From b15ada89af03e56f99932c5d948de193f1dd1761 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 14 Jun 2022 15:59:28 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=A1=A8=E6=AF=8F?= =?UTF-8?q?=E5=A4=A910=E8=8A=82=E8=AF=BE=E6=94=B9=E4=B8=BA11=E8=8A=82?= =?UTF-8?q?=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/ArrangeLessonTerm/IndexLessonTerm.js | 10 +++++----- .../Views/ArrangeLessonTerm/IndexLessonTermStu.js | 6 +++--- .../Views/ArrangeLessonTerm/IndexLessonTermTeach.js | 6 +++--- .../ArrangeLessonTerm/ArrangeLessonTermService.cs | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js index 45c2576c4..397d036f5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js @@ -15,8 +15,8 @@ var bootstrap = function ($, learun) { // 数据处理 var html = '节次/星期星期一星期二星期三星期四星期五星期六星期日星期八星期九星期十'; var weekLists = data.weekList; - //十节课 - for (var i = 1; i < 11; i++) { + //十节课 2022.6.14 修改为一天十一节课 + for (var i = 1; i < 12; i++) { (function (arg) { var args = arg - 1; var datas = flogs(arg, weekLists, 'time'); @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { //某节课空 function tdHandle() { var html = ''; - for (var j = 0; j < 10; j++) { + for (var j = 0; j < 11; j++) { html += '
'; } return html; @@ -69,7 +69,7 @@ var bootstrap = function ($, learun) { //某节课不空 function tdHandles(lists) { var html = ''; - for (var k = 1; k < 11; k++) { + for (var k = 1; k < 12; k++) { (function (arg) { var args = arg - 1; var datas = flogs2(arg, lists, 'day'); @@ -330,7 +330,7 @@ var bootstrap = function ($, learun) { maxHeight: 300, allowSearch: true, //type: 'multiple', - data: [{ text: '1节', value: '1' }, { text: '2节', value: '2' }, { text: '3节', value: '3' }, { text: '4节', value: '4' }, { text: '5节', value: '5' }, { text: '6节', value: '6' }, { text: '7节', value: '7' }, { text: '8节', value: '8' }, { text: '9节', value: '9' }, { text: '10节', value: '10' }], + data: [{ text: '1节', value: '1' }, { text: '2节', value: '2' }, { text: '3节', value: '3' }, { text: '4节', value: '4' }, { text: '5节', value: '5' }, { text: '6节', value: '6' }, { text: '7节', value: '7' }, { text: '8节', value: '8' }, { text: '9节', value: '9' }, { text: '10节', value: '10' }, { text: '11节', value: '11' }], value: 'value', text: 'text' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js index a42b5cf7c..7631078c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js @@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { var html = '节次/星期星期一星期二星期三星期四星期五星期六星期日星期八星期九星期十'; var weekLists = data.weekList; //十节课 - for (var i = 1; i < 11; i++) { + for (var i = 1; i < 12; i++) { (function (arg) { var args = arg - 1; var datas = flogs(arg, weekLists, 'time'); @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { //某节课空 function tdHandle() { var html = ''; - for (var j = 0; j < 10; j++) { + for (var j = 0; j < 11; j++) { html += '
'; } return html; @@ -69,7 +69,7 @@ var bootstrap = function ($, learun) { //某节课不空 function tdHandles(lists) { var html = ''; - for (var k = 1; k < 11; k++) { + for (var k = 1; k < 12; k++) { (function (arg) { var args = arg - 1; var datas = flogs2(arg, lists, 'day'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js index b102eedd0..2fcab6769 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js @@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { var html = '节次/星期星期一星期二星期三星期四星期五星期六星期日星期八星期九星期十'; var weekLists = data.weekList; //十节课 - for (var i = 1; i < 11; i++) { + for (var i = 1; i < 12; i++) { (function (arg) { var args = arg - 1; var datas = flogs(arg, weekLists, 'time'); @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { //某节课空 function tdHandle() { var html = ''; - for (var j = 0; j < 10; j++) { + for (var j = 0; j < 11; j++) { html += '
'; } return html; @@ -69,7 +69,7 @@ var bootstrap = function ($, learun) { //某节课不空 function tdHandles(lists) { var html = ''; - for (var k = 1; k < 11; k++) { + for (var k = 1; k < 12; k++) { (function (arg) { var args = arg - 1; var datas = flogs2(arg, lists, 'day'); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index d8cc40f1f..0dec98bcf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -414,7 +414,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //直接修改 //判断是否冲突(新时间是否存在课程) if (db.FindList(x => - x.LessonDate == lessonDateNew && x.LessonTime == lessiontimeNow && x.CheckMark == "1" && x.ALTId != keyValue).Count() > 0) + x.LessonDate == lessonDateNew && x.LessonTime == lessiontimeNow && x.CheckMark == "1" && x.TeachClassNo == model.TeachClassNo && x.ALTId != keyValue).Count() > 0) { return "第" + weektime + "周当前课程冲突!"; } @@ -1199,7 +1199,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest MakeDate = now, AcademicYearNo = item.AcademicYearNo, Semester = item.Semester, - DeptNo = majorData.FirstOrDefault(m => m.MajorNo ==item.MajorNo)?.DeptNo, + DeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo, MajorNo = item.MajorNo, LessonNo = item.LessonNo, LessonName = item.LessonName, From aa5107f7dc063fe08d551d275d03dc3787fb1908 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 14 Jun 2022 16:13:40 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E7=AE=A1=E7=90=86--?= =?UTF-8?q?=E5=BA=8A=E4=BD=8D=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Accommodation/Index.js | 15 ++++++++------- .../Views/Accommodation/IndexBed.js | 4 +--- .../Views/Accommodation/IndexDistribution.js | 3 +-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js index ff87bf30a..490719349 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js @@ -262,10 +262,10 @@ var bootstrap = function ($, learun) { } }); } - + }); - + //分类管理 $("#lr_Classify").on("click", function () { learun.layerForm({ @@ -304,14 +304,14 @@ var bootstrap = function ($, learun) { selectedParent.ChildType = "5"; } var param = {}; - + if (item.title == '1') param.ApartmentId = item.value; else if (item.title == '2') param.UnitId = item.value; else if (item.title == '3') param.FloorId = item.value; - + //page.initGird(); //page.search({ ParentID: item.value }); page.search(param); @@ -433,6 +433,7 @@ var bootstrap = function ($, learun) { sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', //sord: 'ASC', isSubGrid: true, // 是否有子表 + //床位信息 subGridExpanded: function (subContentId, rowItem) { $('#' + subContentId).jfGrid({ url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID, @@ -454,7 +455,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - //sidx: 'DNo', + sidx: ' REPLACE(Name,\'床\',\'\')' //sord: 'ASC', }); //var param; @@ -467,7 +468,7 @@ var bootstrap = function ($, learun) { //$("#gridtable").empty(); //$("#gridtable")[0].dfop = undefined; //if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") { - + //} else { // //lrAuthorizeJfGridLei // $('#gridtable').jfGrid({ @@ -563,7 +564,7 @@ var bootstrap = function ($, learun) { // }); //} - + }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js index 04b75f750..218d9e18e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js @@ -85,9 +85,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - //isMultiselect: true, - //sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', - //sord: 'ASC', + sidx: ' REPLACE(Name,\'床\',\'\')' }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js index 71a969a6d..2e72dd9af 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js @@ -490,8 +490,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - //sidx: 'DNo', - //sord: 'ASC', + sidx: ' REPLACE(Name,\'床\',\'\')' }); //var param; //param = param || {}; From 6f5f4082f2484b426796bc0f31f7bdb1573f0387 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 14 Jun 2022 17:30:30 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E7=AE=A1=E7=90=86--?= =?UTF-8?q?=E5=BA=8A=E4=BD=8D=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E5=BA=8A=E4=BD=8D=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=9B=B4=E6=96=B0DNo=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AccommodationController.cs | 7 ++++++- .../Areas/LogisticsManagement/Views/Accommodation/Index.js | 2 +- .../LogisticsManagement/Views/Accommodation/IndexBed.js | 2 +- .../Views/Accommodation/IndexDistribution.js | 2 +- .../Learun.Application.Web/Learun.Application.Web.csproj | 2 ++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs index 24e3ad8cf..cecc6a18d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs @@ -243,7 +243,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers [AjaxOnly] public ActionResult GetBedListByRoomId(string RoomId) { - var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => x.DNo); + var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => Convert.ToInt32(x.DNo)); return Success(data); } /// @@ -434,6 +434,11 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers public ActionResult SaveBedForm(string keyValue, string ParentID, string strEntity) { Acc_DormitoryBuildEntity entity = strEntity.ToObject(); + if (entity.Name.Contains("床")) + { + entity.DNo = entity.Name.Replace("床", ""); + } + accommodationIBLL.SaveBedEntity(keyValue, ParentID, entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js index 490719349..162af9682 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js @@ -455,7 +455,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - sidx: ' REPLACE(Name,\'床\',\'\')' + sidx: ' CAST(REPLACE(Name,\'床\',\'\') as int)' //sord: 'ASC', }); //var param; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js index 218d9e18e..0cb2af6f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js @@ -85,7 +85,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - sidx: ' REPLACE(Name,\'床\',\'\')' + //sidx: ' CAST(REPLACE(Name,\'床\',\'\') as int)' }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js index 2e72dd9af..ad35ac2ef 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js @@ -490,7 +490,7 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: false, - sidx: ' REPLACE(Name,\'床\',\'\')' + //sidx: ' CAST(REPLACE(Name,\'床\',\'\') as int)' }); //var param; //param = param || {}; 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 c635205cf..78b3fd178 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 @@ -7775,6 +7775,8 @@ + + From b5c3ea4ee4fb81fc6b2d58c0213f70cb776b71e4 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 16 Jun 2022 10:30:39 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=B8=93=E4=B8=9A=E5=BC=80=E8=AF=BE?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ClassPlanController.cs | 34 +++++++++++-------- .../Controllers/ClassPlanTeachController.cs | 28 ++++++++------- .../TeachClass/TeachClassService.cs | 34 ++++++++++++------- 3 files changed, 56 insertions(+), 40 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index 428b71244..aca057421 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs @@ -118,6 +118,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } entity.State = 0; entity.IsAllowEdit = true; + entity.LessonSortNo = "1"; + entity.CheckMark = "1"; entity.MakeDate = DateTime.Now; var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.MajorNo, entity.Grade, entity.LessonNo); if (model != null) @@ -144,27 +146,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult CourseArranging(string keyValue) { var entity = classPlanIBLL.GetListById(keyValue); - List TeachList = new List(); + for (int i = 0; i < entity.Count; i++) { - var lessonList = classInfoIBLL.GetAllClass(). + var classList = classInfoIBLL.GetAllClass(). Where(x => x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade) - .OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList(); - if (lessonList.Count > 0) + .OrderBy(x => x.ClassNo).Select(stringClass => new { stringClass.ClassNo, stringClass.ClassName }).ToList(); + if (classList.Count > 0) { - for (int j = 0; j < lessonList.Count; j++) + for (int j = 0; j < classList.Count; j++) { - TeachClassEntity TeachEntity = new TeachClassEntity(); - TeachEntity.TeachClassNo = lessonList[j]; - TeachEntity.AcademicYearNo = entity[i].AcademicYearNo; - TeachEntity.MajorNo = entity[i].MajorNo; - TeachEntity.Grade = entity[i].Grade; - TeachEntity.Semester = entity[i].Semester; - TeachEntity.LessonNo = entity[i].LessonNo; - TeachEntity.StuNum = entity[i].StuNum; - TeachEntity.LessonSortNo = entity[i].LessonSortNo; - TeachEntity.F_SchoolId = entity[i].F_SchoolId; + TeachClassEntity TeachEntity = new TeachClassEntity + { + TeachClassNo = classList[j].ClassNo, + AcademicYearNo = entity[i].AcademicYearNo + MajorNo = entity[i].MajorNo, + Grade = entity[i].Grade, + Semester = entity[i].Semester, + LessonNo = entity[i].LessonNo, + StuNum = entity[i].StuNum, + LessonSortNo = entity[i].LessonSortNo, + F_SchoolId = entity[i].F_SchoolId + }; TeachList.Add(TeachEntity); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs index 75946a8fb..0fa2695f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs @@ -22,6 +22,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); #region 视图功能 @@ -142,48 +143,50 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SetTeach(string keyValue, string EmpNo) { var entityList = teachClassIBLL.GetTeachListById(keyValue); + var lessonData = lessonInfoIBLL.GetAllLesson(); + List TeachList = new List(); for (int i = 0; i < entityList.Count; i++) { - var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => - s.MajorNo == entityList[i].MajorNo - && s.F_SchoolId == entityList[i].F_SchoolId - && s.ClassNo == entityList[i].TeachClassNo + var stuDataList = stuInfoBasicIBLL.GetAllList().Where( + s => s.DeptNo == entityList[i].DeptNo && s.MajorNo == entityList[i].MajorNo + && s.F_SchoolId == entityList[i].F_SchoolId && s.ClassNo == entityList[i].TeachClassNo ).ToList(); if (stuDataList.Count > 0) { for (int j = 0; j < stuDataList.Count; j++) { StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); + TeachEntity.NoticeBookNo = stuDataList[j].StuNo; TeachEntity.StuNo = stuDataList[j].StuNo; + TeachEntity.DeptNo = entityList[i].DeptNo; TeachEntity.MajorNo = entityList[i].MajorNo; TeachEntity.ClassNo = stuDataList[j].ClassNo; - TeachEntity.GenderNo = stuDataList[j].GenderNo == true ? "0" : "1"; - TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; - TeachEntity.MajorDetailName = entityList[i].MajorDetailName; TeachEntity.StuName = stuDataList[j].StuName; + TeachEntity.GenderNo = Convert.ToInt32(stuDataList[j].GenderNo).ToString(); TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo; TeachEntity.Semester = entityList[i].Semester; TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo; TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo; TeachEntity.LessonNo = entityList[i].LessonNo; - TeachEntity.PartCode = entityList[i].PartCode; + TeachEntity.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName; + TeachEntity.PartCode = ""; TeachEntity.OrdinaryScoreScale = 0; TeachEntity.TermInScoreScale = 0; TeachEntity.TermEndScoreScale = 0; TeachEntity.OtherScoreScale = 0; TeachEntity.TeachClassNo = entityList[i].TeachClassNo; TeachEntity.LessonSortNo = entityList[i].LessonSortNo; - TeachEntity.StuSortNo = entityList[i].LessonSortNo; + TeachEntity.StuSortNo = "02"; TeachEntity.Grade = entityList[i].Grade; - TeachEntity.StudyScore = 2; - TeachEntity.TotalStudyHour = 2; + TeachEntity.StudyScore = 0; + TeachEntity.TotalStudyHour = 0; TeachEntity.IsInEffect = "1"; TeachEntity.IsPitchOn = "1"; + TeachEntity.EmpNo = EmpNo; TeachEntity.F_SchoolId = entityList[i].F_SchoolId; TeachEntity.CheckMark = "1"; TeachEntity.InsertTime = DateTime.Now; - TeachList.Add(TeachEntity); } } else @@ -211,7 +214,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers && y.F_SchoolId == entityList[i].F_SchoolId && y.ClassNo == entityList[i].TeachClassNo && y.LessonNo == entityList[i].LessonNo - && y.CheckMark == "1" ).Select(x => x.SelectId.ToString()).ToList(); Nid += string.Join(",", ssList) + ","; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs index 7a74b8abf..ea2dfbe83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs @@ -266,18 +266,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { foreach (var item in List) { - TeachClassEntity Teach = new TeachClassEntity(); - Teach.TeachClassNo = item.TeachClassNo; - Teach.AcademicYearNo = item.AcademicYearNo; - Teach.DeptNo = item.DeptNo; - Teach.MajorNo = item.MajorNo; - Teach.Grade = item.Grade; - Teach.Semester = item.Semester; - Teach.LessonNo = item.LessonNo; - Teach.StuNum = item.StuNum; - Teach.LessonSortNo = item.LessonSortNo; - Teach.F_SchoolId = item.F_SchoolId; - db.Insert(Teach); + TeachClassEntity Teach = new TeachClassEntity + { + TeachClassNo = item.TeachClassNo, + AcademicYearNo = item.AcademicYearNo, + DeptNo = item.DeptNo, + MajorNo = item.MajorNo, + Grade = item.Grade, + EmpNo = item.EmpNo, + Semester = item.Semester, + LessonNo = item.LessonNo, + StuNum = item.StuNum, + LessonSortNo = item.LessonSortNo, + F_SchoolId = item.F_SchoolId + }; + if (db.FindEntity( + x => x.F_SchoolId == Teach.F_SchoolId && x.AcademicYearNo == Teach.AcademicYearNo + && x.Semester == Teach.Semester && x.DeptNo == Teach.DeptNo + && x.MajorNo == Teach.MajorNo && x.TeachClassNo == Teach.TeachClassNo + && x.Grade == Teach.Grade && x.LessonNo == Teach.LessonNo) == null) + { + db.Insert(Teach); + } } db.Commit(); } From 27ffdc1cbcca41a34b0302573f23ad8519c2f61f Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 16 Jun 2022 11:16:19 +0800 Subject: [PATCH 5/7] --- .../Controllers/ClassPlanController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index aca057421..ea4221272 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs @@ -160,7 +160,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers TeachClassEntity TeachEntity = new TeachClassEntity { TeachClassNo = classList[j].ClassNo, - AcademicYearNo = entity[i].AcademicYearNo + AcademicYearNo = entity[i].AcademicYearNo, MajorNo = entity[i].MajorNo, Grade = entity[i].Grade, Semester = entity[i].Semester, From 7e455a3d008f340ef53f02a719dbe2915262a184 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 17 Jun 2022 14:29:15 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=95=BF=E9=98=B3=E6=8E=92=E8=AF=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AEmysql=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9C=89null=E6=95=B0=E6=8D=AE=E5=81=9A?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTerm/ArrangeLessonTermService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index 0dec98bcf..063724e29 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -1090,7 +1090,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher WHERE semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" - + entity.Semester + "' and a.type='1' "); + + entity.Semester + "' and a.type='1' and teacher.number is not null "); var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync(@"SELECT * FROM TeachClass WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList(); @@ -1179,7 +1179,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_course cour ON cour.id= p.`course` LEFT JOIN tb_curriculum curr ON curr.id=cour.`course` WHERE s.year = '" + entity.AcademicYearNo + "' AND s.number = '" + entity.Semester - + "' AND curr.`ification` ='1' ORDER BY p.`major` "); + + "' AND curr.`ification` ='1' and tt.EmpNo is not null ORDER BY p.`major` "); var majorData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); var lessonData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); if (TeachList.Count() > 0) From 745b004b3e1f53bd7396e7715a1d53f9c54041a7 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 17 Jun 2022 15:32:05 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=80=BC=E7=8F=AD=E5=AE=89=E6=8E=92?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonnelManagement/DutySchedule/DutySchedule.js | 9 +++++++-- .../PersonnelManagement/Views/DutySchedule/Index.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/DutySchedule/DutySchedule.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/DutySchedule/DutySchedule.js index 473e045da..c28e295cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/DutySchedule/DutySchedule.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/DutySchedule/DutySchedule.js @@ -74,8 +74,13 @@ }, rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 _$item.addClass('lr-list-item lr-list-item-multi'); - _$item.append($('

时间:

').dataFormatter({ - value: _item.Date, + _$item.append($('

开始时间:

').dataFormatter({ + value: _item.StartTime, + type: 'datetime', + dateformat: 'yyyy-MM-dd' + })); + _$item.append($('

结束时间:

').dataFormatter({ + value: _item.EndTime, type: 'datetime', dateformat: 'yyyy-MM-dd' })); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js index 97590ef35..39b3f0932 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js @@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/DutySchedule/GetPageList', headData: [ { label: "值班开始时间", name: "StartTime", width: 200, align: "left" },