@@ -863,6 +863,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 全院学生成绩查看 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetScorePageListByStuInfo(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuScoreIBLL.GetScorePageListByStuInfo(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 学生成绩排名 | |||
@@ -10,6 +10,95 @@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" style="min-width:150px"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div class=" btn-group btn-group-sm"> | |||
<script src="~/Content/vue/vue.js"></script> | |||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> | |||
<script src="https://unpkg.com/element-ui/lib/index.js"></script> | |||
<div id="app"> | |||
<a id="timeNoCludes" class="btn btn-default" v-on:click="nocludesVisible = true">时间段排除</a> | |||
<el-dialog title="时间段排除" | |||
:visible.sync="nocludesVisible" | |||
width="500px" | |||
append-to-body | |||
:before-close="handleClose"> | |||
<div v-for="(item,index) in searchNoIncludes" style="padding-bottom:18px;"> | |||
<el-date-picker v-model="item.value" | |||
size="small" | |||
type="datetimerange" | |||
value-format="yyyy-MM-dd HH:mm:ss" | |||
:picker-options="pickerOptions" | |||
range-separator="至" | |||
start-placeholder="开始日期" | |||
end-placeholder="结束日期" | |||
align="right"> | |||
</el-date-picker> | |||
<el-button size="small" | |||
type="warning" | |||
plain | |||
class="el-icon-delete" | |||
v-on:click="delNoIcludes(index)"> | |||
</el-button> | |||
</div> | |||
<div> | |||
<el-button size="small" type="primary" plain v-on:click="addNoCludes">新 增</el-button> | |||
</div> | |||
<span slot="footer" class="dialog-footer"> | |||
<el-button size="small" type="primary" v-on:click="handleClose">确 定</el-button> | |||
</span> | |||
</el-dialog> | |||
</div> | |||
<script> | |||
new Vue({ | |||
el: "#app", | |||
data: { | |||
searchNoIncludes: [{ value: null }], | |||
nocludesVisible: false, | |||
pickerOptions: {}, | |||
begin: '', | |||
end: '', | |||
}, | |||
mounted() { | |||
window.datesearchChange = this.datesearchChange | |||
}, | |||
methods: { | |||
datesearchChange() { | |||
this.begin = $('#datesearch').attr('starttime') | |||
this.end = $('#datesearch').attr('endtime') | |||
this.pickerOptions = { | |||
disabledDate: (e)=> { | |||
let datetime = e.valueOf() | |||
if (datetime >= new Date(this.begin).valueOf() && datetime < new Date(this.end).valueOf()+1000) { | |||
return false | |||
} | |||
return true | |||
} | |||
} | |||
this.searchNoIncludes = [{ value: null }] | |||
this.setDataNoIncludes() | |||
}, | |||
handleClose() { | |||
this.setDataNoIncludes() | |||
this.nocludesVisible = false | |||
}, | |||
addNoCludes() { | |||
this.searchNoIncludes.push({ value: null }) | |||
}, | |||
delNoIcludes(index) { | |||
this.searchNoIncludes.splice(index, 1) | |||
}, | |||
setDataNoIncludes() { | |||
let arr = this.searchNoIncludes.filter(e => { | |||
return e.value && e.value.length | |||
}) | |||
let data = arr.map(e => e.value.toString()) | |||
$('#timeNoCludes').attr("timeNoCludes", data.join("&")) | |||
} | |||
} | |||
}) | |||
</script> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="weeks" style="min-width:150px"></div> | |||
</div> | |||
@@ -53,8 +53,11 @@ var bootstrap = function ($, learun) { | |||
// 默认 | |||
dfvalue: '0', | |||
selectfn: function (begin, end) { | |||
$('#datesearch').attr('starttime', begin) | |||
$('#datesearch').attr('endtime', end) | |||
startTime = begin; | |||
endTime = end; | |||
window.datesearchChange() | |||
} | |||
}); | |||
// 查询 | |||
@@ -166,6 +169,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.noTime = $('#timeNoCludes').attr("timeNoCludes") | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -30,6 +30,10 @@ | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">高/中职</div> | |||
<div id="GZ" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo" type="lrselect" class="lr-select"></div> | |||
@@ -17,6 +17,11 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 360, 400); | |||
$('#GZ').lrselect({ | |||
data: [{ text: "高职", value: "G" }, { text: "中职", value: "Z" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -22,10 +22,10 @@ var bootstrap = function ($, learun) { | |||
p.StuNo = $.trim($('#StuNo').val()); | |||
p.LessonNo = $.trim($('#LessonNo').lrselectGet()); | |||
p.Grade = $.trim($('#Grade').lrselectGet()); | |||
if (p.StuNo == null || p.StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
//if (p.StuNo == null || p.StuNo == "") { | |||
// learun.alert.warning("请输入学号!"); | |||
// return; | |||
//} | |||
page.initGird(); | |||
page.search(p); | |||
@@ -115,13 +115,13 @@ var bootstrap = function ($, learun) { | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScorePageListByStuInfo', | |||
headData: [ | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '专业', name: 'MajorName', width: 100, align: "left" }, | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '年级', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '专业', name: 'MajorName', width: 150, align: "left" }, | |||
{ label: '班级', name: 'ClassName', width: 130, align: "left" }, | |||
{ label: '年级', name: 'Grade', width: 50, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, | |||
@@ -129,14 +129,14 @@ var bootstrap = function ($, learun) { | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||
{ label: '补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||
//{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | |||
{ label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | |||
], | |||
mainId: 'StuNo', | |||
isPage: false, | |||
sidx: '', | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc,Grade desc,MajorNo,ClassNo,StuNo,LessonSortNo,LessonNo', | |||
sord: '', | |||
onRenderComplete: function (data) { | |||
var studyscoreall = 0; | |||
@@ -20,10 +20,10 @@ var bootstrap = function ($, learun) { | |||
p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
p.Semester = $('#Semester').lrselectGet(); | |||
p.StuNo = $.trim($('#StuNo').val()); | |||
if (p.StuNo == null || p.StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
//if (p.StuNo == null || p.StuNo == "") { | |||
// learun.alert.warning("请输入学号!"); | |||
// return; | |||
//} | |||
page.initGird(); | |||
page.search(p); | |||
@@ -71,7 +71,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListRank', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScorePageListByStuInfo', | |||
headData: [ | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
@@ -91,8 +91,8 @@ var bootstrap = function ($, learun) { | |||
{ label: '系排名', name: 'RankIndept', width: 100, align: "left" }, | |||
], | |||
mainId: 'StuNo', | |||
isPage: false, | |||
sidx: '', | |||
isPage: true, | |||
sidx: 'AcademicYearNo desc,Semester desc,Grade desc,MajorNo,ClassNo,StuNo,LessonSortNo,LessonNo', | |||
sord: '', | |||
onRenderComplete: function (data) { | |||
var studyscoreall = 0; | |||
@@ -130,6 +130,11 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
list = list.Where(m => m.F_CompanyId != keyValue).ToList(); | |||
} | |||
if (keyValue == entity.F_ParentId) | |||
{ | |||
return Fail("操作失败,当前项不允许"); | |||
} | |||
if (list.Any(a => a.F_FullName == entity.F_FullName)) | |||
{ | |||
return Fail("学校名称重复"); | |||
@@ -156,8 +161,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
companyIBLL.VirtualDelete(keyValue); | |||
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); | |||
var list = companyIBLL.GetList().Where(x => x.F_ParentId == keyValue && x.F_EnabledMark == 1 && x.F_DeleteMark == 0); | |||
if (list.Count() > 0) | |||
{ | |||
return Fail("删除失败!拥有下辖项不可直接删除"); | |||
} | |||
else | |||
{ | |||
companyIBLL.VirtualDelete(keyValue); | |||
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); | |||
} | |||
} | |||
#endregion | |||
} |
@@ -1,5 +1,6 @@ | |||
using Learun.Application.Organization; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web.Mvc; | |||
@@ -17,6 +18,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||
private CompanyIBLL companyIBLL = new CompanyBLL(); | |||
private static DepartmentIBLL departmentIBLL_static = new DepartmentBLL(); | |||
private static Dictionary<string, DepartmentModel> mapData = departmentIBLL_static.GetModelMap(); | |||
#region 获取视图 | |||
/// <summary> | |||
/// 主页 | |||
@@ -150,6 +153,10 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
return Fail("部门编号已存在!"); | |||
} | |||
} | |||
if (keyValue == entity.F_ParentId) | |||
{ | |||
return Fail("操作失败,当前项不允许"); | |||
} | |||
//发送标识false | |||
entity.SendFlag = false; | |||
departmentIBLL.SaveEntity(keyValue, entity); | |||
@@ -164,8 +171,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
departmentIBLL.VirtualDelete(keyValue); | |||
return Success("删除成功!"); | |||
var list = departmentIBLL.GetAllList().Where(x => x.F_ParentId == keyValue); | |||
if (list.Count() > 0) | |||
{ | |||
return Fail("删除失败!拥有下辖项不可直接删除"); | |||
} | |||
else | |||
{ | |||
departmentIBLL.VirtualDelete(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
} | |||
#endregion | |||
} |
@@ -2274,15 +2274,26 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les | |||
var status = (queryParam["status"] == null ? "0" : queryParam["status"].ToString()).ToInt(); | |||
string starttime = queryParam["StartTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["StartTime"].ToString(); | |||
string endtime = queryParam["EndTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["EndTime"].ToString(); | |||
var notimeSql = string.Empty; | |||
var notimeSql2 = string.Empty; | |||
if (!queryParam["noTime"].IsEmpty()) | |||
{ | |||
foreach (var item in queryParam["noTime"].ToString().Split('&')) | |||
{ | |||
notimeSql += $" and lessondate not between '{item.Split(',')[0]}' and '{item.Split(',')[1]}'"; | |||
notimeSql2 += $" and clocktime not between '{item.Split(',')[0]}' and '{item.Split(',')[1]}'"; | |||
} | |||
} | |||
strSql.Append("select a.*,b.jobrank as zhiwu,b.ProfessionalTitle as zhicheng,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(" + weeks + "*b.Weekcourses) as zhesuan_monthactcourses, "); | |||
strSql.Append(" case when ta.actcourses is null then 0 when b.jobrank in(5,6) then (ta.actcourses-" + weeks + "*b.Weekcourses)*b.feestandard "); | |||
strSql.Append(" when b.jobrank in(1,2,3,4) then (case when ta.actcourses<=(" + weeks + "*b.weekcourses)/2 then ta.actcourses*b.feestandard else " + weeks + "*b.weekcourses*b.feestandard/2 end) "); | |||
strSql.Append(" else 0 end as actfeestandard "); | |||
strSql.Append("from "); | |||
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '" + starttime + "' and '" + endtime + "' group by a.empno,a.empname ) a "); | |||
strSql.Append("left join (select count(*) as actcourses,EmpNo from (select ff.EmpNo,ff.LessonDate,ff.LessonTime from (select aall.* from (select EmpNo,ALTId from Teach_attendance where LessonSortNo='1' and clocktime between '" + starttime + "' and '" + endtime + "' group by EmpNo,ALTId) ee left join ArrangeLessonTerm aall on aall.ALTId=ee.ALTId) ff group by ff.EmpNo,ff.LessonDate,ff.LessonTime) gg group by gg.EmpNo ) ta on ta.empno=a.empno "); | |||
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '" + starttime + "' and '" + endtime + "' " + notimeSql + " group by a.empno,a.empname ) a "); | |||
strSql.Append("left join (select count(*) as actcourses,EmpNo from (select ff.EmpNo,ff.LessonDate,ff.LessonTime from (select aall.* from (select EmpNo,ALTId from Teach_attendance where LessonSortNo='1' and clocktime between '" + starttime + "' and '" + endtime + "' " + notimeSql2 + " group by EmpNo,ALTId) ee left join ArrangeLessonTerm aall on aall.ALTId=ee.ALTId) ff group by ff.EmpNo,ff.LessonDate,ff.LessonTime) gg group by gg.EmpNo ) ta on ta.empno=a.empno "); | |||
strSql.Append("left join empinfo b on a.empno=b.empno "); | |||
strSql.Append("where a.empno is not null and (b.IsInActiveStatus="+status+" or (0="+status+ " and b.IsInActiveStatus!=2)) "); | |||
strSql.Append("where a.empno is not null and (b.IsInActiveStatus=" + status + " or (0=" + status + " and b.IsInActiveStatus!=2)) "); | |||
if (!string.IsNullOrEmpty(deptNo)) | |||
{ | |||
strSql.Append("and b.F_DepartmentId='" + deptNo + "' "); | |||
@@ -95,6 +95,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["GZ"].IsEmpty()) | |||
{ | |||
dp.Add("GZ", queryParam["GZ"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.MajorNo Like @GZ "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<OpenLessonPlanEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -781,6 +781,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表,带分页 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<StuScoreEntity> GetScorePageListByStuInfo(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuScoreService.GetScorePageListByStuInfo(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表 | |||
@@ -191,6 +191,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
IEnumerable<StuScoreEntity> GetScoreListByStuInfo(string queryJson); | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表,带分页 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
IEnumerable<StuScoreEntity> GetScorePageListByStuInfo(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表 | |||
@@ -2245,7 +2245,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
tableName = queryParam["TableName"].ToString(); | |||
} | |||
var strSql = new StringBuilder(); | |||
strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||
strSql.Append(" select bb.Grade,bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||
strSql.Append(" from ( "); | |||
strSql.Append($"select sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); | |||
strSql.Append(" where 1=1 and s.CheckMark='1' "); | |||
@@ -2354,6 +2354,96 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
} | |||
} | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表,带分页 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<StuScoreEntity> GetScorePageListByStuInfo(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
//参考写法 | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
var tableName = "StuScore"; | |||
if (!queryParam["TableName"].IsEmpty()) | |||
{ | |||
tableName = queryParam["TableName"].ToString(); | |||
} | |||
var strSql = new StringBuilder(); | |||
strSql.Append(" select bb.Grade,bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,bb.DeptNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); | |||
strSql.Append(@" ,(select cc.majorrank from | |||
(select StuNo, SUM(Score) as totalscore, ROW_NUMBER() over(order by SUM(Score) desc) as majorrank | |||
from StuScore c where c.CheckMark = '1' and c.LessonSortNo = '1' and c.MajorNo = bb.MajorNo and c.AcademicYearNo = bb.AcademicYearNo and c.Semester = bb.Semester | |||
group by c.StuNo) cc where cc.StuNo = bb.StuNo) as RankInMajor "); | |||
strSql.Append(@" ,(select cc.majorrank from | |||
(select StuNo, SUM(Score) as totalscore, ROW_NUMBER() over(order by SUM(Score) desc) as majorrank | |||
from StuScore c where c.CheckMark = '1' and c.LessonSortNo = '1' and c.ClassNo = bb.ClassNo and c.AcademicYearNo = bb.AcademicYearNo and c.Semester = bb.Semester | |||
group by c.StuNo) cc where cc.StuNo = bb.StuNo) as RankInClass "); | |||
strSql.Append(@" ,(select cc.majorrank from | |||
(select StuNo, SUM(Score) as totalscore, ROW_NUMBER() over(order by SUM(Score) desc) as majorrank | |||
from StuScore c where c.CheckMark = '1' and c.LessonSortNo = '1' and c.DeptNo = bb.DeptNo and c.AcademicYearNo = bb.AcademicYearNo and c.Semester = bb.Semester | |||
group by c.StuNo) cc where cc.StuNo = bb.StuNo) as RankIndept "); | |||
strSql.Append(" from ( "); | |||
strSql.Append($"select sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,s.DeptNo,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); | |||
strSql.Append(" where 1=1 and s.CheckMark='1' "); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||
strSql.Append(" and s.AcademicYearNo=@AcademicYearNo "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||
strSql.Append(" and s.Semester=@Semester "); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | |||
strSql.Append(" and s.StuNo=@StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String); | |||
strSql.Append(" and s.StuName=@StuName "); | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||
strSql.Append(" and s.LessonNo=@LessonNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" and sb.Grade=@Grade "); | |||
} | |||
strSql.Append(" group by sb.Grade,s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,s.DeptNo ) as bb "); | |||
strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.LessonSortNo=sp.LessonSortNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo and sp.CheckMark = '1' "); | |||
strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.LessonSortNo=spt.LessonSortNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo and spt.CheckMark = '1' "); | |||
strSql.Append(" left join CdLessonSort ls on bb.LessonSortNo= ls.LessonSortNo "); | |||
strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); | |||
strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); | |||
strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); | |||
strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.ltid and lt.LTEnabled='1' "); | |||
var result = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(strSql.ToString(), dp, pagination); | |||
return result; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 根据学号/姓名获取学生成绩列表 | |||
@@ -2909,13 +2999,13 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
var kclx = queryParam["LessonType"].ToString(); | |||
sql = sql + $" and d.LTId='{kclx}' "; | |||
} | |||
var ls = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(sql).GroupBy(x => new { x.ClassNo, x.LessonNo }).Select(x => new StuScoreEntity { ClassNo = x.Key.ClassNo, LessonNo = x.Key.LessonNo, LessonName = x.FirstOrDefault().LessonName, AcademicYearNo = x.FirstOrDefault().AcademicYearNo, Semester = x.FirstOrDefault().Semester, DeptNo = x.FirstOrDefault().DeptNo, Grade = x.FirstOrDefault().Grade, LessonTypeName = x.FirstOrDefault().LessonTypeName, EmpName = x.FirstOrDefault().EmpName, EmpNo = x.FirstOrDefault().EmpNo, ModifyUserId = x.FirstOrDefault().ModifyUserId, ModifyUserName = x.FirstOrDefault().ModifyUserName, LessonTypeId=x.FirstOrDefault().LessonTypeId,ScoreId=x.FirstOrDefault().ScoreId, CheckMark = x.All(a => a.CheckMark == "1") ? "1" : "0" }); | |||
var ls = this.BaseRepository("CollegeMIS").FindList<StuScoreEntity>(sql).GroupBy(x => new { x.ClassNo, x.LessonNo }).Select(x => new StuScoreEntity { ClassNo = x.Key.ClassNo, LessonNo = x.Key.LessonNo, LessonName = x.FirstOrDefault().LessonName, AcademicYearNo = x.FirstOrDefault().AcademicYearNo, Semester = x.FirstOrDefault().Semester, DeptNo = x.FirstOrDefault().DeptNo, Grade = x.FirstOrDefault().Grade, LessonTypeName = x.FirstOrDefault().LessonTypeName, EmpName = x.FirstOrDefault().EmpName, EmpNo = x.FirstOrDefault().EmpNo, ModifyUserId = x.FirstOrDefault().ModifyUserId, ModifyUserName = x.FirstOrDefault().ModifyUserName, LessonTypeId = x.FirstOrDefault().LessonTypeId, ScoreId = x.FirstOrDefault().ScoreId, CheckMark = x.All(a => a.CheckMark == "1") ? "1" : "0" }); | |||
if (!queryParam["Stat"].IsEmpty()) | |||
{ | |||
var zt = queryParam["Stat"].ToString(); | |||
ls=ls.Where(x=>x.CheckMark==zt); | |||
ls = ls.Where(x => x.CheckMark == zt); | |||
} | |||
@@ -5,6 +5,13 @@ | |||
// 考虑到用户刷新网页时会丢失全局数据、页面栈、页面数据等,因此直接跳回首页即可 | |||
async onLaunch(param) { | |||
// 版本更新 | |||
var newVer = '1.0.2'; | |||
var oldVer = localStorage.getItem('version'); | |||
if (newVer != oldVer) { | |||
localStorage.setItem('version', newVer); | |||
this.JUMP_TO("/") | |||
} | |||
// 加载百度地图资源 | |||
let ak = this.GET_AK() | |||
var script = document.createElement('script'); | |||
@@ -31,6 +31,9 @@ | |||
<view style="color: #666;"> | |||
{{postData.ClockPlace}} | |||
</view> | |||
<view class="wifiCard" v-if="info.AttendanceType != 5&isInternalNet"> | |||
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="footer"> | |||
@@ -93,6 +96,8 @@ | |||
postData: {}, | |||
isGetingLocal:false, | |||
// modal:false, | |||
isInternalNet:false, | |||
} | |||
}, | |||
@@ -103,6 +108,7 @@ | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.isInternalNetwork(false) | |||
this.LOADING('加载数据中...') | |||
this.now = this.getCurrentTime() | |||
@@ -314,6 +320,26 @@ | |||
toAttendanceCardTeacher() { | |||
this.JUMP_TO('/pages/AttendanceCardTeacher/list', {},true) | |||
}, | |||
// 判断是否学校网络 | |||
isInternalNetwork(TOAST=true){ | |||
this.LOADING() | |||
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ | |||
this.HIDE_LOADING() | |||
let res_ = res[1] | |||
let client_ip_start = '1.190.222.' | |||
let arr = [] | |||
for(let i=34;i<47;i++){ | |||
arr.push(client_ip_start+i) | |||
} | |||
if(res_.data&&arr.includes(res_.data.client_ip)){ | |||
this.isInternalNet = true | |||
let postData = {AIsOut:0,ClockPlace:'已连接校园网'} | |||
TOAST&&this.NAV_TO(`./single_zc`,postData,true) | |||
}else{ | |||
TOAST&&this.TOAST('未检测到校园网连接') | |||
} | |||
}) | |||
}, | |||
}, | |||
destroyed() { | |||
// let scirpt = document.getElementById('baiduScript') | |||
@@ -431,4 +457,13 @@ | |||
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |||
filter: gray; | |||
} | |||
.wifiCard{ | |||
margin-top: 6px; | |||
font-size: 14px; | |||
text-align: center; | |||
span{ | |||
color: #0c86d8; | |||
} | |||
} | |||
</style> |
@@ -40,6 +40,9 @@ | |||
<view> | |||
{{postData.ClockPlace}} | |||
</view> | |||
<view class="wifiCard" v-if="info.AttendanceType != 5&isInternalNet"> | |||
定位不精准?<span @click="isInternalNetwork">WIFI信息打卡</span> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -97,6 +100,8 @@ | |||
map: null, | |||
postData: {}, | |||
isGetingLocal:false, | |||
isInternalNet:false, | |||
} | |||
}, | |||
@@ -107,6 +112,7 @@ | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.isInternalNetwork(false) | |||
this.LOADING('加载数据中...') | |||
this.now = this.getCurrentTime() | |||
@@ -312,7 +318,27 @@ | |||
}) | |||
}); | |||
} | |||
}, | |||
// 判断是否学校网络 | |||
isInternalNetwork(TOAST=true){ | |||
this.LOADING() | |||
this.requestBase("https://mp.weixin.qq.com/intp/getuserclientip").then(res=>{ | |||
this.HIDE_LOADING() | |||
let res_ = res[1] | |||
let client_ip_start = '1.190.222.' | |||
let arr = [] | |||
for(let i=34;i<47;i++){ | |||
arr.push(client_ip_start+i) | |||
} | |||
if(res_.data&&arr.includes(res_.data.client_ip)){ | |||
this.isInternalNet = true | |||
let postData = {AIsOut:0,ClockPlace:'已连接校园网'} | |||
TOAST&&this.NAV_TO(`./single_zc`,postData,true) | |||
}else{ | |||
TOAST&&this.TOAST('未检测到校园网连接') | |||
} | |||
}) | |||
}, | |||
}, | |||
destroyed() { | |||
let scirpt = document.getElementById('baiduScript') | |||
@@ -430,4 +456,13 @@ | |||
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |||
filter: gray; | |||
} | |||
.wifiCard{ | |||
margin-top: 6px; | |||
font-size: 14px; | |||
text-align: center; | |||
span{ | |||
color: #0c86d8; | |||
} | |||
} | |||
</style> |
@@ -14,7 +14,7 @@ module.exports = { | |||
disableHostCheck: true | |||
}, | |||
output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】 | |||
filename: `${filePath}[name]${Timestamp}.js`, | |||
filename: `${filePath}[name]${Timestamp}.js?v=1.0.2`, | |||
chunkFilename: `${filePath}[name]${Timestamp}.js` | |||
}, | |||
} | |||