diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs index a39762517..3a4d9d858 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs @@ -63,7 +63,7 @@ namespace Learun.Application.Organization var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(fieldSql); - strSql.Append(" FROM LR_Base_Department t WHERE t.F_EnabledMark = 1 AND t.F_DeleteMark = 0 "); + strSql.Append(" FROM LR_Base_Department t WHERE t.F_EnabledMark = 1 AND t.F_DeleteMark = 0 order by F_Order"); return this.BaseRepository().FindList(strSql.ToString()); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs index cae6ef45f..c3a38f6f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs @@ -148,6 +148,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// 排考数据同步 /// /// + [HttpGet] + [AjaxOnly] + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + var data = await arrangeExamTermIBLL.AsyncArrangeExamDataNew(entity); + return Success(data); + } + [HttpGet] [AjaxOnly] public async Task AsyncArrangeExamData() 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 new file mode 100644 index 000000000..e6913b568 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs @@ -0,0 +1,161 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Threading.Tasks; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewController : MvcControllerBase + { + private ArrangeExamTermNewIBLL arrangeExamTermNewIBLL = new ArrangeExamTermNewBLL(); + private ArrangeExamTermBLL arrangeExamTermIBLL = new ArrangeExamTermBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + [HttpGet] + public ActionResult IndexItem() + { + return View(); + } + [HttpGet] + public ActionResult SyncByConditionForm() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = arrangeExamTermNewIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = arrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + [HttpGet] + [AjaxOnly] + public ActionResult GetItemPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = arrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var data = arrangeExamTermNewIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + arrangeExamTermNewIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,ArrangeExamTermNewEntity entity) + { + arrangeExamTermNewIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + + /// + /// 排考数据同步 + /// + /// + [HttpPost] + [AjaxOnly] + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + var data = await arrangeExamTermIBLL.AsyncArrangeExamDataNew(entity); + return Success(data); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml new file mode 100644 index 000000000..8a63b16cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
AETId*
+ +
+
+
AcademicYearNo*
+ +
+
+
Semester*
+ +
+
+
ExamDate*
+ +
+
+
ExamTime*
+ +
+
+
ClassNo*
+ +
+
+
ClassName*
+ +
+
+
LessonNo*
+ +
+
+
LessonName*
+ +
+
+
EmpNo*
+ +
+
+
EmpName*
+ +
+
+
ClassRoomNo*
+ +
+
+
ClassRoomName*
+ +
+
+
F_SchoolId*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js new file mode 100644 index 000000000..c956d0843 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js @@ -0,0 +1,38 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml new file mode 100644 index 000000000..ea475fcd3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js new file mode 100644 index 000000000..77b1e2e27 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js @@ -0,0 +1,120 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()}); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //排考数据同步 + $('#lr_arrange').on('click', function () { + learun.layerForm({ + id: 'SyncByConditionForm', + title: '按条件同步排考数据', + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SyncByConditionForm', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程 + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonid', text: 'lessonname' }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList', + headData: [ + { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, + { label: '学期', name: 'Semester', width: 80, align: "left" }, + { label: '考试日期', name: 'ExamDate', width: 100, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 100, align: "left" }, + //{ label: '班级编号', name: 'ClassNo', width: 200, align: "left" }, + //{ label: '班级名称', name: 'ClassName', width: 200, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '教师编号', name: 'EmpNo', width: 100, align: "left" }, + { label: '教师姓名', name: 'EmpName', width: 100, align: "left" }, + { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" } + ], + mainId:'AETId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 new file mode 100644 index 000000000..5ae192032 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js") 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 new file mode 100644 index 000000000..8c0494fc1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js @@ -0,0 +1,109 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet() }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程 + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonid', text: 'lessonname' }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetItemPageList', + headData: [ + { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, + { label: '学期', name: 'Semester', width: 80, align: "left" }, + { label: '考试开始时间', name: 'StartDate', width: 100, align: "left" }, + { label: '考试结束时间', name: 'EndDate', width: 100, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '监考教师编号', name: 'EmpNo', width: 100, align: "left" }, + { label: '监考教师姓名', name: 'EmpName', width: 100, align: "left" }, + { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, + { label: '座位编号', name: 'SitNumber', width: 100, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, + { label: '学生姓名', name: 'StuName', width: 100, align: "left" } + ], + mainId: 'AETId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.cshtml new file mode 100644 index 000000000..272a8081e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "按条件同步排考数据"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
校区*
+
+
+
+
学年*
+
+
+
+
学期*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js new file mode 100644 index 000000000..bdb4d7fa6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-02-27 11:05 + * 描 述:按条件同步排考数据 + */ +var acceptClick; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bind(); + //page.initData(); + }, + bind: function () { + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + }, + initData: function () { + //if (!!selectedRow) { + // $('#form').lrSetFormData(selectedRow); + //} + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/AsyncArrangeExamDataNew', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js index a9c03936c..7f027b26c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js @@ -160,7 +160,7 @@ } d.write(""); d.write(""); - d.write("

