From bda10110aa6d1e1e00b59edab1a4ffa5fa910566 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 13 Apr 2022 15:11:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=80=83=E8=AF=95=E8=AF=BE=E7=A8=8B=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E3=80=81=E6=B8=85=E7=A9=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Exam_ExamLessonController.cs | 38 +++++++- .../Views/Exam_ExamLesson/Form.js | 4 +- .../Views/Exam_ExamLesson/FormImport.js | 71 --------------- ...mImport.cshtml => FormYearSemester.cshtml} | 2 +- .../Views/Exam_ExamLesson/FormYearSemester.js | 83 +++++++++++++++++ .../Views/Exam_ExamLesson/Index.cshtml | 1 + .../Views/Exam_ExamLesson/Index.js | 26 +++++- .../Learun.Application.Web.csproj | 4 +- .../Exam_ExamLesson/Exam_ExamLessonBLL.cs | 57 ++++++++++++ .../Exam_ExamLesson/Exam_ExamLessonIBLL.cs | 5 + .../Exam_ExamLesson/Exam_ExamLessonService.cs | 91 ++++++++++++++++++- 11 files changed, 299 insertions(+), 83 deletions(-) delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/{FormImport.cshtml => FormYearSemester.cshtml} (95%) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs index 0ea489bcd..b1e4b5ead 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs @@ -38,11 +38,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// - /// 导入 + /// 导入/清空数据 /// /// [HttpGet] - public ActionResult FormImport() + public ActionResult FormYearSemester() { return View(); } @@ -104,6 +104,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers exam_ExamLessonIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } + + /// + /// 导入开课计划 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Import(string AcademicYearNo, string Semester) + { + int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester); + return Success("导入" + res + "条数据!"); + } + /// + /// 按条件清空数据 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteWhere(string AcademicYearNo, string Semester) + { + int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); + return Success("清空" + res + "条数据!"); + } /// /// 保存实体数据(新增、修改) /// @@ -116,6 +139,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Exam_ExamLessonEntity entity = strEntity.ToObject(); + //判断课程编号有无重复 + var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo); + if (model != null && string.IsNullOrEmpty(keyValue)) + { + return Fail("课程编号重复!"); + } + else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId) + { + return Fail("课程编号重复!"); + } + exam_ExamLessonIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js index 9bf67d931..e349cba9a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js @@ -30,7 +30,7 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - + $('#ELEnabled').lrRadioCheckbox({ type: 'radio', code: 'YesOrNoBit', @@ -41,7 +41,7 @@ var bootstrap = function ($, learun) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js deleted file mode 100644 index e67f3fc0c..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js +++ /dev/null @@ -1,71 +0,0 @@ -/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) - * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 - * 创建人:超级管理员 - * 日 期:2022-04-12 15:47 - * 描 述:考试课程表 - */ -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 () { - $('#AcademicYearNo').lrselect({ - placeholder: "学年", - allowSearch: false, - url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', - value: 'value', - text: 'text', - maxHeight: 200, - }); - //学期 - $('#Semester').lrselect({ - placeholder: "学期", - allowSearch: false, - url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', - value: 'value', - text: 'text' - }); - - $('#ELEnabled').lrRadioCheckbox({ - type: 'radio', - code: 'YesOrNoBit', - }); - }, - initData: function () { - if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/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/Exam_ExamLesson/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); - }; - page.init(); -} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml similarity index 95% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.cshtml rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml index 29d9151f5..abb7ca9ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml @@ -12,4 +12,4 @@
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js") +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js new file mode 100644 index 000000000..ed614f227 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js @@ -0,0 +1,83 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-12 15:47 + * 描 述:考试课程表 + */ +var acceptClick; +var type = request('type'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + //page.initData(); + }, + bind: function () { + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text', + maxHeight: 200, + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + + }, + initData: function () { + //if (!!keyValue) { + // $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/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 = { + AcademicYearNo: $('#AcademicYearNo').lrselectGet(), + Semester: $('#Semester').lrselectGet() + }; + //从开课计划导入 + if (type == 1) { + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Import', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } else if (type == 2) { + //按条件清空数据 + learun.layerConfirm('是否确认清空!', function (res) { + if (res) { + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteWhere', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml index 04733641a..0e0739330 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml @@ -45,6 +45,7 @@
 从开课计划导入 +  按条件清空数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js index e8420c804..76e17965d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js @@ -50,6 +50,10 @@ var bootstrap = function ($, learun) { // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ELId'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return false; + } if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', @@ -69,7 +73,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form_import', title: '导入', - url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormImport', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=1', width: 500, height: 300, btn: ['一键导入', '关闭'], @@ -78,6 +82,21 @@ var bootstrap = function ($, learun) { } }); }); + + // 按条件清空数据 + $('#lr_emptyWhere').on('click', function () { + learun.layerForm({ + id: 'form_empty', + title: '清空数据', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=2', + width: 500, + height: 300, + btn: ['清空', '关闭'], + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ELId'); @@ -140,7 +159,7 @@ var bootstrap = function ($, learun) { { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, { label: "学期", name: "Semester", width: 100, align: "left" }, { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, - { label: "课程名称", name: "LessonName", width: 100, align: "left" }, + { label: "课程名称", name: "LessonName", width: 200, align: "left" }, //{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, { label: "是否启用", name: "ELEnabled", width: 100, align: "left", @@ -152,8 +171,7 @@ var bootstrap = function ($, learun) { mainId: 'ELId', isMultiselect: true, isPage: true, - sidx: 'ELOrder', - sord: 'ASC' + sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc' }); 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 369daaeae..fb58b7f0e 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 @@ -991,7 +991,7 @@ - + @@ -7613,7 +7613,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs index b03b6ac34..69aaa0108 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs @@ -67,6 +67,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) + { + try + { + return exam_ExamLessonService.GetEntityByLessonNo(lessonNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 @@ -143,6 +162,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public int Import(string AcademicYearNo, string Semester) + { + try + { + return exam_ExamLessonService.Import(AcademicYearNo, Semester); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + public int DeleteWhere(string AcademicYearNo, string Semester) + { + try + { + return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester); + } + 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/Exam_ExamLesson/Exam_ExamLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs index 86146648d..67cf0ca93 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs @@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); + Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo); #endregion #region 提交数据 @@ -48,6 +49,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// 实体 void SaveEntity(string keyValue, Exam_ExamLessonEntity entity); + + int Import(string AcademicYearNo, string Semester); + int DeleteWhere(string AcademicYearNo, string Semester); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs index b9a29dcbe..c5ee2c626 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs @@ -104,6 +104,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取Exam_ExamLesson表实体数据 + /// + /// + /// + public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.LessonNo == lessonNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 @@ -116,7 +139,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository("CollegeMIS").Delete(t => t.ELId == keyValue); + if (keyValue.Contains(",")) + { + keyValue = string.Join("','", keyValue.Split(',')); + } + + string sql = $"delete Exam_ExamLesson where ELId in ('{keyValue}')"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } catch (Exception ex) { @@ -194,6 +223,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 导入 + /// + /// + /// + /// + public int Import(string AcademicYearNo, string Semester) + { + try + { + string sql = $@"insert into Exam_ExamLesson([ELId] + ,[AcademicYearNo] + ,[Semester] + ,[LessonName] + ,[LessonNo] + ,[ELOrder] + ,[ELEnabled]) +select NEWID(),AcademicYearNo,Semester,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' + and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) +"; + return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 清空数据 + /// + /// + /// + /// + public int DeleteWhere(string AcademicYearNo, string Semester) + { + try + { + string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; + return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion } From 4b94880cfae22749e61b2b8016794444b3858d7d Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 13 Apr 2022 17:57:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=80=83=E8=AF=95=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A4=E6=96=AD=E5=90=8C=E5=AD=A6=E6=9C=9F?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Exam_ExamLessonController.cs | 2 +- .../Exam_ExamLesson/Exam_ExamLessonBLL.cs | 4 ++-- .../Exam_ExamLesson/Exam_ExamLessonIBLL.cs | 2 +- .../Exam_ExamLesson/Exam_ExamLessonService.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs index b1e4b5ead..9716c671e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs @@ -140,7 +140,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Exam_ExamLessonEntity entity = strEntity.ToObject(); //判断课程编号有无重复 - var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo); + var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo,entity.AcademicYearNo,entity.Semester); if (model != null && string.IsNullOrEmpty(keyValue)) { return Fail("课程编号重复!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs index 69aaa0108..7577fcc5a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs @@ -67,11 +67,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) + public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester) { try { - return exam_ExamLessonService.GetEntityByLessonNo(lessonNo); + return exam_ExamLessonService.GetEntityByLessonNo(lessonNo, AcademicYearNo, Semester); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs index 67cf0ca93..504823d6b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs @@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); - Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo); + Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo,string AcademicYearNo, int? Semester); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs index c5ee2c626..e81156627 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs @@ -109,11 +109,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// /// - public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) + public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester) { try { - return this.BaseRepository("CollegeMIS").FindEntity(x => x.LessonNo == lessonNo); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.LessonNo == lessonNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); } catch (Exception ex) { From 45f0fbac3ef39286a26e02e7ee52366f7d94bfe6 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Wed, 13 Apr 2022 18:48:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=B8=88=EF=BC=9A=E5=88=97=E8=A1=A8=EF=BC=8C=E5=A4=9A?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E4=B8=AD=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/EmpInfo/Index.js | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index 19174700a..eadfc70be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -50,8 +50,8 @@ var bootstrap = function ($, learun) { //政治面貌 $('#PartyFaceNo').lrDataItemSelect({ code: 'BCdPartyFace', allowSearch: true }); //最高学历 - $('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); - + //$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); + $('#HighestRecord').lrDataItemSelect({ code: 'RecordInSchool', allowSearch: true }); //民族 $('#NationalityNo').lrDataItemSelect({ code: 'National', allowSearch: true }); @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { //是否审核 $('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); //学位 - $('#DegreeNo').lrDataItemSelect({ code: 'BCdDegree' }); + $('#DegreeNo').lrDataItemSelect({ code: 'DegreeInSchool' }); // 部门选择 $('#F_DepartmentId').lrselect({ @@ -92,7 +92,7 @@ var bootstrap = function ($, learun) { } } }); - $('#DegreeNo').lrDataItemSelect({ code: 'BCdDegree' }); + $('#DegreeNo').lrDataItemSelect({ code: 'DegreeInSchool' }); //职称 $('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); //校区 @@ -412,9 +412,9 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, - keyId: 'id', + keyId: 'f_departmentid', callback: function (_data) { - callback(_data['name']); + callback(_data['f_fullname']); } }); } @@ -494,12 +494,19 @@ var bootstrap = function ($, learun) { { label: "最高学历", name: "HighestRecord", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', + //learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', + // key: value, + // keyId: 'culturedegreeno', + // callback: function (_data) { + // callback(_data['culturedegree']); + // } + //}); + learun.clientdata.getAsync('dataItem', { key: value, - keyId: 'culturedegreeno', + code: 'RecordInSchool', callback: function (_data) { - callback(_data['culturedegree']); + callback(_data.text); } }); } @@ -507,9 +514,16 @@ var bootstrap = function ($, learun) { { label: "最高学位", name: "DegreeNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + //learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'BCdDegree', + // callback: function (_data) { + // callback(_data.text); + // } + //}); learun.clientdata.getAsync('dataItem', { key: value, - code: 'BCdDegree', + code: 'DegreeInSchool', callback: function (_data) { callback(_data.text); }