From 28708e7ad27980b240663f0c5c40f746063c9bbd Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 11:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BA=BA=E6=95=B0=E5=92=8C?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=AD=A6=E7=B1=8D=E4=BA=BA=E6=95=B0=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ClassInfoController.cs | 11 ++++++++++- .../Views/ClassInfo/Form.cshtml | 2 +- .../EducationalAdministration/Views/ClassInfo/Form.js | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs index 78a9cde53..a25982bb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs +++ b/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 ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); - + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + #region 视图功能 /// @@ -68,6 +69,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); 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 { rows = data, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml index ece15903d..4381b907b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml @@ -29,7 +29,7 @@
学生人数*
- +
班主任
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js index 222eebbcf..dbb4686dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js +++ b/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' }); $('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#IsSeparate').lrDataItemSelect({ code: 'YesOrNoBit' }); - $('#ClassType').lrDataItemSelect({ code: 'ClassType' }); + $('#ClassType').lrDataItemSelect({ code: 'ClassType' }); }, initData: function () { if (!!keyValue) { @@ -53,6 +53,7 @@ var bootstrap = function ($, learun) { } }); } + $('#StuNum').val('0'); } }; // 保存数据