西昌民族幼儿师范高等专科学校 收文 (办件)处理笺

"); + //d.write("

西昌民族幼儿师范高等专科学校 收文 (办件)处理笺

"); var $table = a('
'); var num = 24; var $tr = a(''); 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 f6f41c7d9..f0956d504 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 @@ -820,6 +820,7 @@ + @@ -929,6 +930,8 @@ + + @@ -6259,6 +6262,10 @@ + + + + @@ -7459,6 +7466,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index ca0d018a1..2429bf817 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -1,37 +1,42 @@  - - + - - + - - + - - + - - - - - + - - - + - - + - + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 28fd8c9e0..7da28dc63 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -1,175 +1,176 @@  - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs new file mode 100644 index 000000000..8b2d3e607 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewMap : EntityTypeConfiguration + { + public ArrangeExamTermNewMap() + { + #region 表、主键 + //表 + this.ToTable("ARRANGEEXAMTERMNEW"); + //主键 + this.HasKey(t => t.AETId); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index e84d2aed3..7832cd268 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -565,6 +565,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs index a2879c3b7..26737cdd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs @@ -148,6 +148,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + try + { + return await arrangeExamTermService.AsyncArrangeExamDataNew(entity); + } + catch (Exception ex) + { + throw ex; + } + } /// /// 排考数据同步 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs index ba37dea28..6946ca13e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs @@ -61,6 +61,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// Task AsyncArrangeExamData(); + Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity); + /// /// 考试表 /// 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 b77159025..fb70f684b 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 @@ -190,6 +190,71 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + bool result = false; + try + { + //清空本学年本学期排考数据 + var academicYearNo =entity.AcademicYearNo; + 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}'"); + //排考数据处理 + 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(); + 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(); + if (!string.IsNullOrEmpty(apiData)) + { + var data = JsonConvert.DeserializeObject(apiData); + if (!data.success) + { + return result; + } + var dataList = data.entity.list; + if (dataList.Any()) + { + var insertDataList = new List(); + foreach (var item in dataList) + { + var insertData = new ArrangeExamTermNewEntity + { + AETId = Guid.NewGuid().ToString(), + AcademicYearNo = academicYearNo, + Semester = semester, + F_SchoolId = schoolid, + ExamDate = Convert.ToDateTime(item.date).Date, + ExamTime = Convert.ToDateTime(item.date).ToShortTimeString()+"~"+Convert.ToDateTime(item.time).ToShortTimeString(), + LessonNo =item.lessonNo, + LessonName=item.lessonName, + EmpNo=item.empNo, + EmpName = item.empName, + ClassRoomNo=item.classroomNo, + ClassRoomName = item.classroomName + }; + if (arrangeExamTermData.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0 + && insertDataList.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0) + { + insertDataList.Add(insertData); + } + } + insertList.AddRange(insertDataList); + result = await BaseRepository("CollegeMIS").InsertAsync(insertList)>0; + } + } + + } + catch (Exception ex) + { + throw ex; + } + return result; + } + /// /// 排考数据同步 /// @@ -708,8 +773,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string time { get; set; } public string date { get; set; } public string classroomId { get; set; } + public string classroomNo { get; set; } public string classroomName { get; set; } public string kaoshis { get; set; } + public string lessonNo { get; set; } + public string lessonName { get; set; } + public string empNo { get; set; } + public string empName { get; set; } } public class ArrangeExamEntity 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 new file mode 100644 index 000000000..d355186c1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs @@ -0,0 +1,167 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewBLL : ArrangeExamTermNewIBLL + { + private ArrangeExamTermNewService arrangeExamTermNewService = new ArrangeExamTermNewService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList( string queryJson ) + { + try + { + return arrangeExamTermNewService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermNewService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermNewService.GetItemPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public ArrangeExamTermNewEntity GetEntity(string keyValue) + { + try + { + return arrangeExamTermNewService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + arrangeExamTermNewService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity) + { + try + { + arrangeExamTermNewService.SaveEntity(keyValue, entity); + } + 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/ArrangeExamTermNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs new file mode 100644 index 000000000..f8dc0b35c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs @@ -0,0 +1,133 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewEntity + { + #region 实体成员 + /// + /// AETId + /// + /// + [Column("AETID")] + public string AETId { get; set; } + /// + /// AcademicYearNo + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// ExamDate + /// + /// + [Column("EXAMDATE")] + public DateTime? ExamDate { get; set; } + /// + /// ExamTime + /// + /// + [Column("EXAMTIME")] + public string ExamTime { get; set; } + /// + /// ClassNo + /// + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// ClassName + /// + /// + [Column("CLASSNAME")] + public string ClassName { get; set; } + /// + /// LessonNo + /// + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// LessonName + /// + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// EmpNo + /// + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// EmpName + /// + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// ClassRoomNo + /// + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// F_SchoolId + /// + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + + /// + /// 座位编号 + /// + public string SitNumber { get; set; } + public string StuNo { get; set; } + public string StuName { get; set; } + public string StartDate { get; set; } + public string EndDate { get; set; } + public string Teacher { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.AETId = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.AETId = keyValue; + } + #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 new file mode 100644 index 000000000..03d5d3c69 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public interface ArrangeExamTermNewIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetItemPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + ArrangeExamTermNewEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity); + #endregion + + } +} 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 new file mode 100644 index 000000000..a98c3c567 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs @@ -0,0 +1,298 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// + /// 构造方法 + /// + public ArrangeExamTermNewService() + { + fieldSql = @"*"; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermNew t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermNew t "); + var queryParam = queryJson.ToJObject(); + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo=@AcademicYearNo "); + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester=@Semester "); + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo=@EmpNo "); + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo=@LessonNo "); + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo=@ClassNo "); + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo=@ClassRoomNo "); + dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( ExamDate >= @startTime AND ExamDate <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取排考详情 直接读取排课系统mysql + /// + /// + /// + /// + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select * from(select a.student,b.name as StuName,b.number as StuNo,a.number as SitNumber,c.name as ClassRoomName,c.number as ClassRoomNo, +d.name as LessonName,d.number as LessonNo,e.`year` as AcademicYearNo,e.number as Semester, +f.time as StartDate,f.endtime as EndDate,g.teacher +from tb_paikaorule f left join tb_studentpaikao a on f.currid=a.currid +left join tb_paikaoroom g on f.id=g.paikaoruleid + left join tb_student b on a.student=b.id and a.semester=b.semester +left join tb_classroom c on a.classroom=c.id left join tb_curriculum d on a.currid=d.id +left join tb_semester e on a.semester=e.id +where a.student is not null and a.currid is not null) t where 1=1 "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo='"+ queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( StartDate >= '" + queryParam["StartTime"].ToString() + "' AND StartDate <= '" + queryParam["StartTime"].ToString() + "' ) "); + } + + var teacherlist = BaseRepository("paikeDbString").FindList("select name,id,number from tb_teacher"); + var list= this.BaseRepository("paikeDbString").FindList(strSql.ToString(), null, pagination); + foreach (var item in list) + { + if (!string.IsNullOrEmpty(item.Teacher)) + { + foreach (var teacheritem in item.Teacher.Split(',')) + { + item.EmpNo +=teacherlist.FirstOrDefault(m=>m.id==teacheritem)?.number +","; + item.EmpName += teacherlist.FirstOrDefault(m => m.id == teacheritem)?.name + ","; + } + } + } + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取实体数据 + /// + /// 主键 + /// + public ArrangeExamTermNewEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.AETId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 638bc329d..e63556a18 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1711,6 +1711,10 @@ + + + +