From 22324e10184a6a5ab7c470a11e7d35b8da011c3d Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 14 Aug 2024 17:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=92=E8=AF=BE=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E7=8F=AD=E7=BA=A7=E5=BC=80=E8=AF=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/ClassPlanTeach/Index.js | 36 +++++++++++---- .../Controllers/TimeTableController.cs | 5 +- .../Views/TimeTable/IndexInEducation.js | 4 +- .../ArrangeLessonTermService.cs | 46 ++++++++++--------- 4 files changed, 58 insertions(+), 33 deletions(-) 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 e2e559adb..15c4d0327 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 @@ -228,15 +228,35 @@ var bootstrap = function ($, learun) { { label: "教师名称", name: "EmpNo", width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', - key: value, - keyId: 'f_encode', - callback: function (_data) { - callback(_data['f_realname']); + if (value && value.indexOf(',') != -1) { + var content = ''; + var deptarr = value.split(','); + for (var i = 0; i < deptarr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: deptarr[i], + keyId: 'f_encode', + callback: function (_data) { + content += _data['f_realname']; + } + + }); } - }); - } + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_encode', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + } }, { label: "考试类型", name: "ExamType", width: 80, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs index 9cd394fdc..15023fa67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs @@ -363,7 +363,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return JsonResult(noDataResult); } //最大节次 - int maxlessontime = timeTables.Max(m =>Convert.ToInt32(m.LessonTime.Substring(1))); + //int maxlessontime = timeTables.Max(m =>Convert.ToInt32(m.LessonTime.Substring(1))); //班级列表 var classinfolist = timeTables.Select(m => new { m.TeachClassNo, m.ClassName}).OrderBy(m => m.TeachClassNo).GroupBy(m=>new {m.TeachClassNo,m.ClassName}); var formatData = from d in timeTables @@ -398,7 +398,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers ; var result = new - { schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", maxlessontime, classinfolist, weekList = formatData }; + //{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", maxlessontime, classinfolist, weekList = formatData }; + { schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", classinfolist, weekList = formatData }; return JsonResult(result); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js index 86acfa737..bc11f6488 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducation.js @@ -12,7 +12,9 @@ var bootstrap = function ($, learun) { function (data) { // 数据处理 var html = ''; - var weekLists = data.weekList; + var allList = data.weekList[0].list; + var weekLists = []; + $.each(allList) for (var i = 1; i < 11; i++) { (function (arg) { var args = arg - 1; 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 5f21ab225..5da3a75c8 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 @@ -725,8 +725,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest { var LessonList = BaseRepository("paikeDbString").FindList( @"SELECT a.WEEK AS 'week', a.section AS 'sectoin', a.timetext AS 'timetext', c.NAME AS 'classname', c.number AS 'classnumber', - r.NAME AS 'roomname', r.number AS 'roomnunber', GROUP_CONCAT(t.name) AS 'teachername', GROUP_CONCAT(t.number) AS 'teachernumber', - cu.NAME AS 'currname', cu.number AS 'currnumber', s.YEAR AS 'semesteryear', s.number AS 'semesternumber' + r.NAME AS 'roomname', r.number AS 'ClassroomNo', GROUP_CONCAT(t.name) AS 'teachername', GROUP_CONCAT(t.number) AS 'teacherNumber', + cu.NAME AS 'curriculunName', cu.number AS 'curriculunNumber', s.YEAR AS 'year', s.number AS 'semester' FROM tb_paike a LEFT JOIN tb_clazz c ON c.id = a.`clazzid` LEFT JOIN tb_classroom r ON r.id = a.`classroomid` @@ -787,26 +787,28 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest else { //TeachClass数据处理 20211214改为直接读取mysql库 - var teachclasslist = BaseRepository("paikeDbString").FindList(@"SELECT clazz.name AS 'clazzname', - clazz.number AS 'TeachClassNo', - curriculum.name AS 'curriculumname', - curriculum.number AS 'LessonNo', - semester.year AS 'AcademicYearNo', - semester.number AS 'Semester', - a.jointclass AS 'jointclass', - a.type AS 'LessonSortNo', - a.classhour AS 'classhour', - room.name AS 'roomname', - room.number AS 'roomnumber', - teacher.name AS 'teachername', - teacher.number AS 'EmpNo' - FROM tb_class_plan a - LEFT JOIN tb_clazz clazz ON clazz.id = a.clazzid - LEFT JOIN tb_semester semester ON semester.id = clazz.semester - LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum - LEFT JOIN tb_classroom room ON room.id = a.classroom - LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher - WHERE a.type='1' and semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "'"); + var teachclasslist = BaseRepository("paikeDbString").FindList(@"SELECT + clazz.NAME AS 'clazzname', + clazz.number AS 'TeachClassNo', + curriculum.NAME AS 'curriculumname', + curriculum.number AS 'LessonNo', + semester.YEAR AS 'AcademicYearNo', + semester.number AS 'Semester', + a.jointclass AS 'jointclass', + a.type AS 'LessonSortNo', + a.classhour AS 'classhour', + room.NAME AS 'roomname', + room.number AS 'roomnumber', + GROUP_CONCAT(teacher.name) AS 'teachername', + GROUP_CONCAT(teacher.number) AS 'EmpNo' + FROM + tb_class_plan a + LEFT JOIN tb_clazz clazz ON clazz.id = a.clazzid + LEFT JOIN tb_semester semester ON semester.id = clazz.semester + LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum + LEFT JOIN tb_classroom room ON room.id = a.classroom + LEFT JOIN tb_teacher teacher ON FIND_IN_SET(teacher.id,a.teacher) + WHERE a.type='1' and semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "' group by a.id"); var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync(@"SELECT * FROM TeachClass WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList();