diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs index 9f2fffe98..e60189613 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs @@ -67,7 +67,7 @@ namespace Learun.Application.Organization List list = GetList(companyId); if (!string.IsNullOrEmpty(keyWord)) { - list = list.FindAll(t => t.F_FullName.Contains(keyWord) || t.F_EnCode.Contains(keyWord) || t.F_ShortName.Contains(keyWord)); + list = list.FindAll(t => (!string.IsNullOrEmpty(t.F_FullName) && t.F_FullName.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_EnCode) && t.F_EnCode.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_ShortName) && t.F_ShortName.Contains(keyWord))); } return list; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs index f18eff3af..1a7efc597 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs @@ -121,14 +121,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { cdMajorIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("启用成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { cdMajorIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("停用成功!"); } /// /// 删除实体数据 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..9f26f14fb 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 @@ -100,14 +100,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { classInfoIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("启用成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { classInfoIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("停用成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs index 3ee6c35f8..77406a053 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassroomInfoController.cs @@ -86,14 +86,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Lock(string keyValue) { classroomInfoIBLL.Lock(keyValue); - return Success("审核成功!"); + return Success("启用成功!"); } [HttpPost] [AjaxOnly] public ActionResult UnLock(string keyValue) { classroomInfoIBLL.UnLock(keyValue); - return Success("去审成功!"); + return Success("停用成功!"); } /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs index 7d59523c4..898802d3e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs @@ -275,10 +275,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark); - return Success("审核成功!"); + return Success("操作成功!"); } /// /// 保存实体数据(新增、修改) + /// 设置考试时间 /// /// 主键 /// 实体 @@ -305,6 +306,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd; } + entity.EPLId = keyValue; + //判断考试时间是否冲突 + var res = exam_ExamPlanLessonIBLL.IsExamTimeClash(entity); + if (res.flag && !string.IsNullOrEmpty(res.lessonname)) + { + return Fail("考试时间与课程(" + res.lessonname + ")冲突!"); + } + + //保存 exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js index 43c37dec8..9476311ff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AddressBook/Index.js @@ -86,7 +86,14 @@ var bootstrap = function ($, learun) { { label: "性别", name: "AGender", width: 200, align: "left", formatter: function (cellvalue) { - return cellvalue == true ? "男" : "女"; + if (cellvalue == true) { + return '男'; + } else if (cellvalue == false) { + return '女'; + } else { + return ''; + } + //return cellvalue == true ? "男" : "女"; } }, { label: '单位名称', name: 'ACompany', width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js index 8743eebc5..c885dd047 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdMajor/Index.js @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { } var CheckMark = $('#gridtable').jfGridValue('CheckMark'); if (CheckMark === "true") { - learun.alert.warning("当前项目已审核不能编辑!"); + learun.alert.warning("当前项目已启用不能编辑!"); return; } learun.layerForm({ @@ -84,7 +84,7 @@ var bootstrap = function ($, learun) { }); } }); - //审核 + //启用 $('#lr_lock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { @@ -97,7 +97,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目已审核无需再审!"); // return; //} - learun.layerConfirm('是否确认审核该项!', function (res) { + learun.layerConfirm('是否确认启用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { refreshGirdData(); @@ -106,7 +106,7 @@ var bootstrap = function ($, learun) { }); } }); - //去审核 + //停用 $('#lr_unlock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { @@ -119,7 +119,7 @@ var bootstrap = function ($, learun) { // learun.alert.warning("当前项目还未审核不需要去审核!"); // return; //} - learun.layerConfirm('是否确认去审核该项!', function (res) { + learun.layerConfirm('是否确认停用该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { refreshGirdData(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js index 3bac36860..93c23bcf9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js @@ -110,7 +110,7 @@ var bootstrap = function ($, learun) { }); } }); - //审核 + //启用 $('#lr_lock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ClassId'); if (learun.checkrow(keyValue)) { @@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { }); } }); - //去审核 + //停用 $('#lr_unlock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ClassId'); if (learun.checkrow(keyValue)) { 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 28d19bcfd..eb03c43cc 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 @@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { maxHeight: 200, select: function (item) { var NDeptNo = $("#DeptNo").lrselectGet(); - if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { + if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, @@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { } else { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, + param: { strWhere: " 1=1 and CheckMark=1 " }, value: "majorno", text: "majorname", maxHeight: 200 @@ -59,14 +59,20 @@ var bootstrap = function ($, learun) { } } }) - $("#MajorNo").lrselect(); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text' + $("#MajorNo").lrselect({ + select: function (item) { + if (item) { + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', + param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, + value: "lessonno", + text: "lessonname", + maxHeight: 200 + }); + } + } }); + $('#LessonNo').lrselect(); $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); }, initData: function () { @@ -83,7 +89,7 @@ var bootstrap = function ($, learun) { }); } $('#StuSortNo').val('02'); - $('#LessonSortNo').val('2'); + $('#LessonSortNo').val('2'); $('#CheckStyleNo').val('1'); $('#ScoreRecordStyleNo').val('1'); $('#CheckMark').val('1'); @@ -97,7 +103,7 @@ var bootstrap = function ($, learun) { return false; } var nName = $("#LessonNo").find(".lr-select-placeholder").text(); - var Narray= nName.split("("); + var Narray = nName.split("("); $("#LessonName").val(Narray[0]); var postData = { strEntity: JSON.stringify($('body').lrGetFormData()) 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 c22726aea..1e899e565 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 @@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); - $("#MajorNo").lrselect(); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 + $('#MajorNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: " 1=1 and CheckMark=1 " }, + value: "majorno", + text: "majorname", + maxHeight: 200, + select: function (item) { + if (item) { + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', + param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, + value: "lessonno", + text: "lessonname", + maxHeight: 200 + }); + } + } }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -175,7 +185,7 @@ var bootstrap = function ($, learun) { $('#titleinfo').text(item.text); page.search(); var NDeptNo = item.id; - if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { + if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, @@ -186,7 +196,7 @@ var bootstrap = function ($, learun) { } else { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, + param: { strWhere: " 1=1 and CheckMark=1 " }, value: "majorno", text: "majorname", maxHeight: 200 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 2755e71ab..1773be8fb 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 @@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); - $("#MajorNo").lrselect(); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 + $('#MajorNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: " 1=1 and CheckMark=1 " }, + value: "majorno", + text: "majorname", + maxHeight: 200, + select: function (item) { + if (item) { + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', + param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, + value: "lessonno", + text: "lessonname", + maxHeight: 200 + }); + } + } }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -131,7 +141,7 @@ var bootstrap = function ($, learun) { } else { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, + param: { strWhere: " 1=1 and CheckMark=1 " }, value: "majorno", text: "majorname", maxHeight: 200 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js index fa66414dd..652459ef8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassroomInfo/Index.js @@ -82,7 +82,7 @@ var bootstrap = function ($, learun) { }); } }); - //审核 + //启用 $('#lr_lock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ClassroomId'); if (learun.checkrow(keyValue)) { @@ -104,7 +104,7 @@ var bootstrap = function ($, learun) { }); } }); - //去审核 + //停用 $('#lr_unlock').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ClassroomId'); if (learun.checkrow(keyValue)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index e7f808ccc..c774e91e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -147,11 +147,11 @@
校区*
-
+
部门*
-
+
@*
系部
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 8ad0f64b7..eea0daac0 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 @@ -199,7 +199,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { var CheckMark = $('#gridtable').jfGridValue('CheckMark'); if (CheckMark.indexOf('true') != -1) { - learun.alert.warning("选中记录中包含已启用项目!"); + learun.alert.warning("选中记录中包含已审核项目!"); return; } learun.layerForm({ @@ -220,7 +220,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { var CheckMark = $('#gridtable').jfGridValue('CheckMark'); if (CheckMark.indexOf('true') != -1) { - learun.alert.warning("选中记录中包含已启用项目,已启用不能删除!"); + learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); return; } //if (CheckMark === true) { @@ -242,7 +242,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { var CheckMark = $('#gridtable').jfGridValue('CheckMark'); if (CheckMark.indexOf('true') != -1) { - learun.alert.warning("选中记录中包含已启用项目!"); + learun.alert.warning("选中记录中包含已审核项目!"); return; } //if (CheckMark === true) { @@ -264,7 +264,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { var CheckMark = $('#gridtable').jfGridValue('CheckMark'); if (CheckMark.indexOf('false') != -1) { - learun.alert.warning("选中记录中包含已停用项目!"); + learun.alert.warning("选中记录中包含未审核项目!"); return; } //if (CheckMark === false) { @@ -433,9 +433,9 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, - keyId: 'f_departmentid', + keyId: 'id', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['name']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml index ddbb6f774..358eb4e0b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml @@ -11,14 +11,14 @@
学期*
-
+ @*
*
专业*
-
+
*@
年级*
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 5ddc3763c..677d4e8ac 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 @@ -167,32 +167,33 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', headData: [ { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, - { label: "学期", name: "Semester", 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: "MajorNo", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', - key: value, - keyId: 'majorno', - callback: function (_data) { - callback(_data['majorname']); - } - }); - } - }, + { label: "学期", name: "Semester", 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: "MajorNo", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + // key: value, + // keyId: 'majorno', + // callback: function (_data) { + // callback(_data['majorname']); + // } + // }); + // } + //}, { label: "年级", name: "Grade", width: 50, align: "left" }, { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, { label: "课程名称", name: "LessonName", width: 200, align: "left" }, @@ -207,7 +208,7 @@ var bootstrap = function ($, learun) { mainId: 'ELId', isMultiselect: true, isPage: true, - sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc' + sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc,LessonNo asc' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml index f425f78b1..5d3a838e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml @@ -8,12 +8,12 @@
-
考试开始时间*
- +
开始时间*
+
结束时间*
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js index de2e32fff..4c35a6d24 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js @@ -30,18 +30,19 @@ var bootstrap = function ($, learun) { headData: [ { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, { label: "学期", name: "Semester", width: 100, align: "left" }, - { - label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', - key: row.ClassNo, - keyId: 'classno', - callback: function (_data) { - callback(_data['classname']); - } - }); - } - }, + //{ + // label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + // key: row.ClassNo, + // keyId: 'classno', + // callback: function (_data) { + // callback(_data['classname']); + // } + // }); + // } + //}, + { label: "班级名称", name: "ClassName", width: 100, align: "left" }, { label: "班级编号", name: "ClassNo", width: 100, align: "left" }, { label: "学生人数", name: "StuNum", width: 80, align: "left" }, //{ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml index cb0cbb85a..00ee8dad1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml @@ -51,7 +51,7 @@ @* 打印*@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js index 4c0d74e78..83ec5e56b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js @@ -131,7 +131,7 @@ var bootstrap = function ($, learun) { $('#lr_importBy').on('click', function () { learun.layerForm({ id: 'form_import', - title: '生成考试信息', + title: '生成考生信息', url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport', width: 500, height: 300, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js index 80607a514..1b4d824ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js @@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { $('#LessonTypeId').lrDataSourceSelect({ code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { if (item != null && item != undefined) { - if (item.lessontypename === "公开课") { + if (item.lessontypename.indexOf('公开') || item.lessontypename.indexOf('公共')) { $("#TeachMajorNo").removeAttr("isvalid"); $("#TeachMajorNo").removeAttr("NotNull"); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml index e7161b238..00d305947 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuCancelDisciplineManagement/Index.cshtml @@ -13,7 +13,7 @@
-
学生姓名
+
申请人
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js index 729f8ccc6..422017273 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js @@ -19,6 +19,7 @@ var bootstrap = function ($, learun) { var keyword = $('#txt_Keyword').val(); page.search({ keyword: keyword }); }); + $('#PerfectStatus').lrDataItemSelect({ code: "PerfectStatus", placeholder: "请选完善状态" }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js index b22d61222..93f552b0e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js @@ -177,10 +177,9 @@ var bootstrap = function ($, learun) { { label: '姓名', name: 'StuName', width: 100, align: "left" }, { label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives', - key: row.ID, + key: value, keyId: 'stuinfofreshid', callback: function (_data) { var a = _data['id']; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs index 8137f8560..f3dcca402 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs @@ -117,13 +117,11 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 所有文件(夹)列表 /// - /// 文件夹Id /// 返回列表Json [HttpGet] - public ActionResult GetListJson(string folderId) + public ActionResult GetListJson(string folderId, string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetList(folderId, userId); + var data = fileInfoBLL.GetAllList(folderId, keyword); return JsonResult(data); } /// @@ -131,10 +129,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetDocumentListJson() + public ActionResult GetDocumentListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetDocumentList(userId); + var data = fileInfoBLL.GetDocumentList(keyword); return JsonResult(data); } /// @@ -142,10 +139,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetImageListJson() + public ActionResult GetImageListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetImageList(userId); + var data = fileInfoBLL.GetImageList(keyword); return JsonResult(data); } /// @@ -153,10 +149,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetRecycledListJson() + public ActionResult GetRecycledListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetRecycledList(userId); + var data = fileInfoBLL.GetRecycledList(keyword); return JsonResult(data); } /// @@ -164,10 +159,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetMyShareListJson() + public ActionResult GetMyShareListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetMyShareList(userId); + var data = fileInfoBLL.GetMyShareList(keyword); return JsonResult(data); } /// @@ -175,10 +169,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers /// /// 返回列表Json [HttpGet] - public ActionResult GetOthersShareListJson() + public ActionResult GetOthersShareListJson(string keyword) { - string userId = LoginUserInfo.Get().userId; - var data = fileInfoBLL.GetOthersShareList(userId); + var data = fileInfoBLL.GetOthersShareList(keyword); return JsonResult(data); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js index c4014d264..05b55f08d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/Index.js @@ -7,6 +7,8 @@ */ var refreshGirdData; +var keyword; +var folderId; var bootstrap = function ($, learun) { "use strict"; @@ -22,8 +24,12 @@ var bootstrap = function ($, learun) { bind: function () { // 查询 $('#btn_Search').on('click', function () { - var keyword = $('#txt_Keyword').val(); - page.search({ keyword: keyword }); + keyword = $('#txt_Keyword').val(); + + $.lrSetForm(top.$.rootUrl + _url + '?keyword=' + keyword, function (data) {// + $('#gridTable').jfGridSet('refreshdata', data); + }); + //page.search(); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -33,17 +39,18 @@ var bootstrap = function ($, learun) { $(".crumb-path span").click(function () { var value = $(this).attr('data-folderId'); var folderId = $(".crumb-path span:last").attr('data-folderId'); + var where = '&keyword=' + keyword; //console.log(value); if (value == "back") { if (folderId == 0) { $(".crumb-path .back").hide(); } - $.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId, function (data) {// + $.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId + where, function (data) {// $('#gridTable').jfGridSet('refreshdata', data); }); $(".crumb-path span:last").remove(); } else { - $.lrSetForm(top.$.rootUrl + _url + '?folderId=0', function (data) {// + $.lrSetForm(top.$.rootUrl + _url + '?folderId=0' + where, function (data) {// $('#gridTable').jfGridSet('refreshdata', data); }); $(".crumb-path .back").hide(); @@ -268,7 +275,7 @@ var bootstrap = function ($, learun) { $this.addClass('active'); var data_value = $this.context.dataset.value; - + switch (data_value) { case "allFile": _url = "/LR_OAModule/ResourceFile/GetListJson"; @@ -336,7 +343,7 @@ var bootstrap = function ($, learun) { if (options.length != 0) { return "
" + options.F_FileName + "
"; } - } + } }, { label: '大小', name: 'F_FileSize', index: 'F_FileSize', width: 100, align: 'center', @@ -392,6 +399,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.keyword = keyword; + param.folderId = folderId; $('#gridTable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); }, //初始化页面 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs index 840e39df2..59101844a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs @@ -133,10 +133,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers public ActionResult SaveForm(string keyValue, PostEntity entity) { var list = postIBLL.GetList(entity.F_CompanyId); - if (list.Any(a => a.F_EnCode == entity.F_EnCode)) + if (string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode)) { - return Fail("岗位编号重复"); + return Fail("岗位编号重复!"); } + else if (!string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode && a.F_PostId != keyValue)) + { + return Fail("岗位编号重复!"); + } + postIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index 6ea627085..a91e41eff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -29,7 +29,7 @@ var bootstrap = function ($, learun) { // 新增 $('#lr_add').on('click', function () { if (!companyId) { - learun.alert.warning('请选择公司!'); + learun.alert.warning('请选择学校!'); return false; } selectedRow = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js index f5b5aca8e..18b70306c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Post/Index.js @@ -50,7 +50,7 @@ var bootstrap = function ($, learun) { // 新增 $('#lr_add').on('click', function () { if (!companyId) { - learun.alert.warning('请选择公司!'); + learun.alert.warning('请选择学校!'); return false; } selectedRow = null; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml index a6de56ca7..1b54c106e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 228px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml index b85a292ec..45a61029c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 206px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml index 06d008f5d..99ada60d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml @@ -168,7 +168,12 @@ key: value, keyId: 'f_companyid', callback: function (_data) { - result = _data.f_fullname; + if (!_data.f_fullname || _data.f_fullname == '' || _data.f_fullname == 'undefined') { + result = ''; + } + else { + result = _data.f_fullname; + } } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js index 38b25fdd2..fdda26390 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Form.js @@ -97,16 +97,19 @@ var bootstrap = function ($, learun) { initData: function () { if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, function (data) { - for (var id in data) { - if (!!data[id].length && data[id].length > 0) { - $('#' + id).jfGridSet('refreshdata', data[id]); + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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]); + } } - else { - $('[data-table="' + id + '"]').lrSetFormData(data[id]); - } - } - }); + }); + } else { + $('#BuildType').lrselectSet('4'); + $('#BuildType').attr('readonly', 'readonly'); } }, initSelect: function () { @@ -122,6 +125,7 @@ var bootstrap = function ($, learun) { param: { parentId: '0' }, } $('#Campus').lrselect(dfop); + $('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js index 878fe4fc5..c530fc983 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js @@ -25,7 +25,7 @@ var bootstrap = function ($, learun) { allowSearch: true, maxHeight: 225, select: function (item) { - if (item&&item.id!='-1') { + if (item && item.id != '-1') { $('#BuildType').lrselectSet(item.title); $('#BuildType').attr('readonly', 'readonly'); } else { @@ -43,7 +43,7 @@ var bootstrap = function ($, learun) { type: 'radio', code: 'HasToilet', }) - + //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); $('#StudentID').lrselect({ @@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { text: "stuname", url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic' }); - + $('#Class').lrselect({ value: "classno", text: "classname" @@ -115,7 +115,7 @@ var bootstrap = function ($, learun) { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, - function(data) { + function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); @@ -126,6 +126,7 @@ var bootstrap = function ($, learun) { }); } else { $('#ParentID').lrselectSet(ParentID); + $('#ParentID').attr('readonly', 'readonly'); } }, initSelect: function () { @@ -141,7 +142,7 @@ var bootstrap = function ($, learun) { param: { parentId: '0' }, } $('#Campus').lrselect(dfop); - + $('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); } }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml index 1683921af..f120a829f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Room.cshtml @@ -45,6 +45,11 @@ left: -60px; width: 273px; } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml index 3e3925d18..78802bccc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Unit.cshtml @@ -45,6 +45,11 @@ left: 0px; width: 225px } + .indSec1T > a { + width: fit-content; + padding-left: 6px; + padding-right: 6px; + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml index 418c68752..fb7a21463 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Sanitation/Form.cshtml @@ -3,21 +3,21 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
/// 用户Id /// - public IEnumerable GetDocumentList(string userId) + public IEnumerable GetDocumentList(string keyword) { - return service.GetDocumentList(userId); + return service.GetDocumentList(keyword); } /// /// 图片列表 /// /// 用户Id /// - public IEnumerable GetImageList(string userId) + public IEnumerable GetImageList(string keyword) { - return service.GetImageList(userId); + return service.GetImageList(keyword); } /// /// 回收站文件(夹)列表 /// /// 用户Id /// - public IEnumerable GetRecycledList(string userId) + public IEnumerable GetRecycledList(string keyword) { - return service.GetRecycledList(userId); + return service.GetRecycledList(keyword); } /// /// 我的文件(夹)共享列表 /// /// 用户Id /// - public IEnumerable GetMyShareList(string userId) + public IEnumerable GetMyShareList(string keyword) { - return service.GetMyShareList(userId); + return service.GetMyShareList(keyword); } /// /// 他人文件(夹)共享列表 /// /// 用户Id /// - public IEnumerable GetOthersShareList(string userId) + public IEnumerable GetOthersShareList(string keyword) { - return service.GetOthersShareList(userId); + return service.GetOthersShareList(keyword); } /// /// 文件信息实体 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs index a717529c8..9ec561205 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs @@ -12,13 +12,14 @@ namespace Learun.Application.OA.File.FileInfo public interface FileInfoIBLL { #region 获取数据 + /// /// 所有文件(夹)列表 /// /// 文件夹Id /// 用户Id /// - IEnumerable GetList(string folderId, string userId); + IEnumerable GetAllList(string folderId, string keyword); IEnumerable GetList(string userId); IEnumerable GetList(); @@ -27,31 +28,31 @@ namespace Learun.Application.OA.File.FileInfo /// /// 用户Id /// - IEnumerable GetDocumentList(string userId); + IEnumerable GetDocumentList(string keyword); /// /// 图片列表 /// /// 用户Id /// - IEnumerable GetImageList(string userId); + IEnumerable GetImageList(string keyword); /// /// 回收站文件(夹)列表 /// /// 用户Id /// - IEnumerable GetRecycledList(string userId); + IEnumerable GetRecycledList(string keyword); /// /// 我的文件(夹)共享列表 /// /// 用户Id /// - IEnumerable GetMyShareList(string userId); + IEnumerable GetMyShareList(string keyword); /// /// 他人文件(夹)共享列表 /// /// 用户Id /// - IEnumerable GetOthersShareList(string userId); + IEnumerable GetOthersShareList(string keyword); /// /// 文件信息实体 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs index 27aad6bf0..51803ef39 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs @@ -1,4 +1,5 @@ using Learun.DataBase.Repository; +using Learun.Util; using System; using System.Collections.Generic; using System.Data.Common; @@ -30,23 +31,26 @@ namespace Learun.Application.OA.File.FileInfo /// /// 所有文件(夹)列表 /// - /// 文件夹Id - /// 用户Id /// - public IEnumerable GetList(string folderId, string userId) + public IEnumerable GetAllList(string folderId,string keyword) { var strSql = new StringBuilder(); string folderCondition = ""; string fileCondition = ""; if (!string.IsNullOrEmpty(folderId)) { - folderCondition = " AND F_ParentId = @folderId"; - fileCondition=" AND F_FolderId = @folderId"; + folderCondition = $" AND F_ParentId = '{folderId}'"; + fileCondition = $" AND F_FolderId = '{folderId}'"; } else { fileCondition = " AND F_FolderId = '0'"; } + if (!string.IsNullOrEmpty(keyword)) + { + folderCondition = $" AND F_FolderName like '%{keyword}%'"; + fileCondition = $" AND F_FileName like '%{keyword}%'"; + } strSql.Append(@"SELECT * FROM ( SELECT F_FolderId AS F_FileId , F_ParentId AS F_FolderId , @@ -69,17 +73,17 @@ namespace Learun.Application.OA.File.FileInfo F_IsShare FROM LR_OA_FileInfo where F_DeleteMark = 0 "); strSql.Append(fileCondition); - strSql.Append(") t WHERE F_CreateUserId = @userId"); - + strSql.Append(") t WHERE F_CreateUserId = @userId"); + strSql.Append(" ORDER BY CASE WHEN F_FileType = 'folder' THEN 1 ELSE 2 END, F_ModifyDate ASC"); - return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId, folderId = folderId }); + var userId = LoginUserInfo.Get().userId; + return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// /// 文档列表 /// - /// 用户Id /// - public IEnumerable GetDocumentList(string userId) + public IEnumerable GetDocumentList(string keyword) { var strSql = new StringBuilder(); strSql.Append(@"SELECT F_FileId , @@ -95,15 +99,20 @@ namespace Learun.Application.OA.File.FileInfo AND F_FileType IN ( 'log', 'txt', 'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx' ) AND F_CreateUserId = @userId"); + if (!string.IsNullOrEmpty(keyword)) + { + strSql.Append($" and F_FileName like '%{keyword}%'"); + } + strSql.Append(" ORDER BY F_ModifyDate ASC"); + var userId = LoginUserInfo.Get().userId; return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// /// 图片列表 /// - /// 用户Id /// - public IEnumerable GetImageList(string userId) + public IEnumerable GetImageList(string keyword) { var strSql = new StringBuilder(); strSql.Append(@"SELECT F_FileId , @@ -118,79 +127,101 @@ namespace Learun.Application.OA.File.FileInfo WHERE F_DeleteMark = 0 AND F_FileType IN ( 'ico', 'gif', 'jpeg', 'jpg', 'png', 'psd' ) AND F_CreateUserId = @userId"); + if (!string.IsNullOrEmpty(keyword)) + { + strSql.Append($" and F_FileName like '%{keyword}%'"); + } + var userId = LoginUserInfo.Get().userId; strSql.Append(" ORDER BY F_ModifyDate ASC"); return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// /// 回收站文件(夹)列表 /// - /// 用户Id /// - public IEnumerable GetRecycledList(string userId) + public IEnumerable GetRecycledList(string keyword) { var strSql = new StringBuilder(); strSql.Append(@"SELECT * - FROM ( SELECT F_FolderId AS F_FileId , + FROM ( "); + var folderSql = @"SELECT F_FolderId AS F_FileId , F_ParentId AS F_FolderId , F_FolderName AS F_FileName , '' AS F_FileSize , 'folder' AS F_FileType , F_CreateUserId, F_ModifyDate - FROM LR_OA_FileFolder where F_DeleteMark = 1 - UNION - SELECT F_FileId , + FROM LR_OA_FileFolder where F_DeleteMark = 1"; + var fileinfoSql = @"SELECT F_FileId , F_FolderId , F_FileName , F_FileSize , F_FileType , F_CreateUserId, F_ModifyDate - FROM LR_OA_FileInfo where F_DeleteMark = 1 - ) t WHERE F_CreateUserId = @userId"); + FROM LR_OA_FileInfo where F_DeleteMark = 1"; + if (!string.IsNullOrEmpty(keyword)) + { + folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; + fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; + } + strSql.Append(folderSql + "UNION "); + strSql.Append(fileinfoSql); + strSql.Append(") t WHERE F_CreateUserId = @userId"); + + + var userId = LoginUserInfo.Get().userId; strSql.Append(" ORDER BY F_ModifyDate DESC"); return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// /// 我的文件(夹)共享列表 /// - /// 用户Id /// - public IEnumerable GetMyShareList(string userId) + public IEnumerable GetMyShareList(string keyword) { var strSql = new StringBuilder(); strSql.Append(@"SELECT * - FROM ( SELECT F_FolderId AS F_FileId , + FROM ( "); + var folderSql = @"SELECT F_FolderId AS F_FileId , F_ParentId AS F_FolderId , F_FolderName AS F_FileName , '' AS F_FileSize , 'folder' AS F_FileType , F_CreateUserId, F_ModifyDate - FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1 - UNION - SELECT F_FileId , + FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1"; + var fileinfoSql = @"SELECT F_FileId , F_FolderId , F_FileName , F_FileSize , F_FileType , F_CreateUserId, F_ModifyDate - FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1 - ) t WHERE F_CreateUserId = @userId"); + FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1"; + if (!string.IsNullOrEmpty(keyword)) + { + folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; + fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; + } + strSql.Append(folderSql + "UNION "); + strSql.Append(fileinfoSql); + strSql.Append(") t WHERE F_CreateUserId = @userId"); + + var userId = LoginUserInfo.Get().userId; strSql.Append(" ORDER BY F_ModifyDate DESC"); return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// /// 他人文件(夹)共享列表 /// - /// 用户Id /// - public IEnumerable GetOthersShareList(string userId) + public IEnumerable GetOthersShareList(string keyword) { var strSql = new StringBuilder(); strSql.Append(@"SELECT * - FROM ( SELECT F_FolderId AS F_FileId , + FROM ( "); + var folderSql = @"SELECT F_FolderId AS F_FileId , F_ParentId AS F_FolderId , F_FolderName AS F_FileName , '' AS F_FileSize , @@ -198,9 +229,8 @@ namespace Learun.Application.OA.File.FileInfo F_CreateUserId, F_CreateUserName, F_ShareTime AS F_ModifyDate - FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1 - UNION - SELECT F_FileId , + FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1"; + var fileinfoSql = @" SELECT F_FileId , F_FolderId , F_FileName , F_FileSize , @@ -208,9 +238,18 @@ namespace Learun.Application.OA.File.FileInfo F_CreateUserId, F_CreateUserName, F_ShareTime AS F_ModifyDate - FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1 - ) t WHERE F_CreateUserId != @userId"); + FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1"; + if (!string.IsNullOrEmpty(keyword)) + { + folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; + fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; + } + strSql.Append(folderSql + "UNION "); + strSql.Append(fileinfoSql); + strSql.Append(") t WHERE F_CreateUserId != @userId"); + strSql.Append(" ORDER BY F_ModifyDate DESC"); + var userId = LoginUserInfo.Get().userId; return this.BaseRepository().FindList(strSql.ToString(), new { userId = userId }); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs index 4a814bffb..72b0e926f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs @@ -82,11 +82,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(fieldSql); - strSql.Append(" FROM AddressBook t "); + strSql.Append(" FROM AddressBook t where 1=1 "); var data = LoginUserInfo.Get(); if (!data.isSystem) { - strSql.Append($" where ASaverId='{data.userId}' or AIsShare=1"); + strSql.Append($" and ASaverId='{data.userId}' or AIsShare=1"); + } + var queryParam = queryJson.ToJObject(); + if (!queryParam["keyword"].IsEmpty()) + { + strSql.Append($" AND t.AName Like '%{queryParam["keyword"].ToString()}%' "); } return this.BaseRepository().FindList(strSql.ToString(), pagination); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs index 21ac3b223..60ccf3d55 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs @@ -75,9 +75,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId - "); + having count(StuNo)>0"); - var list = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination).Where(x => x.ClassStuNum > 0); + var list = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); var stulist = BaseRepository("CollegeMIS").FindList("select * from Exam_ArrangeExamTermItemNew"); foreach (var item in list) { @@ -118,7 +118,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 "); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null "); var queryParam = queryJson.ToJObject(); if (!queryParam["AcademicYearNo"].IsEmpty()) { 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 93acdbd95..e8db630b6 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 @@ -230,13 +230,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration string sql = $@"insert into Exam_ExamLesson([ELId] ,[AcademicYearNo] ,[Semester] -,Grade,DeptNo,MajorNo +,Grade ,[LessonName] ,[LessonNo] ,[ELOrder] ,[ELEnabled]) -select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' +select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) + group by LessonNo,LessonName,AcademicYearNo,Semester,Grade "; return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs index 98d10feb6..b79689df8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs @@ -325,10 +325,12 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); //排考安排班级 var planClassData = db.FindList(x => x.EPLId == planLesson.EPLId); var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); - string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; + string stuSql = $"select * from Exam_ExamStudent where ESEnabled=1 and AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; //所有考生 var stuInfoList = db.FindList(stuSql).ToList(); var classInfo = db.FindList(); + + itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList(); if (itemList.Count >= stuInfoList.Count()) { //随机安排座位 @@ -350,7 +352,6 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); else { //不随机安排座位 - itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList(); stuInfoList = stuInfoList.OrderBy(x => x.StuNo).OrderBy(x => x.ClassNo).ToList(); //为考生安排座位 for (int i = 0; i < stuInfoList.Count; i++) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs index b0f93bc0a..c7c637b78 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs @@ -204,6 +204,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 判断考试时间是否冲突 + /// + /// + public (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity) + { + try + { + return exam_ExamPlanLessonService.IsExamTimeClash(entity); + } + 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_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs index 71536b4f8..fa343c8f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs @@ -49,6 +49,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// 实体 void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity); + + (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index d2f60c98b..e311e7905 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}'"); + return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}' order by LessonNo"); } catch (Exception ex) { @@ -182,9 +182,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (exam_ExamPlan.PlanType == "1") { //必修 - string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,ELId,LessonName,LessonNo) -select NEWID(),'{EPId}',ELId,LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' - and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')"; + string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) +select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')' from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' + and LessonNo+'('+grade+')' not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') + group by LessonNo,grade,LessonName"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "2") @@ -218,12 +219,12 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan //排考课程表 var list = db.FindList(x => x.EPId == EPId); //班级 - var classInfo = db.FindList($"select ClassNo,count(1) as StuNum FROM Exam_ExamStudent where ESType='{exam_ExamPlan.PlanType}' and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' group by ClassNo"); + var classInfo = db.FindList($"select ClassNo,count(1) as StuNum FROM Exam_ExamStudent where ESEnabled=1 and ESType='{exam_ExamPlan.PlanType}' and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' group by ClassNo"); foreach (var lesson in list) { //考试课程信息 var examLesson = db.FindEntity(x => x.ELId == lesson.ELId); - + //应排班级数 lesson.ClassNum = classInfo.Count(); //应考人数 @@ -279,6 +280,50 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan } } + /// + /// 判断考试时间是否冲突 + /// + /// + public (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity) + { + try + { + var epl = this.BaseRepository("CollegeMIS").FindEntity(entity.EPLId); + //查询和entity考试日期同一天的考试课程 + var daylist = this.BaseRepository("CollegeMIS").FindList($"select * from [dbo].[Exam_ExamPlanLesson] where epid='{epl.EPId}' and examtime is not null and datediff(day, examdate, '{entity.ExamDate}') = 0"); + //考试开始时间 + var examstartTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeStart.Trim()); + //考试结束时间 + var examendTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeEnd.Trim()); + + foreach (var examPlanLesson in daylist) + { + //开始时间 + var startTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[0]); + //结束时间 + var endTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[1]); + if ((examstartTime >= startTime && examstartTime <= endTime) || + (examendTime >= startTime && examendTime <= endTime)) + { + return (true, examPlanLesson.LessonName); + } + + } + + return (false, ""); + } + 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/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs index c7eb75789..2bc99622f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentEntity.cs @@ -81,6 +81,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展字段 [NotMapped] public int StuNum { get; set; } + [NotMapped] + public string ClassName { get; set; } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs index f95d16c92..951809e3b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs @@ -91,9 +91,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" ClassNo,count(1) as StuNum,AcademicYearNo,Semester,ESType "); + strSql.Append(@" t.ClassNo,count(1) as StuNum,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "); strSql.Append(" FROM Exam_ExamStudent t "); - strSql.Append(" WHERE 1=1 "); + strSql.Append(" left join classinfo c on t.ClassNo=c.ClassNo "); + strSql.Append(" WHERE t.ESEnabled=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); @@ -112,6 +113,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); strSql.Append(" AND t.ClassNo = @ClassNo "); } + if (!queryParam["ClassName"].IsEmpty()) + { + dp.Add("ClassName", "%" + queryParam["ClassName"].ToString() + "%", DbType.String); + strSql.Append(" AND c.ClassName Like @ClassName "); + } if (!queryParam["StuNo"].IsEmpty()) { dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); @@ -134,7 +140,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //排考安排课程表Id if (!queryParam["EPLId"].IsEmpty()) { - strSql.Append($" and classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')"); + strSql.Append($" and t.classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')"); } //排考记录表Id if (!queryParam["EPId"].IsEmpty()) @@ -145,7 +151,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' "); } } - strSql.Append(" group by ClassNo,AcademicYearNo,Semester,ESType "); + strSql.Append(" group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "); return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Sanitation/SanitationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Sanitation/SanitationBLL.cs index 0607c7858..d76ca24eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Sanitation/SanitationBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Sanitation/SanitationBLL.cs @@ -86,7 +86,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement showcheck = false, checkstate = 0, isexpand = false, - parentId = item.ParentID == null ? "" : item.ParentID + parentId = item.ParentID == null ? "" : item.ParentID, + title = item.BuildType, }; treeList.Add(node); }