From 115dd4fc25c7f81920837513bcebfddd73fd0d05 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 10 Jan 2025 14:28:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E8=AF=BE?= =?UTF-8?q?=E8=A1=A8=E5=90=8C=E6=AD=A5=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermService.cs | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 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 482c2f89a..a07d91abf 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 @@ -981,17 +981,30 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest var classroomData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); if (entity.SyncType == "1") { - var LessonList = BaseRepository("paikeDbString").FindList( - @"SELECT a.week AS 'week', a.section AS 'section',a.timetext AS 'timetext',c.name AS 'classname',c.number AS 'classnumber', - r.name AS 'roomname',r.number AS 'ClassroomNo',t.name AS 'teachername',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` - LEFT JOIN tb_teacher t ON t.id =a.`teacherid` - LEFT JOIN tb_curriculum cu ON cu.id=a.`curriculunid` - LEFT JOIN tb_semester s ON s.id=a.`semester` - WHERE 1=1 AND s.year = '" + entity.AcademicYearNo + "' AND s.number ='" + entity.Semester + "' AND c.number IS NOT NULL "); + var LessonList = BaseRepository("paikeDbString").FindList(@"SELECT + a.WEEK AS 'week', + a.section AS 'section', + a.timetext AS 'timetext', + c.NAME AS 'classname', + c.number AS 'classnumber', + 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` + LEFT JOIN tb_teacher t ON FIND_IN_SET(t.id,a.`teacherid`) + LEFT JOIN tb_curriculum cu ON cu.id = a.`curriculunid` + LEFT JOIN tb_semester s ON s.id = a.`semester` +WHERE + 1 = 1 + AND s.YEAR = '" + entity.AcademicYearNo + "' AND s.number = '" + entity.Semester + "' group by a.id"); if (LessonList.Count() > 0) { var oldArrangeLessonTermList = (await BaseRepository("CollegeMIS").FindListAsync()).ToList();