diff --git a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0(塔里木).docx b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0(塔里木).docx new file mode 100644 index 000000000..40c37ee42 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园统一身份认证补充接口说明V1.0(塔里木).docx @@ -0,0 +1,69 @@ + + +数字化智慧校园 + + + + + +统一身份认证补充接口 + + + + + + +V1.0 + + + + + + +概述 + 根据特定需求开发补充接口 +登录接口 + 采用标准Http GET 请求发送用户名、密码到认证接口,接口实现用户名密码判定后返回标准json; + +请求地址:http://10.30.0.10:8000/Login/CheckLoginForSSOBC +请求方式:发送标准Http GET请求到认证地址 + +接口请求参数 + 参数 + 说明 +u +用户名 +p +密码 + +认证接口返回参数 + 参数 + 说明 +code +状态码 返回200成功、其他失败 +info +状态消息 返回login success表示登录成功、其他失败 +data +保留 暂时无用 + +登录成功后,认证服务器将在用户浏览器cookies中写入数字化智慧校园系统数据,第三方系统可直接跳转到http://10.30.0.10:8000/Home/Index 进入数字化智慧校园系统。 + +退出登录接口 + 第三方系统退出时,需要主动调用退出登录接口以同步数字化智慧校园系统退出状态。 + 采用标准Http POST 请求,返回标准json; + +请求地址:http://10.30.0.10:8000/Login/OutLoginForSSOBC +请求方式:发送标准Http POST请求到认证地址 + +接口请求参数:无 + +认证接口返回参数 + 参数 + 说明 +code +状态码 返回200成功、其他失败 +info +状态消息 返回logout success表示退出成功、其他失败 +data +保留 暂时无用 + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs index 2b643cac9..cf57f41e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs @@ -122,6 +122,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var data = arrangeLessonTermIBLL.GetEntity(keyValue); return Success(data); } + /// + /// 获取调度时间数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLessonDateList(string queryJson) + { + var data = arrangeLessonTermIBLL.GetList(queryJson).Where(x => x.LessonDate.HasValue).Select(x => x.LessonDate).Distinct().Select(x => new + { + text = x, + value = x + }).OrderBy(x => x.value); + + return Success(data); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ElectiveMergeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ElectiveMergeController.cs index d7ffb29b4..8bae3e3f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ElectiveMergeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ElectiveMergeController.cs @@ -149,6 +149,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers emItemEntity.ClassRoomName = olpoe.ClassRoomName; listElectiveMergeItemEntity.Add(emItemEntity); } + + if (listElectiveMergeItemEntity.Select(m=>m.LessonSection.Substring(0,1)).Distinct().Count()>1) + { + return Fail("合班失败!请确认所选课程是否为同一天课程。"); + } electiveMergeIBLL.SaveEntity(null, emMergeEntity, listElectiveMergeItemEntity); return Success("合班成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs new file mode 100644 index 000000000..95ae373a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanController : MvcControllerBase + { + private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ExamPlanIBLL.GetPageList(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 Exam_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity( keyValue ); + var jsonData = new { + Exam_ExamPlan = Exam_ExamPlanData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + exam_ExamPlanIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Exam_ExamPlanEntity entity = strEntity.ToObject(); + exam_ExamPlanIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs index 270d9f43b..d99e78b0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs @@ -104,6 +104,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers LessonInfoData.Introduction = WebHelper.HtmlDecode(LessonInfoData.Introduction); return Success(LessonInfoData); } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLessonByMajorNo(string majorNo) + { + var LessonInfoList = lessonInfoIBLL.GetLessonByMajorNo(majorNo); + return Success(LessonInfoList); + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index 622ce156b..a1a8f1486 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -5,6 +5,7 @@ using System.Web.Mvc; using System.Collections.Generic; using System; using System.Linq; +using Learun.Application.Base.SystemModule; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -25,6 +26,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers CdMajorIBLL CdMajorIBLL = new CdMajorBLL(); private StuSelectLessonListOfElectivePreIBLL stuSelectLessonListOfElectivePreIBLL = new StuSelectLessonListOfElectivePreBLL(); private OpenLessonPlanOfElectiveChangeIBLL openLessonPlanOfElectiveChangeIBLL = new OpenLessonPlanOfElectiveChangeBLL(); + private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); #region 视图功能 @@ -224,14 +226,57 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers if (!string.IsNullOrEmpty(entity.AfterLessonNo)) { model.AfterLessonNo = entity.AfterLessonNo; + var lesson = dataSourceIBLL.GetDataTable("LessonInfo", "t.lessonno='" + entity.AfterLessonNo + "'"); + if (lesson != null && lesson.Rows.Count > 0) + { + model.AfterLessonName = lesson.Rows[0]["lessonname"].ToString(); + } + } + else + { + var lesson = dataSourceIBLL.GetDataTable("LessonInfo", "t.lessonno='" + entity.LessonNo + "'"); + if (lesson != null && lesson.Rows.Count > 0) + { + model.AfterLessonName = lesson.Rows[0]["lessonname"].ToString(); + } } + if (!string.IsNullOrEmpty(entity.AfterEmpNo)) { model.AfterEmpNo = entity.AfterEmpNo; + + var emp = dataSourceIBLL.GetDataTable("EmpInfo", "t.empno='" + entity.AfterEmpNo + "'"); + if (emp != null && emp.Rows.Count > 0) + { + model.AfterEmpName = emp.Rows[0]["empname"].ToString(); + } } + else + { + var emp = dataSourceIBLL.GetDataTable("EmpInfo", "t.empno='" + entity.EmpNo + "'"); + if (emp != null && emp.Rows.Count > 0) + { + model.AfterEmpName = emp.Rows[0]["empname"].ToString(); + } + } + if (!string.IsNullOrEmpty(entity.AfterClassRoomNo)) { model.AfterClassRoomNo = entity.AfterClassRoomNo; + + var classRoom = dataSourceIBLL.GetDataTable("ClassRoomInfo", "t.classroomno='" + entity.AfterClassRoomNo + "'"); + if (classRoom != null && classRoom.Rows.Count > 0) + { + model.AfterClassRoomName = classRoom.Rows[0]["classroomname"].ToString(); + } + } + else + { + var classRoom = dataSourceIBLL.GetDataTable("ClassRoomInfo", "t.classroomno='" + entity.ClassRoomNo + "'"); + if (classRoom != null && classRoom.Rows.Count > 0) + { + model.AfterClassRoomName = classRoom.Rows[0]["classroomname"].ToString(); + } } openLessonPlanOfElectiveChangeIBLL.SaveEntity("", model); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index 905be20de..67e843cd9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -5,6 +5,7 @@ using Learun.Util; using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; using System.Linq; using System.Web.Mvc; @@ -183,6 +184,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 全院学生成绩查看页面 + /// + /// + [HttpGet] + public ActionResult AllStuScoreQueryIndex() + { + return View(); + } + /// + /// 全院学生成绩打印 + /// + /// + [HttpGet] + public ActionResult AllStuScoreQueryPrint() + { + ViewBag.WebApi = ConfigurationManager.AppSettings["WebApi"]; + return View(); + } #endregion #region 获取数据 @@ -715,6 +735,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(result); } + /// + /// 全院学生成绩查看 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreListByStuInfo(string queryJson) + { + var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson); + if (data.Any()) + { + data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x=>x.LessonSortNo).ThenBy(x => x.LessonNo); + } + + return Success(data); + } + public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo) { var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs index ef8c04c8d..77e7fec38 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs @@ -71,6 +71,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 补考名单查看 + /// + /// + [HttpGet] + public ActionResult IndexUnpass() + { + return View(); + } + #endregion #region 获取数据 @@ -106,6 +116,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 补考名单查看 + /// 分页参数 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForUnpass(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuScoreNotPassIBLL.GetPageListForUnpass(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// /// 获取表单数据 /// 主键 @@ -171,7 +203,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuScoreNotPassIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } - + /// 初始化补考成绩 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult InitScore() + { + stuScoreNotPassIBLL.InitScore(); + return Success("操作成功!"); + } + #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs index 380f8dc62..8eec54f49 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs @@ -71,6 +71,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } + /// + /// 二次补考成绩查看 + /// + /// + [HttpGet] + public ActionResult IndexUnpassTwo() + { + return View(); + } + #endregion #region 获取数据 @@ -146,6 +156,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(data); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForUnpass(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuScoreNotPassTwoIBLL.GetPageListForUnpass(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } #endregion #region 提交数据 @@ -176,6 +207,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuScoreNotPassTwoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + + /// + /// 初始化二次补考成绩 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult InitScore() + { + stuScoreNotPassTwoIBLL.InitScore(); + return Success("操作成功!"); + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs index cc47418eb..cb4b7d1b7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs @@ -34,6 +34,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + [HttpGet] + public ActionResult QueryStuSelectResultForTeacher() + { + return View(); + } /// /// 教务-审核表单页 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js index 3bbd0b3b6..46e63e24a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js @@ -46,16 +46,16 @@ var bootstrap = function ($, learun) { //调度开始时间 $('#AttemperStartTime').lrselectRefresh({ allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), - value: 'LessonDate', - text: 'LessonDate' + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), + value: 'value', + text: 'text' }); //调度结束时间 $('#AttemperEndTime').lrselectRefresh({ allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), - value: 'LessonDate', - text: 'LessonDate' + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), + value: 'value', + text: 'text' }); } }, @@ -180,20 +180,9 @@ var bootstrap = function ($, learun) { $('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); $('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); //调度开始时间 - $('#AttemperStartTime').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), - value: 'LessonDate', - text: 'LessonDate' - }); + $('#AttemperStartTime').lrselect({ allowSearch: true }); //调度结束时间 - $('#AttemperEndTime').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), - value: 'LessonDate', - text: 'LessonDate' - }); - + $('#AttemperEndTime').lrselect({ allowSearch: true }); }, initData: function () { if (!!keyValue) { @@ -234,7 +223,10 @@ var bootstrap = function ($, learun) { $('#NewClassroomNo').siblings('div').html('教室*'); } } - page.query(); + var timer = setTimeout(function () { + page.query(); + clearTimeout(timer); + }, 3000) } }); } @@ -268,7 +260,7 @@ var bootstrap = function ($, learun) { } }; // 设置表单数据 - setFormData = function (processId) { + setFormData = function (processId, param, callback) { if (!!processId) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { for (var id in data) { @@ -310,9 +302,14 @@ var bootstrap = function ($, learun) { $('#NewClassroomNo').siblings('div').html('教室*'); } } + var timer = setTimeout(function () { + page.query(); + clearTimeout(timer); + }, 3000) } }); } + callback && callback(); } // 验证数据是否填写完整 validForm = function () { @@ -336,7 +333,7 @@ var bootstrap = function ($, learun) { return false; } if (formData.AttemperEndTime < formData.AttemperStartTime) { - learun.alert.warning("调度结束时间应该大于调度开始时间!"); + learun.alert.warning("调度结束时间不能小于调度开始时间!"); return false; } } @@ -349,7 +346,7 @@ var bootstrap = function ($, learun) { $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { - callBack(res, formData, i); + callBack(res, i); } }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml index d7c970c4e..71071ebdb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml @@ -126,11 +126,11 @@
调度开始时间*
-
+
调度结束时间*
-
+
调度备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js index fb37b83ac..e0247da8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js @@ -41,21 +41,22 @@ var bootstrap = function ($, learun) { p.TeachClassNo = $('#TeachClassNo').lrselectGet(); p.EmpNo = $('#EmpNo').lrselectGet(); p.ClassroomNo = $('#ClassroomNo').lrselectGet(); + //console.log(p); //if (!!p.F_SchoolId && !!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { if (!!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { //调度开始时间 $('#AttemperStartTime').lrselectRefresh({ allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), - value: 'LessonDate', - text: 'LessonDate' + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), + value: 'value', + text: 'text' }); //调度结束时间 $('#AttemperEndTime').lrselectRefresh({ allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), - value: 'LessonDate', - text: 'LessonDate' + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), + value: 'value', + text: 'text' }); } }, @@ -179,20 +180,6 @@ var bootstrap = function ($, learun) { $('#NewEmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); $('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); $('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); - //调度开始时间 - $('#AttemperStartTime').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), - value: 'LessonDate', - text: 'LessonDate' - }); - //调度结束时间 - $('#AttemperEndTime').lrselect({ - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), - value: 'LessonDate', - text: 'LessonDate' - }); }, initData: function () { @@ -236,7 +223,7 @@ var bootstrap = function ($, learun) { $('#NewClassroomNo').siblings('div').html('教室*'); } } - page.query(); + } }); } @@ -270,7 +257,7 @@ var bootstrap = function ($, learun) { } }; // 设置表单数据 - setFormData = function (processId) { + setFormData = function (processId, param, callback) { if (!!processId) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { for (var id in data) { @@ -317,6 +304,7 @@ var bootstrap = function ($, learun) { } }); } + callback && callback(); } // 验证数据是否填写完整 validForm = function () { @@ -336,7 +324,7 @@ var bootstrap = function ($, learun) { } } else if (formData.AttemperType == "01") { //调课:调度时间比较 if (formData.AttemperEndTime < formData.AttemperStartTime) { - learun.alert.warning("调度结束时间应该大于调度开始时间!"); + learun.alert.warning("调度结束时间不能小于调度开始时间!"); return false; } } @@ -349,7 +337,7 @@ var bootstrap = function ($, learun) { $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { - callBack(res, formData, i); + callBack(res, i); } }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js index b390431e8..6b56aca3e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js @@ -408,21 +408,36 @@ var bootstrap = function ($, learun) { } }; refreshGirdData = function (res, postData) { - if (res.code == 200) { + //if (res.code == 200) { + // // 发起流程 + // learun.workflowapi.create({ + // isNew: true, + // schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 + // processId: processId, + // processName: '课程异动申请',// 对应流程名称 + // processLevel: '1', + // description: '', + // formData: JSON.stringify(postData), + // callback: function (res, data) { + // } + // }); + // page.search(); + //} + + if (res && res.code && res.code == 200) { // 发起流程 - learun.workflowapi.create({ - isNew: true, - schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 + + var postData = { + schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 processId: processId, - processName: '课程异动申请',// 对应流程名称 - processLevel: '1', - description: '', - formData: JSON.stringify(postData), - callback: function (res, data) { - } + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); }); - page.search(); + } + page.search(); }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMajor/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMajor/Index.js index 58dfa6639..6839e2da6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMajor/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMajor/Index.js @@ -5,6 +5,7 @@ * 描 述:选课专业 */ var refreshGirdData; +var acceptClick; var OLPOEId = request("OLPOEId"); var bootstrap = function ($, learun) { "use strict"; @@ -129,8 +130,17 @@ var bootstrap = function ($, learun) { $('#gridtablemanagemajor').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; + refreshGirdData = function () { page.search(); }; + + // 保存数据 + acceptClick = function (callBack) { + if (!!callBack) { + learun.layerClose(window.name); + callBack(); + } + }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.cshtml index a3ce1de60..d50374b93 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.cshtml @@ -11,10 +11,10 @@
部门
- @*
+
系部
-
*@ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.js index ca29ab2d4..9f1bb64ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/FormEdit.js @@ -35,7 +35,7 @@ var bootstrap = function ($, learun) { } }); $('#F_DepartmentId').lrselect(); - //$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml new file mode 100644 index 000000000..f8810fce8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "考试记录表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
排考名称*
+ +
+
+
排考类型*
+
+
+
+
排考编号*
+ +
+
+
排考总人数*
+ +
+
+
生成座位*
+
+
+
+
是否生成*
+
+
+
+
排序号*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js new file mode 100644 index 000000000..7a12a2cb2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js @@ -0,0 +1,68 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-14 18:12 + * 描 述:考试记录表 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#PlanType').lrDataItemSelect({ code: 'StudentType' }); + $('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml new file mode 100644 index 000000000..15b62df28 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "考试记录表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
排考名称
+ +
+
+
排考类型
+
+
+
+
排考编号
+ +
+
+
生成座位
+
+
+
+
是否生成
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js new file mode 100644 index 000000000..4a3990b5a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js @@ -0,0 +1,147 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-14 18:12 + * 描 述:考试记录表 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#PlanType').lrDataItemSelect({ code: 'StudentType' }); + $('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('EPId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('EPId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  生成排考名单 + $('#lr_generate').on('click', function () { + }); + //  清除排考名单 + $('#lr_cleargenerate').on('click', function () { + }); + //  安排考试 + $('#lr_planks').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPageList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { label: "排考名称", name: "PlanName", width: 100, align: "left" }, + { + label: "排考类型", name: "PlanType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'StudentType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "排考编号", name: "PlanCode", width: 100, align: "left" }, + { label: "排考总人数", name: "EPStuCount", width: 100, align: "left" }, + { + label: "生成座位", name: "EPRandom", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否"; + } + }, + { + label: "是否生成", name: "EPGenarate", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否"; + } + }, + { label: "排序号", name: "EPOrder", width: 100, align: "left" }, + ], + mainId: 'EPId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index b9446da71..470213e9a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -40,7 +40,10 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/Index?OLPOEId=' + keyValue, width: 1000, height: 700, - btn: null + //btn: null + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } }); } @@ -183,8 +186,9 @@ var bootstrap = function ($, learun) { formatter: function (cellvalue, row) { if (cellvalue.indexOf(',') == -1) return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; - else + else { return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; + } } }, { label: "上课时间", name: "LessonTime", width: 150, align: "left" }, @@ -221,18 +225,29 @@ var bootstrap = function ($, learun) { { label: "通过人数", name: "StuNum", width: 60, align: "left" }, { label: "已报人数(预)", name: "StuNumOfApplyPre", width: 80, align: "left" }, { label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" }, - //{ - // label: "选课专业", name: "ElectiveMajorList", width: 150, align: "left",formatter: function (cellvalue,row) { - // var str = ""; - // for (var i = 0; i < row.ElectiveMajorList.length; i++) { - // str += row.ElectiveMajorList[i].Grade + "级" + row.ElectiveMajorList[i].MajorName; - // if (i != row.ElectiveMajorList.length - 1) { - // str += ","; - // } - // } - // return str; - // } - //} + { + label: "是否已选专业", name: "IsElectiveMajor", width: 100, align: "left", formatter: function (cellvalue,row) { + if (!!row.ElectiveMajorList && row.ElectiveMajorList.length > 0) { + return ""; + } else { + return ""; + } + } + }, + { + label: "选课专业", name: "ElectiveMajorList", width: 150, align: "left", formatter: function (cellvalue, row) { + var str = ""; + if (!!cellvalue && cellvalue.length > 0) { + for (var i = 0; i < cellvalue.length; i++) { + str += cellvalue[i].Grade + "级" + cellvalue[i].MajorName; + if (i != cellvalue.length - 1) { + str += ","; + } + } + } + return str; + } + } ], mainId: 'Id', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.cshtml index 855d8696f..ac93283a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.cshtml @@ -26,21 +26,24 @@ - -
-
- +
+ 选课要求:至少需要选择3门不同的课程
- - -
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js index c426e026f..3079bf4fd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/StudentIndex.js @@ -176,7 +176,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListOfStudent', headData: [ { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, @@ -196,6 +196,21 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "课程类型", name: "LessonTypeId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + console.log(row.LessonTypeId); + + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', + key: row.LessonTypeId, + keyId: 'ltid', + callback: function (_data) { + callback(_data['lessontypename']); + } + }); + } + }, { label: "上课节次", name: "LessonSection", width: 150, align: "left", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.js index 8d45704d1..cc3d59d23 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.js @@ -17,7 +17,7 @@ var bootstrap = function ($, learun) { bind: function () { $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); $("#GenderNo").lrDataItemSelect({ code: 'usersex' }); - $("#PartyFaceNo").lrDataItemSelect({ code: 'BCdPartyFace' }); + $("#PartyFaceNo").lrDataItemSelect({ code: 'PolityStatus' }); $("#FamilyOriginNo").lrDataItemSelect({ code: 'ExamineeCategory' }); $("#NationalityNo").lrDataItemSelect({ code: 'National' }); $("#TestStuSortNo").lrDataItemSelect({ code: 'ExamineeType' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml new file mode 100644 index 000000000..c612bbfac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml @@ -0,0 +1,38 @@ +@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+  打印 +
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js new file mode 100644 index 000000000..a8553a604 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js @@ -0,0 +1,108 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-14 11:02 + * 描 述:全院学生成绩查看 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.StuNo = $.trim($('#StuNo').val()); + if (p.StuNo == null || p.StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + + page.initGird(); + page.search(p); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //打印 + $('#lr_print').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + var Semester = $('#Semester').lrselectGet(); + var StuNo = $.trim($('#StuNo').val()); + if (StuNo == null || StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + learun.layerForm({ + id: 'AllStuScoreQueryPrint', + title: '学生成绩单', + url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, + width: 1200, + height: 800, + btn: null + }); + }); + }, + bindSelect: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', + headData: [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 200, align: "left" }, + { label: '专业', name: 'MajorName', width: 100, align: "left" }, + { label: '班级', name: 'ClassName', width: 100, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, + { label: '科目', name: 'LessonName', width: 300, align: "left" }, + { label: '学分', name: 'StudyScore', width: 50, align: "left" }, + { label: '成绩', name: 'Score', width: 100, align: "left" }, + { label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, + { label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, + { label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, + { label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, + ], + mainId: 'StuNo', + isPage: false, + sidx: '', + sord: '', + }); + + //page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryPrint.cshtml new file mode 100644 index 000000000..a08a261a5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryPrint.cshtml @@ -0,0 +1,167 @@ + + + + + + + + + Document + + + + + +
+

塔里木职业技术学院学生成绩单

+
    + +
    + +
    +
    打印
    + + + + + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml new file mode 100644 index 000000000..7f42b08f4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "长阳迎新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    学年
    +
    +
    +
    +
    学期
    +
    +
    +
    +
    年级
    +
    +
    +
    +
    系部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    课程
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js new file mode 100644 index 000000000..672507755 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js @@ -0,0 +1,147 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-16 10:14 + * 描 述:长阳迎新 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#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' + }); + //年级 + $('#grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ + allowSearch: true, + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { + var deptno = ""; + if (val) { + deptno = val.deptno; + } + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, + text: "MajorName", + value: "MajorNo" + }) + } + }); + $('#MajorNo').lrDataSourceSelect({ + allowSearch: true, + code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: + function (val) { + var majorNo = ''; + if (val) { + majorNo = val.MajorNo; + } + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + + majorNo, + text: "ClassName", + value: "ClassNo" + }); + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/LessonInfo/GetLessonByMajorNo?majorNo=' + + majorNo, + text: "LessonName", + value: "LessonNo" + }); + } + }); + $('#ClassNo').lrDataSourceSelect({ + allowSearch: true, + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#LessonNo').lrDataSourceSelect({ + allowSearch: true, + code: 'LessonInfo', value: 'lessonno', text: 'lessonname' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 初始化补考成绩 + $('#lr_Init').on('click', function () { + learun.layerConfirm('是否确认初始化补考成绩!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/InitScore', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetPageListForUnpass', + headData: [ + { + label: "学号", name: "stuno", width: 80, align: "left" + }, + { + label: "姓名", name: "stuname", width: 100, align: "left" + }, + { label: "课程", name: "LessonName", width: 100, align: "left" }, + { label: "考试年级", name: "Grade", width: 100, align: "left" }, + { + label: "学年", name: "AcademicYearNo", width: 80, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'usersex', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + }, + { label: "学期", name: "Semester", width: 150, align: "left" }, + { label: "班级", name: "classname", width: 150, align: "left" }, + { label: "平时成绩", name: "OrdinaryScore2", width: 150, align: "left" }, + { label: "期末成绩", name: "TermEndScore2", width: 150, align: "left" }, + { label: "成绩", name: "Score2", width: 150, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'ClassNo,LessonNo', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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/StuScoreNotPassTwo/IndexUnpassTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.cshtml new file mode 100644 index 000000000..da3304a88 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "二次补考成绩查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    学年
    +
    +
    +
    +
    学期
    +
    +
    +
    +
    年级
    +
    +
    +
    +
    系部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    课程
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js new file mode 100644 index 000000000..2c9f8248a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js @@ -0,0 +1,143 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-16 10:14 + * 描 述:长阳迎新 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#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' + }); + //年级 + $('#grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { + var deptno = ""; + if (val) { + deptno = val.deptno; + } + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, + text: "MajorName", + value: "MajorNo" + }) + } + }); + $('#MajorNo').lrDataSourceSelect({ + code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: + function (val) { + var majorNo = ''; + if (val) { + majorNo = val.MajorNo; + } + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + + majorNo, + text: "ClassName", + value: "ClassNo" + }); + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/LessonInfo/GetLessonByMajorNo?majorNo=' + + majorNo, + text: "LessonName", + value: "LessonNo" + }); + } + }); + $('#ClassNo').lrDataSourceSelect({ + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#LessonNo').lrDataSourceSelect({ + code: 'LessonInfo', value: 'lessonno', text: 'lessonname' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 初始化补考成绩 + $('#lr_Init').on('click', function () { + learun.layerConfirm('是否确认初始化二次补考成绩!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/InitScore', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetPageListForUnpass', + headData: [ + { + label: "学号", name: "stuno", width: 80, align: "left" + }, + { + label: "姓名", name: "stuname", width: 100, align: "left" + }, + { label: "课程", name: "LessonName", width: 100, align: "left" }, + { label: "考试年级", name: "Grade", width: 100, align: "left" }, + { + label: "学年", name: "AcademicYearNo", width: 80, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'usersex', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + }, + { label: "学期", name: "Semester", width: 150, align: "left" }, + { label: "班级", name: "classname", width: 150, align: "left" }, + { label: "平时成绩", name: "OrdinaryScore2", width: 150, align: "left" }, + { label: "期末成绩", name: "TermEndScore2", width: 150, align: "left" }, + { label: "成绩", name: "Score2", width: 150, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'ClassNo,LessonNo', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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/StuSelectLessonListOfElective/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.cshtml index a3fd15128..26676a0c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.cshtml @@ -21,6 +21,9 @@ +
    + 选课要求:至少需要选择3门不同的课程 +
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.js index fa4d52a95..9da21e054 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.js @@ -68,7 +68,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetPageList', headData: [ { label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, @@ -87,6 +87,21 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "课程类型", name: "LessonTypeId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + console.log(row.LessonTypeId); + + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', + key: row.LessonTypeId, + keyId: 'ltid', + callback: function (_data) { + callback(_data['lessontypename']); + } + }); + } + }, { label: "上课节次", name: "LessonSection", width: 150, align: "left", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js index c5f5bb8cb..48fd142b5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', headData: [ { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.cshtml new file mode 100644 index 000000000..f7c8f9b3c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.cshtml @@ -0,0 +1,59 @@ +@{ + ViewBag.Title = "选修课课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    学年
    +
    +
    +
    +
    学期
    +
    +
    +
    +
    校区
    +
    +
    +
    +
    系部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    选课状态
    +
    +
    +
    +
    报名状态
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js new file mode 100644 index 000000000..a773bbc7e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js @@ -0,0 +1,218 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课课程 + */ +var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学年!"); + return false; + } + if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学期!"); + return; + } + page.search(queryJson); + }, 300, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); + $('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 60, align: "left" }, + { + label: "校区", name: "F_SchoolId", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + 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: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "选课状态", name: "Id", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == null || cellvalue == undefined || cellvalue == "") { + return '未报名'; + } else { + return '已报名'; + } + } + }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '报名成功'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + { label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, + { + label: "所选课程名称", name: "LessonName", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: row.LessonNo, + keyId: 'lessonno', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + } + }, + { label: "课程学分", name: "StudyScore", width: 100, align: "left" }, + { label: "教师编号", name: "EmpNo", width: 100, align: "left" }, + { + label: "教师姓名", name: "EmpName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: row.EmpNo, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "上课节次", name: "LessonSection", width: 150, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { + if (cellvalue.indexOf(',') == -1) { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; + } else { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; + } + } + } + }, + { label: "上课时间", name: "LessonTime", width: 180, align: "left" }, + { + label: "教室名称", name: "ClassRoomName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', + key: row.ClassRoomNo, + keyId: 'classroomno', + callback: function (_data) { + callback(_data['classroomname']); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'StuId', + isPage: true, + sidx: 'StuNo', + sord: 'asc' + }); + }, + search: function (param) { + param = param || {}; + param.EmpNo = learun.clientdata.get(['userinfo']).enCode; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs index 50cb98846..ddb78929f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs @@ -1,4 +1,5 @@ -using Learun.Application.Form; +using System; +using Learun.Application.Form; using Learun.Util; using System.Collections.Generic; using System.Web.Mvc; @@ -331,12 +332,20 @@ namespace Learun.Application.Web.Areas.LR_FormModule.Controllers [ValidateInput(false)] public ActionResult SaveInstanceForms(string data) { - List list = data.ToObject>(); - foreach (var item in list) + try { - formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); + List list = data.ToObject>(); + foreach (var item in list) + { + formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); + } + return Success("保存成功!"); } - return Success("保存成功!"); + catch (Exception e) + { + return Fail("输入字段超过限定长度,请精简内容后再试。"); + } + } /// /// 删除自定义表单数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml index ce5fadf56..d85c010ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml @@ -64,7 +64,7 @@
    -
    请填写Sql语句*
    +
    条件筛选Sql语句*
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js index 883981420..4eefbb4dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js @@ -366,19 +366,18 @@ var bootstrap = function ($, learun) { $('#step-1').lrSetFormData(data.module); $('#F_FormId').lrselectSet(data.relation.F_FormId); - + $("#F_CloseDoSql").val(data.relation.F_CloseDoSql); var settingJson = JSON.parse(data.relation.F_SettingJson); $('[name="formOpenType"][value="' + settingJson.layer.opentype + '"]').attr('checked', 'checked'); $('#fromWidth').val(settingJson.layer.width); $('#fromHeight').val(settingJson.layer.height); - $('[name="queryDatetime"][value="' + settingJson.query.isDate + '"]').attr('checked', 'checked'); $('#queryDatetime').lrselectSet(settingJson.query.DateField); $('#queryWidth').val(settingJson.query.width); $('#queryHeight').val(settingJson.query.height); queryData = settingJson.query.fields; - console.log(queryData); + $('#query_girdtable').jfGridSet('refreshdata', queryData); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js index 5bd0c94fa..49678ffae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js @@ -15,6 +15,7 @@ var relation; var mainTablePk = ""; var mainTable = ""; var mainCompontId = ""; +var sqlwhere = ""; var bootstrap = function ($, learun) { "use strict"; @@ -28,7 +29,7 @@ var bootstrap = function ($, learun) { relation = data.relation; settingJson = JSON.parse(data.relation.F_SettingJson); formScheme = JSON.parse(data.scheme.F_Scheme); - + sqlwhere = relation.F_CloseDoSql; for (var i = 0, l = formScheme.dbTable.length; i < l; i++) { var tabledata = formScheme.dbTable[i]; if (tabledata.relationName == "") { @@ -305,6 +306,9 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + if (!!sqlwhere) { + queryJson.sqlwhere = sqlwhere; + } param.queryJson = JSON.stringify(queryJson); $('#gridtable').jfGridSet('reload', param); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index 090db1c3a..a66d6452e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -711,13 +711,13 @@ var bootstrap = function ($, learun) { signUrl: signUrl, stamp: stamp }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { - learun.loading(false); - if (_data) { - learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); - learun.frameTab.close(tabIframeId); - } - }); + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { + learun.loading(false); + if (_data) { + learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); + learun.frameTab.close(tabIframeId); + } + }); }); }); } @@ -1721,14 +1721,18 @@ var bootstrap = function ($, learun) { formData[_item.field] = processId; point.formData = JSON.stringify(formData); formDataList.push(point); - - _item.isUpdate = true; + //liangkun 修复第一次保存失败报错后第二次直接会update + //_item.isUpdate = true; } }); if (formDataList.length > 0) { $.lrSaveForm(top.$.rootUrl + '/LR_FormModule/Custmerform/SaveInstanceForms', { data: JSON.stringify(formDataList) }, function (res) { if (res.code == 200) { + //liangkun 修复第一次保存失败报错后第二次直接会update + $.each(nwfForms, function (_index, _item) { + _item.isUpdate = true; + }); monitorSave(); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml index dac19e036..2adefd6c2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.cshtml @@ -8,9 +8,9 @@
    • 登录日志
    • -
    • 访问日志
    • -
    • 操作日志
    • -
    • 异常日志
    • +
    • 访问日志
    • +
    • 操作日志
    • +
    • 异常日志
    @@ -23,10 +23,22 @@
    - -
    -
    -  查询 +
    +
    +
    +
    操作用户
    + +
    +
    +
    系统功能
    + +
    +
    +
    操作类型
    + +
    +
    +
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js index f0b8e0869..f89f0c26f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/Index.js @@ -51,10 +51,9 @@ var bootstrap = function ($, learun) { }); }); // 查询 - $('#btn_Search').on('click', function () { - var keyword = $('#txt_Keyword').val(); - page.search({ keyword: keyword }); - }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs new file mode 100644 index 000000000..043d4af3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs @@ -0,0 +1,141 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleController : MvcControllerBase + { + private Acc_DormitoryRuleIBLL acc_DormitoryRuleIBLL = new Acc_DormitoryRuleBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = acc_DormitoryRuleIBLL.GetPageList(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 Acc_DormitoryRuleData = acc_DormitoryRuleIBLL.GetAcc_DormitoryRuleEntity(keyValue); + var jsonData = new + { + Acc_DormitoryRule = Acc_DormitoryRuleData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + acc_DormitoryRuleIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Acc_DormitoryRuleEntity entity = strEntity.ToObject(); + DateTime time; + bool flag = DateTime.TryParse(entity.LateReturnTime, out time); + if (!flag) + { + return Fail("晚归时间格式不正确!"); + } + + if (!(entity.PushHour >= 0 && entity.PushHour <= 23)) + { + return Fail("推送时间点填写不正确!"); + } + + var model = acc_DormitoryRuleIBLL.GetEnableEntity(); + if (entity.IsEnable == 1) + { + if (string.IsNullOrEmpty(keyValue) && model != null) + { + return Fail("只能有一个启用的规则!"); + } + else if (!string.IsNullOrEmpty(keyValue) && model != null && model.Id != keyValue) + { + return Fail("只能有一个启用的规则!"); + } + } + acc_DormitoryRuleIBLL.SaveEntity(keyValue, entity); + + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs index 94c336d32..24e3ad8cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs @@ -7,6 +7,7 @@ using System.Web.Helpers; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; +using System.Linq; namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { @@ -32,26 +33,31 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } - ///// - ///// 表单页 - ///// - ///// - //[HttpGet] - //public ActionResult Form() - //{ - // return View(); - //} + /// + /// 分配宿舍 + /// + /// + [HttpGet] + public ActionResult IndexDistribution() + { + return View(); + } /// /// 带参数的表单页 /// /// [HttpGet] - public ActionResult Form(string ParentID = null, string ParentName = null) + public ActionResult Form(string ParentID = null, string ParentName = null, string keyValue = null) { ViewBag.ParentID = ParentID; ViewBag.ParentName = ParentName; ViewBag.BuildType = accommodationIBLL.GetBuildType(ParentID); + if (!string.IsNullOrEmpty(keyValue)) + { + ViewBag.BuildType = accommodationIBLL.GetParentBuildType(keyValue); + } + return View(); } @@ -137,9 +143,70 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } + /// + /// 分配系 + /// + /// + [HttpGet] + public ActionResult FormDept() + { + return View(); + } - - + /// + /// 分配专业和班级 + /// + /// + [HttpGet] + public ActionResult FormClass() + { + return View(); + } + /// + /// 分配宿舍 + /// + /// + [HttpGet] + public ActionResult FormRoom() + { + return View(); + } + /// + /// 床位管理 + /// + /// + [HttpGet] + public ActionResult IndexBed() + { + return View(); + } + /// + /// 床位管理 + /// + /// + [HttpGet] + public ActionResult FormBed() + { + return View(); + } + /// + /// 分类管理 + /// + /// + [HttpGet] + public ActionResult FormClassify() + { + return View(); + } + /// + /// 分类管理 + /// + /// + [HttpGet] + public ActionResult IndexClassify() + { + return View(); + } #endregion @@ -167,6 +234,38 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return Success(jsonData); } + /// + /// 获取床位数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetBedListByRoomId(string RoomId) + { + var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => x.DNo); + return Success(data); + } + /// + /// 获取分类数据 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetClassifyList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = accommodationIBLL.GetClassifyList(paginationobj, queryJson).OrderBy(x => x.DNo); + //var jsonData = new + //{ + // rows = data, + // total = paginationobj.total, + // page = paginationobj.page, + // records = paginationobj.records + //}; + return Success(data); + } /// /// 获取宿舍楼数据 @@ -269,6 +368,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers var data = accommodationIBLL.GetTreeNew(); return Success(data); } + /// + /// 获取上级树形数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetClassifyTree() + { + var data = accommodationIBLL.GetClassifyTree(); + return Success(data); + } + + #endregion #region 提交数据 @@ -286,6 +398,18 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return Success("删除成功!"); } /// + /// 删除 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteBed(string keyValue, string ParentID) + { + accommodationIBLL.DeleteBed(keyValue, ParentID); + return Success("删除成功!"); + } + /// /// 保存实体数据(新增、修改) /// 主键 /// @@ -299,7 +423,54 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers accommodationIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveBedForm(string keyValue, string ParentID, string strEntity) + { + Acc_DormitoryBuildEntity entity = strEntity.ToObject(); + accommodationIBLL.SaveBedEntity(keyValue, ParentID, entity); + return Success("保存成功!"); + } + /// + /// 寝室分配系 + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveDeptClass(string keyValue, string strEntity, int type) + { + Acc_DormitoryBuildEntity entity = strEntity.ToObject(); + accommodationIBLL.SaveDeptClass(keyValue, entity, type); + return Success("保存成功!"); + } + + /// + /// 寝室分配床位 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveRoom(string RoomId, List list) + { + //List list = strEntity.ToObject>(); + string res = accommodationIBLL.SaveRoom(RoomId, list); + if (!string.IsNullOrEmpty(res)) + { + return Fail(res); + } + + return Success("保存成功!"); + } /// /// 学生宿舍的单元、楼层、房间、床位添加 @@ -312,11 +483,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers [AjaxOnly] public ActionResult DormitoryAdd(string keyValue, string strEntity) { - //dynamic entity = JsonConvert.DeserializeObject(strEntity); - //var ElementNum = entity.ElementNum; - //var FloorNum = entity.FloorNum; - //var RoomNum = entity.RoomNUm; - //var BedNum = entity.BedNum; JObject jsonEntity = JObject.Parse(strEntity); var elementNum = int.Parse(jsonEntity["ElementNum"].ToString()); @@ -344,7 +510,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers } - + /// /// 同步宿舍信息数据 /// @@ -353,10 +519,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { accommodationIBLL.SyncData(); return Success("同步成功"); - - } - //public ActionResult DormitoryAdd(string a,string ) #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs new file mode 100644 index 000000000..10d1f7135 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/DormitoryReturnController.cs @@ -0,0 +1,245 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; +using System; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public class DormitoryReturnController : MvcControllerBase + { + private DormitoryReturnIBLL dormitoryReturnIBLL = new DormitoryReturnBLL(); + private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormOut() + { + return View(); + } + + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormReturn() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexReport() + { + return View(); + } + + #endregion + + #region 获取数据 + /// + /// 获取左侧树形数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree() + { + var data = dormitoryReturnIBLL.GetTree(); + return Success(data); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = dormitoryReturnIBLL.GetPageList(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 Acc_DormitoryReturnData = dormitoryReturnIBLL.GetAcc_DormitoryReturnEntity(keyValue); + var jsonData = new + { + Acc_DormitoryReturn = Acc_DormitoryReturnData, + }; + return Success(jsonData); + } + /// + /// 获取下拉框数据 + /// + /// + [HttpGet] + public ActionResult GetDept() + { + var data = accommodationIBLL.GetDept(); + + return Success(data); + } + /// + /// 获取下拉框数据 + /// + /// + [HttpGet] + public ActionResult GetMajor(string strWhere) + { + var data = accommodationIBLL.GetMajor(strWhere); + + return Success(data); + } + /// + /// 获取下拉框数据 + /// + /// + [HttpGet] + public ActionResult GetClass(string strWhere) + { + var data = accommodationIBLL.GetClass(strWhere); + + return Success(data); + } + + [HttpGet] + public ActionResult GetReportList(string queryJson) + { + List data = dormitoryReturnIBLL.GetReportList(queryJson).ToList(); + var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList(); + List list2 = new List(); + foreach (var item in list) + { + var name = item.Key == 1 ? "已归宿" : "未归宿"; + list2.Add(new { name = name, value = item.num }); + + } + return JsonResult(list2); + } + + /// + /// + /// + /// + public ActionResult GetReportData(string queryJson) + { + List data = dormitoryReturnIBLL.GetReportList(queryJson).ToList(); + var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList(); + List list2 = new List(); + List list1 = new List(); + foreach (var item in list) + { + var name = item.Key == 1 ? "已归宿" : "未归宿"; + list2.Add(new { name = name, value = item.num }); + list1.Add(name); + + } + return Success(new { list1, list2 }); + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + dormitoryReturnIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveData(string keyValue, string strEntity) + { + Acc_DormitoryReturnEntity entity = strEntity.ToObject(); + dormitoryReturnIBLL.SaveData(keyValue, entity); + + return Success("保存成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string type, string strEntity) + { + Acc_DormitoryReturnEntity entity = strEntity.ToObject(); + dormitoryReturnIBLL.SaveEntity(type, entity); + + return Success("保存成功!"); + } + + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml new file mode 100644 index 000000000..100ee31f8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "宿舍晚归规则"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
    +
    +
    晚归时间*
    + +
    +
    +
    推送人*
    +
    +
    +
    +
    推送班主任*
    +
    +
    +
    +
    推送时间点*
    + +
    +
    +
    启用*
    +
    +
    +
    +@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js new file mode 100644 index 000000000..2dab9f792 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-03-14 12:05 + * 描 述:宿舍晚归规则 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#PushUser').lrDataSourceSelect({ + code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', type: 'multiple' + }); + + $('#ClassDiredctor').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + $('#IsEnable').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml new file mode 100644 index 000000000..ebbd5409c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "宿舍晚归规则"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js new file mode 100644 index 000000000..4b81ce7c9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js @@ -0,0 +1,139 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-03-14 12:05 + * 描 述:宿舍晚归规则 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/GetPageList', + headData: [ + { label: "晚归时间", name: "LateReturnTime", width: 100, align: "left" }, + { + label: "推送人", name: "PushUser", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + if (value.indexOf(',') != -1) { + var content = ''; + var timearr = value.split(','); + for (var i = 0; i < timearr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: timearr[i], + keyId: 'f_userid', + callback: function (_data) { + content += _data['f_realname']; + } + }); + } + content = content.substring(0, content.length - 1); + callback(content); + } else { + 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: "ClassDiredctor", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'YesOrNoInt', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "推送时间点", name: "PushHour", width: 100, align: "left" }, + { + label: "启用", name: "IsEnable", width: 100, align: "left", + formatter: function (cellvalue, rowObject) { + return cellvalue == 1 ? "" : ""; + } + + }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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/LogisticsManagement/Views/Accommodation/Corridor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml index 76b48d7ef..a6de56ca7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Corridor.cshtml @@ -58,11 +58,7 @@
    @@ -76,7 +72,9 @@
    -
    {{floor.dormitory.Name}}
    {{floor.dormitory.Sex | filter_sex}}
    +
    {{floor.dormitory.Name}} + @*
    {{floor.dormitory.Sex | filter_sex}}
    *@ +
    {{floor.RoomNum}}{{floor.BedNum}}
    @@ -344,7 +342,7 @@ }, addFloor: function () { var url = ""; - url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + this.unitID + '&ParentName=' + this.unitName; + url = top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?ParentID=' + this.unitID + '&ParentName=' + this.unitName; top.learun.layerForm({ id: 'form', title: '新增', @@ -361,7 +359,7 @@ top.learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, + url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?keyValue=' + id, width: 600, height: 400, callBack: function (id) { @@ -393,7 +391,7 @@ '
    ' + '
    ' + this.dormitoryName + '  ' + this.unitName + '
    ' + '
    ' + floor.dormitory.Name + - this.filter_sex(floor.dormitory.Sex) + + '' + this.filter_sex(floor.dormitory.Sex) + '' + '
    ' + '
    ' + '
    负 责 人' + floor.dormitory.Functionary + '
    负责人电话' + floor.dormitory.Phone + '
    ' + @@ -403,14 +401,14 @@ '
    ' + '
    ' + '
      ' + - '
    • 编     号' + floor.dormitory.Name + '
    • ' + - '
    • 价     格' + floor.dormitory.Price + '
    • ' + + '
    • 编     号' + floor.dormitory.DNo + '
    • ' + + '
    • 价     格' + (floor.dormitory.Price == null ? '' : floor.dormitory.Price) + '
    • ' + '
    • 房     间' + floor.RoomNum + '
    • ' + '
    • 入     住' + floor.HasStudentNum + '
    • ' + '
    • 空     床' + floor.NoStudentNum + '
    • ' + '
    • 床     位' + floor.BedNum + '
    • ' + - '
    • 涉及院系' + this.filter_Dept(floor.dormitory.Dept) + '
    • ' + - '
    • 涉及专业' + this.filter_Major(floor.dormitory.Major) + '
    • ' + + //'
    • 涉及院系' + this.filter_Dept(floor.dormitory.Dept) + '
    • ' + + //'
    • 涉及专业' + this.filter_Major(floor.dormitory.Major) + '
    • ' + '
    ' + '
    ' + //'' + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml index b9a5635ac..b85a292ec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Dormitory.cshtml @@ -62,11 +62,7 @@
    @@ -118,155 +114,6 @@ +@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js new file mode 100644 index 000000000..7f8aec873 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js @@ -0,0 +1,131 @@ +var bootstrap = function ($, learun) { + "use strict"; + var year = ""; + var page = { + init: function () { + page.bind(); + page.initGrid(); + page.initChart(); + }, + bind: function () { + $('#Dept').lrselect({ + width: '150px', + placeholder: "请选择系部", + allowSearch: true, + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetDept', + value: 'Dept', + text: 'DeptName', + select: function (item) { + if (item) { + $('#Major').lrselectRefresh({ + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor', + param: { strWhere: "m.deptno='" + item.Dept + "'" } + }); + $('#Class').lrselectRefresh({ + //url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass', + //param: { strWhere: "c.majorno=''" } + }); + } + } + }); + $('#Major').lrselect({ + width: '150px', + placeholder: "请选择专业", + allowSearch: true, + //url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor', + value: 'Major', + text: 'MajorName', + select: function (item) { + if (item) { + $('#Class').lrselectRefresh({ + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass', + param: { strWhere: "c.majorno='" + item.Major + "'" } + }); + } + } + }); + $('#Class').lrselect({ + width: '150px', + placeholder: "请选择班级", + allowSearch: true, + value: 'Class', + text: 'ClassName' + }); + + //查询 + $('#btn_Search').on('click', function () { + page.search({ Dept: $('#Dept').lrselectGet(), Major: $('#Major').lrselectGet(), Class: $('#Class').lrselectGet() }); + }); + + }, + initGrid: function () { + $(".lr-layout-grid").height($(window).height() - 110); + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportList', + headData: [ + { name: "name", label: "状态", width: 100, align: "center" }, + { name: "value", label: "人数", width: 150, align: "center" } + + ] + }); + page.search(); + }, + initChart: function (queryJson) { + var myChart1 = echarts.init(document.getElementById('main')); + //var myChart2 = echarts.init(document.getElementById('main1')); + queryJson = { + Dept: $('#Dept').lrselectGet(), + Major: $('#Major').lrselectGet(), + Class: $('#Class').lrselectGet() + }; + //console.log('queryJson', queryJson); + learun.httpAsyncPost(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportData', { queryJson: JSON.stringify(queryJson) }, function (res) { + if (res.code == 200) { + var option = { + title: { + text: '学生归宿统计', + x: 'center' + }, + tooltip: { + trigger: 'item', + formatter: "{a}
    {b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + left: 'left', + data: res.data.list1 + }, + series: [ + { + name: '学生归宿', + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: res.data.list2, + itemStyle: { + emphasis: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ] + }; + + myChart1.setOption(option); + + } + }); + + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + page.initChart(param); + } + }; + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs index 2b26e1d62..93f48ee5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs @@ -85,6 +85,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } /// + /// 班级课程表【教务】 + /// + /// + [HttpGet] + public ActionResult ClassIndexInEducation() + { + return View(); + } + /// /// 课程表【教学调度】 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml new file mode 100644 index 000000000..4a794077d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.cshtml @@ -0,0 +1,159 @@ +@{ + ViewBag.Title = "班级课程表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 查询 +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
      +
    • 节次/星期
    • +
    • 星期一
    • +
    • 星期二
    • +
    • 星期三
    • +
    • 星期四
    • +
    • 星期五
    • +
    • 星期六
    • +
    • 星期日
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js") + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js new file mode 100644 index 000000000..472359edf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js @@ -0,0 +1,202 @@ +var refreshGirdData; +var bootstrap = function ($, learun) { + var startTime; + var endTime; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + loadData: function (param) { + $.lrSetFormWithParam(top.$.rootUrl + '/PersonnelManagement/TimeTable/GetDataInEducation', param, + function (data) { + // 数据处理 + var html = ''; + var weekLists = data.weekList; + for (var i = 1; i < 11; i++) { + (function (arg) { + var args = arg - 1; + var datas = flogs(arg, weekLists, 'time'); + html += ' ' + arg + '节'; + if (datas) { + var lists = datas.list; + html += tdHandles(lists); + } else { + html += tdHandle(arg); + } + html += ''; + })(i); //调用时参数 + } + $('.personT').text(data.schoolName); + $('.perSemester').text(data.semester); + $('.perFestivalsBox table').html(html); + + function flogs(num, data, obj) { + var flog = false; + $.each(data, + function (i, n) { + if (n[obj] == num) { + flog = n; + return; + } + }) + return flog; + } + function flogs2(num, data, obj) { + var arr = new Array(); + $.each(data, + function (i, n) { + if (n[obj] == num) { + arr.push(n); + } + }) + return arr; + } + + //某节课空 + function tdHandle() { + var html = ''; + for (var j = 0; j < 7; j++) { + html += '
    '; + } + return html; + } + + //某节课不空 + function tdHandles(lists) { + var html = ''; + for (var k = 1; k < 8; k++) { + (function (arg) { + var args = arg - 1; + var datas = flogs2(arg, lists, 'day'); + if (datas.length > 0) { + html += ''; + $.each(datas, function (i, item) { + if (i > 0) { + html += '
    '; + } + html += '
    课程:' + + item.curriculum + + '
    ' + + '
    教师:' + + item.teacher + + '
    ' + + '
    班级:' + + item.className + + '
    ' + + '
    教室:' + + item.classRoom + + '
    '; + }); + html += ''; + + } else { + html += '
    '; + } + + })(k); + } + return html; + } + }); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#datesearch').lrdate({ + dfdata: [ + { + name: '上周', + begin: function () { return learun.getTime(7); }, + end: function () { + return learun.getTime(1); + } + }, + { + name: '本周', + begin: function () { return learun.getTime(0); }, + end: function () { + return learun.getTime(-6); + } + }, + { + name: '下周', + begin: function () { return learun.getTime(-7); }, + end: function () { + return learun.getTime(-13); + } + }], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: 'currentWeek', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + //查询 + $('#lr_search').on('click', function () { + var p = {}; + p.schoolId = $('#F_SchoolId').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + page.search(p); + }); + }, + bindSelect: function () { + //校区 + $('#F_SchoolId').lrDataSourceSelect({ + code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { + if (!!item) { + // 班级 + $('#ClassNo').lrselectRefresh({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + param: { schoolId: item.f_companyid }, + value: 'value', + text: 'text' + }); + } else { + //班级 + $('#ClassNo').lrselectRefresh({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + param: { schoolId: "" }, + value: 'value', + text: 'text' + }); + } + } + }); + //班级 + $('#ClassNo').lrselect({ + placeholder: "请选择班级", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', + value: 'value', + text: 'text' + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + page.loadData(param); + } + }; + page.init(); +}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index 4c8044023..06b7dfc2b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -557,6 +557,11 @@ namespace Learun.Application.Web.Controllers { return Success(new { pwd = true }); } + //每月1号强制用户修改密码 + if (DateTime.Now.Day == 1 && up == "false") + { + return Success(new { pwd = true }); + } //是否30天未修改密码验证 //获取开关显示配置中“30天未修改密码登录后提示修改”项的配置 if (teachSwitchIBLL.FindFirst("modifypwdtip")) 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 22c6dcb25..74e2a3d31 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 @@ -824,6 +824,10 @@ + + + + @@ -6458,6 +6462,22 @@ + + + + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwd.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwd.js index 9e0bbba79..f6370ac69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwd.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwd.js @@ -35,6 +35,7 @@ var bootstrap = function ($, learun) { } if ($this.val() != $('#NewPwd').val()) { learun.alert.error("两次密码输入不一样"); + return false; } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index e78391a95..767cc70ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -2203,6 +2203,7 @@ dfop.rows = 1000000; data = data || dfop.param || {}; dfop.param = data.param || data; + dfop.running.pageparam.page = 1; _jfgrid.reload($self, dfop); break; case 'refresh': diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-excel.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-excel.js index a617e48ef..d3bd95e31 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-excel.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-excel.js @@ -61,6 +61,12 @@ callBack: function (id) { return top[id].acceptClick(); }, + end: function () { + if (learun.frameTab.currentIframe().$('#' + item.F_GridId)[0].dfop.rows == 1000000) { + learun.frameTab.currentIframe().$('#' + item.F_GridId)[0].dfop.rows = 30; + learun.frameTab.currentIframe().$('#' + item.F_GridId).jfGridSet('reload'); + } + }, btn: ['导出Excel', '关闭'] }); }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index f542e9f12..469130f66 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -34,6 +34,7 @@ + @@ -78,6 +79,7 @@ + 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 9592e4aee..2aaaf7c6c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -143,9 +143,9 @@ - + - + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index a5634307c..13908fea8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -212,6 +212,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs new file mode 100644 index 000000000..08c563989 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs @@ -0,0 +1,143 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using Nancy; +using Newtonsoft.Json; + +namespace Learun.Application.WebApi.Modules +{ + public class StuScoreApi : BaseNoLoginApi + { + public StuScoreApi() + : base("/Learun/adms/EducationalAdministration/StuScore") + { + Get["/scoreListByStuInfo"] = GetScoreListByStuInfo; + + } + + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); + private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); + private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); + + /// + /// 全院学生成绩查看-打印成绩单 + /// + /// + /// + private Response GetScoreListByStuInfo(dynamic _) + { + var param = this.GetReq(); + + ScoreListByStuInfo result = new ScoreListByStuInfo(); + + var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(param.StuNo); + if (stuInfoBasicEntity != null) + { + result.StuNo = stuInfoBasicEntity.StuNo; + result.StuName = stuInfoBasicEntity.StuName; + result.MajorNo = stuInfoBasicEntity.MajorNo; + result.ClassNo = stuInfoBasicEntity.ClassNo; + if (!string.IsNullOrEmpty(stuInfoBasicEntity.MajorNo)) + { + result.MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(stuInfoBasicEntity.MajorNo)?.MajorName; + } + if (!string.IsNullOrEmpty(stuInfoBasicEntity.ClassNo)) + { + result.ClassName = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo)?.ClassName; + } + } + var queryJson = JsonConvert.SerializeObject(param); + + var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson); + var dataTemp = data.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new ScoreList() + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuScoreEntityList = x.Select(y => new StuScoreModel() + { + AcademicYearNo = y.AcademicYearNo, + Semester = y.Semester, + LessonSortNo = y.LessonSortNo, + LessonSortName = y.LessonSortName, + LessonNo = y.LessonNo, + LessonName = y.LessonName, + StudyScore = y.StudyScore, + Score = y.Score, + ScoreOfNotPass = y.ScoreOfNotPass, + ScoreOfNotPassTwo = y.ScoreOfNotPassTwo + }).OrderBy(a=>a.LessonSortNo).ThenBy(a=>a.LessonNo).ToList() + }).ToList().OrderByDescending(x=>x.AcademicYearNo).ThenByDescending(x=>x.Semester); + result.ScoreList = dataTemp.ToList(); + + return Success(result); + + } + + public class Model + { + /// + /// 学年(18-19) + /// + public string AcademicYearNo { get; set; } + /// + /// 学期(1) + /// + public string Semester { get; set; } + /// + /// 学号 + /// + public string StuNo { get; set; } + + } + public class ScoreListByStuInfo { + public string StuNo { get; set; } + public string StuName { get; set; } + public string MajorNo { get; set; } + public string MajorName { get; set; } + public string ClassNo { get; set; } + public string ClassName { get; set; } + public List ScoreList { get; set; } + } + public class ScoreList { + public string AcademicYearNo { get; set; } + public string Semester { get; set; } + public List StuScoreEntityList { get; set; } + } + public class StuScoreModel { + public string AcademicYearNo { get; set; } + public string Semester { get; set; } + /// + /// 课程类别码 + /// + public string LessonSortNo { get; set; } + /// + /// 课程类别名称 + /// + public string LessonSortName { get; set; } + public string LessonNo { get; set; } + public string LessonName { get; set; } + /// + /// 学分 + /// + public decimal? StudyScore { get; set; } + /// + /// 成绩 + /// + public decimal? Score { get; set; } + /// + /// 第一次补考成绩 + /// + public string ScoreOfNotPass { get; set; } + /// + /// 第二次补考成绩 + /// + public string ScoreOfNotPassTwo { get; set; } + + } + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index 65df96b5e..457e01c62 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -13,7 +13,7 @@ using Nancy; namespace Learun.Application.WebApi.Modules { - public class TimeTable : BaseApi + public class TimeTable : BaseNoLoginApi { public TimeTable() : base("/learun/adms/timetable") @@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules Get["/list"] = GetList; Get["/StuList"] = GetStuInfo; Get["/StuLessonInfo"] = GetStuLessonInfo; + Get["/timeTableData"] = GetTimeTableData; } private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); @@ -111,6 +112,68 @@ namespace Learun.Application.WebApi.Modules } + + /// + /// 全院课程表【按班级分组】 + /// + /// + /// + private Response GetTimeTableData(dynamic _) + { + var param = this.GetReq(); + + TimeTableData result = new TimeTableData(); + + //开始时间 + var startdate = string.IsNullOrEmpty(param.StartDate) ? DateTime.Today : Convert.ToDateTime(param.StartDate); + var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd"); + var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); + result.StartDate = startDate; + result.EndDate = endDate; + + var semesterAndYear = Common.GetSemesterAndYear(startDate); + result.AcademicYearNo = semesterAndYear.AcademicYearLong; + result.Semester = semesterAndYear.Semester; + + //课程表数据 + var timeTableList = new List(); + //必修课课程表 + var data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, ""); + timeTableList.AddRange(data); + //选修课课程表 + var dataOfElective = arrangeLessonTermOfElectiveIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, ""); + timeTableList.AddRange(dataOfElective); + var dataTemp = timeTableList.GroupBy(x => new { x.TeachClassNo, x.ClassName, x.LessonSortNo }).Select(x => new ClassDataList() + { + ClassNo = x.Key.TeachClassNo, + ClassName = x.Key.ClassName, + LessonSortNo = x.Key.LessonSortNo, + TimeTableList = x.Select(y => new TwoDevelopment.EducationalAdministration.TimeTable() + { + AcademicYear = y.AcademicYear, + Semester = y.Semester, + DeptNo = y.DeptNo, + MajorNo = y.MajorNo, + F_SchoolId = y.F_SchoolId, + LessonNo = y.LessonNo, + LessonName = y.LessonName, + LessonDate = y.LessonDate, + LessonTime = y.LessonTime, + EmpNo = y.EmpNo, + EmpName = y.EmpName, + TeachClassNo = y.TeachClassNo, + ClassName = y.ClassName, + ClassRoomNo = y.ClassRoomNo, + ClassroomName = y.ClassroomName, + LessonSortNo = y.LessonSortNo + }).OrderBy(a => a.LessonTime.Substring(0, 1)).ThenBy(a => a.LessonTime.Substring(1)).ToList() + }).OrderBy(x => x.LessonSortNo).ThenBy(x => x.ClassNo).ToList(); + + result.ClassDataList = dataTemp; + + return Success(result); + + } /// /// 数字转中文 @@ -166,6 +229,30 @@ namespace Learun.Application.WebApi.Modules { public string StartDate { get; set; } public string EndDate { get; set; } + /// + /// 班级编号 + /// + public string ClassNo { get; set; } + /// + /// 教师编号 + /// + public string EmpNo { get; set; } } + public class TimeTableData + { + public string AcademicYearNo { get; set; } + public string Semester { get; set; } + public string StartDate { get; set; } + public string EndDate { get; set; } + public List ClassDataList { get; set; } + } + public class ClassDataList + { + public string ClassNo { get; set; } + public string ClassName { get; set; } + public string LessonSortNo { get; set; } + public List TimeTableList { get; set; } + } + } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeBLL.cs index 4d9dec5ce..a6ac7efe5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeBLL.cs @@ -514,9 +514,9 @@ namespace Learun.Application.Base.AuthorizeModule case 8: // ѧϵ { var empinfo = dataAuthorizeService.GetEmpInfoEntityByNo(userInfo.account); - if (empinfo != null&&!string.IsNullOrEmpty(empinfo.DeptNo)) + if (empinfo != null&&empinfo.Rows.Count>0&&empinfo.Rows[0]["DeptNo"]!=null) { - text = empinfo.DeptNo; + text = empinfo.Rows[0]["DeptNo"].ToString(); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeService.cs index 3c3870537..a96feced9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/DataAuthorize/DataAuthorizeService.cs @@ -2,6 +2,7 @@ using Learun.DataBase.Repository; using Learun.Util; using System; using System.Collections.Generic; +using System.Data; using System.Text; namespace Learun.Application.Base.AuthorizeModule @@ -265,11 +266,11 @@ namespace Learun.Application.Base.AuthorizeModule #endregion - public dynamic GetEmpInfoEntityByNo(string keyValue) + public DataTable GetEmpInfoEntityByNo(string keyValue) { try { - return this.BaseRepository("CollegeMIS").FindEntity("select * from EmpInfo where EmpNo='"+keyValue+"'"); + return this.BaseRepository("CollegeMIS").FindTable("select * from EmpInfo where EmpNo='"+keyValue+"'"); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs index 1e3296b7e..1948b9075 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs @@ -902,6 +902,11 @@ namespace Learun.Application.Form queryParamTemp.Add("lrend", queryParam["lrend"].ToDate()); querySql += " AND (" + formSchemeModel.mainTableName + "tt." + queryParam["lrdateField"].ToString() + " >=@lrbegin AND " + formSchemeModel.mainTableName + "tt." + queryParam["lrdateField"].ToString() + " <=@lrend ) "; } + //自定义sql查询条件 + else if (queryParam != null && !queryParam["sqlwhere"].IsEmpty()) + { + querySql += " "+ queryParam["sqlwhere"].ToString(); + } else if (queryParam != null) // 复合条件查询 { @@ -932,7 +937,7 @@ namespace Learun.Application.Form { queryParam.Add(item.Key, item.Value); } - + return querySql; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanMap.cs new file mode 100644 index 000000000..9eeeea5b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanMap : EntityTypeConfiguration + { + public Exam_ExamPlanMap() + { + #region 表、主键 + //表 + this.ToTable("EXAM_EXAMPLAN"); + //主键 + this.HasKey(t => t.EPId); + #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 412f8b965..4e681e02f 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 @@ -103,6 +103,8 @@ + + @@ -561,6 +563,16 @@ + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryReturnMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryReturnMap.cs new file mode 100644 index 000000000..912286693 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryReturnMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public class Acc_DormitoryReturnMap : EntityTypeConfiguration + { + public Acc_DormitoryReturnMap() + { + #region 表、主键 + //表 + this.ToTable("ACC_DORMITORYRETURN"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs new file mode 100644 index 000000000..f56e03bcd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleMap : EntityTypeConfiguration + { + public Acc_DormitoryRuleMap() + { + #region 表、主键 + //表 + this.ToTable("ACC_DORMITORYRULE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + 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 058d33054..12e74d8e0 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 @@ -74,15 +74,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { //参考写法 - //var queryParam = queryJson.ToJObject(); + var queryParam = queryJson.ToJObject(); // 虚拟参数 - //var dp = new DynamicParameters(new { }); - //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var dp = new DynamicParameters(new { }); + var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(fieldSql); - strSql.Append(" FROM ArrangeLessonTerm t "); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + strSql.Append(" FROM ArrangeLessonTerm t where 1=1 "); + + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonNo "); + } + if (!queryParam["TeachClassNo"].IsEmpty()) + { + dp.Add("TeachClassNo", "%"+queryParam["TeachClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.TeachClassNo like @TeachClassNo "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["ClassroomNo"].IsEmpty()) + { + dp.Add("ClassroomNo", queryParam["ClassroomNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassroomNo = @ClassroomNo "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp); } catch (Exception ex) { @@ -684,7 +726,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest 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 + "'"); + WHERE 1=1 AND c.number IS NOT NULL AND s.year = '" + entity.AcademicYearNo + "' AND s.number ='" + entity.Semester + "'"); if (LessonList.Count() > 0) { @@ -758,7 +800,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum LEFT JOIN tb_classroom room ON room.id = a.classroom LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher - WHERE semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "'"); + WHERE a.type='1' and semester.year = '" + entity.AcademicYearNo + "' AND semester.number = '" + entity.Semester + "'"); var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync(@"SELECT * FROM TeachClass WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList(); @@ -847,7 +889,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_course cour ON cour.id= p.`course` LEFT JOIN tb_curriculum curr ON curr.id=cour.`course` WHERE s.year = '" + entity.AcademicYearNo + "' AND s.number = '" + entity.Semester - + "' AND sc.sid = '" + entity.F_SchoolId + "' ORDER BY p.`major` "); + + "' AND sc.sid = '" + entity.F_SchoolId + "' AND curr.`ification` ='1' ORDER BY p.`major` "); var majorData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); var lessonData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs index b57de4c9d..b95b6846f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs @@ -200,6 +200,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { foreach (var lessontime in item.paike.timeText.TrimEnd(',').Split(',')) { + string tmplessontime = ""; + if (item.paike.section == "7") + { + tmplessontime = "18:00-18:45"; + } + if (item.paike.section == "8") + { + tmplessontime = "18:45-19:30"; + } + if (item.paike.section == "9") + { + tmplessontime = "20:30-21:15"; + } + if (item.paike.section == "10") + { + tmplessontime = "21:15-22:00"; + } var insertData = new ArrangeLessonTermOfElectiveEntity { Id = Guid.NewGuid().ToString(), @@ -210,7 +227,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration LessonNo = item.paike.curriculunNumber, LessonName = item.paike.curriculunName, LessonSortNo = "2", - LessonTime = (item.paike.section == "7" ? "16:20-17:05" : "17:15-18:00"), + LessonTime = tmplessontime, LessonSection = item.paike.week + item.paike.section, StudyScore = lessonData.FirstOrDefault(x => x.LessonNo == item.paike.curriculunNumber)?.StudyScore, EmpNo = item.paike.teacherNumber, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs index 4152e37ad..106cc3bd4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs @@ -4,6 +4,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -261,18 +262,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var now = DateTime.Now; var loginInfo = LoginUserInfo.Get(); + var list = db.FindList(x => x.OLPOEId == olpoeId); //添加 foreach (var item in dataList) { - var entity = new ElectiveMajorEntity(); - entity.Create(); - entity.OLPOEId = olpoeId; - entity.MajorId = item.ID; - entity.Grade = item.Grade; - entity.CreateUserId = loginInfo.userId; - entity.CreateUserName = loginInfo.realName; - entity.CreateDate = now; - db.Insert(entity); + //判断是否已选 + if (list.Where(x => x.MajorId == item.ID).Count() <= 0) + { + var entity = new ElectiveMajorEntity(); + entity.Create(); + entity.OLPOEId = olpoeId; + entity.MajorId = item.ID; + entity.Grade = item.Grade; + entity.CreateUserId = loginInfo.userId; + entity.CreateUserName = loginInfo.realName; + entity.CreateDate = now; + db.Insert(entity); + } } db.Commit(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs index 19090038e..9fe409667 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs @@ -113,7 +113,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { db.BeginTrans(); - var deldatalist = db.FindList(m => m.EmId == keyValue).OrderBy(m=>m.LessonSection); + var deldatalist = db.FindList(m => m.EmId == keyValue).OrderBy(m=>Convert.ToInt32(m.LessonSection)); var deldatafirst = deldatalist.First(); var deldatalast= deldatalist.Last(); var opfirst = db.FindEntity(m => m.Id == deldatafirst.OLPOEId); @@ -162,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.Insert(electiveMergeItemEntity); var ids =string.Join(",",electiveMergeItemEntity.Select(n => n.OLPOEId)); var olplist = db.FindList(m => - ids.Contains(m.Id)).OrderBy(c=>c.LessonSection); + ids.Contains(m.Id)).OrderBy(c=>Convert.ToInt32(c.LessonSection)); var opfirst = olplist.First(); var oplast = olplist.Last(); opfirst.LessonSection +=","+ oplast.LessonSection; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs index def26cb76..0e1492ada 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs @@ -792,10 +792,10 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi { model.F_DepartmentId = entity.F_DepartmentId; } - //if (!string.IsNullOrEmpty(entity.DeptNo)) - //{ - // model.DeptNo = entity.DeptNo; - //} + if (!string.IsNullOrEmpty(entity.DeptNo)) + { + model.DeptNo = entity.DeptNo; + } db.Update(model); } } @@ -814,10 +814,10 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi { model.F_DepartmentId = entity.F_DepartmentId; } - //if (!string.IsNullOrEmpty(entity.DeptNo)) - //{ - // model.DeptNo = entity.DeptNo; - //} + if (!string.IsNullOrEmpty(entity.DeptNo)) + { + model.DeptNo = entity.DeptNo; + } db.Update(model); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs new file mode 100644 index 000000000..8fd0c72b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs @@ -0,0 +1,125 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanBLL : Exam_ExamPlanIBLL + { + private Exam_ExamPlanService exam_ExamPlanService = new Exam_ExamPlanService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return exam_ExamPlanService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Exam_ExamPlan表实体数据 + /// + /// 主键 + /// + public Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue) + { + try + { + return exam_ExamPlanService.GetExam_ExamPlanEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + exam_ExamPlanService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Exam_ExamPlanEntity entity) + { + try + { + exam_ExamPlanService.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/Exam_ExamPlan/Exam_ExamPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanEntity.cs new file mode 100644 index 000000000..33f884d50 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanEntity.cs @@ -0,0 +1,90 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanEntity + { + #region 实体成员 + /// + /// EPId + /// + [Column("EPID")] + public string EPId { get; set; } + /// + /// 学年 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public int? Semester { get; set; } + /// + /// 排考名称 + /// + [Column("PLANNAME")] + public string PlanName { get; set; } + /// + /// 排考类型 + /// + [Column("PLANTYPE")] + public string PlanType { get; set; } + /// + /// 排考编号 + /// + [Column("PLANCODE")] + public string PlanCode { get; set; } + /// + /// 排考总人数 + /// + [Column("EPSTUCOUNT")] + public int? EPStuCount { get; set; } + /// + /// 是否随机生成座位 + /// + [Column("EPRANDOM")] + public bool? EPRandom { get; set; } + /// + /// 是否已生成 + /// + [Column("EPGENARATE")] + public bool? EPGenarate { get; set; } + /// + /// 排序号 + /// + [Column("EPORDER")] + public int? EPOrder { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.EPId = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.EPId = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs new file mode 100644 index 000000000..2775b00cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public interface Exam_ExamPlanIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Exam_ExamPlan表实体数据 + /// + /// 主键 + /// + Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Exam_ExamPlanEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs new file mode 100644 index 000000000..88bd8b7c0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs @@ -0,0 +1,188 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-14 18:12 + /// 描 述:考试记录表 + /// + public class Exam_ExamPlanService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.EPId, + t.AcademicYearNo, + t.Semester, + t.PlanName, + t.PlanType, + t.PlanCode, + t.EPStuCount, + t.EPRandom, + t.EPGenarate, + t.EPOrder + "); + strSql.Append(" FROM Exam_ExamPlan t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo",queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester",queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["PlanName"].IsEmpty()) + { + dp.Add("PlanName", "%" + queryParam["PlanName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PlanName Like @PlanName "); + } + if (!queryParam["PlanType"].IsEmpty()) + { + dp.Add("PlanType",queryParam["PlanType"].ToString(), DbType.String); + strSql.Append(" AND t.PlanType = @PlanType "); + } + if (!queryParam["PlanCode"].IsEmpty()) + { + dp.Add("PlanCode", "%" + queryParam["PlanCode"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PlanCode Like @PlanCode "); + } + if (!queryParam["EPRandom"].IsEmpty()) + { + dp.Add("EPRandom",queryParam["EPRandom"].ToString(), DbType.String); + strSql.Append(" AND t.EPRandom = @EPRandom "); + } + if (!queryParam["EPGenarate"].IsEmpty()) + { + dp.Add("EPGenarate",queryParam["EPGenarate"].ToString(), DbType.String); + strSql.Append(" AND t.EPGenarate = @EPGenarate "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Exam_ExamPlan表实体数据 + /// + /// 主键 + /// + public Exam_ExamPlanEntity GetExam_ExamPlanEntity(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.EPId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Exam_ExamPlanEntity 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/EducationalAdministration/LessonInfo/LessonInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs index 2dd7f2d23..1bdfcc200 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs @@ -42,6 +42,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetLessonByMajorNo(string majorNo) + { + try + { + return lessonInfoService.GetLessonByMajorNo(majorNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取LessonInfo表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs index bb89e6e35..9e56b4fd0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs @@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetLessonByMajorNo(string majorNo); /// /// 获取LessonInfo表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs index 2bbbdb6c8..96e49ebe8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs @@ -100,6 +100,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetLessonByMajorNo(string majorNo) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.TeachMajorNo == majorNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + internal bool GetAny() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs index 3f3730287..c7b3e472e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs @@ -222,6 +222,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public string LessonNo2 { get; set; } [NotMapped] public string EmpNo2 { get; set; } + [NotMapped] public string LessonTypeId { get; set; } + /// /// 选课专业列表 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index c2ec1f140..6e76ce297 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -100,9 +100,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity(x => x.WorkName == "选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); var strSql = new StringBuilder(); - strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status,cp.Status as StatusPre from ElectiveMajor a left join OpenLessonPlanOfElective b on a.OLPOEId=b.Id + strSql.Append(@"select b.*,leif.LessonTypeId,c.StuNo,c.StuName,c.Status,cp.Status as StatusPre from ElectiveMajor a left join OpenLessonPlanOfElective b on a.OLPOEId=b.Id left join StuSelectLessonListOfElective c on b.Id=c.OLPEId and c.StuNo=@StuNo - left join StuSelectLessonListOfElectivePre cp on b.Id=cp.OLPEId and cp.StuNo=@StuNo + left join StuSelectLessonListOfElectivePre cp on b.Id=cp.OLPEId and cp.StuNo=@StuNo left join LessonInfo leif on b.LessonNo=leif.LessonNo where not exists ( "); //不显示与已选课程 相同课程名称相同教师的课程 strSql.Append(" select * from StuSelectLessonListOfElective s where s.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and s.Semester='" + EADateArrangeEntityAboutElective.Semester + "' and s.StuNo=@StuNo and s.Status <>3 and s.LessonName=b.LessonName and s.EmpNo=b.EmpNo and s.OLPEId!=b.Id "); @@ -359,7 +359,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { list = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp).ToList(); } - + //选课专业 + var majorSql = + @"SELECT t.MajorName,t.MajorNo,a.* FROM ElectiveMajor a left join CdMajor t on a.majorid=t.id"; + var electiveMajorList = this.BaseRepository("CollegeMIS").FindList(majorSql); foreach (var item in list) { //模式二:正式选课 @@ -381,6 +384,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration item.StuNumPre = aaa.Where(x => x.Status == 2).Count(); + //选课专业 + item.ElectiveMajorList = electiveMajorList.Where(x => x.OLPOEId == item.Id).ToList(); } return list; @@ -415,14 +420,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var EmId = db.FindEntity(x => x.OLPOEId == OLPEIdOne)?.EmId; var OLPEIdTwo = db.FindEntity(x => x.EmId == EmId && x.OLPOEId != OLPEIdOne).OLPOEId; var lessonInfoEntity = db.FindEntity(x => x.LessonNo == entity.AfterLessonNo); + //选修课开课计划 + db.ExecuteBySql($"update OpenLessonPlanOfElective set LessonNo='{entity.AfterLessonNo}',LessonName='{entity.AfterLessonName}',EmpNo='{entity.AfterEmpNo}',EmpName='{entity.AfterEmpName}',ClassRoomNo='{entity.AfterClassRoomNo}',ClassRoomName='{entity.AfterClassRoomName}' where Id='{OLPEIdOne}' "); - db.ExecuteBySql($"update OpenLessonPlanOfElective set LessonNo='{entity.AfterLessonNo}',EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where Id='{OLPEIdOne}' "); - db.ExecuteBySql($"update StuSelectLessonListOfElective set LessonNo='{entity.AfterLessonNo}',EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where OLPEId='{OLPEIdOne}' "); + //学生选课表 + db.ExecuteBySql($"update StuSelectLessonListOfElective set LessonNo='{entity.AfterLessonNo}',LessonName='{entity.AfterLessonName}',EmpNo='{entity.AfterEmpNo}',EmpName='{entity.AfterEmpName}',ClassRoomNo='{entity.AfterClassRoomNo}',ClassRoomName='{entity.AfterClassRoomName}' where OLPEId='{OLPEIdOne}' "); db.ExecuteBySql($"update StuSelectLessonListOfElectivePre set LessonNo='{entity.AfterLessonNo}',EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where OLPEId='{OLPEIdOne}' "); - db.ExecuteBySql($"update ElectiveMergeItem set EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where EmId='{EmId}' "); - db.ExecuteBySql($"update ElectiveMerge set LessonId='{lessonInfoEntity?.LessonId}',LessonNo='{entity.AfterLessonNo}' where EMId='{EmId}' "); - db.ExecuteBySql($"update OpenLessonPlanOfElectiveDel set LessonNo='{entity.AfterLessonNo}',EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where Id='{OLPEIdTwo}' "); - db.ExecuteBySql($"update ArrangeLessonTermOfElective set LessonNo='{entity.AfterLessonNo}',EmpNo='{entity.AfterEmpNo}',ClassRoomNo='{entity.AfterClassRoomNo}' where PaiKeId='{OLPEIdOne}' or PaiKeId='{OLPEIdTwo}' "); + //选修合班明细 + db.ExecuteBySql($"update ElectiveMergeItem set EmpNo='{entity.AfterEmpNo}',EmpName='{entity.AfterEmpName}',ClassRoomNo='{entity.AfterClassRoomNo}',ClassRoomName='{entity.AfterClassRoomName}' where EmId='{EmId}' "); + //合班合并结果 + db.ExecuteBySql($"update ElectiveMerge set LessonId='{lessonInfoEntity?.LessonId}',LessonNo='{entity.AfterLessonNo}',LessonName='{entity.AfterLessonName}' where EMId='{EmId}' "); + //合班异动数据记录 + db.ExecuteBySql($"update OpenLessonPlanOfElectiveDel set LessonNo='{entity.AfterLessonNo}',LessonName='{entity.AfterLessonName}',EmpNo='{entity.AfterEmpNo}',EmpName='{entity.AfterEmpName}',ClassRoomNo='{entity.AfterClassRoomNo}',ClassRoomName='{entity.AfterClassRoomName}' where Id='{OLPEIdTwo}' "); + //选修课程表 + db.ExecuteBySql($"update ArrangeLessonTermOfElective set LessonNo='{entity.AfterLessonNo}',LessonName='{entity.AfterLessonName}',EmpNo='{entity.AfterEmpNo}',EmpName='{entity.AfterEmpName}',ClassRoomNo='{entity.AfterClassRoomNo}',ClassRoomName='{entity.AfterClassRoomName}' where PaiKeId='{OLPEIdOne}' or PaiKeId='{OLPEIdTwo}' "); db.Commit(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElectiveChange/OpenLessonPlanOfElectiveChangeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElectiveChange/OpenLessonPlanOfElectiveChangeEntity.cs index 280180925..690b6a29c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElectiveChange/OpenLessonPlanOfElectiveChangeEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElectiveChange/OpenLessonPlanOfElectiveChangeEntity.cs @@ -107,6 +107,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string EmpNo { get; set; } [NotMapped] public string ClassRoomNo { get; set; } + [NotMapped] + public string AfterLessonName { get; set; } + [NotMapped] + public string AfterEmpName { get; set; } + [NotMapped] + public string AfterClassRoomName { get; set; } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SignUpHelper.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SignUpHelper.cs index 456fd1771..76bd20839 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SignUpHelper.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SignUpHelper.cs @@ -177,6 +177,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //相同时间不能报名 return; } + //相同课程不能报名 + if (sslleListOfNow1.Where(x => x.LessonNo == olpeEntity.LessonNo).Any()) + { + //相同课程不能报名 + return; + } //新增报名数据 var model = new StuSelectLessonListOfElectiveEntity() { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs index 9fc249220..f311eb7a9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs @@ -677,6 +677,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + public IEnumerable GetScoreListByStuInfo(string queryJson) + { + try + { + return stuScoreService.GetScoreListByStuInfo(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetStuGraduateInfo(string queryJson) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs index 5b3681e63..4be5477b3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs @@ -388,11 +388,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// - /// 成绩格式化(补)(重) + /// 成绩格式化(补)(重)(选修) /// [NotMapped] public string ScoreFormat { get; set; } + /// + /// 补考成绩 + /// + [NotMapped] + public string ScoreOfNotPass { get; set; } + /// + /// 二次补考成绩 + /// + [NotMapped] + public string ScoreOfNotPassTwo { get; set; } + /// + /// 课程类别名称 + /// + /// + [NotMapped] + public string LessonSortName { get; set; } + /// + /// 专业名称 + /// + [NotMapped] + public string MajorName { get; set; } + /// + /// 专业排名 + /// + [NotMapped] + public int RankInMajor { get; set; } + /// + /// 班级排名 + /// + [NotMapped] + public int RankInClass { get; set; } + + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs index 1943c15b9..7e987896c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs @@ -182,6 +182,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetScoreListByStuNo(string queryJson); + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + IEnumerable GetScoreListByStuInfo(string queryJson); /// /// 获取个人成绩列表 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index d80ecc687..c10ba0ced 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -1839,7 +1839,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var strSql = new StringBuilder(); strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName "); strSql.Append(" ,case when bb.LessonSortNo='2' then bb.Score else (case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end) end as Score "); - strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score) else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat "); + strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score)+'(选修)' else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat "); strSql.Append(" from ( "); strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); strSql.Append(" where 1=1 and s.CheckMark='1' "); @@ -1876,5 +1876,125 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } } } + + /// + /// 根据学号/姓名获取学生成绩列表 + /// + /// + /// + public IEnumerable GetScoreListByStuInfo(string queryJson) + { + try + { + //参考写法 + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var tableName = "StuScore"; + if (!queryParam["TableName"].IsEmpty()) + { + tableName = queryParam["TableName"].ToString(); + } + var strSql = new StringBuilder(); + strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,bb.Score,sp.Score as ScoreOfNotPass,spt.Score as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); + strSql.Append(" from ( "); + strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); + strSql.Append(" where 1=1 and s.CheckMark='1' "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" and s.AcademicYearNo=@AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" and s.Semester=@Semester "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" and s.StuNo=@StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String); + strSql.Append(" and s.StuName=@StuName "); + } + strSql.Append(" group by s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo ) as bb "); + strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.LessonSortNo=sp.LessonSortNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo and sp.CheckMark = '1' "); + strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.LessonSortNo=spt.LessonSortNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo and spt.CheckMark = '1' "); + strSql.Append(" left join CdLessonSort ls on bb.LessonSortNo= ls.LessonSortNo "); + strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); + strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); + strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); + + var result = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + + //计算专业排名,班级排名 + if (result.Any()) + { + var temp = result.GroupBy(x=>new { x.AcademicYearNo,x.Semester}).Select(x => new StuScoreEntity() + { + AcademicYearNo=x.Key.AcademicYearNo, + Semester=x.Key.Semester, + StuNo=x.FirstOrDefault().StuNo, + ClassNo=x.FirstOrDefault().ClassNo, + MajorNo=x.FirstOrDefault().MajorNo + }).ToList(); + if (temp.Any()) + { + foreach (var item in temp) + { + //专业排名 + var ml = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.LessonSortNo == "1" && x.MajorNo == item.MajorNo && x.CheckMark == "1"); + var mlGroup = ml.GroupBy(x => x.StuNo).Select(x => new + { + StuNo = x.Key, + TotalScore = x.Select(y => y.Score).Sum() + }).OrderByDescending(x => x.TotalScore); + if (mlGroup.Any()) + { + var rank = mlGroup.Select(x => x.StuNo).ToList().IndexOf(item.StuNo); + item.RankInMajor = rank + 1; + } + //班级排名 + var cl = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.LessonSortNo == "1" && x.ClassNo == item.ClassNo && x.CheckMark == "1"); + var clGroup = cl.GroupBy(x => x.StuNo).Select(x => new + { + StuNo = x.Key, + TotalScore = x.Select(y => y.Score).Sum() + }).OrderByDescending(x => x.TotalScore); + if (clGroup.Any()) + { + var rank = clGroup.Select(x => x.StuNo).ToList().IndexOf(item.StuNo); + item.RankInClass = rank + 1; + } + } + } + foreach (var ii in result) + { + ii.RankInMajor = temp.FirstOrDefault(x => x.AcademicYearNo == ii.AcademicYearNo && x.Semester == ii.Semester).RankInMajor; + ii.RankInClass = temp.FirstOrDefault(x => x.AcademicYearNo == ii.AcademicYearNo && x.Semester == ii.Semester).RankInClass; + } + + } + + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs index b083b6586..06edde13f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs @@ -65,6 +65,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + return stuScoreNotPassService.GetPageListForUnpass(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取实体数据 /// 主键 @@ -187,6 +206,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化补考成绩 + /// + public void InitScore() + { + try + { + stuScoreNotPassService.InitScore(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs index c937dc615..d5a83aac9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs @@ -328,5 +328,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion } + + public class NotPassEntity + { + public string stuno { get; set; } + public string stuname { get; set; } + public string LessonName { get; set; } + public string Grade { get; set; } + public string AcademicYearNo { get; set; } + public string Semester { get; set; } + public string classname { get; set; } + public string OrdinaryScore2 { get; set; } + public string TermEndScore2 { get; set; } + public string Score2 { get; set; } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs index 509b479e6..ad1e1472d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs @@ -26,6 +26,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson); /// /// 获取实体数据 /// 主键 @@ -61,6 +62,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuScoreNotPassEntity entity); + void InitScore(); #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs index 464fdc255..501189f44 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs @@ -163,6 +163,67 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var strSql = new StringBuilder(); + strSql.Append(@"select a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) +else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) +else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) +else CONVERT(varchar,a.Score) end as Score2 "); + strSql.Append(@" from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo "); + strSql.Append(@"where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append($" and a.Semester ='{queryParam["Semester"].ToString().Trim()}'"); + } + if (!queryParam["grade"].IsEmpty()) + { + strSql.Append($" and a.grade ='{queryParam["grade"].ToString()}'"); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + strSql.Append($" and a.DeptNo ='{queryParam["DeptNo"].ToString()}'"); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + strSql.Append($" and a.MajorNo ='{queryParam["MajorNo"].ToString()}'"); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append($" and a.LessonNo ='{queryParam["LessonNo"].ToString()}'"); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append($" and a.ClassNo ='{queryParam["ClassNo"].ToString()}'"); + } + + strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取实体数据 /// 主键 @@ -342,6 +403,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化补考成绩 + /// + public void InitScore() + { + try + { + string sql = @"insert into StuScoreNotPass +(NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, OrdinaryScore, TermInScore, + TermEndScore, OtherScore, IsInEffect, ConflictLessonNo, IsReStudy, CheckMark, + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, IsEditable) + select + NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, '0', '0', + '0', '0', IsInEffect, ConflictLessonNo, IsReStudy, '0', + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, '1' + from + ( + select a.* from +StuScore a +left join StuInfoBasic b on b.StuNo=a.StuNo +where a.LessonSortNo='1' and b.AbmormityMoveMark <> '1' +and ( (a.Score >= 0 and a.Score<60) or a.Score=(-5) or a.Score=(-10) ) +and a.StuNo not in ( +select StuNo from StuScoreNotPass p where p.AcademicYearNo=a.AcademicYearNo and p.Semester=a.Semester and p.LessonNo=a.LessonNo and p.TeachClassNo=a.TeachClassNo and p.LessonSortNo=a.LessonSortNo and p.OpenLessonDeptNo=a.OpenLessonDeptNo and p.OpenLessonMajorNo=a.OpenLessonMajorNo +) +) as bb +order by bb.ScoreId"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs index d9169e806..fa7db1635 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs @@ -65,6 +65,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 二次补考名单查看 + /// + /// + /// + /// + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + return stuScoreNotPassTwoService.GetPageListForUnpass(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取StuScoreNotPassTwo表实体数据 /// 主键 @@ -164,6 +188,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化二次补考成绩 + /// + public void InitScore() + { + try + { + stuScoreNotPassTwoService.InitScore(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs index bf26394c2..fe3be3622 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs @@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson); /// /// 获取StuScoreNotPassTwo表实体数据 /// 主键 @@ -57,6 +58,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DeleteEntity(string keyValue); + void InitScore(); /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs index e13506595..979fee09a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs @@ -249,6 +249,73 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 二次补考成绩查看 + /// + /// + /// + /// + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var strSql = new StringBuilder(); + strSql.Append(@"select a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) +else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) +else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) +else CONVERT(varchar,a.Score) end as Score2 "); + strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); + strSql.Append(@"where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append($" and a.Semester ='{queryParam["Semester"].ToString().Trim()}'"); + } + if (!queryParam["grade"].IsEmpty()) + { + strSql.Append($" and a.grade ='{queryParam["grade"].ToString()}'"); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + strSql.Append($" and a.DeptNo ='{queryParam["DeptNo"].ToString()}'"); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + strSql.Append($" and a.MajorNo ='{queryParam["MajorNo"].ToString()}'"); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append($" and a.LessonNo ='{queryParam["LessonNo"].ToString()}'"); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append($" and a.ClassNo ='{queryParam["ClassNo"].ToString()}'"); + } + + strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 @@ -310,10 +377,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + #endregion #region 扩展数据 + /// + /// 初始化二次补考成绩 + /// + public void InitScore() + { + try + { + string sql = @"insert into StuScoreNotPassTwo +(NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, OrdinaryScore, TermInScore, + TermEndScore, OtherScore, IsInEffect, ConflictLessonNo, IsReStudy, CheckMark, + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, IsEditable) + select + NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, '0', '0', + '0', '0', IsInEffect, ConflictLessonNo, IsReStudy, '0', + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, '1' + from + ( + select a.* from +StuScoreNotPass a +left join StuInfoBasic b on b.StuNo=a.StuNo +where a.LessonSortNo='1' and b.AbmormityMoveMark <> '1' +and ( (a.Score >= 0 and a.Score<60) or a.Score=(-5) or a.Score=(-10) ) +and a.StuNo not in ( +select StuNo from StuScoreNotPassTwo p where p.AcademicYearNo=a.AcademicYearNo and p.Semester=a.Semester and p.LessonNo=a.LessonNo and p.TeachClassNo=a.TeachClassNo and p.LessonSortNo=a.LessonSortNo and p.OpenLessonDeptNo=a.OpenLessonDeptNo and p.OpenLessonMajorNo=a.OpenLessonMajorNo +) +) as bb +order by bb.ScoreId"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 学年下拉框信息 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs index 70f099fe1..d27073da4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs @@ -212,6 +212,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展字段 [NotMapped] public string F_SchoolId { get; set; } + [NotMapped] public string LessonTypeId { get; set; } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs index 1ff93c134..9bff6fd34 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs @@ -29,8 +29,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT t.* "); - strSql.Append(" FROM StuSelectLessonListOfElective t "); + strSql.Append("SELECT t.*,leif.LessonTypeId "); + strSql.Append(" FROM StuSelectLessonListOfElective t left join LessonInfo leif on t.LessonNo=leif.LessonNo "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 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 187108297..3b7c60111 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 @@ -279,8 +279,16 @@ + + + + + + + + @@ -1695,34 +1703,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs new file mode 100644 index 000000000..491d215b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleBLL : Acc_DormitoryRuleIBLL + { + private Acc_DormitoryRuleService acc_DormitoryRuleService = new Acc_DormitoryRuleService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return acc_DormitoryRuleService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue) + { + try + { + return acc_DormitoryRuleService.GetAcc_DormitoryRuleEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// + public Acc_DormitoryRuleEntity GetEnableEntity() + { + try + { + return acc_DormitoryRuleService.GetEnableEntity(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + acc_DormitoryRuleService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Acc_DormitoryRuleEntity entity) + { + try + { + acc_DormitoryRuleService.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/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs new file mode 100644 index 000000000..351f0e912 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs @@ -0,0 +1,90 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 晚归时间 + /// + [Column("LATERETURNTIME")] + public string LateReturnTime { get; set; } + /// + /// 推送人员 + /// + [Column("PUSHUSER")] + public string PushUser { get; set; } + /// + /// 是否推送班主任 + /// + [Column("CLASSDIREDCTOR")] + public int? ClassDiredctor { get; set; } + /// + /// 推送时间点 + /// + [Column("PUSHHOUR")] + public int? PushHour { get; set; } + /// + /// 是否启用 + /// + [Column("ISENABLE")] + public int? IsEnable { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// UpdateTime + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// UpdateUserId + /// + [Column("UPDATEUSERID")] + public string UpdateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs new file mode 100644 index 000000000..22b52a86d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public interface Acc_DormitoryRuleIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue); + Acc_DormitoryRuleEntity GetEnableEntity(); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Acc_DormitoryRuleEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs new file mode 100644 index 000000000..751c2f837 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs @@ -0,0 +1,168 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Acc_DormitoryRule t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetEnableEntity() + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.IsEnable == 1); + } + 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.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Acc_DormitoryRuleEntity 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/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs index 8dfc1bb3a..0c0866c1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/Acc_DormitoryBuildEntity.cs @@ -19,12 +19,33 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// [Column("ID")] public string ID { get; set; } + /// + /// 编号 + /// + [Column("DNO")] + public string DNo { get; set; } + /// /// 名称 /// [Column("NAME")] public string Name { get; set; } /// + /// 宿舍楼 + /// + [Column("APARTMENTID")] + public string ApartmentId { get; set; } + /// + /// 单元 + /// + [Column("UNITID")] + public string UnitId { get; set; } + /// + /// 楼层 + /// + [Column("FLOORID")] + public string FloorId { get; set; } + /// /// 负责人 /// [Column("FUNCTIONARY")] @@ -145,9 +166,32 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// [Column("PLANBEDNUM")] public int? PlanBedNum { get; set; } + + /// + /// 寝室类型(几人寝) + /// + [Column("ROOMTYPE")] + public int? RoomType { get; set; } + /// + /// 入住人数 + /// + [Column("CHECKINSTU")] + public int? CheckInStu { get; set; } + /// + /// 是否归宿 + /// + [Column("ISRETURN")] + public int? IsReturn { get; set; } #endregion #region 扩展字段 + + [NotMapped] + public string ApartmentName { get; set; } + [NotMapped] + public string UnitName { get; set; } + [NotMapped] + public string FloorName { get; set; } /// /// 学生名字 /// @@ -176,6 +220,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement [NotMapped] public string bedId { get; set; } + + [NotMapped] + public string DeptName { get; set; } + [NotMapped] + public string MajorName { get; set; } + [NotMapped] + public string ClassName { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs index efb5fe22b..41bda8acd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs @@ -42,6 +42,26 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } } + + public IEnumerable GetBedListByRoomId(string RoomId) + { + try + { + return accommodationService.GetBedListByRoomId(RoomId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetAllList() { try @@ -61,6 +81,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + public IEnumerable GetClassifyList(Pagination paginationobj, string queryJson) + { + try + { + return accommodationService.GetClassifyList(paginationobj, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public object GetDormitoryList() { try @@ -179,6 +218,27 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } + public string GetParentBuildType(string keyValue) + { + try + { + return accommodationService.GetParentBuildType(keyValue); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + + } + /// /// 获取Acc_DormitoryBuild表实体数据 /// 主键 @@ -251,6 +311,61 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + public List GetDept() + { + try + { + return accommodationService.GetSelectData("").Select(x => new Acc_DormitoryBuildEntity { Dept = x.Dept, DeptName = x.DeptName }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetMajor(string strWhere) + { + try + { + return accommodationService.GetSelectData(strWhere).Select(x => new Acc_DormitoryBuildEntity { Major = x.Major, MajorName = x.MajorName }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetClass(string strWhere) + { + try + { + return accommodationService.GetSelectData(strWhere).Select(x => new Acc_DormitoryBuildEntity { Class = x.Class, ClassName = x.ClassName }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取左侧树形数据 /// @@ -270,8 +385,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement value = item.ID.ToString(), showcheck = false, checkstate = 0, - isexpand = false, - parentId = item.ParentID == null ? "" : item.ParentID + isexpand = true, + parentId = item.ParentID == null ? "" : item.ParentID, + title = item.BuildType }; @@ -339,9 +455,49 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } } + public List GetClassifyTree() + { + try + { + List list = accommodationService.GetClassifyTree(); + List treeList = new List(); + foreach (Acc_DormitoryBuildEntity item in list) + { + TreeModel node = new TreeModel + { + id = item.ID.ToString(), + text = item.Name.ToString(), + value = item.ID.ToString(), + showcheck = false, + checkstate = 0, + isexpand = false, + parentId = item.ParentID == null ? "" : item.ParentID, + title = string.IsNullOrEmpty(item.BuildType) ? "" : (Convert.ToInt32(item.BuildType) + 1).ToString(), + }; + treeList.Add(node); + + + } + + + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 根据父id 获取树形数据 @@ -386,7 +542,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } - /// + /// /// 根据父id 获取树形数据 /// /// @@ -431,11 +587,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } - public bool MatchDormitoryInfo(string stuNo,string dormitory,string unit,string floor,string room,string bed ,List data) + public bool MatchDormitoryInfo(string stuNo, string dormitory, string unit, string floor, string room, string bed, List data) { try { - return accommodationService.MatchDormitoryInfo(stuNo,dormitory,unit,floor,room,bed,data); + return accommodationService.MatchDormitoryInfo(stuNo, dormitory, unit, floor, room, bed, data); } catch (Exception ex) @@ -481,6 +637,31 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteBed(string keyValue, string ParentID) + { + try + { + accommodationService.DeleteBed(keyValue, ParentID); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 保存实体数据(新增、修改) /// 主键 @@ -505,6 +686,74 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveBedEntity(string keyValue, string ParentID, Acc_DormitoryBuildEntity entity) + { + try + { + accommodationService.SaveBedEntity(keyValue, ParentID, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + + /// + /// 分配系 + /// + /// + /// + public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity, int type) + { + try + { + accommodationService.SaveDeptClass(keyValue, entity, type); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public string SaveRoom(string RoomId, List list) + { + try + { + return accommodationService.SaveRoom(RoomId, list); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 批量添加单元、楼层、宿舍、床位 @@ -581,7 +830,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } - #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs index 41cd164b0..2050f1292 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs @@ -21,7 +21,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetBedListByRoomId(string RoomId); IEnumerable GetAllList(); + IEnumerable GetClassifyList(Pagination paginationobj,string queryJson); /// /// 获取Acc_DormitoryBuild表实体数据 /// 主键 @@ -42,6 +44,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// /// List GetList(); + List GetDept(); + List GetMajor(string strWhere); + List GetClass(string strWhere); /// /// 获取左侧树形数据 /// @@ -50,6 +55,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement string GetDormitoryInfoByStuNo(string val); List GetTree(); List GetTreeNew(); + List GetClassifyTree(); bool MatchDormitoryInfo(string stuNo, string dormitory, string unit, string floor, string room, string bed,List data); @@ -68,7 +74,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// /// void DeleteEntity(string keyValue); + void DeleteBed(string keyValue, string ParentID); string GetBuildType(string parentID); + string GetParentBuildType(string keyValue); /// /// 保存实体数据(新增、修改) @@ -76,7 +84,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement /// /// void SaveEntity(string keyValue, Acc_DormitoryBuildEntity entity); - + void SaveBedEntity(string keyValue,string ParentID, Acc_DormitoryBuildEntity entity); + void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity,int type); + string SaveRoom(string RoomId, List list); /// /// 批量添加单元、楼层、房间、床位 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index 21b627eb3..ade272d6d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -51,10 +51,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement t.ParentID, t.Remark, t.Starred, - t.HasToilet, - stb.StuName + t.HasToilet,t.RoomType, +t.ApartmentId,t.UnitId,t.FloorId,t.CheckInStu, +a.name as ApartmentName,b.name as UnitName,c.Name as FloorName "); - strSql.Append(" FROM Acc_DormitoryBuild t LEFT JOIN dbo.StuInfoBasic stb ON t.StudentID=stb.StuId"); + strSql.Append(" FROM Acc_DormitoryBuild t "); + strSql.Append(@" left join (select * FROM Acc_DormitoryBuild where BuildType='1') a on t.ApartmentId=a.ID + left join(select * FROM Acc_DormitoryBuild where BuildType = '2') b on t.UnitId = b.ID + left join(select * FROM Acc_DormitoryBuild where BuildType = '3') c on t.FloorId = c.ID "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -64,6 +68,27 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement dp.Add("ParentID", queryParam["ParentID"].ToString(), DbType.String); strSql.Append(" AND t.ParentID =@ParentID "); } + //else + //{ + // strSql.Append(" AND t.BuildType ='4' "); + //} + + if (!queryParam["ApartmentId"].IsEmpty()) + { + dp.Add("ApartmentId", queryParam["ApartmentId"].ToString(), DbType.String); + strSql.Append(" AND t.ApartmentId =@ApartmentId "); + } + if (!queryParam["UnitId"].IsEmpty()) + { + dp.Add("UnitId", queryParam["UnitId"].ToString(), DbType.String); + strSql.Append(" AND t.UnitId =@UnitId "); + } + if (!queryParam["FloorId"].IsEmpty()) + { + dp.Add("FloorId", queryParam["FloorId"].ToString(), DbType.String); + strSql.Append(" AND t.FloorId =@FloorId "); + } + if (!queryParam["Name"].IsEmpty()) { dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); @@ -76,18 +101,18 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } if (!queryParam["Dept"].IsEmpty()) { - dp.Add("Dept", "%" + queryParam["Dept"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Dept Like @Dept "); + dp.Add("Dept", queryParam["Dept"].ToString(), DbType.String); + strSql.Append(" AND t.Dept=@Dept "); } if (!queryParam["Class"].IsEmpty()) { - dp.Add("Class", "%" + queryParam["Class"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Class Like @Class "); + dp.Add("Class", queryParam["Class"].ToString(), DbType.String); + strSql.Append(" AND t.Class=@Class "); } if (!queryParam["Major"].IsEmpty()) { - dp.Add("Major", "%" + queryParam["Major"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Major Like @Major "); + dp.Add("Major", queryParam["Major"].ToString(), DbType.String); + strSql.Append(" AND t.Major=@Major "); } if (!queryParam["Sex"].IsEmpty()) { @@ -104,6 +129,53 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement dp.Add("Leader", "%" + queryParam["Leader"].ToString() + "%", DbType.String); strSql.Append(" AND t.Leader Like @Leader "); } + + if (!queryParam["NoDistribution"].IsEmpty()) + { + var noDistribution = queryParam["NoDistribution"].ToString(); + if (noDistribution.Contains("dept")) + { + strSql.Append(" AND (t.Dept is null or len(t.Dept)=0) "); + } + if (noDistribution.Contains("major")) + { + strSql.Append(" AND (t.Major is null or len(t.Major)=0) "); + } + if (noDistribution.Contains("class")) + { + strSql.Append(" AND (t.Class is null or len(t.Class)=0) "); + } + if (noDistribution.Contains("room")) + { + strSql.Append(" AND (t.CheckInStu is null or len(t.CheckInStu)=0 or t.CheckInStu=0) "); + } + } + if (!queryParam["Distribution"].IsEmpty()) + { + var distribution = queryParam["Distribution"].ToString(); + if (distribution.Contains("dept")) + { + strSql.Append(" AND len(t.Dept)>0 "); + } + if (distribution.Contains("major")) + { + strSql.Append(" AND len(t.Major)>0 "); + } + if (distribution.Contains("class")) + { + strSql.Append(" AND len(t.Class)>0 "); + } + if (distribution.Contains("room")) + { + strSql.Append(" AND t.CheckInStu>0 "); + } + } + + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination).OrderBy(a => a.Name).ThenBy(a => a.Name).ToList(); } catch (Exception ex) @@ -118,6 +190,27 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } } + + public IEnumerable GetBedListByRoomId(string RoomId) + { + try + { + string sql = $"select ID,Name,DNo,StudentID from Acc_DormitoryBuild where BuildType='5' and ParentID='{RoomId}'"; + return this.BaseRepository("CollegeMIS").FindList(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetAllList() { try @@ -137,11 +230,95 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + + public IEnumerable GetClassifyList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.Name, + t.Address, + t.Campus, + t.Dept, + t.BuildType, + t.Major, + t.Class, + t.Sex, + t.Functionary, + t.Phone, + t.Price, + t.Leader, + t.StudentID, + t.PlanStudentID, + t.ParentID, + t.Remark, + t.Starred, + t.HasToilet,t.RoomType, +t.ApartmentId,t.UnitId,t.FloorId,t.CheckInStu, +a.name as ApartmentName,b.name as UnitName,c.Name as FloorName + "); + strSql.Append(" FROM Acc_DormitoryBuild t "); + strSql.Append(@" left join (select * FROM Acc_DormitoryBuild where BuildType='1') a on t.ApartmentId=a.ID + left join(select * FROM Acc_DormitoryBuild where BuildType = '2') b on t.UnitId = b.ID + left join(select * FROM Acc_DormitoryBuild where BuildType = '3') c on t.FloorId = c.ID "); + strSql.Append(" WHERE 1=1 and (t.BuildType<>'5' and t.BuildType<>'4') "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["ParentID"].IsEmpty()) + { + dp.Add("ParentID", queryParam["ParentID"].ToString(), DbType.String); + strSql.Append(" AND t.ParentID =@ParentID "); + } + if (!queryParam["keyword"].IsEmpty()) + { + strSql.Append($" AND t.Name like '%{queryParam["keyword"].ToString()}%' "); + } + if (!queryParam["ApartmentId"].IsEmpty()) + { + dp.Add("ApartmentId", queryParam["ApartmentId"].ToString(), DbType.String); + strSql.Append(" AND t.ApartmentId =@ApartmentId "); + } + if (!queryParam["UnitId"].IsEmpty()) + { + dp.Add("UnitId", queryParam["UnitId"].ToString(), DbType.String); + strSql.Append(" AND t.UnitId =@UnitId "); + } + if (!queryParam["FloorId"].IsEmpty()) + { + dp.Add("FloorId", queryParam["FloorId"].ToString(), DbType.String); + strSql.Append(" AND t.FloorId =@FloorId "); + } + + if (!queryParam["Name"].IsEmpty()) + { + dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Name Like @Name "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp).ToList(); + //return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + internal string GetBuildType(string parentID) { try { - var entity = this.BaseRepository("CollegeMIS").FindEntity(a => a.ParentID == parentID); + var entity = this.BaseRepository("CollegeMIS").FindEntity(a => a.ID == parentID); if (null != entity) { return entity.BuildType; @@ -164,6 +341,35 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + public string GetParentBuildType(string keyValue) + { + try + { + string sql = $@" select BuildType from [dbo].[Acc_DormitoryBuild] where Id=( + select parentid from [dbo].[Acc_DormitoryBuild] where id='{keyValue}')"; + var data = this.BaseRepository("CollegeMIS").FindObject(sql); + if (data == null) + { + return ""; + } + else + { + return data.ToString(); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + internal object GetRoomList(string parentID) { try @@ -418,7 +624,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement floorInfo.dormitory = bed; if (!string.IsNullOrEmpty(bed.StudentID)) { - floorInfo.stuInfo = this.BaseRepository("CollegeMIS").FindEntity(a => a.StuId == bed.StudentID); + floorInfo.stuInfo = this.BaseRepository("CollegeMIS").FindEntity(a => a.StuNo == bed.StudentID); } list.Add(floorInfo); } @@ -510,6 +716,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + public List GetClassifyTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => (x.BuildType == "2" || x.BuildType == "1")).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取Acc_DormitoryBuild表实体数据 /// 主键 @@ -582,7 +807,44 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement { try { - return this.BaseRepository("CollegeMIS").FindList(a => a.BuildType != "5").OrderBy(a => a.sort).ThenBy(a => a.Name).ToList(); + return this.BaseRepository("CollegeMIS").FindList(a => a.BuildType != "5" && a.BuildType != "4").OrderBy(a => a.sort).ThenBy(a => a.Name).ToList(); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取非空床的系部专业 班级 + /// + /// + public List GetSelectData(string strWhere) + { + try + { + string sql = + @"select distinct dept,d.DeptName,major,m.MajorName,class,c.ClassName from [dbo].[Acc_DormitoryBuild] t +join CdDept d on t.dept=d.deptno +join CdMajor m on t.major=m.majorno +join ClassInfo c on t.class=c.classno +where t.ID in ( +select parentid from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0) +)"; + if (!string.IsNullOrEmpty(strWhere)) + { + sql += " and " + strWhere; + } + + return this.BaseRepository("CollegeMIS").FindList(sql).ToList(); } catch (Exception ex) @@ -598,6 +860,41 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + /// + /// 获取树形数据(学生归宿) + /// + /// + public List GetSqlTreeForReturn() + { + try + { + List list = new List(); + var roomSql = @"select * from [dbo].[Acc_DormitoryBuild] where ID in ( +select parentid from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0) +)"; + List roomList = this.BaseRepository("CollegeMIS") + .FindList(roomSql).ToList(); + list = roomList.Union(list).ToList(); + var apartIds = roomList.Select(x => x.ApartmentId).Distinct().ToList(); + var unitIds = roomList.Select(x => x.UnitId).Distinct().ToList(); + var floorIds = roomList.Select(x => x.FloorId).Distinct().ToList(); + var otherList = this.BaseRepository("CollegeMIS").FindList(x => + apartIds.Contains(x.ID) || unitIds.Contains(x.ID) || floorIds.Contains(x.ID)).ToList(); + list = list.Union(otherList).ToList(); + return list.OrderBy(x => x.DNo).OrderBy(x => x.Name).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 根据父id获取数据 /// @@ -734,6 +1031,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } bedInfo.StudentID = stuInfo.StuId; bedInfo.StuName = stuInfo.StuName; + bedInfo.Dept = stuInfo.DeptNo; + bedInfo.Major = stuInfo.MajorNo; + bedInfo.Class = stuInfo.ClassNo; + bedInfo.Sex = Convert.ToString(stuInfo.GenderNo); this.BaseRepository("CollegeMIS").Update(bedInfo); return true; } @@ -799,6 +1100,27 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + + public void DeleteBed(string keyValue, string ParentID) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); + UpdateCheckInNum(ParentID); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public void DeleteAll(string parentid) { var list = this.BaseRepository("CollegeMIS").FindList(a => a.ParentID == parentid).ToList(); @@ -842,7 +1164,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement var elementEntity = new Acc_DormitoryBuildEntity { ParentID = keyValue, + ApartmentId = keyValue, Name = i.ToString() + "单元", + DNo = i.ToString(), BuildType = "2",//单元类型 Sex = dormitory.Sex, Address = dormitory.Address, @@ -859,6 +1183,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement UpdateTime = DateTime.Now }; elementEntity.Create(); + elementEntity.UnitId = elementEntity.ID; list.Add(elementEntity); //添加楼层 @@ -869,7 +1194,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement var floorEntity = new Acc_DormitoryBuildEntity { ParentID = elementEntity.ID, + ApartmentId = keyValue, + UnitId = elementEntity.ID, Name = j.ToString() + "层", + DNo = j.ToString(), BuildType = "3",//楼层类型, Sex = dormitory.Sex, Address = dormitory.Address, @@ -886,6 +1214,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement UpdateTime = DateTime.Now }; floorEntity.Create(); + floorEntity.FloorId = floorEntity.ID; list.Add(floorEntity); //添加房间 @@ -896,7 +1225,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement var roomEntity = new Acc_DormitoryBuildEntity { ParentID = floorEntity.ID, + ApartmentId = keyValue, + UnitId = elementEntity.ID, + FloorId = floorEntity.ID, Name = j.ToString() + (n < 10 ? "0" + n.ToString() : n.ToString()) + "室", + DNo = j.ToString() + (n < 10 ? "0" + n.ToString() : n.ToString()), BuildType = "4",//房间类型 Sex = dormitory.Sex, Address = dormitory.Address, @@ -909,6 +1242,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement Major = dormitory.Major, Phone = dormitory.Phone, Price = dormitory.Price, + RoomType = bedNum, UpdateBy = currentUser.realName, UpdateTime = DateTime.Now, Starred = "3", @@ -925,7 +1259,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement var bedEntity = new Acc_DormitoryBuildEntity { ParentID = roomEntity.ID, + ApartmentId = keyValue, + UnitId = elementEntity.ID, + FloorId = floorEntity.ID, Name = m.ToString() + "床", + DNo = m.ToString(), BuildType = "5", Sex = dormitory.Sex, Address = dormitory.Address, @@ -1275,9 +1613,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } else { + entity.Create(); if (entity.BuildType == "1") { - if (string.IsNullOrEmpty(entity.ParentID)) + entity.ApartmentId = entity.ID; + if (string.IsNullOrEmpty(entity.ParentID) || entity.ParentID == "-1") { var rootNode = this.BaseRepository("CollegeMIS").FindList().FirstOrDefault(a => a.ParentID == null); if (rootNode == null) @@ -1291,6 +1631,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement rootEntity.CreateTime = DateTime.Now; rootEntity.UpdateBy = currentUser.realName; rootEntity.UpdateTime = DateTime.Now; + rootEntity.ApartmentId = rootEntity.ID; entity.ParentID = rootEntity.ID; this.BaseRepository("CollegeMIS").Insert(rootEntity); } @@ -1300,7 +1641,33 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } } - entity.Create(); + else + { + //上一级 + var parentity = this.BaseRepository("CollegeMIS").FindList().FirstOrDefault(a => a.ID == entity.ParentID); + switch (parentity.BuildType) + { + case "1": + entity.ApartmentId = parentity.ID; + entity.UnitId = entity.ID; + break; + case "2": + { + entity.FloorId = entity.ID; + entity.UnitId = parentity.ID; + entity.ApartmentId = parentity.ApartmentId; + } + break; + case "3": + { + entity.FloorId = parentity.ID; + entity.UnitId = parentity.UnitId; + entity.ApartmentId = parentity.ApartmentId; + } + break; + } + } + entity.CreateBy = currentUser.realName; entity.CreateTime = DateTime.Now; entity.UpdateBy = currentUser.realName; @@ -1321,6 +1688,157 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveBedEntity(string keyValue, string ParentID, Acc_DormitoryBuildEntity entity) + { + var db = this.BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + db.Update(entity); + } + else + { + var parentEntity = db.FindEntity(ParentID); + entity.Create(); + entity.ApartmentId = parentEntity.ApartmentId; + entity.UnitId = parentEntity.UnitId; + entity.FloorId = parentEntity.FloorId; + entity.ParentID = ParentID; + entity.BuildType = "5"; + db.Insert(entity); + } + db.Commit(); + UpdateCheckInNum(ParentID); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + private void UpdateCheckInNum(string ParentID) + { + try + { + string sql = $@"update [dbo].[Acc_DormitoryBuild] set RoomType=( +select count(1) from [dbo].[Acc_DormitoryBuild] where ParentId='{ParentID}' and BuildType='5' +) +where ID='{ParentID}' +"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity, int type) + { + try + { + if (keyValue.Contains(",")) + { + keyValue = string.Join("','", keyValue.Split(',')); + } + string sql = $"update Acc_DormitoryBuild set "; + if (type == 1) + { + sql += $" Dept='{entity.Dept}' "; + } + else + { + sql += $"Major='{entity.Major}',Class='{entity.Class}'"; + } + + sql += $" where ID in ('{keyValue}')"; + + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 分配宿舍 + /// + /// + /// + public string SaveRoom(string RoomId, List list) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + foreach (var entity in list) + { + //判断该学生是否已分配 + if (!string.IsNullOrEmpty(entity.StudentID)) + { + var count = db.FindList().Count(x => x.StudentID == entity.StudentID && x.ID != entity.ID); + if (count > 0) + { + var stuname = db.FindEntity(x => x.StuNo == entity.StudentID)?.StuName; + return "学生" + stuname + "已分配床位,不可重复分配!"; + } + } + + //分配床位 + string sql = $"update Acc_DormitoryBuild set StudentID='{entity.StudentID}' where ID='{entity.ID}'"; + db.ExecuteBySql(sql); + } + + int checkInStu = list.Where(x => x.StudentID != null).Count(); + string checkInSql = $"update Acc_DormitoryBuild set CheckInStu='{checkInStu}' where ID='{RoomId}'"; + db.ExecuteBySql(checkInSql); + + db.Commit(); + return ""; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 同步宿舍信息 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/Acc_DormitoryReturnEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/Acc_DormitoryReturnEntity.cs new file mode 100644 index 000000000..3e91d02ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/Acc_DormitoryReturnEntity.cs @@ -0,0 +1,104 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public class Acc_DormitoryReturnEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 宿舍id,关联Acc_DormitoryBuild表 + /// + [Column("DORMITORYBUILDID")] + public string DormitoryBuildId { get; set; } + /// + /// 床位父级 + /// + [Column("PARENTID")] + public string ParentId { get; set; } + + /// + /// 检查日期 + /// + [Column("CHECKDATE")] + public DateTime? CheckDate { get; set; } + /// + /// 出宿时间 + /// + [Column("OUTTIME")] + public DateTime? OutTime { get; set; } + /// + /// 归宿时间 + /// + [Column("RETURNTIME")] + public DateTime? ReturnTime { get; set; } + + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 修改时间 + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// 修改人 + /// + [Column("UPDATEUSERID")] + public string UpdateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + this.UpdateTime = DateTime.Now; + this.UpdateUserId = LoginUserInfo.Get().userId; + } + #endregion + #region 扩展字段 + [NotMapped] + public string Name { get; set; } + + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs new file mode 100644 index 000000000..066f0b3e8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnBLL.cs @@ -0,0 +1,210 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; +using System.Linq; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public class DormitoryReturnBLL : DormitoryReturnIBLL + { + private DormitoryReturnService dormitoryReturnService = new DormitoryReturnService(); + private AccommodationService accommodationService = new AccommodationService(); + + #region 获取数据 + + /// + /// 获取左侧树形数据 + /// + /// + public List GetTree() + { + try + { + List list = accommodationService.GetSqlTreeForReturn(); + List treeList = new List(); + foreach (Acc_DormitoryBuildEntity item in list) + { + TreeModel node = new TreeModel + { + id = item.ID.ToString(), + text = item.Name.ToString(), + value = item.ID.ToString(), + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = item.ParentID == null ? "" : item.ParentID, + title = item.BuildType + + }; + + + treeList.Add(node); + + + } + + + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return dormitoryReturnService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetReportList(string queryJson) + { + try + { + return dormitoryReturnService.GetReportList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryReturn表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(string keyValue) + { + try + { + return dormitoryReturnService.GetAcc_DormitoryReturnEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + dormitoryReturnService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string type, Acc_DormitoryReturnEntity entity) + { + try + { + dormitoryReturnService.SaveEntity(type, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void SaveData(string keyValue, Acc_DormitoryReturnEntity entity) + { + try + { + dormitoryReturnService.SaveData(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/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs new file mode 100644 index 000000000..39401c7d1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnIBLL.cs @@ -0,0 +1,50 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public interface DormitoryReturnIBLL + { + #region 获取数据 + List GetTree(); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetReportList(string queryJson); + /// + /// 获取Acc_DormitoryReturn表实体数据 + /// + /// 主键 + /// + Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string type, Acc_DormitoryReturnEntity entity); + void SaveData(string keyValue, Acc_DormitoryReturnEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs new file mode 100644 index 000000000..94249c21b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/DormitoryReturn/DormitoryReturnService.cs @@ -0,0 +1,273 @@ +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.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-10 10:06 + /// 描 述:学生归宿管理 + /// + public class DormitoryReturnService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.*,a.Name + "); + strSql.Append(" FROM Acc_DormitoryReturn t "); + strSql.Append(" join Acc_DormitoryBuild a on t.DormitoryBuildId=a.ID "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + 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 ( t.CheckDate >= @startTime AND t.CheckDate <= @endTime ) "); + } + if (!queryParam["OutTime"].IsEmpty()) + { + dp.Add("OutTime", queryParam["OutTime"].ToString(), DbType.String); + strSql.Append(" AND t.OutTime = @OutTime "); + } + if (!queryParam["ParentId"].IsEmpty()) + { + dp.Add("ParentId", queryParam["ParentId"].ToString(), DbType.String); + strSql.Append(" AND t.ParentId = @ParentId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取统计数据 + /// + /// + /// + public IEnumerable GetReportList(string queryJson) + { + try + { + string sql = @"select (case t.isreturn when 1 then 1 else 0 end) as isreturn,a.Dept,a.Major,a.class from +( +select parentid,isreturn from [dbo].[Acc_DormitoryBuild] where BuildType='5' and (studentid is not null and len(studentid)>0) +) t +join Acc_DormitoryBuild a on a.ID=t.parentid where 1=1 +"; + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Dept"].IsEmpty()) + { + sql += $" AND a.Dept = '{queryParam["Dept"].ToString()}'"; + } + if (!queryParam["Major"].IsEmpty()) + { + sql += $" AND a.Major = '{queryParam["Major"].ToString()}'"; + } + if (!queryParam["Class"].IsEmpty()) + { + sql += $" AND a.Class = '{queryParam["Class"].ToString()}'"; + } + return this.BaseRepository("CollegeMIS").FindList(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryReturn表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryReturnEntity GetAcc_DormitoryReturnEntity(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.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string type, Acc_DormitoryReturnEntity entity) + { + var db = this.BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + if (type == "1") + { + //学生出宿 + entity.Create(); + entity.CheckDate = Convert.ToDateTime(entity.OutTime.Value.Date); + db.Insert(entity); + + //修改该床位为未归宿 + var sql = $"update Acc_DormitoryBuild set IsReturn=0 where ID='{entity.DormitoryBuildId}'"; + db.ExecuteBySql(sql); + } + else + { + //学生归宿 + //获取今天最后一次出宿的记录 + var outsql = + $"select top 1 * from Acc_DormitoryReturn where DormitoryBuildId='{entity.DormitoryBuildId}' and CheckDate='{DateTime.Now.Date}' order by OutTime desc"; + var model = db.FindList(outsql).FirstOrDefault(); + if (model == null) + { + //新增 + entity.Create(); + entity.ReturnTime = entity.ReturnTime; + entity.CheckDate = Convert.ToDateTime(entity.ReturnTime.Value.Date); + db.Insert(entity); + } + else + { + //修改 + model.ReturnTime = entity.ReturnTime; + model.Remark += " " + entity.Remark; + model.Modify(model.Id); + db.Update(model); + } + + //修改该床位为未归宿 + var sql = $"update Acc_DormitoryBuild set IsReturn=1 where ID='{entity.DormitoryBuildId}'"; + db.ExecuteBySql(sql); + } + + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存 + /// + /// + /// + public void SaveData(string keyValue, Acc_DormitoryReturnEntity 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.WorkFlow/NodeMethod/ArrangeLessonTermAttemperMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/ArrangeLessonTermAttemperMethod.cs index 5f0ecf4ed..d1e0e9d24 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/ArrangeLessonTermAttemperMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/ArrangeLessonTermAttemperMethod.cs @@ -7,17 +7,21 @@ using System.Threading.Tasks; namespace Learun.Application.WorkFlow { - public class ArrangeLessonTermAttemperMethod : INodeMethod + public class ArrangeLessonTermAttemperMethod : IWorkFlowMethod { ArrangeLessonTermAttemperIBLL arrangeLessonTermAttemperIBLL = new ArrangeLessonTermAttemperBLL(); - public void Sucess(string processId) + + public void Execute(WfMethodParameter parameter) { - arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(2, processId); - } - - public void Fail(string processId) - { - arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(0, processId); + if (parameter.code == "agree") + { + arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(2, parameter.processId); + } + else + { + arrangeLessonTermAttemperIBLL.ModifyStatusByProcessId(0, parameter.processId); + } } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/OperatorHelper.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/OperatorHelper.cs index f2fdaa45a..0ed02d72b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/OperatorHelper.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/OperatorHelper.cs @@ -465,7 +465,7 @@ namespace Learun.Util.Operat logEntity.F_CategoryId = 3; logEntity.F_OperateTypeId = ((int)operateLogModel.type).ToString(); logEntity.F_OperateType = EnumAttribute.GetDescription(operateLogModel.type); - logEntity.F_OperateAccount = operateLogModel.userInfo?.account; + logEntity.F_OperateAccount = operateLogModel.userInfo?.account+"("+ operateLogModel.userInfo.realName+ ")"; logEntity.F_OperateUserId = operateLogModel.userInfo?.userId; logEntity.F_Module = operateLogModel.title; logEntity.F_ExecuteResult = 1; @@ -495,7 +495,7 @@ namespace Learun.Util.Operat logEntity.F_CategoryId = 3; logEntity.F_OperateTypeId = ((int)operateLogModel.type).ToString(); logEntity.F_OperateType = EnumAttribute.GetDescription(operateLogModel.type); - logEntity.F_OperateAccount = operateLogModel.userInfo.account; + logEntity.F_OperateAccount = operateLogModel.userInfo?.account + "(" + operateLogModel.userInfo.realName + ")"; logEntity.F_OperateUserId = operateLogModel.userInfo.userId; logEntity.F_Module = operateLogModel.title; logEntity.F_ExecuteResult = 1;