From 64cd6bcbdc9613511540826453d118241adff316 Mon Sep 17 00:00:00 2001 From: ndbs Date: Sun, 23 Apr 2023 16:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8A=A1=E7=AE=A1=E7=90=86=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTerm/ArrangeLessonTermService.cs | 5 +++-- .../TeachClass/TeachClassEntity.cs | 2 ++ .../TeachClass/TeachClassService.cs | 14 +++++++++++++- 3 files changed, 18 insertions(+), 3 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 da0273401..1a48b61e9 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 @@ -1161,7 +1161,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest @"select m.name AS 'MajorName', m.number AS 'MajorNo', tt.EmpNo AS 'EmpNo', tt.EmpName AS 'EmpName', sc.name AS 'F_SchoolName', sc.sid AS 'F_SchoolId', p.grade AS 'Grade', p.classhour AS 'classhour', curr.name AS 'LessonName', curr.number AS 'LessonNo', - s.year AS 'AcademicYearNo', s.number AS 'Semester' FROM tb_major_plan p + s.year AS 'AcademicYearNo', s.number AS 'Semester' ,cour.`assessmentmethod` AS 'ExamType' FROM tb_major_plan p LEFT JOIN ( SELECT t.teacher, @@ -1222,7 +1222,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest CheckMark = "1", TestMark = 0, F_SchoolId = item.F_SchoolId, - State = 1 + State = 1, + ExamType = item.ExamType }; if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester && diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs index 46e29051e..f560bca12 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs @@ -117,6 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public int? EndWeek { get; set; } [NotMapped] + public string ExamType { get; set; } + [NotMapped] public string LessonName { get; set; } [NotMapped] public string LessonSortDetailNo { get; set; } 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 4bb4388cc..83dad037f 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 @@ -32,8 +32,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" * "); + strSql.Append(@" t.*,op.ExamType,op.LessonName "); strSql.Append(" FROM TeachClass t "); + strSql.Append(" left join openlessonplan op on op.academicyearno=t.academicyearno and op.semester=t.semester and op.DeptNo=t.DeptNo and op.majorno =t.majorno "); + strSql.Append(" and op.grade =t.grade and op.lessonno =t.lessonno and op.F_SchoolId =t.F_SchoolId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -73,6 +75,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); strSql.Append(" AND t.LessonNo = @LessonNo "); } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.TeachClassNo = @ClassNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex)