@@ -18,7 +18,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | ||||
private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); | private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
/// <summary> | /// <summary> | ||||
@@ -68,6 +69,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
var data = classInfoIBLL.GetPageList(paginationobj, queryJson); | var data = classInfoIBLL.GetPageList(paginationobj, queryJson); | ||||
var studata = stuInfoBasicIBLL.GetAllList(); | |||||
foreach (var item in data) | |||||
{ | |||||
item.StuNum = studata.Where(o => | |||||
o.DeptNo == item.DeptNo && o.MajorNo == item.MajorNo | |||||
&& o.ClassNo == item.ClassNo && o.Grade == item.Grade | |||||
).Count(); | |||||
} | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -29,7 +29,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | <div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | ||||
<div class="lr-form-item-title">学生人数<font face="宋体">*</font></div> | <div class="lr-form-item-title">学生人数<font face="宋体">*</font></div> | ||||
<input id="StuNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
<input id="StuNum" type="text" class="form-control" readonly="readonly" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | <div class="col-xs-6 lr-form-item" data-table="ClassInfo"> | ||||
<div class="lr-form-item-title">班主任</div> | <div class="lr-form-item-title">班主任</div> | ||||
@@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { | |||||
$('#ClassDiredctorNo').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_encode',text: 'f_realname' }); | $('#ClassDiredctorNo').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_encode',text: 'f_realname' }); | ||||
$('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); | $('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); | ||||
$('#IsSeparate').lrDataItemSelect({ code: 'YesOrNoBit' }); | $('#IsSeparate').lrDataItemSelect({ code: 'YesOrNoBit' }); | ||||
$('#ClassType').lrDataItemSelect({ code: 'ClassType' }); | |||||
$('#ClassType').lrDataItemSelect({ code: 'ClassType' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -53,6 +53,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
$('#StuNum').val('0'); | |||||
} | } | ||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||