From ac221c933dfa44bc6868858c8c3f24745133be32 Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 10:50:50 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E7=BB=99=E5=AD=A6=E7=B1=8D=E5=BC=82?= =?UTF-8?q?=E5=8A=A8=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=8A=A8=E5=89=8D=E5=92=8C?= =?UTF-8?q?=E5=BC=82=E5=8A=A8=E5=90=8E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasicChangeController.cs | 18 ++ .../Views/StuInfoBasicChange/Form.cshtml | 8 +- .../Views/StuInfoBasicChange/Form.js | 43 +++- .../Views/StuInfoBasicChange/Formafter.cshtml | 50 ++++ .../Views/StuInfoBasicChange/Formafter.js | 206 +++++++++++++++++ .../StuInfoBasicChange/Formbefore.cshtml | 44 ++++ .../Views/StuInfoBasicChange/Formbefore.js | 215 ++++++++++++++++++ .../Views/StuInfoBasicChange/Index.cshtml | 2 + .../Views/StuInfoBasicChange/Index.js | 34 +++ .../Learun.Application.Web.csproj | 4 + .../StuInfoBasicChangeEntity.cs | 7 +- 11 files changed, 622 insertions(+), 9 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formafter.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formafter.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formbefore.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formbefore.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index cecc15137..f699ac48a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -47,6 +47,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 表单查看页 + /// + /// + [HttpGet] + public ActionResult Formbefore() + { + return View(); + } + /// + /// 表单查看页 + /// + /// + [HttpGet] + public ActionResult Formafter() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml index 14626a53b..d2f7a5b15 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml @@ -39,7 +39,13 @@
班级*
- +
转出学校
+
学籍新安排
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js index 1334b21eb..24033455e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js @@ -108,6 +108,38 @@ var bootstrap = function ($, learun) { }); } }); + // 异动前学籍信息 + $('#lr_before').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + learun.layerForm({ + id: 'form', + title: '异动前学籍信息', + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Formbefore?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + }, + btn: null + }); + }); + // 异动后学籍信息 + $('#lr_after').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '异动前学籍信息', + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Formafter?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + }, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -222,6 +254,8 @@ var bootstrap = function ($, learun) { { label: "创建用户", name: "CreateUserId", width: 100, align: "left" }, { label: "审核时间", name: "CheckTime", width: 130, align: "left" }, { label: "审核用户", name: "CheckUserId", width: 100, align: "left" }, + { label: "转出学校", name: "OutSchool", width: 200, align: "left" }, + { label: "备注", name: "StuChangeRemark", width: 200, align: "left" }, { label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 75b9fc77e..a3adf6926 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1078,6 +1078,8 @@ + + @@ -7551,6 +7553,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs index 4e04ce9f7..b58c8c2b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-10-28 11:48 /// 描 述:学籍异动 ///
- public class StuInfoBasicChangeEntity + public class StuInfoBasicChangeEntity { #region 实体成员 /// @@ -99,6 +99,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CHECKSTATUS")] public int? CheckStatus { get; set; } + /// + /// 转出学校 + /// + [Column("OUTSCHOOL")] + public string OutSchool { get; set; } #endregion #region 扩展操作 From 28708e7ad27980b240663f0c5c40f746063c9bbd Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 11:38:10 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BA=BA=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E5=AD=A6=E7=94=9F=E5=AD=A6=E7=B1=8D=E4=BA=BA=E6=95=B0?= =?UTF-8?q?=E4=B8=80=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'); } }; // 保存数据 From 399714f0be22ef16f670dda8a70070842f4326d8 Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 14:17:27 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=AD=A6=E7=B1=8D?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=8C=E8=BE=B9=E6=B7=BB=E5=8A=A0=E7=9C=81?= =?UTF-8?q?=E7=BC=96=E5=AD=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Form.cshtml | 4 ++++ .../Views/StuInfoBasic/Index.js | 1 + .../Views/StuVolunteer/Form.cshtml | 10 +++++++--- .../Views/StuVolunteer/Index.js | 9 +++++---- .../StuInfoBasic/StuInfoBasicEntity.cs | 6 ++++++ .../StuVolunteer/StuVolunteerEntity.cs | 5 +++++ .../StuVolunteer/StuVolunteerService.cs | 10 +++++----- 7 files changed, 33 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index cca53fdce..63711fe01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -23,6 +23,10 @@
通知书号*
+
+
省编学号
+ +
身份证号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index f5f544879..bb7223822 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -225,6 +225,7 @@ var bootstrap = function ($, learun) { headData: [ { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "学籍号", name: "StuCode", width: 100, align: "left" }, + { label: "省编学号", name: "ProvinceCode", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 80, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml index c7e58b257..475180aca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml @@ -19,15 +19,19 @@
报名号*
-
+
+
省编学号
+ +
+
学生姓名*
-
+
性别*
-
+
中考总分*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js index 9ed573a15..7d630e802 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js @@ -27,8 +27,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form', - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -46,8 +46,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/Form?keyValue=' + keyValue, - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -81,6 +81,7 @@ var bootstrap = function ($, learun) { { label: "毕业学校", name: "BySchool", width: 150, align: "left" }, { label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" }, { label: "报名号", name: "ApplyNo", width: 150, align: "left" }, + { label: "省编学号", name: "ProvinceCode", width: 150, align: "left" }, { label: "学生姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "Sex", width: 100, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs index 88606a2b6..8ecf1a84b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs @@ -708,6 +708,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("TWOPOSITION")] public string TwoPosition { get; set; } + /// + /// 省编学号 + /// + [Column("PROVINCECODE")] + + public string ProvinceCode { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs index d6aef3475..8ea525103 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs @@ -251,6 +251,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("LINKPHONE")] public string LinkPhone { get; set; } + /// + /// 省编学号 + /// + [Column("PROVINCECODE")] + public string ProvinceCode { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs index 5eae36568..5d9689f7b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs @@ -324,11 +324,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.ExecuteBySql(updSql); string addSql = @"insert into StuInfoBasic ( -Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore -) -select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore -from StuVolunteer t where t.ClassStatus=1 -and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) "; + Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore,ProvinceCode + ) + select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore,ProvinceCode + from StuVolunteer t where t.ClassStatus=1 + and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) "; db.ExecuteBySql(addSql); db.Commit(); From 0c66dec0d9b415277c110c90891aad13075db3fe Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 16:21:48 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E8=BD=AC=E5=85=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=9F=E6=88=90=E5=AD=A6=E7=B1=8D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasicChangeController.cs | 15 +++++++++++ .../Views/StuInfoBasic/Form.cshtml | 2 +- .../Views/StuInfoBasicChange/Index.cshtml | 1 + .../Views/StuInfoBasicChange/Index.js | 22 ++++++++++++++++ .../StuInfoBasicChangeBLL.cs | 24 +++++++++++++++++ .../StuInfoBasicChangeIBLL.cs | 8 +++++- .../StuInfoBasicChangeService.cs | 26 +++++++++++++++++-- 7 files changed, 94 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index f699ac48a..dcf285011 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -166,6 +166,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.DoUnCheck(keyValue); return Success("操作成功!"); } + + /// + /// 生成学籍 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult GenerateStu(string stuNo) + { + stuInfoBasicChangeIBLL.GenerateStu(stuNo); + return Success("生成成功!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index 63711fe01..66e5e6da3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -25,7 +25,7 @@
省编学号
- +
身份证号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml index 13363e638..7adba77f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml @@ -30,6 +30,7 @@  去审核  异动前信息  异动后信息 +  生成学籍
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js index 24033455e..e7bb6daec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js @@ -140,6 +140,28 @@ var bootstrap = function ($, learun) { }); } }); + $('#lr_stuCode').on('click', function () { + var StuNo = $('#gridtable').jfGridValue('StuNo'); + if (learun.checkrow(StuNo)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus != 1) { + learun.alert.warning("当前项目未审核无法去审!"); + return; + } + var StuChangeType = $('#gridtable').jfGridValue('StuChangeType'); + if (StuChangeType != "02") { + learun.alert.warning("只有转入学生才可生成学籍!"); + return; + } + learun.layerConfirm('是否确认生成学籍!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/GenerateStu', { stuNo: StuNo }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs index c3076b071..ea78f808d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs @@ -165,6 +165,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 生成学籍 + /// 主键 + /// + /// + public void GenerateStu(string stuNo) + { + try + { + stuInfoBasicChangeService.GenerateStu(stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs index 3380c21a7..7935e6ff0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs @@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); - + /// /// 审核实体数据 /// 主键 @@ -57,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DoUnCheck(string keyValue); + /// + /// 生成学籍 + /// + /// + void GenerateStu(string stuNo); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs index 5fb126220..739d03722 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs @@ -153,7 +153,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (entity != null) { //处理数据 - if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 + if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 { //改信息; var classInfoEntity = db.FindEntity(x => x.ClassNo == entity.NewClassNo); @@ -162,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); } } - else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学 + else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学 { //改信息;不显示成绩; db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); @@ -237,6 +237,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public void GenerateStu(string stuNo) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(s => s.StuNo == stuNo); + entity.StuCode = "G" + entity.IdentityCardNo; + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } From 4fe6597a5da06b08fc6c5052a8ff2abdad2442c8 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 24 Jan 2022 09:24:47 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasicChangeController.cs | 34 +-- .../Views/StuInfoBasicChange/Form.cshtml | 4 +- .../Views/StuInfoBasicChange/Formafter.cshtml | 50 ---- .../Views/StuInfoBasicChange/Formafter.js | 206 ----------------- .../StuInfoBasicChange/Formbefore.cshtml | 44 ---- .../Views/StuInfoBasicChange/Formbefore.js | 215 ------------------ .../Views/StuInfoBasicChange/Index.cshtml | 3 - .../Views/StuInfoBasicChange/Index.js | 54 ----- .../Views/StuInfoBasic_ChangeLog/Index.js | 26 ++- .../Learun.Application.Web.csproj | 4 - .../StuInfoBasicChangeBLL.cs | 23 -- .../StuInfoBasicChangeIBLL.cs | 5 - .../StuInfoBasicChangeService.cs | 22 -- 13 files changed, 23 insertions(+), 667 deletions(-) delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formafter.cshtml delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formafter.js delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formbefore.cshtml delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Formbefore.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index dcf285011..952067fec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -47,24 +47,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - /// - /// 表单查看页 - /// - /// - [HttpGet] - public ActionResult Formbefore() - { - return View(); - } - /// - /// 表单查看页 - /// - /// - [HttpGet] - public ActionResult Formafter() - { - return View(); - } #endregion #region 获取数据 @@ -140,7 +122,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } - + /// /// 审核实体数据 /// 主键 @@ -167,20 +149,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("操作成功!"); } - /// - /// 生成学籍 - /// 主键 - /// - /// - [HttpPost] - [AjaxOnly] - - public ActionResult GenerateStu(string stuNo) - { - stuInfoBasicChangeIBLL.GenerateStu(stuNo); - return Success("生成成功!"); - } - #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml index d2f7a5b15..ea287be9c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml @@ -26,7 +26,7 @@
-
学籍原安排
+
学籍异动前信息
系部*
@@ -46,7 +46,7 @@
-
学籍新安排
+
学籍异动后信息
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js index e7bb6daec..bca4b9019 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js @@ -108,60 +108,6 @@ var bootstrap = function ($, learun) { }); } }); - // 异动前学籍信息 - $('#lr_before').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - learun.layerForm({ - id: 'form', - title: '异动前学籍信息', - url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Formbefore?keyValue=' + keyValue, - width: 800, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - }, - btn: null - }); - }); - // 异动后学籍信息 - $('#lr_after').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '异动前学籍信息', - url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Formafter?keyValue=' + keyValue, - width: 800, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - }, - btn: null - }); - } - }); - $('#lr_stuCode').on('click', function () { - var StuNo = $('#gridtable').jfGridValue('StuNo'); - if (learun.checkrow(StuNo)) { - var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); - if (CheckStatus != 1) { - learun.alert.warning("当前项目未审核无法去审!"); - return; - } - var StuChangeType = $('#gridtable').jfGridValue('StuChangeType'); - if (StuChangeType != "02") { - learun.alert.warning("只有转入学生才可生成学籍!"); - return; - } - learun.layerConfirm('是否确认生成学籍!', function (res) { - if (res) { - learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/GenerateStu', { stuNo: StuNo }, function () { - refreshGirdData(); - }); - } - }); - } - }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js index ec5b613a4..7ff4fcd7a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js @@ -101,15 +101,29 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', headData: [ + { label: "修改属性", name: "FieldName", width: 200, align: "left" }, + { label: "修改前", name: "BeforeChange", width: 200, align: "left" }, + { label: "修改后", name: "AfterChange", width: 200, align: "left" }, + { + label: "修改人", name: "UpdateBy", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_account', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + + }, + { label: "修改时间", name: "UpdateTime", width: 200, align: "left" }, { label: "数据主键", name: "StuID", width: 250, align: "left" }, - { label: "字段", name: "FieldName", width: 100, align: "left" }, - { label: "修改前", name: "BeforeChange", width: 100, align: "left" }, - { label: "修改后", name: "AfterChange", width: 100, align: "left" }, - { label: "修改人", name: "UpdateBy", width: 100, align: "left" }, - { label: "修改时间", name: "UpdateTime", width: 100, align: "left" }, ], mainId: 'ID', - isPage: true + isPage: true, + sidx: 'UpdateTime desc', }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index a3adf6926..75b9fc77e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1078,8 +1078,6 @@ - - @@ -7553,8 +7551,6 @@ - - diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs index ea78f808d..2372848e8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs @@ -166,29 +166,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - /// - /// 生成学籍 - /// 主键 - /// - /// - public void GenerateStu(string stuNo) - { - try - { - stuInfoBasicChangeService.GenerateStu(stuNo); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowBusinessException(ex); - } - } - } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs index 7935e6ff0..0b89d4c67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs @@ -57,11 +57,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DoUnCheck(string keyValue); - /// - /// 生成学籍 - /// - /// - void GenerateStu(string stuNo); #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs index 739d03722..17f8e9173 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs @@ -237,28 +237,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - - public void GenerateStu(string stuNo) - { - try - { - var entity = this.BaseRepository("CollegeMIS").FindEntity(s => s.StuNo == stuNo); - entity.StuCode = "G" + entity.IdentityCardNo; - this.BaseRepository("CollegeMIS").Update(entity); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - #endregion } From 65c8e0ee491e5d8e08947c22f6a62e950fd94924 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 24 Jan 2022 11:01:53 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8?= =?UTF-8?q?=E8=BD=AC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoBasicController.cs | 9 + .../Views/StuInfoBasic/FormTran.cshtml | 204 +++++++++++++++++ .../Views/StuInfoBasic/FormTran.js | 205 ++++++++++++++++++ .../Views/StuInfoBasic/Index.cshtml | 1 + .../Views/StuInfoBasic/Index.js | 27 ++- .../Learun.Application.Web.csproj | 2 + .../StuInfoBasic/StuInfoBasicEntity.cs | 2 +- .../StuInfoBasic/StuInfoBasicService.cs | 21 ++ 8 files changed, 463 insertions(+), 8 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index bb578e616..9f0477867 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -91,6 +91,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 异动转入 + /// + /// + public ActionResult FormTran() + { + return View(); + } + /// /// 学生列表【班级信息管理】 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml new file mode 100644 index 000000000..8854572f9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.cshtml @@ -0,0 +1,204 @@ +@{ + ViewBag.Title = "学生学籍"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学校*
+
+
+
+
学号*
+ +
+
+
学籍号
+ +
+
+
考生号*
+ +
+
+
通知书号*
+ +
+
+
省编学号
+ +
+
+
身份证号*
+ +
+
+
姓名*
+ +
+
+
民族*
+
+
+
+
性别*
+
+
+
+
疫情状态
+
+
+
+
政治面貌
+
+
+
+
出生日期*
+ +
+
+
健康状况
+
+
+
+
户口分类
+
+
+
+
籍贯
+
+
+
+
+
+
+
+
照片
+
+
+
+
联系电话*
+ +
+
+
E-mail
+ +
+
+
通信地址*
+ +
+
+
邮政编码*
+ +
+
+
户口所在地
+ +
+
+
档案所在地
+ +
+
+
父亲姓名*
+ +
+
+
父亲电话*
+ +
+
+
母亲姓名*
+ +
+
+
母亲电话*
+ +
+
+
家庭出身
+
+
+
+
港澳台侨
+
+
+
+
年级*
+
+
+
+
本专科
+
+
+
+
学制
+
+
+
+
报到日期*
+ +
+
+
学习形式
+
+
+
+
毕业证号
+ +
+
+
毕业日期
+ +
+
+
系所*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
入学年月*
+ +
+
+
入党时间
+ +
+
+
入团时间
+ +
+
+
校内地址
+ +
+
+
校内电话
+ +
+
+
QQ
+ +
+
+
特长
+ +
+
+
备注
+ +
+
+
毕业证书备注
+ + +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js new file mode 100644 index 000000000..c3a4fa33e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js @@ -0,0 +1,205 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-02-21 16:53 + * 描 述:学生学籍 + */ +var acceptClick; +var keyValue = request('keyValue'); +var isStudent = request('isStudent'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + page.hide(); + }, + hide: function () { + if (isStudent == "1") { + $("#StuName").parent().hide(); + $("#IdentityCardNo").parent().hide(); + $("#StuNo").parent().hide(); + $("#ClassNo").parent().hide(); + $("#MajorNo").parent().hide(); + $("#EduSystem").parent().hide(); + $("#F_SchoolId").parent().hide(); + $("#StuCode").parent().hide(); + $("#ksh").parent().hide(); + $("#NoticeNo").parent().hide(); + $("#HealthStatusNo").parent().hide(); + $("#ResidenceNo").parent().hide(); + $("#F_ProvinceId").parent().parent().hide(); + $("#Photo").parent().hide(); + $("#DeptNo").parent().hide(); + $("#FamilyOriginNo").parent().hide(); + $("#OverseasChineseNo").parent().hide(); + $("#Grade").parent().hide(); + $("#GraduateNo").parent().hide(); + $("#EduSystem").parent().hide(); + $("#RegisterDate").parent().hide(); + $("#StudyModality").parent().hide(); + $("#GraduateYear").parent().hide(); + $("#EntranceDate").parent().hide(); + $("#JoinPartyDate").parent().hide(); + $("#JoinLeagueDate").parent().hide(); + $("#InSchoolAddress").parent().hide(); + $("#InSchoolTelephone").parent().hide(); + $("#Remark").parent().hide(); + $("#DiplomaRemark").parent().hide(); + $("#GoodAt").parent().hide(); + $("#InSchoolAddress").parent().hide(); + $("#InSchoolTelephone").parent().hide(); + $("#JoinLeagueDate").parent().hide(); + } + }, + bind: function () { + $('#F_ProvinceId').lrDataSourceSelect({ + code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', + select: function (item) { + if (item) { + $('#F_CityId').lrselectRefresh({ + url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode", + param: { ProvinceCode: item.pcode }, + value: 'CCODE', + text: 'CNAME' + }); + } else { + $('#F_CityId').lrselectRefresh({ + url: "", + data: [] + }); + } + $('#F_CountyId').lrselectRefresh({ + url: "", + data: [] + }); + } + }); + $('#F_CityId').lrselect({ + value: 'ccode', text: 'cname', + select: function (item) { + if (item) { + $('#F_CountyId').lrselectRefresh({ + url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", + param: { cityCode: item.CCODE }, + value: 'ACODE', + text: 'ANAME' + }); + } + } + }); + $('#F_CountyId').lrselect({ + value: 'ACODE', text: 'ANAME' + }); + $('#ClassNo').lrselect({ + value: "classno", + text: "classname" + }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: 'value', + text: 'text' + }); + $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); + $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); + $('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' }); + $('#HealthStatusNo').lrDataSourceSelect({ code: 'BCdHealthStatus', value: 'healthstatusno', text: 'healthstatus' }); + $('#Photo').lrUploader(); + $('#FamilyOriginNo').lrDataSourceSelect({ code: 'BCdFamilyOrigin', value: 'familyoriginno', text: 'familyorigin' }); + $('#OverseasChineseNo').lrDataSourceSelect({ code: 'BCdOverseasChinese', value: 'overseaschineseno', text: 'overseaschinesename' }); + $('#GraduateNo').lrDataItemSelect({ code: 'CollegeType' }); + $('#EduSystem').lrDataItemSelect({ code: 'EduSystem' }); + $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); + $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); + $('#DeptNo').lrselect({ + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } + }); + } + else { + $('#MajorNo').lrselectRefresh({ + url: "", + data: [] + }); + } + $('#ClassNo').lrselectRefresh({ + url: "", + data: [] + }); + } + }); + $('#MajorNo').lrselect({ + value: "majorno", + text: "majorname", + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', + param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } + }); + } + + } + }); + + + $('#MajorNo').on("click", + function () { + var data = $('#DeptNo').lrselectGet(); + if (!data) { + learun.alert.error('请先选择系'); + } + }); + $('#ClassNo').on("click", + function () { + var data1 = $('#DeptNo').lrselectGet(); + var data2 = $('#MajorNo').lrselectGet(); + if (!data1 || !data2) { + learun.alert.error('请先选择系和专业'); + } + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + $('#IsTran').val('0'); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index 85e50b95a..26fa92a7c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -40,6 +40,7 @@
 录入 +  异动转入  修改  删除  查看 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index bb7223822..632c45f9c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -37,6 +37,19 @@ var bootstrap = function ($, learun) { } }); }); + // 异动转入 + $('#lt_transaction').on('click', function () { + learun.layerForm({ + id: 'form', + title: '异动转入', + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FormTran', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); @@ -169,7 +182,7 @@ var bootstrap = function ($, learun) { } }) }) - + //查看异动 $("#lr_searchChange").on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); @@ -346,12 +359,12 @@ var bootstrap = function ($, learun) { { label: "联系电话", name: "mobile", width: 100, align: "left" }, { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, - { - label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center", - formatter: function (cellvalue) { - return cellvalue == "1" ? "" : ""; - } - }, + //{ + // label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center", + // formatter: function (cellvalue) { + // return cellvalue == "1" ? "" : ""; + // } + //}, { label: "审核状态", name: "CheckMark", width: 80, align: "center", formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 75b9fc77e..004135c32 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1081,6 +1081,7 @@ + @@ -7551,6 +7552,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs index 8ecf1a84b..2daf2e7f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs @@ -742,7 +742,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public List StuPunishmentList { get; set; } [NotMapped] public List StuScoreClassOneList { get; set; } - + [NotMapped] public string IsTran { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index a31760d11..9b6f0d8ec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -681,6 +681,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration else { entity.Create(); + if (entity.IsTran == "0") + { + StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity + { + Id = Guid.NewGuid().ToString(), + StuNo = entity.StuNo, + StuName = entity.StuName, + DeptNo = entity.DeptNo, + MajorNo = entity.MajorNo, + ClassNo = entity.ClassNo, + StuChangeRemark = entity.Remark, + NewDeptNo = entity.DeptNo, + NewMajorNo = entity.MajorNo, + NewClassNo = entity.ClassNo, + CreateUserId = entity.StuNo, + StuChangeType = "04", + StuChangeReason = "10", + CreateTime = DateTime.Now, + }; + this.BaseRepository("CollegeMIS").Insert(stuinfoChange); + } this.BaseRepository("CollegeMIS").Insert(entity); } } From b69f3f69014b277e6d44447f15746e36c8e6db98 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 25 Jan 2022 09:20:31 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=95=99=E6=9D=90=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/TextBookInfoController.cs | 166 ++++++++++++ .../Views/TextBookInfo/Form.cshtml | 79 ++++++ .../Views/TextBookInfo/Form.js | 58 ++++ .../Views/TextBookInfo/Index.cshtml | 50 ++++ .../Views/TextBookInfo/Index.js | 243 +++++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../TextBookInfoMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../TextBookInfo/TextBookInfoBLL.cs | 169 ++++++++++++ .../TextBookInfo/TextBookInfoEntity.cs | 155 +++++++++++ .../TextBookInfo/TextBookInfoIBLL.cs | 69 +++++ .../TextBookInfo/TextBookInfoService.cs | 255 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 1283 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs new file mode 100644 index 000000000..409f87055 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs @@ -0,0 +1,166 @@ +using System; +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using NPOI.SS.Util; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoController : MvcControllerBase + { + private TextBookInfoIBLL textBookInfoIBLL = new TextBookInfoBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = textBookInfoIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var TextBookInfoData = textBookInfoIBLL.GetTextBookInfoEntity(keyValue); + var jsonData = new + { + TextBookInfo = TextBookInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + textBookInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + TextBookInfoEntity entity = strEntity.ToObject(); + + if (string.IsNullOrEmpty(keyValue)) + { + entity.IsValid = true; + entity.IsDel = 0; + } + else + { + entity.UpdateUserID = LoginUserInfo.Get().userId; + entity.Updatetime = DateTime.Now; + } + + var RepetitionList = textBookInfoIBLL.GetRepetitions(keyValue, entity.TextBookNo, entity.TextBookName, entity.PublishNo, entity.DeptNo, entity.Publisher, entity.TextBookNature, entity.TextBookType, entity.Edition, entity.Impression); + + if (RepetitionList != null) + { + return Fail("保存失败请检查数据有重复项!"); + } + else + { + textBookInfoIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + } + #endregion + + #region 扩展数据 + + /// + /// 启用 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult EnableEntity(string keyValue, string IsValid) + { + textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); + return Success("启用成功!"); + } + + /// + /// 禁用 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DisableEntity(string keyValue, string IsValid) + { + textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid); + return Success("禁用成功!"); + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml new file mode 100644 index 000000000..916f95168 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml @@ -0,0 +1,79 @@ +@{ + ViewBag.Title = "教材信息管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
