diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs index e6913b568..7a33ebd0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs @@ -155,6 +155,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var data = await arrangeExamTermIBLL.AsyncArrangeExamDataNew(entity); return Success(data); } + + + [HttpGet] + public ActionResult GetClassTree() + { + return Success(arrangeExamTermNewIBLL.GetClassTree()); + } + + public ActionResult GetLessonData() + { + return Success(arrangeExamTermNewIBLL.GetClassTree()); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml index 509d1e2c0..8b9988065 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml @@ -2,25 +2,34 @@ ViewBag.Title = "排考2021新"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
+
+
+
班级信息
+
+
+
-
+
+
+ 班级信息 +
-
+
-
+
-
+
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js index d31e68529..00536ab4a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js @@ -11,12 +11,21 @@ var bootstrap = function ($, learun) { "use strict"; var datebegin = ''; var dateend = ''; + var ClassNo = ''; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetClassTree', + nodeClick: function (item) { + ClassNo = item.id; + page.search({ ClassNo: item.id }); + } + }); $('.datetime').each(function () { $(this).lrdate({ dfdata: [ @@ -47,7 +56,7 @@ var bootstrap = function ($, learun) { }); // 查询 $('#btn_Search').on('click', function () { - page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -70,6 +79,13 @@ var bootstrap = function ($, learun) { text: 'text' }); //课程 + //$('#LessonNo').lrselect({ + // placeholder: "请选择课程", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', + // value: 'value', + // text: 'text' + //}); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); @@ -80,14 +96,15 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, - { label: '考试开始时间', name: 'StartDate', width: 120, align: "left" }, - { label: '考试结束时间', name: 'EndDate', width: 120, align: "left" }, + { label: '考试日期', name: 'ExamDate', width: 120, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, + { label: '班级名称', name: 'ClassName', width: 100, align: "left" }, { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, { label: '学生姓名', name: 'StuName', width: 200, align: "left" }, { label: '座位编号', name: 'SitNumber', width: 100, align: "left" } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml index 03cd7bd7a..41aadd3c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml @@ -29,8 +29,8 @@
负责人
- -
+
+
分管校长
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js index 222bbfc67..1f06e8ae0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js @@ -37,6 +37,13 @@ var bootstrap = function ($, learun) { } } }); + //部门负责人 + $("#F_Manager").lrformselect({ + layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', + layerUrlW: 400, + layerUrlH: 300, + dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + }); $('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index c104c04d9..6ea627085 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -112,10 +112,22 @@ var bootstrap = function ($, learun) { { label: "部门编号", name: "F_EnCode", width: 100, align: "left" }, { label: "部门简称", name: "F_ShortName", width: 100, align: "left" }, { label: "部门性质", name: "F_Nature", width: 100, align: "left" }, - { label: "负责人", name: "F_Manager", width: 100, align: "left" }, + { + label: "负责人", name: "F_Manager", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, { label: "分管校长", name: "F_SchoolMaster", width: 100, align: "left" }, { - label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , + label: "公告类别", name: "NoticeCategory", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getsAsync('dataItem', { key: value, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs index 55a82339a..929387918 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs @@ -205,16 +205,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var semester =entity.Semester; var schoolid = entity.F_SchoolId; this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'"); + this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermItemNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'"); //排考数据处理 var insertList = new List(); var arrangeExamTermData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); - var classRoomInfoData = this.BaseRepository("CollegeMIS").FindList().ToList(); - var lessonData = this.BaseRepository("CollegeMIS").FindList().ToList(); + var classinfoData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); + var studentData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}"); httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); var apiData = await Client.PostAsync(Config.GetValue("ArrangeExamAPINew"), httpContent).Result.Content.ReadAsStringAsync(); //明细接口 - Client.PostAsync(Config.GetValue("ArrangeExamItemAPINew"), httpContent); + //Client.PostAsync(Config.GetValue("ArrangeExamItemAPINew"), httpContent); if (!string.IsNullOrEmpty(apiData)) { var data = JsonConvert.DeserializeObject(apiData); @@ -253,7 +254,51 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration result = await BaseRepository("CollegeMIS").InsertAsync(insertList)>0; } } - + //明细对接 + string sql = @"SELECT semester.year AS 'AcademicYearNo',semester.number AS 'Semester',currid.number AS 'LessonNo',currid.name AS 'LessonName', + student.name AS 'StuName',student.number AS 'StuNo',classroom.name 'ClassRoomName',classroom.number AS 'ClassRoomNo', + paikao.time AS 'StartDate',paikao.endtime 'EndDate',a.number 'SitNumber', + (SELECT GROUP_CONCAT(teachername) FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) AS EmpName, + (SELECT GROUP_CONCAT(number) FROM tb_teacher WHERE id IN + (SELECT teacherid FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) ) AS EmpNo + FROM tb_studentpaikao a + + LEFT JOIN tb_student student ON student.id = a.student + LEFT JOIN tb_classroom classroom ON classroom.id = a.classroom + LEFT JOIN tb_curriculum currid ON currid.id = a.currid + LEFT JOIN tb_semester semester ON semester.id = a.semester + LEFT JOIN tb_paikaorule paikao ON paikao.currid = a.currid where semester.year='"+academicYearNo+ "' and semester.number='"+semester+"'"; + var list= BaseRepository("paikeDbString").FindList(sql); + var listsqlserver =new List(); + foreach (var item in list) + { + ArrangeExamTermItemNewEntity aetitem = new ArrangeExamTermItemNewEntity(); + aetitem.Create(); + aetitem.AcademicYearNo = item.AcademicYearNo; + aetitem.Semester = item.Semester; + aetitem.LessonNo = item.LessonNo; + aetitem.LessonName = item.LessonName; + item.ExamDate = Convert.ToDateTime(item.StartDate); + aetitem.ExamDate = item.ExamDate; + item.ExamTime = Convert.ToDateTime(item.StartDate).ToShortTimeString() + "~" + Convert.ToDateTime(item.EndDate).ToShortTimeString(); + aetitem.ExamTime = item.ExamTime; + aetitem.ClassNo = item.ClassNo; + aetitem.ClassName = item.ClassName; + aetitem.EmpNo = item.EmpNo; + aetitem.EmpName = item.EmpName; + aetitem.ClassRoomNo = item.ClassRoomNo; + aetitem.ClassRoomName = item.ClassRoomName; + aetitem.F_SchoolId = schoolid; + aetitem.SitNumber = item.SitNumber; + aetitem.StuNo = item.StuNo; + aetitem.StuName = item.StuName; + var classitem = studentData.Find(m => m.StuNo == item.StuNo); + item.ClassNo = classitem?.ClassNo; + aetitem.ClassNo = item.ClassNo; + aetitem.ClassName = classinfoData.Find(m=>m.ClassNo==aetitem.ClassNo)?.ClassName; + listsqlserver.Add(aetitem); + } + BaseRepository("CollegeMIS").Insert(listsqlserver); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs index d49c077fc..f3d4459a4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs @@ -23,7 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 查询参数 /// - public IEnumerable GetList( string queryJson ) + public IEnumerable GetList(string queryJson) { try { @@ -161,6 +161,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public List GetClassTree() + { + try + { + var list = arrangeExamTermNewService.GetClassTree(); + List treeList = new List(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.ClassNo, + text = item.ClassName, + value = item.ClassNo, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "0" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs index 1c9e13cb4..2a7018854 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs @@ -52,5 +52,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity); #endregion + List GetClassTree(); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs index 3b9db361c..4ce6b0d75 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs @@ -132,7 +132,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// - /// 获取排考详情 直接读取排课系统mysql + /// 获取排考详情 /// /// /// @@ -142,19 +142,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append(@"select * from(SELECT semester.year AS 'AcademicYearNo',semester.number AS 'Semester',currid.number AS 'LessonNo',currid.name AS 'LessonName', - student.name AS 'StuName',student.number AS 'StuNo',classroom.name 'ClassRoomName',classroom.number AS 'ClassRoomNo', - paikao.time AS 'StartDate',paikao.endtime 'EndDate',a.number 'SitNumber', - (SELECT GROUP_CONCAT( teachername) FROM tb_paikao WHERE currid=a.`currid` AND classroomid = a.`classroom`) AS EmpName, - (SELECT GROUP_CONCAT(number) FROM tb_teacher WHERE id IN - (SELECT teacherid FROM tb_paikao WHERE currid=a.`currid` AND classroomid = a.`classroom`) ) AS EmpNo - FROM tb_studentpaikao a - - LEFT JOIN tb_student student ON student.id = a.student - LEFT JOIN tb_classroom classroom ON classroom.id = a.classroom - LEFT JOIN tb_curriculum currid ON currid.id = a.currid - LEFT JOIN tb_semester semester ON semester.id = a.semester - LEFT JOIN tb_paikaorule paikao ON paikao.currid= a.currid ) t where 1=1 "); + strSql.Append(@"select * from ArrangeExamTermItemNew t where 1=1 "); var queryParam = queryJson.ToJObject(); if (!queryParam["AcademicYearNo"].IsEmpty()) { @@ -186,10 +174,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) { - strSql.Append(" AND ( StartDate >= '" + queryParam["StartTime"].ToString() + "' AND StartDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } - return this.BaseRepository("paikeDbString").FindList(strSql.ToString(), null, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination); } catch (Exception ex) { @@ -289,5 +277,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + public IEnumerable GetClassTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from ArrangeExamTermItemNew group by ClassNo,ClassName order by ClassNo"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } }