diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.css new file mode 100644 index 000000000..e69de29bb diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.html new file mode 100644 index 000000000..661b51048 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.html @@ -0,0 +1,8 @@ +
+
+
+ 总共0条 +
+
+
+
\ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js new file mode 100644 index 000000000..9ec70397f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNew.js @@ -0,0 +1,53 @@ +(function () { + var multipleData = null; + var page = { + grid: null, + init: function ($page) { + page.grid = $page.find('#lr_ArrangeExamTerm_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function (_index, _item, _$item) {// 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + }); + }, + lclass: 'lr-list', + loadData: function (param, callback, $page) {// 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page + }, + queryJson: '{}' + }; + if (param.multipleData) { + _postParam.queryJson = JSON.stringify(multipleData); + } + learun.httpget(config.webapi + '/learun/ask/testlist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } + else { + callback([], 2); + } + }); + }, + rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('

考试日期:

').dataFormatter({ value: _item.ExamDate })); + _$item.append($('

考试时间:

').dataFormatter({ value: _item.ExamTime })); + _$item.append($('

课程编码:

').dataFormatter({ value: _item.LessonNo })); + _$item.append($('

课程名称:

').dataFormatter({ value: _item.LessonName })); + _$item.append($('

教室编码:

').dataFormatter({ value: _item.ClassRoomNo })); + _$item.append($('

教室名称:

').dataFormatter({ value: _item.ClassRoomName })); + return ''; + }, + }; + return page; +})(); \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs index 10b20d45f..9f2fffe98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs @@ -39,7 +39,6 @@ namespace Learun.Application.Organization if (list == null) { list = (List)departmentService.GetList(companyId); - cache.Write>(cacheKey + companyId, list, CacheId.department); } return list; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs index a39762517..3a4d9d858 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentService.cs @@ -63,7 +63,7 @@ namespace Learun.Application.Organization var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(fieldSql); - strSql.Append(" FROM LR_Base_Department t WHERE t.F_EnabledMark = 1 AND t.F_DeleteMark = 0 "); + strSql.Append(" FROM LR_Base_Department t WHERE t.F_EnabledMark = 1 AND t.F_DeleteMark = 0 order by F_Order"); return this.BaseRepository().FindList(strSql.ToString()); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs index 5bb467a07..4884149af 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs @@ -233,6 +233,8 @@ namespace Learun.Application.Organization [Column("PERSIGNATURE")] public string PerSignature { get; set; } + [Column("F_ORDER")] + public int? F_Order { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs index cae6ef45f..c3a38f6f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermController.cs @@ -148,6 +148,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// 排考数据同步 /// /// + [HttpGet] + [AjaxOnly] + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + var data = await arrangeExamTermIBLL.AsyncArrangeExamDataNew(entity); + return Success(data); + } + [HttpGet] [AjaxOnly] public async Task AsyncArrangeExamData() diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs new file mode 100644 index 000000000..7a33ebd0a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeExamTermNewController.cs @@ -0,0 +1,173 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Threading.Tasks; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewController : MvcControllerBase + { + private ArrangeExamTermNewIBLL arrangeExamTermNewIBLL = new ArrangeExamTermNewBLL(); + private ArrangeExamTermBLL arrangeExamTermIBLL = new ArrangeExamTermBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + [HttpGet] + public ActionResult IndexItem() + { + return View(); + } + [HttpGet] + public ActionResult SyncByConditionForm() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = arrangeExamTermNewIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = arrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + [HttpGet] + [AjaxOnly] + public ActionResult GetItemPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = arrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var data = arrangeExamTermNewIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + arrangeExamTermNewIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,ArrangeExamTermNewEntity entity) + { + arrangeExamTermNewIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + + /// + /// 排考数据同步 + /// + /// + [HttpPost] + [AjaxOnly] + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + var data = await arrangeExamTermIBLL.AsyncArrangeExamDataNew(entity); + return Success(data); + } + + + [HttpGet] + public ActionResult GetClassTree() + { + return Success(arrangeExamTermNewIBLL.GetClassTree()); + } + + public ActionResult GetLessonData() + { + return Success(arrangeExamTermNewIBLL.GetClassTree()); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index 247825127..cdb33e70f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs @@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; using System; +using System.Linq; +using DocumentFormat.OpenXml.Office.CustomUI; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -17,6 +19,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class ClassPlanController : MvcControllerBase { private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL(); + private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); + private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); #region 视图功能 @@ -38,6 +42,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + #endregion #region 获取数据 @@ -111,12 +116,69 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.AmendDate = DateTime.Now; } + entity.State = 0; + entity.IsAllowEdit = true; entity.MakeDate = DateTime.Now; + var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); + if (model != null) + { + if (keyValue != model.ID.ToString()) + { + return Fail("此课程已重复!不可再次添加此课程"); + } + } classPlanIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } #endregion + #region 扩展数据 + /// + /// 排课 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult CourseArranging(string keyValue) + { + var entity = classPlanIBLL.GetListById(keyValue); + + List TeachList = new List(); + for (int i = 0; i < entity.Count; i++) + { + var lessonList = classInfoIBLL.GetAllClass(). + Where(x => x.DeptNo == entity[i].DeptNo && x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade) + .OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList(); + if (lessonList.Count > 0) + { + for (int j = 0; j < lessonList.Count; j++) + { + TeachClassEntity TeachEntity = new TeachClassEntity(); + TeachEntity.TeachClassNo = lessonList[j]; + TeachEntity.AcademicYearNo = entity[i].AcademicYearNo; + TeachEntity.DeptNo = entity[i].DeptNo; + TeachEntity.MajorNo = entity[i].MajorNo; + TeachEntity.Grade = entity[i].Grade; + TeachEntity.Semester = entity[i].Semester; + TeachEntity.LessonNo = entity[i].LessonNo; + TeachEntity.StuNum = entity[i].StuNum; + TeachEntity.LessonSortNo = entity[i].LessonSortNo; + TeachEntity.F_SchoolId = entity[i].F_SchoolId; + TeachList.Add(TeachEntity); + } + } + else + { + return Fail("排课失败!暂无排课班级"); + } + } + teachClassIBLL.SaveEntityList(TeachList); + classPlanIBLL.SaveEntityList(keyValue, entity); + return Success("排课成功"); + } + + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs new file mode 100644 index 000000000..0b10baebb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs @@ -0,0 +1,282 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System; +using System.Linq; +using DocumentFormat.OpenXml.Office.CustomUI; +using List = DocumentFormat.OpenXml.Office2010.ExcelAc.List; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-08-21 17:28 + /// 描 述:设置教师 + /// + public class ClassPlanTeachController : MvcControllerBase + { + private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); + private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult TeachForm() + { + return View(); + } + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult TeachFormQZ() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = teachClassIBLL.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 ClassPlanData = teachClassIBLL.GetTeachClassEntity(keyValue); + var jsonData = new + { + ClassPlan = ClassPlanData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + teachClassIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + TeachClassEntity entity = strEntity.ToObject(); + teachClassIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + + #endregion + + #region 扩展数据 + + /// + /// 设置教师 + /// + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult SetTeach(string keyValue, string EmpNo) + { + var entityList = teachClassIBLL.GetTeachListById(keyValue); + List TeachList = new List(); + for (int i = 0; i < entityList.Count; i++) + { + var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo + && s.MajorNo == entityList[i].MajorNo && s.F_SchoolId == entityList[i].F_SchoolId + && s.ClassNo == entityList[i].TeachClassNo + ).ToList(); + if (stuDataList.Count > 0) + { + for (int j = 0; j < stuDataList.Count; j++) + { + StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); + TeachEntity.StuNo = stuDataList[j].StuNo; + TeachEntity.DeptNo = entityList[i].DeptNo; + TeachEntity.MajorNo = entityList[i].MajorNo; + TeachEntity.ClassNo = stuDataList[j].ClassNo; + TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; + TeachEntity.MajorDetailName = entityList[i].MajorDetailName; + TeachEntity.StuName = stuDataList[j].StuName; + TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo; + TeachEntity.Semester = entityList[i].Semester; + TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo; + TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo; + TeachEntity.LessonNo = entityList[i].LessonNo; + TeachEntity.PartCode = entityList[i].PartCode; + TeachEntity.OrdinaryScoreScale = 0; + TeachEntity.TermInScoreScale = 0; + TeachEntity.TermEndScoreScale = 0; + TeachEntity.OtherScoreScale = 0; + TeachEntity.TeachClassNo = entityList[i].TeachClassNo; + TeachEntity.LessonSortNo = entityList[i].LessonSortNo; + TeachEntity.StuSortNo = entityList[i].LessonSortNo; + TeachEntity.Grade = entityList[i].Grade; + TeachEntity.StudyScore = 2; + TeachEntity.TotalStudyHour = 2; + TeachEntity.IsInEffect = "1"; + TeachEntity.IsPitchOn = "1"; + TeachEntity.IsPitchOn = "1"; + TeachEntity.F_SchoolId = entityList[i].F_SchoolId; + TeachEntity.CheckMark = "1"; + TeachEntity.InsertTime = DateTime.Now; + TeachList.Add(TeachEntity); + } + } + else + { + return Fail("设置失败,未发现相关学生!"); + } + } + StuSelectLesson.SaveEntityList(TeachList); + + teachClassIBLL.UpEmpNo(keyValue, EmpNo); //更改当前教师 + + return Success("设置成功!"); + + } + public ActionResult QzSetTeach(string keyValue, string EmpNo) + { + var entityList = teachClassIBLL.GetTeachListById(keyValue); + string Nid = ""; + if (entityList.Count > 0) + { + for (int i = 0; i < entityList.Count; i++) + { + List ssList = StuSelectLesson.GetAllList().Where( + y => y.DeptNo == entityList[i].DeptNo + && y.MajorNo == entityList[i].MajorNo + && y.F_SchoolId == entityList[i].F_SchoolId + && y.ClassNo == entityList[i].TeachClassNo + && y.LessonNo == entityList[i].LessonNo + && y.CheckMark == "1" + ).Select(x => x.SelectId.ToString()).ToList(); + Nid += string.Join(",", ssList) + ","; + } + } + + Nid = Nid.TrimEnd(','); + StuSelectLesson.DeleteEntity(Nid); + + List TeachList = new List(); + for (int i = 0; i < entityList.Count; i++) + { + var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo + && s.MajorNo == entityList[i].MajorNo && s.F_SchoolId == entityList[i].F_SchoolId + && s.ClassNo == entityList[i].TeachClassNo + ).ToList(); + if (stuDataList.Count > 0) + { + for (int j = 0; j < stuDataList.Count; j++) + { + StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); + TeachEntity.StuNo = stuDataList[j].StuNo; + TeachEntity.DeptNo = entityList[i].DeptNo; + TeachEntity.MajorNo = entityList[i].MajorNo; + TeachEntity.ClassNo = stuDataList[j].ClassNo; + TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; + TeachEntity.MajorDetailName = entityList[i].MajorDetailName; + TeachEntity.StuName = stuDataList[j].StuName; + TeachEntity.GenderNo = stuDataList[j].GenderNo == true ? "0" : "1"; + TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo; + TeachEntity.Semester = entityList[i].Semester; + TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo; + TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo; + TeachEntity.LessonNo = entityList[i].LessonNo; + TeachEntity.PartCode = entityList[i].PartCode; + TeachEntity.OrdinaryScoreScale = 0; + TeachEntity.TermInScoreScale = 0; + TeachEntity.TermEndScoreScale = 0; + TeachEntity.OtherScoreScale = 0; + TeachEntity.TeachClassNo = entityList[i].TeachClassNo; + TeachEntity.LessonSortNo = entityList[i].LessonSortNo; + TeachEntity.StuSortNo = entityList[i].LessonSortNo; + TeachEntity.Grade = entityList[i].Grade; + TeachEntity.StudyScore = 2; + TeachEntity.TotalStudyHour = 2; + TeachEntity.IsInEffect = "1"; + TeachEntity.IsPitchOn = "1"; + TeachEntity.IsPitchOn = "1"; + TeachEntity.F_SchoolId = entityList[i].F_SchoolId; + TeachEntity.InsertTime = DateTime.Now; + TeachList.Add(TeachEntity); + } + } + else + { + return Fail("设置失败,未发现相关学生!"); + } + } + + StuSelectLesson.SaveEntityList(TeachList); + + teachClassIBLL.UpEmpNo(keyValue, EmpNo); //更改当前教师 + + return Success("设置成功!"); + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml new file mode 100644 index 000000000..8a63b16cc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
AETId*
+ +
+
+
AcademicYearNo*
+ +
+
+
Semester*
+ +
+
+
ExamDate*
+ +
+
+
ExamTime*
+ +
+
+
ClassNo*
+ +
+
+
ClassName*
+ +
+
+
LessonNo*
+ +
+
+
LessonName*
+ +
+
+
EmpNo*
+ +
+
+
EmpName*
+ +
+
+
ClassRoomNo*
+ +
+
+
ClassRoomName*
+ +
+
+
F_SchoolId*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js new file mode 100644 index 000000000..c956d0843 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Form.js @@ -0,0 +1,38 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml new file mode 100644 index 000000000..ea475fcd3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js new file mode 100644 index 000000000..6a9334e9c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/Index.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()}); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //排考数据同步 + $('#lr_arrange').on('click', function () { + learun.layerForm({ + id: 'SyncByConditionForm', + title: '按条件同步排考数据', + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SyncByConditionForm', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程 + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList', + headData: [ + { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, + { label: '学期', name: 'Semester', width: 80, align: "left" }, + { label: '考试日期', name: 'ExamDate', width: 100, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 100, align: "left" }, + //{ label: '班级编号', name: 'ClassNo', width: 200, align: "left" }, + //{ label: '班级名称', name: 'ClassName', width: 200, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '教师编号', name: 'EmpNo', width: 100, align: "left" }, + { label: '教师姓名', name: 'EmpName', width: 100, align: "left" }, + { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" } + ], + mainId: 'AETId', + sidx: 'ExamTime asc, LessonNo asc,ClassRoomNo asc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml new file mode 100644 index 000000000..8b9988065 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
班级信息
+
+
+
+
+
+
+ 班级信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js new file mode 100644 index 000000000..917d3db25 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js @@ -0,0 +1,130 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + var ClassNo = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetClassTree', + nodeClick: function (item) { + ClassNo = item.id; + page.search({ ClassNo: item.id }); + } + }); + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程 + //$('#LessonNo').lrselect({ + // placeholder: "请选择课程", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', + // value: 'value', + // text: 'text' + //}); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); + $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetItemPageList', + headData: [ + { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, + { label: '学期', name: 'Semester', width: 60, align: "left" }, + { label: '考试日期', name: 'ExamDate', width: 120, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, + { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, + { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, + { label: '班级名称', name: 'ClassName', width: 100, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, + { label: '学生姓名', name: 'StuName', width: 200, align: "left" }, + { label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } + ], + mainId: 'AETId', + sidx: 'ExamTime asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + console.log(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/ArrangeExamTermNew/SyncByConditionForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.cshtml new file mode 100644 index 000000000..272a8081e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.cshtml @@ -0,0 +1,19 @@ +@{ + ViewBag.Title = "按条件同步排考数据"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
校区*
+
+
+
+
学年*
+
+
+
+
学期*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js new file mode 100644 index 000000000..bdb4d7fa6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/SyncByConditionForm.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-02-27 11:05 + * 描 述:按条件同步排考数据 + */ +var acceptClick; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bind(); + //page.initData(); + }, + bind: function () { + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + }, + initData: function () { + //if (!!selectedRow) { + // $('#form').lrSetFormData(selectedRow); + //} + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/AsyncArrangeExamDataNew', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml index 0cc1700b6..9f664a33d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml @@ -15,15 +15,15 @@
学期*
-
+
系部*
-
+
专业*
-
+
年级*
@@ -32,15 +32,15 @@
- *@
年级
@@ -59,6 +59,7 @@  新增  编辑  删除 +  排课
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js index 1def00728..c22726aea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js @@ -18,7 +18,7 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_shortname' }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", allowSearch: true, @@ -35,32 +35,6 @@ var bootstrap = function ($, learun) { text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); - //$('#DeptNo').lrselect({ - // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', - // value: 'deptno', - // text: 'deptname', - // maxHeight: 200, - // select: function(item) { - // var NDeptNo = $("#DeptNo").lrselectGet(); - // if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { - // $('#MajorNo').lrselectRefresh({ - // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - // param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, - // value: "majorno", - // text: "majorname", - // maxHeight: 200 - // }); - // } else { - // $('#MajorNo').lrselectRefresh({ - // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', - // param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, - // value: "majorno", - // text: "majorname", - // maxHeight: 200 - // }); - // } - // } - //}); $("#MajorNo").lrselect(); $('#LessonNo').lrselect({ placeholder: "请选择课程", @@ -81,7 +55,7 @@ var bootstrap = function ($, learun) { title: '新增', url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form', width: 800, - height: 400, + height: 450, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -91,29 +65,100 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, - width: 800, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + var state = $('#gridtable').jfGridValue('State'); + if (state == 0) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, + width: 800, + height: 450, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } else { + learun.layerConfirm('是否确认修改,修改后可能会造成不可弥补的错误!!!', function (res) { + if (res) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, + width: 800, + height: 450, + 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 + '/EducationalAdministration/ClassPlan/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + var state = $('#gridtable').jfGridValue('State').split(','); + var allEmpty = true; + for (var i = 0; i < state.length; i++) { + if (state[i] != 0) { + allEmpty = false; + } + } + if (allEmpty) { + learun.layerConfirm('是否确认删除该项!', + function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', + { keyValue: keyValue }, + function () { + refreshGirdData(); + }); + } + }); + } else { + learun.layerConfirm('是否确认删除该项,删除数据后不可恢复!!!', function (item) { + if (item) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + } + }); + //排课 + $('#lr_courses').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var state = $('#gridtable').jfGridValue('State').split(','); + var allEmpty = true; + for (var i = 0; i < state.length; i++) { + if (state[i] != 0) { + allEmpty = false; } - }); + } + if (allEmpty) { + learun.layerConfirm('确定要进行排课么!', + function (res) { + if (res) { + learun.postForm( + top.$.rootUrl + '/EducationalAdministration/ClassPlan/CourseArranging', + { keyValue: keyValue }, + function () { + refreshGirdData(); + }); + } + }); + } else { + learun.alert.warning("不嫩选择已排课的课程计划"); + } } }); }, @@ -206,7 +251,18 @@ var bootstrap = function ($, learun) { } }, { label: "年级", name: "Grade", width: 50, align: "left" }, + { label: "课程编码", name: "LessonNo", width: 200, align: "left" }, { label: "课程名称", name: "LessonName", width: 200, align: "left" }, + { + label: "状态", name: "State", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '未排课'; + } if (cellvalue == 1) { + return '已排课'; + } + } + }, { label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" }, { label: "人数", name: "StuNum", width: 80, align: "left" }, { label: "周课时", name: "WeekLessonHour", width: 80, align: "left" }, @@ -231,7 +287,8 @@ var bootstrap = function ($, learun) { { label: "备注", name: "Remark", width: 100, align: "left" }, ], mainId: 'ID', - sidx: 'ID desc', + sidx: 'MakeDate desc', + isMultiselect: true, isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml new file mode 100644 index 000000000..4a6fdd314 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml @@ -0,0 +1,68 @@ +@{ + ViewBag.Title = "开课计划"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
学校信息
+
+
+
+
+
+
+ 未选择学校 - 专业信息 +
+
+
+
+
+
+
+
学校
+
+
+
+
专业
+
+
+
+
学年
+
+
+
+
学期
+
+
+ @*
+
系部
+
+
*@ +
+
年级
+
+
+
+
课程
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js new file mode 100644 index 000000000..2755e71ab --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -0,0 +1,250 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-11-29 11:43 + * 描 述:开课计划 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var cddeptname = ''; + var page = { + init: function () { + page.inittree(); + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 250, 400); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //年级 + $('#Grade').lrselect({ + placeholder: "请选择年级", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', + value: 'value', + text: 'text' + }); + $('#Semester').lrDataItemSelect({ code: 'Semester' }); + $("#MajorNo").lrselect(); + $('#LessonNo').lrselect({ + placeholder: "请选择课程", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', + value: 'value', + text: 'text', + maxHeight: 200 + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/TeachForm', + width: 800, + height: 450, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 设置教师 + $('#lr_teach').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var empno = $('#gridtable').jfGridValue('EmpNo').split(','); + var allEmpty = true; + for (var i = 0; i < empno.length; i++) { + if (empno[i] != '') { + allEmpty = false; + } + } + if (allEmpty) { + learun.layerForm({ + id: 'form', + title: '设置教师', + url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/TeachForm?keyValue=' + keyValue, + width: 400, + height: 300, + callBack: function (id) { + return top[id].acceptClick(); + } + }); + } else { + learun.alert.warning("所选班级已设置教师,不可重复设置!!!"); + } + } + }); + // 强制设置教师 + $('#lr_qzteach').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '强制设置教师', + url: top.$.rootUrl + + '/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' + + keyValue, + width: 400, + height: 300, + callBack: function (id) { + return top[id].acceptClick(); + } + }); + } + }); + }, + inittree: function () { + $('#cddeptTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree', + param: { parentId: '0' }, + nodeClick: page.treeNodeClick + }); + //$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); + }, + treeNodeClick: function (item) { + cddeptname = item.id; + $('#titleinfo').text(item.text); + page.search(); + var NDeptNo = item.id; + if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, + value: "majorno", + text: "majorname", + maxHeight: 200 + }); + } else { + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, + value: "majorno", + text: "majorname", + maxHeight: 200 + }); + } + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/GetPageList', + headData: [ + { + 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: "AcademicYearNo", width: 80, align: "left" }, + { + label: "学期", name: "Semester", width: 50, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Semester', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "系部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { label: "年级", name: "Grade", width: 50, align: "left" }, + { + label: "课程", name: "LessonNo", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: value, + keyId: 'lessonno', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + } + }, + { label: "人数", name: "StuNum", width: 80, align: "left" }, + { label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, + { label: "课程区别码", name: "PartCode", width: 80, align: "left" }, + { label: "班级", name: "TeachClassNo", width: 80, align: "left" }, + { + label: "教师", name: "EmpNo", width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_encode', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "合上班", name: "RelatedClassNo", width: 80, align: "left" }, + { label: "拟开教学班数", name: "LessonSortNo", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + sidx: 'ID desc', + isMultiselect: true, + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DeptNo = cddeptname; + $('#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/ClassPlanTeach/TeachForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.cshtml new file mode 100644 index 000000000..f8e88904f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "开课计划"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
教师*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js new file mode 100644 index 000000000..db907b115 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js @@ -0,0 +1,32 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-11-29 11:43 + * 描 述:开课计划 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + }, + bind: function () { + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + var EmpNo = postData.EmpNo; + console.log(EmpNo); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.cshtml new file mode 100644 index 000000000..487c450dd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "开课计划"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
教师*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js new file mode 100644 index 000000000..02ee00152 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js @@ -0,0 +1,32 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-11-29 11:43 + * 描 述:开课计划 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + }, + bind: function () { + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + var EmpNo = postData.EmpNo; + console.log(EmpNo); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index ee049f969..e7f808ccc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -58,15 +58,19 @@
身份证号*
-
+
出生日期
-
+
民族
-
+
+
排序*
+ +
+
政治面貌
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js index 42ba0249b..4e18edd7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js @@ -172,6 +172,7 @@ var bootstrap = function ($, learun) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); + console.log(2); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index b9e75f443..1cbc41857 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -380,9 +380,9 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, - keyId: 'f_departmentid', + keyId: 'id', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['name']); } }); } @@ -460,7 +460,7 @@ var bootstrap = function ($, learun) { } }, { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, - + { label: "排序", name: "F_Order", width: 100, align: "left" }, { label: "最高学历", name: "HighestRecord", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -615,6 +615,7 @@ var bootstrap = function ($, learun) { ], mainId: 'EmpId', + sidx: 'F_Order asc', isPage: true, isMultiselect: true }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml index c9e4f65f6..beebc1a61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml @@ -199,6 +199,7 @@  添加节点执行人  添加表字段  添加分管校长 +  添加部门负责人  移除
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js index b03b2762c..f5b67d8b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js @@ -185,6 +185,9 @@ var bootstrap = function ($, learun) { case '7': return '分管校长'; break; + case '8': + return '部门负责人'; + break; } } }, @@ -350,7 +353,19 @@ var bootstrap = function ($, learun) { } }); }); - + //添加部门负责人 + $('#lr_form_deptmaster').on('click', function () { + learun.layerConfirm('是否确认增加部门负责人?', function (res) { + if (res) { + var data = { auditorId: 'bmfzrid', type: '8', auditorName: '部门负责人' }; + if (!isRepeat(data.auditorId)) { + data.id = learun.newGuid(); + auditors.push(data); + $('#auditor_girdtable').jfGridSet('refreshdata', auditors); + } + } + }); + }); /*表单添加*/ $('#workform_girdtable').jfGrid({ headData: [ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs index 5338529bc..5890ce8dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs @@ -113,7 +113,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers { { "X-SS-API-KEY", ApiKey } }; - string responses = Util.HttpMethods.HttpPosts("http://localhost:8005/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); + string responses = Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); #endregion #region 修改审核状态 @@ -132,7 +132,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers listCon.Add(con); AList.contents = listCon; AList.reasons = "终审通过"; - Util.HttpMethods.HttpPosts("http://localhost:8005/api/v1/contents/actions/check", AList.ToJson(), ApiId); + Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/actions/check", AList.ToJson(), ApiId); } #endregion return Success("发布成功!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml index 03cd7bd7a..41aadd3c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml @@ -29,8 +29,8 @@
负责人
- -
+
+
分管校长
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js index 222bbfc67..1f06e8ae0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js @@ -37,6 +37,13 @@ var bootstrap = function ($, learun) { } } }); + //部门负责人 + $("#F_Manager").lrformselect({ + layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', + layerUrlW: 400, + layerUrlH: 300, + dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + }); $('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index c104c04d9..6ea627085 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -112,10 +112,22 @@ var bootstrap = function ($, learun) { { label: "部门编号", name: "F_EnCode", width: 100, align: "left" }, { label: "部门简称", name: "F_ShortName", width: 100, align: "left" }, { label: "部门性质", name: "F_Nature", width: 100, align: "left" }, - { label: "负责人", name: "F_Manager", width: 100, align: "left" }, + { + label: "负责人", name: "F_Manager", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, { label: "分管校长", name: "F_SchoolMaster", width: 100, align: "left" }, { - label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , + label: "公告类别", name: "NoticeCategory", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getsAsync('dataItem', { key: value, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js index 5067e8d74..2488e7e83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js @@ -357,6 +357,7 @@ var bootstrap = function ($, learun) { } } }, + { label: "排序", name: "F_Order", index: "F_Order", width: 50, align: "center"}, { label: "最后登录时间", name: "F_UserId_Log", width: 200, align: "left", formatterAsync: function (callback, value, row) { learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/User/GetLastLoginTime?userId=' + value, function (res) { @@ -372,6 +373,7 @@ var bootstrap = function ($, learun) { isPage: true, reloadSelected: true, mainId: 'F_UserId', + sidx: 'F_Order asc', isMultiselect: true }); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js index a9c03936c..7f027b26c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js @@ -160,7 +160,7 @@ } d.write(""); d.write(""); - d.write("

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

"); + //d.write("

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

"); var $table = a('
'); var num = 24; var $tr = a(''); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 6714c3fed..8b1fa0e0d 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 @@ -1,4 +1,4 @@ - + @@ -319,6 +319,7 @@ + @@ -819,6 +820,7 @@ + @@ -928,6 +930,8 @@ + + @@ -943,6 +947,8 @@ + + @@ -1076,6 +1082,7 @@ + @@ -6263,6 +6270,10 @@ + + + + @@ -7461,6 +7472,11 @@ + + + + + @@ -7585,10 +7601,10 @@ False - True - 20472 + True + 20472 / - http://localhost:20873/ + http://localhost:20873/ False False diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index ca0d018a1..2429bf817 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -1,37 +1,42 @@  - - + - - + - - + - - + - - - - - + - - - + - - + - + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 28fd8c9e0..0907e0fdb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -1,175 +1,178 @@  - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file 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 1a2d19159..1bfa10fb1 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 @@ -195,6 +195,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs new file mode 100644 index 000000000..9e63736a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ArrangeExamTermNewApi.cs @@ -0,0 +1,47 @@ +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.EvaluationTeach; +using Learun.Util; +using Nancy; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.Ask; + +namespace Learun.Application.WebApi.Modules +{ + /// + /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创建人:数字化智慧校园-框架开发组 + /// 日 期:2018.01.04 + /// 描 述:部门管理 + /// + public class ArrangeExamTermNewApi : BaseApi + { + public ArrangeExamTermNewApi() + : base("/learun/ask") + { + Get["/testlist"] = GetPageList; + } + + private ArrangeExamTermNewIBLL AeTerm = new ArrangeExamTermNewBLL(); + + /// + /// 获取问卷列表 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = AeTerm.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs new file mode 100644 index 000000000..d5bc86e8d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermItemNewMap.cs @@ -0,0 +1,28 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 14:27 + /// 描 述:排考明细 + /// + public class ArrangeExamTermItemNewMap : EntityTypeConfiguration + { + public ArrangeExamTermItemNewMap() + { + #region 表、主键 + //表 + this.ToTable("ARRANGEEXAMTERMITEMNEW"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs new file mode 100644 index 000000000..8b2d3e607 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ArrangeExamTermNewMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewMap : EntityTypeConfiguration + { + public ArrangeExamTermNewMap() + { + #region 表、主键 + //表 + this.ToTable("ARRANGEEXAMTERMNEW"); + //主键 + this.HasKey(t => t.AETId); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index e84d2aed3..e366181a5 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 @@ -67,6 +67,7 @@ + @@ -565,6 +566,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs index a2879c3b7..26737cdd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermBLL.cs @@ -148,6 +148,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + try + { + return await arrangeExamTermService.AsyncArrangeExamDataNew(entity); + } + catch (Exception ex) + { + throw ex; + } + } /// /// 排考数据同步 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs index ba37dea28..6946ca13e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermIBLL.cs @@ -61,6 +61,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// Task AsyncArrangeExamData(); + Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity); + /// /// 考试表 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs index b77159025..929387918 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTerm/ArrangeExamTermService.cs @@ -190,6 +190,123 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 + /// + /// 2021新排考接口 + /// + /// + /// + public async Task AsyncArrangeExamDataNew(ArrangeLessonTermEntity entity) + { + bool result = false; + try + { + //清空本学年本学期排考数据 + var academicYearNo =entity.AcademicYearNo; + var semester =entity.Semester; + var schoolid = entity.F_SchoolId; + this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'"); + this.BaseRepository("CollegeMIS").ExecuteBySql($"delete from ArrangeExamTermItemNew where AcademicYearNo='{academicYearNo}' and Semester='{semester}' and F_SchoolId='{schoolid}'"); + //排考数据处理 + var insertList = new List(); + var arrangeExamTermData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); + var classinfoData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); + var studentData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); + HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}"); + httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); + var apiData = await Client.PostAsync(Config.GetValue("ArrangeExamAPINew"), httpContent).Result.Content.ReadAsStringAsync(); + //明细接口 + //Client.PostAsync(Config.GetValue("ArrangeExamItemAPINew"), httpContent); + if (!string.IsNullOrEmpty(apiData)) + { + var data = JsonConvert.DeserializeObject(apiData); + if (!data.success) + { + return result; + } + var dataList = data.entity.list; + if (dataList.Any()) + { + var insertDataList = new List(); + foreach (var item in dataList) + { + var insertData = new ArrangeExamTermNewEntity + { + AETId = Guid.NewGuid().ToString(), + AcademicYearNo = academicYearNo, + Semester = semester, + F_SchoolId = schoolid, + ExamDate = Convert.ToDateTime(item.date).Date, + ExamTime = Convert.ToDateTime(item.date).ToShortTimeString()+"~"+Convert.ToDateTime(item.time).ToShortTimeString(), + LessonNo =item.lessonNo, + LessonName=item.lessonName, + EmpNo=item.empNo, + EmpName = item.empName, + ClassRoomNo=item.classroomNo, + ClassRoomName = item.classroomName + }; + if (arrangeExamTermData.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0 + && insertDataList.Count(x => x.ExamDate == insertData.ExamDate && x.LessonNo == insertData.LessonNo && x.EmpNo == insertData.EmpNo && x.ClassRoomNo == insertData.ClassRoomNo) == 0) + { + insertDataList.Add(insertData); + } + } + insertList.AddRange(insertDataList); + result = await BaseRepository("CollegeMIS").InsertAsync(insertList)>0; + } + } + //明细对接 + string sql = @"SELECT semester.year AS 'AcademicYearNo',semester.number AS 'Semester',currid.number AS 'LessonNo',currid.name AS 'LessonName', + student.name AS 'StuName',student.number AS 'StuNo',classroom.name 'ClassRoomName',classroom.number AS 'ClassRoomNo', + paikao.time AS 'StartDate',paikao.endtime 'EndDate',a.number 'SitNumber', + (SELECT GROUP_CONCAT(teachername) FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) AS EmpName, + (SELECT GROUP_CONCAT(number) FROM tb_teacher WHERE id IN + (SELECT teacherid FROM tb_paikao WHERE currid = a.`currid` AND classroomid = a.`classroom`) ) AS EmpNo + FROM tb_studentpaikao a + + LEFT JOIN tb_student student ON student.id = a.student + LEFT JOIN tb_classroom classroom ON classroom.id = a.classroom + LEFT JOIN tb_curriculum currid ON currid.id = a.currid + LEFT JOIN tb_semester semester ON semester.id = a.semester + LEFT JOIN tb_paikaorule paikao ON paikao.currid = a.currid where semester.year='"+academicYearNo+ "' and semester.number='"+semester+"'"; + var list= BaseRepository("paikeDbString").FindList(sql); + var listsqlserver =new List(); + foreach (var item in list) + { + ArrangeExamTermItemNewEntity aetitem = new ArrangeExamTermItemNewEntity(); + aetitem.Create(); + aetitem.AcademicYearNo = item.AcademicYearNo; + aetitem.Semester = item.Semester; + aetitem.LessonNo = item.LessonNo; + aetitem.LessonName = item.LessonName; + item.ExamDate = Convert.ToDateTime(item.StartDate); + aetitem.ExamDate = item.ExamDate; + item.ExamTime = Convert.ToDateTime(item.StartDate).ToShortTimeString() + "~" + Convert.ToDateTime(item.EndDate).ToShortTimeString(); + aetitem.ExamTime = item.ExamTime; + aetitem.ClassNo = item.ClassNo; + aetitem.ClassName = item.ClassName; + aetitem.EmpNo = item.EmpNo; + aetitem.EmpName = item.EmpName; + aetitem.ClassRoomNo = item.ClassRoomNo; + aetitem.ClassRoomName = item.ClassRoomName; + aetitem.F_SchoolId = schoolid; + aetitem.SitNumber = item.SitNumber; + aetitem.StuNo = item.StuNo; + aetitem.StuName = item.StuName; + var classitem = studentData.Find(m => m.StuNo == item.StuNo); + item.ClassNo = classitem?.ClassNo; + aetitem.ClassNo = item.ClassNo; + aetitem.ClassName = classinfoData.Find(m=>m.ClassNo==aetitem.ClassNo)?.ClassName; + listsqlserver.Add(aetitem); + } + BaseRepository("CollegeMIS").Insert(listsqlserver); + } + catch (Exception ex) + { + throw ex; + } + return result; + } + /// /// 排考数据同步 /// @@ -708,8 +825,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string time { get; set; } public string date { get; set; } public string classroomId { get; set; } + public string classroomNo { get; set; } public string classroomName { get; set; } public string kaoshis { get; set; } + public string lessonNo { get; set; } + public string lessonName { get; set; } + public string empNo { get; set; } + public string empName { get; set; } } public class ArrangeExamEntity diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs new file mode 100644 index 000000000..798b43b91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// +     /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 +     /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewBLL : ArrangeExamTermItemNewIBLL + { + private ArrangeExamTermItemNewService arrangeExamTermItemNewService = new ArrangeExamTermItemNewService(); + + #region 获取数据 + + /// +         /// 获取列表数据 +         /// +         /// 查询参数 +         /// + public IEnumerable GetList(string queryJson) + { + try + { + return arrangeExamTermItemNewService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 获取列表分页数据 +         /// +         /// 分页参数 +         /// 查询参数 +         /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermItemNewService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 获取实体数据 +         /// +         /// 主键 +         /// + public ArrangeExamTermItemNewEntity GetEntity(string keyValue) + { + try + { + return arrangeExamTermItemNewService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// +         /// 删除实体数据 +         /// +         /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + arrangeExamTermItemNewService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// +         /// 保存实体数据(新增、修改) +         /// +         /// 主键 +         /// 实体 + public void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity) + { + try + { + arrangeExamTermItemNewService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs new file mode 100644 index 000000000..91e88c9a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewEntity.cs @@ -0,0 +1,145 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// +     /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 +     /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewEntity + { + #region 实体成员 + /// +         /// Id +         /// +         /// + [Column("ID")] + public string Id { get; set; } + /// +         /// AcademicYearNo +         /// +         /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// +         /// Semester +         /// +         /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// +         /// ExamDate +         /// +         /// + [Column("EXAMDATE")] + public DateTime? ExamDate { get; set; } + /// +         /// ExamTime +         /// +         /// + [Column("EXAMTIME")] + public string ExamTime { get; set; } + /// +         /// ClassNo +         /// +         /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// +         /// ClassName +         /// +         /// + [Column("CLASSNAME")] + public string ClassName { get; set; } + /// +         /// LessonNo +         /// +         /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// +         /// LessonName +         /// +         /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// +         /// EmpNo +         /// +         /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// +         /// EmpName +         /// +         /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// +         /// ClassRoomNo +         /// +         /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// +         /// ClassRoomName +         /// +         /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// +         /// F_SchoolId +         /// +         /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + /// +         /// SitNumber +         /// +         /// + [Column("SITNUMBER")] + public string SitNumber { get; set; } + /// +         /// StuNo +         /// +         /// + [Column("STUNO")] + public string StuNo { get; set; } + /// +         /// StuName +         /// +         /// + [Column("STUNAME")] + public string StuName { get; set; } + + [NotMapped] + public string StartDate { get; set; } + [NotMapped] + public string EndDate { get; set; } + + #endregion + + #region 扩展操作 + /// +         /// 新增调用 +         /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// +         /// 编辑调用 +         /// +         /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs new file mode 100644 index 000000000..bd8f19f4e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 14:27 + /// 描 述:排考明细 + /// + public interface ArrangeExamTermItemNewIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + ArrangeExamTermItemNewEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity entity); + #endregion + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs new file mode 100644 index 000000000..8462c44c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermItemNew/ArrangeExamTermItemNewService.cs @@ -0,0 +1,235 @@ +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 力软信息技术(苏州)有限公司 +     /// 创 建:超级管理员 +     /// 日 期:2021-12-09 14:27 +     /// 描 述:排考明细 +     /// + public class ArrangeExamTermItemNewService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// +         /// 构造方法 +         /// + public ArrangeExamTermItemNewService() + { + fieldSql = @" +                t.Id, +                t.AcademicYearNo, +                t.Semester, +                t.ExamDate, +                t.ExamTime, +                t.ClassNo, +                t.ClassName, +                t.LessonNo, +                t.LessonName, +                t.EmpNo, +                t.EmpName, +                t.ClassRoomNo, +                t.ClassRoomName, +                t.F_SchoolId, +                t.SitNumber, +                t.StuNo, +                t.StuName +            "; + } + #endregion + + #region 获取数据 + + /// +         /// 获取列表数据 +         /// +         /// 条件参数 +         /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermItemNew t "); + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 获取列表分页数据 +         /// +         /// 分页参数 +         /// 条件参数 +         /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermItemNew t where 1=1 "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo='" + queryParam["EmpNo"].ToString() + "' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["StartTime"].ToString() + "' ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),null,pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 获取实体数据 +         /// +         /// 主键 +         /// + public ArrangeExamTermItemNewEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// +         /// 删除实体数据 +         /// +         /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// +         /// 保存实体数据(新增、修改) +         /// 主键 +         /// 实体 +         /// + public void SaveEntity(string keyValue, ArrangeExamTermItemNewEntity 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 + + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs new file mode 100644 index 000000000..f3d4459a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewBLL.cs @@ -0,0 +1,202 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewBLL : ArrangeExamTermNewIBLL + { + private ArrangeExamTermNewService arrangeExamTermNewService = new ArrangeExamTermNewService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return arrangeExamTermNewService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermNewService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + { + try + { + return arrangeExamTermNewService.GetItemPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public ArrangeExamTermNewEntity GetEntity(string keyValue) + { + try + { + return arrangeExamTermNewService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + arrangeExamTermNewService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity) + { + try + { + arrangeExamTermNewService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public List GetClassTree() + { + try + { + var list = arrangeExamTermNewService.GetClassTree(); + List treeList = new List(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.ClassNo, + text = item.ClassName, + value = item.ClassNo, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "0" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs new file mode 100644 index 000000000..9601c6899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewEntity.cs @@ -0,0 +1,139 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewEntity + { + #region 实体成员 + /// + /// AETId + /// + /// + [Column("AETID")] + public string AETId { get; set; } + /// + /// AcademicYearNo + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// ExamDate + /// + /// + [Column("EXAMDATE")] + public DateTime? ExamDate { get; set; } + /// + /// ExamTime + /// + /// + [Column("EXAMTIME")] + public string ExamTime { get; set; } + /// + /// ClassNo + /// + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// ClassName + /// + /// + [Column("CLASSNAME")] + public string ClassName { get; set; } + /// + /// LessonNo + /// + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// LessonName + /// + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// EmpNo + /// + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// EmpName + /// + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// ClassRoomNo + /// + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// F_SchoolId + /// + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + + /// + /// 座位编号 + /// + [NotMapped] + public string SitNumber { get; set; } + [NotMapped] + public string StuNo { get; set; } + [NotMapped] + public string StuName { get; set; } + [NotMapped] + public string StartDate { get; set; } + [NotMapped] + public string EndDate { get; set; } + [NotMapped] + public string Teacher { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.AETId = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.AETId = keyValue; + } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs new file mode 100644 index 000000000..2a7018854 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewIBLL.cs @@ -0,0 +1,57 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public interface ArrangeExamTermNewIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetItemPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + ArrangeExamTermNewEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity); + #endregion + + List GetClassTree(); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs new file mode 100644 index 000000000..4ce6b0d75 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeExamTermNew/ArrangeExamTermNewService.cs @@ -0,0 +1,299 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-08 12:19 + /// 描 述:排考2021新 + /// + public class ArrangeExamTermNewService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// + /// 构造方法 + /// + public ArrangeExamTermNewService() + { + fieldSql = @"*"; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermNew t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM ArrangeExamTermNew t where 1=1 "); + var queryParam = queryJson.ToJObject(); + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo=@AcademicYearNo "); + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester=@Semester "); + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo=@EmpNo "); + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo=@LessonNo "); + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo=@ClassNo "); + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo=@ClassRoomNo "); + dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( ExamDate >= @startTime AND ExamDate <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取排考详情 + /// + /// + /// + /// + public IEnumerable GetItemPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select * from ArrangeExamTermItemNew t where 1=1 "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo='"+ queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取实体数据 + /// + /// 主键 + /// + public ArrangeExamTermNewEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.AETId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ArrangeExamTermNewEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + public IEnumerable GetClassTree() + { + try + { + return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from ArrangeExamTermItemNew group by ClassNo,ClassName order by ClassNo"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs index 1489602ef..44d709d8a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs @@ -120,5 +120,107 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion + + #region 扩展数据 + /// + /// 去重 + /// + /// + /// + /// + /// + /// + /// + /// + /// + public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, + string Major, string Grade, string Lesson) + { + try + { + return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 删除实体数据 + /// + /// 主键 + public void DelRelation(string keyValue) + { + try + { + classPlanService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public List GetListById(string keyValue) + { + try + { + return classPlanService.GetListById(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void SaveEntityList(string keyValue, List entity) + { + try + { + classPlanService.SaveEntityList(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/ClassPlan/ClassPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs index 6ba71a1e2..012eb2fa5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs @@ -44,5 +44,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(string keyValue, OpenLessonPlanEntity entity); #endregion + #region 扩展数据 + + /// + /// 去重 + /// + /// 主键 + /// 校区 + /// 学年 + /// 学期 + /// 系部 + /// 专业 + /// 年级 + /// 课程 + /// + OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, string Major, string Grade, string Lesson); + + /// + /// 编辑时删除关联数据 + /// + /// + void DelRelation(string keyValue); + + /// + /// 获取TeachClass表实体数据 + /// 主键 + /// + /// + List GetListById(string keyValue); + + void SaveEntityList(string keyValue, List entity); + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs index 184b03de9..822519c21 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs @@ -122,13 +122,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 public void DeleteEntity(string keyValue) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - var keyvalue = Convert.ToInt32(keyValue); - this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyvalue); + var keyvalue = keyValue.Split(','); + foreach (var items in keyvalue) + { + var OpList = this.BaseRepository("CollegeMIS").FindEntity(t => t.ID.ToString() == items); + if (OpList != null) + { + var TeachList = this.BaseRepository("CollegeMIS").FindList( + x => x.DeptNo == OpList.DeptNo && + x.MajorNo == OpList.MajorNo && + x.Grade == OpList.Grade && + x.Semester == OpList.Semester && + x.LessonNo == OpList.LessonNo && + x.AcademicYearNo == OpList.AcademicYearNo + ).ToList(); + List StrTeach = null; + if (TeachList.Count > 0) + { + StrTeach = TeachList.Select(x => x.TeachClassNo).ToList(); + if (StrTeach.Count() > 0) + { + var LessonList = this.BaseRepository("CollegeMIS").FindList( + y => y.DeptNo == OpList.DeptNo && + y.MajorNo == OpList.MajorNo && + y.Grade == OpList.Grade && + y.Semester == OpList.Semester && + y.LessonNo == OpList.LessonNo && + y.AcademicYearNo == OpList.AcademicYearNo && + StrTeach.Contains(y.ClassNo) + ); + foreach (var item in LessonList) + { + db.Delete(m => m.SelectId == Convert.ToInt32(item.SelectId)); + } + + foreach (var item in TeachList) + { + db.Delete(m => m.ID == item.ID); + } + } + } + } + db.Delete(m => m.ID.ToString() == items); + } + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -175,5 +219,160 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + + #region 扩展数据 + /// + /// 去重 + /// + /// 主键 + /// 校区 + /// 学年 + /// 学期 + /// 系部 + /// 专业 + /// 年级 + /// 课程 + /// + public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, + string Major, string Grade, string Lesson) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity( + x => x.F_SchoolId == School + && x.AcademicYearNo == Year + && x.Semester == Semester + && x.DeptNo == Dept + && x.MajorNo == Major + && x.Grade == Grade + && x.LessonNo == Lesson + ); + + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + public void DelRelation(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var keyvalue = Convert.ToInt32(keyValue); + var OpList = this.BaseRepository("CollegeMIS").FindEntity(t => t.ID == keyvalue); + if (OpList != null) + { + var TeachList = this.BaseRepository("CollegeMIS").FindList( + x => x.DeptNo == OpList.DeptNo && + x.MajorNo == OpList.MajorNo && + x.Grade == OpList.Grade && + x.Semester == OpList.Semester && + x.LessonNo == OpList.LessonNo && + x.AcademicYearNo == OpList.AcademicYearNo + ).ToList(); + List StrTeach = null; + if (TeachList.Count > 0) + { + StrTeach = TeachList.Select(x => x.TeachClassNo).ToList(); + if (StrTeach.Count > 0) + { + var LessonList = this.BaseRepository("CollegeMIS").FindList( + y => y.DeptNo == OpList.DeptNo && + y.MajorNo == OpList.MajorNo && + y.Grade == OpList.Grade && + y.Semester == OpList.Semester && + y.LessonNo == OpList.LessonNo && + y.AcademicYearNo == OpList.AcademicYearNo && + StrTeach.Contains(y.ClassNo) + ); + foreach (var item in LessonList) + { + db.Delete(m => m.SelectId == Convert.ToInt32(item.SelectId)); + } + + foreach (var item in TeachList) + { + db.Delete(m => m.ID == item.ID); + } + } + } + + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取OpenLessonPlan表实体数据 + /// 主键 + /// + /// + public List GetListById(string keyValue) + { + try + { + var id = keyValue.Split(','); + return this.BaseRepository("CollegeMIS") + .FindList(x => id.Contains(x.ID.ToString())).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + public void SaveEntityList(string keyValue, List entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var keyvalue = keyValue.Split(','); + foreach (var item in keyvalue) + { + var entityList = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID.ToString() == item); + entityList.State = 1; + db.Update(entityList); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + 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/EmpInfo/EmpInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs index ed9380366..4aaae7b41 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs @@ -527,7 +527,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("WORKERTECHNOLOGYSTATUS")] public bool? WorkerTechnologyStatus { get; set; } - + /// /// 任同职级职务时间 /// @@ -585,6 +585,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("ISINACTIVETIME")] public DateTime? IsInActiveTime { get; set; } + /// + /// 排序 + /// + [Column("F_ORDER")] + public int? F_Order { get; set; } + + #endregion #region 扩展操作 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 b03e465b3..924390e69 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 @@ -434,6 +434,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi userbase.F_CompanyId = tEntity.F_CompanyId; userbase.F_DepartmentId = tEntity.F_DepartmentId; userbase.F_IdentityCardNo = tEntity.IdentityCardNo; + userbase.F_Order = tEntity.F_Order; userIBLL.SaveEntity(null, userbase); studentList.Add(userbase); } @@ -545,7 +546,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi var keyValueArr = keyValue.Split(','); foreach (var item in keyValueArr) { - db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'"); + db.ExecuteBySql("update EmpInfo set CheckMark=1 where EmpId='" + item + "'"); } db.Commit(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs index 2f3a5cfc6..0ebadc6b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanEntity.cs @@ -270,6 +270,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("ISALLOWEDIT")] public bool? IsAllowEdit { get; set; } + /// + /// 排课标识 + /// + [Column("STATE")] + public int? State { get; set; } #endregion #region 扩展操作 @@ -305,6 +310,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public string MajorName { get; set; } + /// + /// 教师 + /// + [NotMapped] + public string TeachNo { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs new file mode 100644 index 000000000..9fbfaf9a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListBLL.cs @@ -0,0 +1,164 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class StuSelectLessonListBLL : StuSelectLessonListIBLL + { + private StuSelectLessonListService stuSelectLessonListService = new StuSelectLessonListService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuSelectLessonListService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + public StuSelectLessonListEntity GetListEntity(string keyValue) + { + try + { + return stuSelectLessonListService.GetListEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + stuSelectLessonListService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StuSelectLessonListEntity entity) + { + try + { + stuSelectLessonListService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + public void SaveEntityList(List entity) + { + try + { + stuSelectLessonListService.SaveEntityList(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetAllList() + { + try + { + return stuSelectLessonListService.GetAllList(); + } + 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/StuSelectLessonList/StuSelectLessonListIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListIBLL.cs new file mode 100644 index 000000000..9d90b7f5d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListIBLL.cs @@ -0,0 +1,53 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public interface StuSelectLessonListIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + StuSelectLessonListEntity GetListEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StuSelectLessonListEntity entity); + void SaveEntityList(List entity); + + IEnumerable GetAllList(); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs new file mode 100644 index 000000000..c3dfede79 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs @@ -0,0 +1,242 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class StuSelectLessonListService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM StuSelectLessonList t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["keyword"].IsEmpty()) + { + dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); + strSql.Append(" AND t.DisFrom like @keyword "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + public StuSelectLessonListEntity GetListEntity(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) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //this.BaseRepository("CollegeMIS").Delete(t => t.StuId == keyValue); + + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + db.Delete(t => t.SelectId.ToString() == item); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StuSelectLessonListEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + var keyvalue = Convert.ToInt32(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 + + #region 扩展数据 + public void SaveEntityList(List entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + foreach (var item in entity) + { + StuSelectLessonListEntity stuLessonList = new StuSelectLessonListEntity(); + stuLessonList.F_SchoolId = item.F_SchoolId; + stuLessonList.NoticeBookNo = item.NoticeBookNo; + stuLessonList.StuNo = item.StuNo; + stuLessonList.DeptNo = item.DeptNo; + stuLessonList.MajorNo = item.MajorNo; + stuLessonList.ClassNo = item.ClassNo; + stuLessonList.MajorDetailNo = item.MajorDetailNo; + stuLessonList.MajorDetailName = item.MajorDetailName; + stuLessonList.StuName = item.StuName; + stuLessonList.TeachClassNo = item.TeachClassNo; + stuLessonList.GenderNo = item.GenderNo; + stuLessonList.AcademicYearNo = item.AcademicYearNo; + stuLessonList.Semester = item.Semester; + stuLessonList.OpenLessonDeptNo = item.OpenLessonDeptNo; + stuLessonList.OpenLessonMajorNo = item.OpenLessonMajorNo; + stuLessonList.LessonNo = item.LessonNo; + stuLessonList.LessonName = item.LessonName; + stuLessonList.PartCode = item.PartCode; + stuLessonList.LessonNameEng = item.LessonNameEng; + stuLessonList.OrdinaryScoreScale = item.OrdinaryScoreScale; + stuLessonList.TermInScoreScale = item.TermInScoreScale; + stuLessonList.TermEndScoreScale = item.TermEndScoreScale; + stuLessonList.OtherScoreScale = item.OtherScoreScale; + stuLessonList.LessonSortNo = item.LessonSortNo; + stuLessonList.StuSortNo = item.StuSortNo; + stuLessonList.Grade = item.Grade; + stuLessonList.StudyScore = item.StudyScore; + stuLessonList.TotalStudyHour = item.TotalStudyHour; + stuLessonList.IsInEffect = item.IsInEffect; + stuLessonList.Remark = item.Remark; + stuLessonList.ConflictLessonNo = item.ConflictLessonNo; + stuLessonList.EmpNo = item.EmpNo; + stuLessonList.TeachPlanNo = item.TeachPlanNo; + stuLessonList.IsPitchOn = item.IsPitchOn; + stuLessonList.CheckMark = item.CheckMark; + stuLessonList.InsertTime = item.InsertTime; + stuLessonList.CheckMark = "1"; + db.Insert(stuLessonList); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public IEnumerable GetAllList() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(m => m.CheckMark == "1"); + } + 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/TeachClass/TeachClassBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs new file mode 100644 index 000000000..8e07b0437 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs @@ -0,0 +1,233 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-01-29 11:08 + /// 描 述:班级信息管理 + /// + public class TeachClassBLL : TeachClassIBLL + { + private TeachClassService teachClassEntity = new TeachClassService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return teachClassEntity.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public bool GetAny() + { + try + { + return teachClassEntity.GetAny(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ClassInfo表实体数据 + /// 主键 + /// + /// + public TeachClassEntity GetTeachClassEntity(string keyValue) + { + try + { + return teachClassEntity.GetTeachClassEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取ClassInfo表实体数据 + /// 班级编号 + /// + /// + + #endregion + + #region 提交数据 + public void DeleteEntity(string keyValue) + { + try + { + teachClassEntity.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, TeachClassEntity entity) + { + try + { + teachClassEntity.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void SaveEntityList(List entity) + { + try + { + teachClassEntity.SaveEntityList(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 扩展数据 + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public List GetTeachListById(string keyValue) + { + try + { + return teachClassEntity.GetTeachListById(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 查询条件 + /// + /// + public IEnumerable GetAllClass() + { + try + { + return teachClassEntity.GetAllClass(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void UpEmpNo(string keyValue, string EmpNo) + { + try + { + teachClassEntity.UpEmpNo(keyValue, EmpNo); + } + 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/TeachClass/TeachClassIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs new file mode 100644 index 000000000..27aeb4551 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs @@ -0,0 +1,76 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-01-29 11:08 + /// 描 述:班级信息管理 + /// + public interface TeachClassIBLL + { + #region 获取数据 + bool GetAny(); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ClassInfo表实体数据 + /// 主键 + /// + /// + TeachClassEntity GetTeachClassEntity(string keyValue); + #endregion + + #region 提交数据 + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, TeachClassEntity entity); + + + #endregion + + #region 扩展数据 + + /// + /// 获取ClassTeach表实体数据 + /// 主键 + /// + /// + List GetTeachListById(string keyValue); + /// + /// 保存数据 + /// + /// + void SaveEntityList(List entity); + /// + /// 去重 + /// + /// + IEnumerable GetAllClass(); + /// + /// 保存/修改教师 + /// + /// + /// + void UpEmpNo(string keyvalue, string EmpNo); + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs new file mode 100644 index 000000000..6798daddd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs @@ -0,0 +1,331 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-01-29 11:08 + /// 描 述:班级信息管理 + /// + public class TeachClassService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM TeachClass t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["F_SchoolId"].IsEmpty()) + { + dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); + strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); + } + 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["Grade"].IsEmpty()) + { + dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Grade Like @Grade "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + internal bool GetAny() + { + try + { + return this.BaseRepository("CollegeMIS").FindList().ToList().Count > 0 ? true : false; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ClassInfo表实体数据 + /// 主键 + /// + /// + public TeachClassEntity GetTeachClassEntity(string keyValue) + { + try + { + int ID = Convert.ToInt32(keyValue); + return this.BaseRepository("CollegeMIS").FindEntity(ID); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + #region 提交数据 + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //修改 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID == Convert.ToInt32(item)); + if (entity != null) + { + entity.EmpNo = ""; + db.Update(entity); + } + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, TeachClassEntity entity) + { + try + { + var keyvalue = Convert.ToInt32(keyValue); + 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 + + #region 扩展数据 + public IEnumerable GetAllClass() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ClassInfo表实体数据 + /// 主键 + /// + /// + public List GetTeachListById(string keyValue) + { + try + { + var id = keyValue.Split(','); + return this.BaseRepository("CollegeMIS") + .FindList(x => id.Contains(x.ID.ToString())).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 保存数据 + /// + /// 主键 + /// + public void SaveEntityList(List List) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + foreach (var item in List) + { + TeachClassEntity Teach = new TeachClassEntity(); + Teach.TeachClassNo = item.TeachClassNo; + Teach.AcademicYearNo = item.AcademicYearNo; + Teach.DeptNo = item.DeptNo; + Teach.MajorNo = item.MajorNo; + Teach.Grade = item.Grade; + Teach.Semester = item.Semester; + Teach.LessonNo = item.LessonNo; + Teach.StuNum = item.StuNum; + Teach.LessonSortNo = item.LessonSortNo; + Teach.F_SchoolId = item.F_SchoolId; + db.Insert(Teach); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 保存或修改教师 + /// + /// + /// + public void UpEmpNo(string keyValue, string EmpNo) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var keyarray = keyValue.Split(','); + foreach (var item in keyarray) + { + var entityList = this.GetTeachClassEntity(item); + entityList.EmpNo = EmpNo; + db.Update(entityList); + + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 81e4aa5aa..18945acac 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 @@ -91,6 +91,10 @@ + + + + @@ -211,6 +215,9 @@ + + + @@ -228,6 +235,9 @@ + + + @@ -1705,6 +1715,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs index a30cccfe6..a10328c61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs @@ -795,6 +795,52 @@ namespace Learun.Application.WorkFlow }); } + } + break; + case 8://liang 20210706新增部门负责人判断 + //获取流程创建用户的分管领导 + //判断用户所在部门是否有上级部门:如果有,找到上级部门的负责人;如果没有,找本部门的分管校长; + string deptMasterId = ""; + var selfDepart2 = departmentIBLL.GetEntity(paramConfig.CreateUser.DepartmentId); + if (selfDepart2 != null) + { + //本部门存在部门负责人 + if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) + { + deptMasterId = selfDepart2.F_Manager; + } + else + { + //本部门不存在就找上级部门 + var parentDepart = departmentIBLL.GetEntity(selfDepart2.F_ParentId); + if (parentDepart != null) + { + if (!string.IsNullOrEmpty(selfDepart2.F_Manager)) + { + deptMasterId = parentDepart.F_Manager; + } + } + } + } + //找到部门负责人就增加审批人 + if (!string.IsNullOrEmpty(deptMasterId)) + { + var userEntity7 = userIBLL.GetEntityByUserId(deptMasterId); + + if (null != userEntity7) + { + if (!list.Exists(m => m.Id == userEntity7.F_UserId)) + { + list.Add(new NWFUserInfo() + { + Id = userEntity7.F_UserId, + Account = userEntity7.F_Account, + Name = userEntity7.F_RealName + }); + } + + } + } break; }