浏览代码

班级人数和学生学籍人数一致

临城职教中职
ndbs 2 年前
父节点
当前提交
28708e7ad2
共有 3 个文件被更改,包括 13 次插入3 次删除
  1. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml
  3. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js

+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs 查看文件

@@ -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,


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml 查看文件

@@ -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>


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js 查看文件

@@ -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');
} }
}; };
// 保存数据 // 保存数据


正在加载...
取消
保存