教材号*
+ +
+
+
教材名称
+ +
+
+
出版号*
+ +
+
+
专业部*
+
+
+
+
第一作者*
+ +
+
+
其他作者
+ +
+
+
出版日期*
+ +
+
+
出版社*
+ +
+
+
教材类型*
+
+
+
+
教材性质*
+
+
+
+
价格
+ +
+
+
版次
+ +
+
+
印次
+ +
+
+
是否有练习册
+
+
+
+
是否有教参教辅
+
+
+
+
内容简介
+ +
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js new file mode 100644 index 000000000..8a332f07e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js @@ -0,0 +1,58 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-01-24 12:19 + * 描 述:教材信息管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#TextBookType').lrDataItemSelect({ code: 'TextBookType' }); + $('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' }); + $('#IsWorkBook').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsTeachConsult').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName); + $('#Createdate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml new file mode 100644 index 000000000..c7da16f10 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "教材信息管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
教材名称
+ +
+
+
专业部
+
+
+
+
教材类型
+
+
+
+
教材性质
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js new file mode 100644 index 000000000..68db657bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js @@ -0,0 +1,243 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-01-24 12:19 + * 描 述:教材信息管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#TextBookType').lrDataItemSelect({ code: 'TextBookType' }); + $('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form', + width: 800, + height: 500, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + var IsValid = $('#gridtable').jfGridValue('IsValid'); + if (IsValid == "true") { + learun.alert.warning("选中记录中包含已启用项目,已启用项不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form?keyValue=' + keyValue, + width: 800, + height: 500, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var IsValid = $('#gridtable').jfGridValue('IsValid'); + if (IsValid.indexOf('true') != -1) { + learun.alert.warning("选中记录中包含已启用项目,已启用项不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //启用 + $('#lr_enabled').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var IsValid = $('#gridtable').jfGridValue('IsValid'); + if (IsValid.indexOf('true') != -1) { + learun.alert.warning("选中记录中包含已启用项!"); + return; + } + learun.layerConfirm('是否确认启用选中项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/EnableEntity', { keyValue: keyValue, IsValid: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //禁用 + $('#lr_disabled').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var IsValid = $('#gridtable').jfGridValue('IsValid'); + if (IsValid.indexOf('false') != -1) { + learun.alert.warning("选中记录中包含已启用项!"); + return; + } + learun.layerConfirm('是否确认禁用选中项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DisableEntity', { keyValue: keyValue, IsValid: '0' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/GetPageList', + headData: [ + { label: "教材号", name: "TextBookNo", width: 150, align: "left" }, + { label: "教材名称", name: "TextBookName", width: 150, align: "left" }, + { label: "出版号", name: "PublishNo", width: 100, align: "left" }, + { + label: "专业部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { label: "第一作者", name: "FirstAuthor", width: 100, align: "left" }, + { label: "其他作者", name: "OtherAuthor", width: 100, align: "left" }, + { + label: "出版日期", name: "Pubdate", width: 80, align: "left", + formatter: function (value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } + }, + { label: "出版社", name: "Publisher", width: 100, align: "left" }, + { + label: "教材类型", name: "TextBookType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TextBookType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "教材性质", name: "TextBookNature", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TextBookNature', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "价格", name: "Price", width: 60, align: "left" }, + { label: "版次", name: "Edition", width: 100, align: "left" }, + { label: "印次", name: "Impression", width: 100, align: "left" }, + { + label: "是否有练习册", name: "IsWorkBook", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "" : + ""; + } + }, + { + label: "是否有教参教辅", name: "IsTeachConsult", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "" : + ""; + } + }, + { label: "内容简介", name: "Description", width: 100, align: "left" }, + { + label: "录入用户", name: "CreateUserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "录入时间", name: "Createdate", width: 100, align: "left" }, + { + label: "修改用户", name: "UpdateUserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "修改时间", name: "Updatetime", width: 100, align: "left" }, + { + label: "是否有效", name: "IsValid", width: 80, align: "center", + formatter: function (cellvalue) { + return cellvalue == true ? "" : ""; + } + } + ], + mainId: 'ID', + isPage: true, + isMultiselect: true, + sidx: 'Createdate desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " and Isdel = '0' "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 004135c32..2f97830e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -836,6 +836,7 @@ + @@ -6630,6 +6631,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs new file mode 100644 index 000000000..c746a0501 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoMap : EntityTypeConfiguration + { + public TextBookInfoMap() + { + #region 表、主键 + //表 + this.ToTable("TEXTBOOKINFO"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index f285e3c01..063196420 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -590,6 +590,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs new file mode 100644 index 000000000..6bca1c47c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs @@ -0,0 +1,169 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoBLL : TextBookInfoIBLL + { + private TextBookInfoService textBookInfoService = new TextBookInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return textBookInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + public TextBookInfoEntity GetTextBookInfoEntity(string keyValue) + { + try + { + return textBookInfoService.GetTextBookInfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + textBookInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, TextBookInfoEntity entity) + { + try + { + textBookInfoService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + /// + /// 启用或禁用 + /// + /// 主键 + /// 状态 + public void EnabOrDisabEntity(string keyValue, string IsValid) + { + try + { + textBookInfoService.EnabOrDisabEntity(keyValue, IsValid); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression) + { + try + { + return textBookInfoService.GetRepetitions(keyValue, TextBookNo, TextBookName, PublishNo, DeptNo, Publisher, TextBookNature, TextBookType, Edition, Impression); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs new file mode 100644 index 000000000..de827f00f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs @@ -0,0 +1,155 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 专业部 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 教材号 + /// + [Column("TEXTBOOKNO")] + public string TextBookNo { get; set; } + /// + /// 教材名称 + /// + [Column("TEXTBOOKNAME")] + public string TextBookName { get; set; } + /// + /// 出版号 + /// + [Column("PUBLISHNO")] + public string PublishNo { get; set; } + /// + /// 第一作者 + /// + [Column("FIRSTAUTHOR")] + public string FirstAuthor { get; set; } + /// + /// 其他作者 + /// + [Column("OTHERAUTHOR")] + public string OtherAuthor { get; set; } + /// + /// 出版日期 + /// + [Column("PUBDATE")] + public DateTime? Pubdate { get; set; } + /// + /// 出版社 + /// + [Column("PUBLISHER")] + public string Publisher { get; set; } + /// + /// 教材类型 + /// + [Column("TEXTBOOKTYPE")] + public string TextBookType { get; set; } + /// + /// 教材性质 + /// + [Column("TEXTBOOKNATURE")] + public string TextBookNature { get; set; } + /// + /// 价格 + /// + [Column("PRICE")] + public decimal? Price { get; set; } + /// + /// 版次 + /// + [Column("EDITION")] + public string Edition { get; set; } + /// + /// 印次 + /// + [Column("IMPRESSION")] + public string Impression { get; set; } + /// + /// 是否有练习册 + /// + [Column("ISWORKBOOK")] + public bool? IsWorkBook { get; set; } + /// + /// 是否有教参教辅 + /// + [Column("ISTEACHCONSULT")] + public bool? IsTeachConsult { get; set; } + /// + /// 内容简介 + /// + [Column("DESCRIPTION")] + public string Description { get; set; } + /// + /// 是否有效 + /// + [Column("ISVALID")] + public bool? IsValid { get; set; } + /// + /// Createdate + /// + [Column("CREATEDATE")] + public DateTime? Createdate { get; set; } + /// + /// Updatetime + /// + [Column("UPDATETIME")] + public DateTime? Updatetime { get; set; } + /// + /// CreateUserID + /// + [Column("CREATEUSERID")] + public string CreateUserID { get; set; } + /// + /// UpdateUserID + /// + [Column("UPDATEUSERID")] + public string UpdateUserID { get; set; } + /// + /// 删除 0 1 + /// + public int? IsDel { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs new file mode 100644 index 000000000..4754bc473 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs @@ -0,0 +1,69 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public interface TextBookInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + TextBookInfoEntity GetTextBookInfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, TextBookInfoEntity entity); + #endregion + + #region 扩展数据 + /// + /// 启用或禁用 + /// + /// + /// + void EnabOrDisabEntity(string keyValue, string IsValid); + /// + /// + /// + /// 名称 + /// 出版号 + /// 专业部 + /// + /// + /// + /// 版次 + /// + TextBookInfoEntity GetRepetitions(string keyValue,string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression); + + #endregion + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs new file mode 100644 index 000000000..5d78e1ce4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs @@ -0,0 +1,255 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-01-24 12:19 + /// 描 述:教材信息管理 + /// + public class TextBookInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM TextBookInfo t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["TextBookName"].IsEmpty()) + { + dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TextBookName Like @TextBookName "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["TextBookType"].IsEmpty()) + { + dp.Add("TextBookType", queryParam["TextBookType"].ToString(), DbType.String); + strSql.Append(" AND t.TextBookType = @TextBookType "); + } + if (!queryParam["TextBookNature"].IsEmpty()) + { + dp.Add("TextBookNature", queryParam["TextBookNature"].ToString(), DbType.String); + strSql.Append(" AND t.TextBookNature = @TextBookNature "); + } + + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取TextBookInfo表实体数据 + /// + /// 主键 + /// + public TextBookInfoEntity GetTextBookInfoEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = BaseRepository("CollegeMIS").FindEntity(x => x.ID == item); + entity.IsDel = 1; + db.Update(entity); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, TextBookInfoEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 扩展数据 + /// + /// 启用或禁用 + /// + /// + public void EnabOrDisabEntity(string keyValue, string IsValid) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = BaseRepository("CollegeMIS").FindEntity(x => x.ID == item); + entity.IsValid = IsValid.ToString() == "1" ? true : false; + db.Update(entity); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 去重 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + return this.BaseRepository("CollegeMIS").FindEntity( + x => x.ID != keyValue && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && + x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType + && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0); + } + else + { + return this.BaseRepository("CollegeMIS").FindEntity( + x => x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && + x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType + && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 4da072d09..66eff34c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1790,6 +1790,10 @@ + + + + From 434aed9f2f791f8e4d6d13778f3615d075c99178 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 25 Jan 2022 12:13:54 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.cshtml | 28 +++++--- .../Views/StuInfoBasic/Index.js | 65 +++++++++++++++++-- .../StuInfoBasic/StuInfoBasicService.cs | 15 +++++ 3 files changed, 95 insertions(+), 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index 26fa92a7c..480cbbc9e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -10,14 +10,6 @@
-
-
学号
- -
-
-
姓名
- -
系部
@@ -30,6 +22,26 @@
班级
+
+
年级
+
+
+
+
姓名
+ +
+
+
性别
+
+
+
+
民族
+
+
+
+
身份证号
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index 632c45f9c..426a7ea21 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -10,10 +10,65 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 220, 400); - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); - $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + }, 300, 400); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass', + value: "year", + text: "year", + }); + $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); + $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -182,7 +237,7 @@ var bootstrap = function ($, learun) { } }) }) - + //查看异动 $("#lr_searchChange").on('click', function () { var keyValue = $('#gridtable').jfGridValue('StuId'); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 9b6f0d8ec..50d15c53e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -71,6 +71,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Grade", "" + queryParam["Grade"].ToString() + "", DbType.String); strSql.Append(" AND t.Grade=@Grade "); } + if (!queryParam["GenderNo"].IsEmpty()) + { + dp.Add("GenderNo", "" + queryParam["GenderNo"].ToString() + "", DbType.String); + strSql.Append(" AND t.GenderNo=@GenderNo "); + } + if (!queryParam["IdentityCardNo"].IsEmpty()) + { + dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.IdentityCardNo Like @IdentityCardNo "); + } + if (!queryParam["NationalityNo"].IsEmpty()) + { + dp.Add("NationalityNo", "" + queryParam["NationalityNo"].ToString() + "", DbType.String); + strSql.Append(" AND t.NationalityNo = @NationalityNo "); + } if (!queryParam["FinishSchoolMark"].IsEmpty()) { dp.Add("FinishSchoolMark", "" + queryParam["FinishSchoolMark"].ToString() + "", DbType.String); From 2df7a5c69aac84eff95a326152d6099cb915d15b Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 25 Jan 2022 15:07:17 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=BC=80=E8=AF=BE=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=B8=8B=E6=8B=89=E6=A1=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/ClassPlan/Form.js | 8 +------- .../EducationalAdministration/Views/ClassPlan/Index.js | 9 +-------- .../Views/ClassPlanTeach/Index.js | 9 +-------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index 4fef293f4..c0fc654ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -34,13 +34,7 @@ var bootstrap = function ($, learun) { }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text' - }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js index 7ed171482..baf34ed51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js @@ -36,14 +36,7 @@ var bootstrap = function ($, learun) { }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); $("#MajorNo").lrselect(); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 - }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js index df7273066..14ffc8aab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -36,14 +36,7 @@ var bootstrap = function ($, learun) { }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); $("#MajorNo").lrselect(); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 - }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload();