From c966c304312220459f6ed2b216610746f2446646 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 15 Apr 2022 11:45:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E8=AF=BE=E7=A8=8B=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=88=E7=B3=BB=E3=80=81=E4=B8=93=E4=B8=9A?= =?UTF-8?q?=E3=80=81=E5=B9=B4=E7=BA=A7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Exam_ExamLesson/Form.cshtml | 30 +++++++++++----- .../Views/Exam_ExamLesson/Form.js | 35 +++++++++++++++++++ .../Views/Exam_ExamLesson/Index.js | 30 ++++++++++++++-- .../Learun.Application.Web.csproj | 1 - .../Exam_ExamLesson/Exam_ExamLessonEntity.cs | 17 ++++++++- .../Exam_ExamLesson/Exam_ExamLessonService.cs | 11 ++---- 6 files changed, 103 insertions(+), 21 deletions(-) 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 5336a2785..ddbb6f774 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 @@ -3,27 +3,39 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
学年*
-
+
-
+
学期*
-
+
-
+
+
*
+
+
+
+
专业*
+
+
+
+
年级*
+
+
+
课程编号*
-
+
课程名称*
- +
-
+
排序号
-
+
是否启用*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js index e349cba9a..1693b95a7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js @@ -30,6 +30,41 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + //年级 + $('#Grade').lrselect({ + placeholder: "请选择年级", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + value: 'deptno', + text: 'deptname', + maxHeight: 200, + select: function(item) { + var NDeptNo = $("#DeptNo").lrselectGet(); + 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 + ")" }, + value: "majorno", + text: "majorname", + maxHeight: 200 + }); + } else { + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, + value: "majorno", + text: "majorname", + maxHeight: 200 + }); + } + } + }); + $("#MajorNo").lrselect(); $('#ELEnabled').lrRadioCheckbox({ type: 'radio', 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 76e17965d..17b88e233 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 @@ -153,11 +153,37 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', headData: [ { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, - { label: "学期", name: "Semester", 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: 'id', + 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" }, //{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, 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 df2c8a63d..255ef53c3 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 @@ -995,7 +995,6 @@ - diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs index 2a217151f..771ce6e4a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-04-12 15:47 /// 描 述:考试课程表 /// - public class Exam_ExamLessonEntity + public class Exam_ExamLessonEntity { #region 实体成员 /// @@ -40,6 +40,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("LESSONNO")] public string LessonNo { get; set; } /// + /// 年级 + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 系 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// /// 排序号 /// [Column("ELORDER")] 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 e81156627..1abc35f39 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 @@ -32,13 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(@" - t.ELId, - t.AcademicYearNo, - t.Semester, - t.LessonNo, - t.LessonName, - t.ELOrder, - t.ELEnabled + t.* "); strSql.Append(" FROM Exam_ExamLesson t "); strSql.Append(" WHERE 1=1 "); @@ -236,11 +230,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration string sql = $@"insert into Exam_ExamLesson([ELId] ,[AcademicYearNo] ,[Semester] +,Grade,DeptNo,MajorNo ,[LessonName] ,[LessonNo] ,[ELOrder] ,[ELEnabled]) -select NEWID(),AcademicYearNo,Semester,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' +select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) "; return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);