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 eb15366b0..7be2dbf20 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 @@ -149,6 +149,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } entity.State = 0; entity.IsAllowEdit = true; + entity.LessonSortNo = "1"; + entity.CheckMark = "1"; 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) @@ -177,6 +179,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var entity = classPlanIBLL.GetListById(keyValue); List TeachList = new List(); + for (int i = 0; i < entity.Count; i++) { var lessonList = classInfoIBLL.GetAllClass(). @@ -188,7 +191,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { TeachClassEntity TeachEntity = new TeachClassEntity(); TeachEntity.TeachClassNo = lessonList[j].ClassNo; - TeachEntity.TeachClassName = lessonList[j].ClassName; TeachEntity.AcademicYearNo = entity[i].AcademicYearNo; TeachEntity.DeptNo = entity[i].DeptNo; TeachEntity.MajorNo = entity[i].MajorNo; @@ -198,6 +200,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers TeachEntity.StuNum = entity[i].StuNum; TeachEntity.LessonSortNo = entity[i].LessonSortNo; TeachEntity.F_SchoolId = entity[i].F_SchoolId; + TeachList.Add(TeachEntity); } } 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 index 192479ee4..512b8cd1d 100644 --- 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 @@ -23,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); + private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); + #region 视图功能 /// @@ -150,7 +152,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SetTeach(string keyValue, string EmpNo) { var entityList = teachClassIBLL.GetTeachListById(keyValue); + var lessonData = lessonInfoIBLL.GetAllLesson(); + List TeachList = new List(); + for (int i = 0; i < entityList.Count; i++) { var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo @@ -162,31 +167,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers for (int j = 0; j < stuDataList.Count; j++) { StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); + TeachEntity.NoticeBookNo = stuDataList[j].StuNo; 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 = Convert.ToInt32(stuDataList[j].GenderNo).ToString(); 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.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName; + TeachEntity.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.StuSortNo = "02"; TeachEntity.Grade = entityList[i].Grade; - TeachEntity.StudyScore = 2; - TeachEntity.TotalStudyHour = 2; + TeachEntity.StudyScore = 0; + TeachEntity.TotalStudyHour = 0; TeachEntity.IsInEffect = "1"; TeachEntity.IsPitchOn = "1"; + TeachEntity.EmpNo = EmpNo; TeachEntity.F_SchoolId = entityList[i].F_SchoolId; TeachEntity.CheckMark = "1"; TeachEntity.InsertTime = DateTime.Now; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs index 0399d666e..9a8722fa3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs @@ -21,6 +21,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL(); + private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL(); #region 视图功能 @@ -321,6 +322,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("操作成功!"); } + /// + /// 一键安排考场 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult PlanRoomByEPId(string keyValue) + { + var res = exam_ExamPlanRoomIBLL.PlanRoomByEPId(keyValue); + if (!res.flag) + { + return Fail(res.str); + } + + return Success("操作成功!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs index 66be01a30..1b29bacd0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs @@ -196,6 +196,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers Exam_ExamPlanLessonData.ExamTimeEnd = etime[1]; } + if ((Exam_ExamPlanLessonData.ClassNum == null || Exam_ExamPlanLessonData.ClassNum <= 0) || + (Exam_ExamPlanLessonData.SeatCount == null || Exam_ExamPlanLessonData.SeatCount <= 0)) + { + exam_ExamPlanLessonIBLL.UpdateClassNumAndStuCount(Exam_ExamPlanLessonData.EPLId); + } + var jsonData = new { Exam_ExamPlanLesson = Exam_ExamPlanLessonData, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs new file mode 100644 index 000000000..4b93c7489 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs @@ -0,0 +1,126 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public class HealthPunchTimeController : MvcControllerBase + { + private HealthPunchTimeIBLL healthPunchTimeIBLL = new HealthPunchTimeBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = healthPunchTimeIBLL.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 HealthPunchTimeData = healthPunchTimeIBLL.GetHealthPunchTimeEntity(keyValue); + var jsonData = new + { + HealthPunchTime = HealthPunchTimeData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + healthPunchTimeIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + HealthPunchTimeEntity entity = strEntity.ToObject(); + healthPunchTimeIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + [HttpPost] + [AjaxOnly] + public ActionResult EnableForm(string keyValue) + { + healthPunchTimeIBLL.EnableEntity(keyValue); + return Success("修改成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index a2ff405f1..03e98533b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -87,6 +87,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 选 成绩比例设置 + /// + /// + [HttpGet] + public ActionResult IndexElective() + { + return View(); + } + /// + /// 选 成绩比例设置 + /// + /// + [HttpGet] + public ActionResult FormOfElective() + { + return View(); + } #endregion #region 获取数据 @@ -111,6 +129,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListElective(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = openLessonPlanOfElectiveIBLL.GetPageListElective(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + [HttpGet] [AjaxOnly] public ActionResult GetPageListOfMerge(string pagination, string queryJson) @@ -161,6 +201,38 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetOpenLessonPlanEntityByJson(string queryJson) + { + var OpenLessonPlanData = openLessonPlanOfElectiveIBLL.GetOpenLessonPlanEntityByJson(queryJson); + var jsonData = new + { + OpenLessonPlanOfElective = OpenLessonPlanData, + }; + return Success(jsonData); + } + + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetStuSelectLessonListEntityByJson(string queryJson) + { + var StuSelectLessonListData = openLessonPlanOfElectiveIBLL.GetStuSelectLessonListEntityByJson(queryJson); + var jsonData = new + { + StuSelectLessonListOfElective = StuSelectLessonListData, + }; + return Success(jsonData); + } #endregion #region 提交数据 @@ -317,6 +389,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("保存成功!"); } + /// + /// 设置成绩比例 + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveFormOfElective(string keyValue, string strEntity) + { + OpenLessonPlanOfElectiveEntity entity = strEntity.ToObject(); + openLessonPlanOfElectiveIBLL.SaveFormOfElective(keyValue, entity); + + return Success("保存成功!"); + } #endregion #region 扩展数据 @@ -776,5 +864,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveFormOfClass(string queryJson, string strEntity) + { + StuSelectLessonListOfElectiveEntity entity = strEntity.ToObject(); + openLessonPlanOfElectiveIBLL.SaveStuSelectLessonListScaleByJson(queryJson, entity); + + return Success("保存成功!"); + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index 67e843cd9..2e67b4fe8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -534,7 +534,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetLessonNoDataWithNo() { var loginInfo = LoginUserInfo.Get(); - var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description); + var semesterAndYear = Common.GetSemesterAndYear(); + var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description,semesterAndYear.AcademicYearShort,semesterAndYear.Semester); foreach (var item in data) { item.text = string.Format("{0}({1})", item.text, item.value); @@ -567,7 +568,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetElectiveLessonNoDataWithNo() { var loginInfo = LoginUserInfo.Get(); - var data = stuScoreIBLL.GetElectiveLessonNoDataOfAll(loginInfo.account, loginInfo.Description); + var semesterAndYear = Common.GetSemesterAndYear(); + var data = stuScoreIBLL.GetElectiveLessonNoDataOfAll(loginInfo.account, loginInfo.Description, semesterAndYear.AcademicYearShort, semesterAndYear.Semester); foreach (var item in data) { item.text = string.Format("{0}({1})", item.text, item.value); 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 9f664a33d..e8a8160a4 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 @@ -32,10 +32,6 @@
- @*
-
课程类别码
-
-
*@
课程细类码
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index 024fb9e46..1da2073ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -69,7 +69,6 @@ var bootstrap = function ($, learun) { text: "lessonname", maxHeight: 200 }); - console.log(param); } } }); @@ -90,7 +89,7 @@ var bootstrap = function ($, learun) { }); } $('#StuSortNo').val('02'); - $('#LessonSortNo').val('2'); + $('#LessonSortNo').val('1'); $('#CheckStyleNo').val('1'); $('#ScoreRecordStyleNo').val('1'); $('#CheckMark').val('1'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml index 670778a6d..9a398c75b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml @@ -5,25 +5,21 @@
-
学校信息
+
系部信息
- 未选择学校 - 专业信息 + 未选择系部 - 系部信息
-
-
学校
-
-
-
+
专业
@@ -39,7 +35,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 a61228835..a27d8ba21 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_fullname' }); + //$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", allowSearch: true, @@ -35,6 +35,7 @@ var bootstrap = function ($, learun) { text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $('#MajorNo').lrselect({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', param: { strWhere: " 1=1 and CheckMark=1 " }, @@ -222,8 +223,22 @@ var bootstrap = function ($, learun) { } }, { label: "年级", name: "Grade", width: 50, align: "left" }, + { label: "专业编码", name: "MajorNo", width: 120, align: "left" }, + { + label: "专业名称", name: "MajorNo", width: 200, align: "left" , + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, { label: "课程编码", name: "LessonNo", width: 200, align: "left" }, - { label: "课程名称", name: "LessonName", width: 200, align: "left" }, + { label: "课程名称", name: "LessonName", width: 200, align: "left", }, { label: "课程类型", name: "LessonTypeId", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { 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 index 6cf2377a4..b0de850af 100644 --- 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 @@ -5,28 +5,28 @@
-
学校信息
+
系部信息
- 未选择学校 - 专业信息 + 未选择系部 - 系部信息
-
-
学校
-
-
-
+
专业
+
+
班级
+
+
学年
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 index 9c578defe..4c44259ce 100644 --- 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 @@ -18,7 +18,6 @@ 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_fullname' }); $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", allowSearch: true, @@ -35,17 +34,13 @@ var bootstrap = function ($, learun) { text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $("#MajorNo").lrselect(); $('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 - }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -216,7 +211,7 @@ var bootstrap = function ($, learun) { { label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, { label: "班级编号", name: "TeachClassNo", width: 80, align: "left" }, { - label: "班级名称", name: "TeachClassNo", width: 80, align: "left" , + label: "班级名称", name: "TeachClassNo", width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -228,8 +223,9 @@ var bootstrap = function ($, learun) { }); } }, + { label: "教师编号", name: "EmpNo", width: 80, align: "left" }, { - label: "教师", name: "EmpNo", 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', 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 index db907b115..f67ed63ad 100644 --- 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 @@ -24,8 +24,7 @@ var bootstrap = function ($, learun) { } var postData = $('#form').lrGetFormData(); var EmpNo = postData.EmpNo; - console.log(EmpNo); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + 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.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js index 02ee00152..e3366d758 100644 --- 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 @@ -24,9 +24,9 @@ var bootstrap = function ($, learun) { } var postData = $('#form').lrGetFormData(); var EmpNo = postData.EmpNo; - console.log(EmpNo); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + 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.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js index b688d360c..4c57d991b 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 @@ -91,7 +91,7 @@ var bootstrap = function ($, learun) { $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); $('#IsHasLesson').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#NationalityNo').lrDataItemSelect({ code: 'National' }); - $('#PartyFaceNo').lrDataItemSelect({ code: 'BCdPartyFace' }); + $('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus' }); $('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', select: function (item) { 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 5e58fa009..d0a13be6f 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 @@ -48,7 +48,7 @@ var bootstrap = function ($, learun) { }); $('#RegionNo').lrselect(); //政治面貌 - $('#PartyFaceNo').lrDataItemSelect({ code: 'BCdPartyFace', allowSearch: true }); + $('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus', allowSearch: true }); //最高学历 $('#HighestRecord').lrDataItemSelect({ code: 'HighestEducation'}); @@ -482,7 +482,7 @@ var bootstrap = function ($, learun) { formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'BCdPartyFace', + code: 'PolityStatus', callback: function (_data) { callback(_data.text); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js index bb5017349..95948ea43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js @@ -193,6 +193,21 @@ var bootstrap = function ($, learun) { } }); + //一键安排考场 + $('#lr_examroom').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('EPId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认安排考场!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanRoomByEPId', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //自动生成排考时间 $('#lr_examlessontime').on('click', function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js index 244a8d55d..6a43b138b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js @@ -56,7 +56,7 @@ var bootstrap = function ($, learun) { selectedRow = null; learun.layerForm({ id: 'formroom1', - title: '新增考场', + title: '选择考场', url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoom?EPLId=' + EPLId, width: 850, height: 500, @@ -92,11 +92,13 @@ var bootstrap = function ($, learun) { } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); - var empnoArr = data[id].EmpNo.split(','); - var empnameArr = data[id].EmpName.split(','); - $.each(empnoArr, function (i, val) { - tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); - }); + if (data[id].EmpNo && (data[id].EmpNo).indexOf(',') != -1) { + var empnoArr = data[id].EmpNo.split(','); + var empnameArr = data[id].EmpName.split(','); + $.each(empnoArr, function (i, val) { + tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); + }); + } $('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); } } @@ -146,7 +148,7 @@ var bootstrap = function ($, learun) { } var datas = $('#Exam_ExamPlanTeacher').jfGridGet('rowdatas'); if (datas == null || datas.length == 0) { - learun.alert.warning("请先新增监考老师!"); + learun.alert.warning("请新增监考老师!"); return false; } return true; @@ -169,14 +171,14 @@ var bootstrap = function ($, learun) { '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoomAndTeacher?keyValue=' + keyValue, postData, - function(res) { + function (res) { // 保存成功后才回调 if (!!callBack) { callBack(res, formData, i); } }); - } + } }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js index 883428f9e..4ed2217cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js @@ -129,12 +129,16 @@ var bootstrap = function ($, learun) { if (ELCheckMark == 1) { return learun.alert.warning("该项已审核!"); } - var param ={}; + var param = {}; param.EPId = EPId; param.EPLId = EPLId; + //判断是否已设置考试时间 + if (!$('#examDate').html() || !$('#examTime').html()) { + return learun.alert.warning("请先设置考试时间!"); + } //判断是否已新增班级 - var data= learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass?queryJson='+JSON.stringify(param)); - + var data = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass?queryJson=' + JSON.stringify(param)); + if (data.data.length > 0) { learun.layerForm({ id: 'formteacherRoom', @@ -149,7 +153,7 @@ var bootstrap = function ($, learun) { } else { return learun.alert.warning("请先添加班级!"); } - + } else { return learun.alert.warning("请选择考试课程!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.cshtml new file mode 100644 index 000000000..e2d6315e3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.cshtml @@ -0,0 +1,35 @@ +@{ + ViewBag.Title = "健康打卡时段"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
开始时间*
+ +
+
+
结束时间*
+ +
+
+
描述*
+
+
+
+
是否启用*
+
+
+ + +
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js new file mode 100644 index 000000000..8050ebec4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js @@ -0,0 +1,56 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-06-17 09:17 + * 描 述:健康打卡时段 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Description').lrDataItemSelect({ code: 'HealthPunchType' }); + $('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); + $('#CheckMark').lrselectSet("1"); + $('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); + $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml new file mode 100644 index 000000000..5c19a70aa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "健康打卡时段"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
描述
+
+
+ @*
+
是否启用
+
+
*@ +
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js new file mode 100644 index 000000000..7aa3016e6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js @@ -0,0 +1,154 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-06-17 09:17 + * 描 述:健康打卡时段 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#Description').lrDataItemSelect({ code: 'HealthPunchType' }); + $('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var keyValue = $('#gridtable').jfGridValue('ID'); + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark == 1) { + return + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  启用 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + console.log(keyValue) + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认启用!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/EnableForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  禁用 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认启用!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/EnableForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/GetPageList', + headData: [ + { label: "开始时间", name: "StarTime", width: 100, align: "left" }, + { label: "结束时间", name: "EndTime", width: 100, align: "left" }, + { + label: "描述", name: "Description", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'HealthPunchType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "录入用户", name: "CreateUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "录入时间", name: "CreateTime", width: 200, align: "left" }, + { + label: "是否启用", name: "CheckMark", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == "0" ? "启用" : + "禁用"; + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/FormOfClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/FormOfClass.js index ba65aa129..eecb21218 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/FormOfClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlan/FormOfClass.js @@ -10,6 +10,8 @@ var AcademicYearNo = request('AcademicYearNo'); var Semester = request('Semester'); var LessonNo = request('LessonNo'); var ClassNo = request('ClassNo'); +var ClassRoomNo = request('ClassRoomNo'); +var LessonSection = request('LessonSection'); var param = {}; if (!!F_SchoolId && !!AcademicYearNo && !!Semester && !!LessonNo && !!ClassNo) { param.F_SchoolId = F_SchoolId; @@ -17,6 +19,16 @@ if (!!F_SchoolId && !!AcademicYearNo && !!Semester && !!LessonNo && !!ClassNo) { param.Semester = Semester; param.LessonNo = LessonNo; param.ClassNo = ClassNo; + +} +if (!!F_SchoolId && !!AcademicYearNo && !!Semester && !!LessonNo && !!ClassRoomNo && !!LessonSection) { + param.F_SchoolId = F_SchoolId; + param.AcademicYearNo = AcademicYearNo; + param.Semester = Semester; + param.LessonNo = LessonNo; + param.ClassRoomNo = ClassRoomNo; + param.LessonSection = LessonSection; + } var bootstrap = function ($, learun) { "use strict"; @@ -31,20 +43,37 @@ var bootstrap = function ($, learun) { }, initData: function () { if (!!param) { - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { - for (var id in data) { - if (data[id] == null) { - learun.alert.warning("学生选课数据不存在!"); - return false; - } - if (!!data[id].length && data[id].length > 0) { - $('#' + id).jfGridSet('refreshdata', data[id]); + if (!!ClassNo) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { + for (var id in data) { + if (data[id] == null) { + learun.alert.warning("学生选课数据不存在!"); + return false; + } + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } } - else { - $('[data-table="' + id + '"]').lrSetFormData(data[id]); + }); + } else { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { + for (var id in data) { + if (data[id] == null) { + learun.alert.warning("学生选课数据不存在!"); + return false; + } + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } } - } - }); + }); + } } } }; @@ -67,12 +96,22 @@ var bootstrap = function ($, learun) { var postData = { strEntity: JSON.stringify($('body').lrGetFormData()) }; - $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/SaveFormOfClass?queryJson=' + JSON.stringify(param), postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); + if (!!ClassNo) { + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/SaveFormOfClass?queryJson=' + JSON.stringify(param), postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } else { + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/SaveFormOfClass?queryJson=' + JSON.stringify(param), postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml new file mode 100644 index 000000000..465f44a38 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "成绩比例设置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
平时成绩占比*
+ + % +
+
+
期中成绩占比*
+ + % +
+
+
期末成绩占比*
+ + % +
+
+
其他成绩占比*
+ + % +
+
+
是否允许编辑*
+
+
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js new file mode 100644 index 000000000..5d4c4918b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-08-21 17:28 + * 描 述:成绩比例设置 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + //page.initData(); + }, + bind: function () { + $('#IsAllowEdit').lrDataItemSelect({ code: 'YesOrNoBit' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + //计算比例 + var OrdinaryScoreScale = $('#OrdinaryScoreScale').val(); + var TermInScoreScale = $('#TermInScoreScale').val(); + var TermEndScoreScale = $('#TermEndScoreScale').val(); + var OtherScoreScale = $('#OtherScoreScale').val(); + var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); + if (totalScale !== 100) { + learun.alert.warning("成绩比例之和必须等于100!"); + return false; + } + + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/SaveFormOfElective?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml new file mode 100644 index 000000000..4de36f0f9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "选修课课程信息"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
课程
+
+
+
+
教师
+
+
+
+
教室
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js new file mode 100644 index 000000000..555862bf3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js @@ -0,0 +1,152 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-08-21 17:28 + * 描 述:成绩比例设置 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + page.bindSelect(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '成绩比例设置', + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + bindSelect: function () { + //校区 + $('#F_SchoolId').lrDataSourceSelect({ + code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } + }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + $('#LessonNo').lrselect({ + placeholder: "请选择课程", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrselect({ + placeholder: "请选择老师", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetEmpNoData', + value: 'value', + text: 'text' + }); + $('#ClassRoomNo').lrselect({ + placeholder: "请选择教室", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetElectiveClassRoomNoData', + value: 'value', + text: 'text' + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListElective', + headData: [ + { label: "校区", name: "F_School", width: 150, align: "left" }, + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 80, align: "left" }, + { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, + { label: "课程名称", name: "LessonName", width: 150, align: "left" }, + { label: "节次", name: "LessonSection", width: 100, align: "left" }, + { label: "教室编号", name: "ClassRoomNo", width: 100, align: "left" }, + { label: "教室", name: "ClassRoomName", width: 100, align: "left" }, + { label: "教师编号", name: "EmpNo", width: 100, align: "left" }, + { label: "教师名称", name: "EmpName", width: 150, align: "left" }, + { label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" }, + { label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" }, + { label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" }, + { label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" }, + { + label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) { + return (cellvalue === true || cellvalue === "true") ? "" : ""; + } + }, + ], + mainId: 'Id', + isPage: true, + isMultiselect: true, + sidx: 'AcademicYearNo,Semester', + sord: 'desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.js index 6ead81c74..3ccd1b4bc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.js @@ -110,7 +110,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -121,7 +121,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -143,7 +143,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js index b0e0da3de..c450a42ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js @@ -4,6 +4,7 @@ * 日 期:2019-06-14 11:02 * 描 述:全院学生成绩录入(新) */ + var selectedRow; var refreshGirdData; var refreshGirdData2; @@ -110,7 +111,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -121,7 +122,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -132,7 +133,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -143,7 +144,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(0); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -496,6 +497,8 @@ var bootstrap = function ($, learun) { if (ref.code == "200") { $('#AcademicYearNo').lrselectSet(ref.data.Item1); $('#Semester').lrselectSet(ref.data.Item3); + $('#AcademicYearNo').attr('disabled', "disabled"); + $('#Semester').attr('disabled', "disabled"); } }.bind(this), "json"); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js index a090a20b0..e8edfed56 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js @@ -111,7 +111,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -122,7 +122,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -133,7 +133,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -144,7 +144,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -198,11 +198,11 @@ var bootstrap = function ($, learun) { $('#lr_setScale').on('click', function () { var query = judgeSelect(); if (query) { - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { - if (data["OpenLessonPlan"] != null) { - if (data["OpenLessonPlan"].IsAllowEdit) { //教务允许成绩录入时编辑比例 - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { - if (data["StuSelectLessonList"] != null) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data["OpenLessonPlanOfElective"] != null) { + if (data["OpenLessonPlanOfElective"].IsAllowEdit) { //教务允许成绩录入时编辑比例 + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data["StuSelectLessonListOfElective"] != null) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { if (data != null) { if (data.CheckMark == 1) { //学生成绩已审核 @@ -212,7 +212,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'FormOfClass', title: '班级成绩比例设置', - url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&ClassNo=' + query.ClassNo, + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&LessonSection=' + query.LessonSection + '&ClassRoomNo=' + query.ClassRoomNo, width: 600, height: 400, callBack: function (id) { @@ -235,7 +235,7 @@ var bootstrap = function ($, learun) { return false; } } else { - learun.alert.warning("开课计划不存在!"); + learun.alert.warning("选修开课计划不存在!"); return false; } }); @@ -533,9 +533,9 @@ var bootstrap = function ($, learun) { }, searchScale: function (param) { param = param || {}; - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { - if (data["StuSelectLessonList"] != null) { - var ssll = data["StuSelectLessonList"]; + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { + if (data["StuSelectLessonListOfElective"] != null) { + var ssll = data["StuSelectLessonListOfElective"]; $('#OrdinaryScoreScale').html(ssll.OrdinaryScoreScale > 0 ? ssll.OrdinaryScoreScale : 0); $('#TermInScoreScale').html(ssll.TermInScoreScale > 0 ? ssll.TermInScoreScale : 0); $('#TermEndScoreScale').html(ssll.TermEndScoreScale > 0 ? ssll.TermEndScoreScale : 0); @@ -590,7 +590,7 @@ var bootstrap = function ($, learun) { page.initGird(); page.search(query); - //page.searchScale(query); + page.searchScale(query); } }; judgeSelect = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index a965be528..f38c4a386 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js @@ -111,7 +111,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -122,7 +122,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -133,7 +133,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -144,7 +144,7 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { - row.Score = (parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)).toFixed(2); + row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, } @@ -198,11 +198,11 @@ var bootstrap = function ($, learun) { $('#lr_setScale').on('click', function () { var query = judgeSelect(); if (query) { - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { - if (data["OpenLessonPlan"] != null) { - if (data["OpenLessonPlan"].IsAllowEdit) { //教务允许成绩录入时编辑比例 - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { - if (data["StuSelectLessonList"] != null) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetOpenLessonPlanEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data["OpenLessonPlanOfElective"] != null) { + if (data["OpenLessonPlanOfElective"].IsAllowEdit) { //教务允许成绩录入时编辑比例 + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data["StuSelectLessonListOfElective"] != null) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { if (data != null) { if (data.CheckMark == 1) { //学生成绩已审核 @@ -212,7 +212,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'FormOfClass', title: '班级成绩比例设置', - url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&ClassNo=' + query.ClassNo, + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/FormOfClass?F_SchoolId=' + query.F_SchoolId + '&AcademicYearNo=' + query.AcademicYearNo + '&Semester=' + query.Semester + '&LessonNo=' + query.LessonNo + '&LessonSection=' + query.LessonSection + '&ClassRoomNo=' + query.ClassRoomNo, width: 600, height: 400, callBack: function (id) { @@ -513,6 +513,9 @@ var bootstrap = function ($, learun) { if (ref.code == "200") { $('#AcademicYearNo').lrselectSet(ref.data.Item1); $('#Semester').lrselectSet(ref.data.Item3); + $('#AcademicYearNo').attr('disabled', "disabled"); + $('#Semester').attr('disabled', "disabled"); + } }.bind(this), "json"); }, @@ -533,9 +536,9 @@ var bootstrap = function ($, learun) { }, searchScale: function (param) { param = param || {}; - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { - if (data["StuSelectLessonList"] != null) { - var ssll = data["StuSelectLessonList"]; + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetStuSelectLessonListEntityByJson?queryJson=' + JSON.stringify(param), function (data) { + if (data["StuSelectLessonListOfElective"] != null) { + var ssll = data["StuSelectLessonListOfElective"]; $('#OrdinaryScoreScale').html(ssll.OrdinaryScoreScale > 0 ? ssll.OrdinaryScoreScale : 0); $('#TermInScoreScale').html(ssll.TermInScoreScale > 0 ? ssll.TermInScoreScale : 0); $('#TermEndScoreScale').html(ssll.TermEndScoreScale > 0 ? ssll.TermEndScoreScale : 0); @@ -590,7 +593,7 @@ var bootstrap = function ($, learun) { page.initGird(); page.search(query); - //page.searchScale(query); + page.searchScale(query); } }; judgeSelect = function () { 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 20185ec92..7a88a1e0e 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 @@ -833,6 +833,7 @@ + @@ -1035,6 +1036,8 @@ + + @@ -6549,6 +6552,10 @@ + + + + @@ -7848,6 +7855,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchTimeMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchTimeMap.cs new file mode 100644 index 000000000..3a49861b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchTimeMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public class HealthPunchTimeMap : EntityTypeConfiguration + { + public HealthPunchTimeMap() + { + #region 表、主键 + //表 + this.ToTable("HEALTHPUNCHTIME"); + //主键 + this.HasKey(t => t.ID); + #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 719cf7c99..7cbcc4ae0 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 @@ -588,6 +588,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index bd4c6d752..d58701a62 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -819,7 +819,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest Grade = classitemEntity?.Grade, LessonSortNo = teachClassEntity.LessonSortNo, TeachClassNo = teachClassEntity.TeachClassNo, - TeachClassName = teachClassEntity.TeachClassName, EmpNo = teachClassEntity.EmpNo, F_SchoolId = entity.F_SchoolId }; 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 3fed56576..f0d9bac85 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 @@ -35,7 +35,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(@" t.*,l.LessonTypeId "); strSql.Append(" FROM OpenLessonPlan t "); strSql.Append(" left join lessoninfo l on t.lessonno=l.lessonno "); - strSql.Append(" WHERE 1=1 "); + strSql.Append(" WHERE 1=1 and l.CheckMark=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs index 93660d231..7c2e4c8dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs @@ -364,9 +364,9 @@ where l.EPLId='{EPLId}' } - //更新排考安排课程表实排班级数、实排人数 + //更新排考安排课程表实排班级数、实排人数和应排班级数、应排人数(如果没有点击【一键安排班级】,应排班级数、应排人数在安排考试页面切换课程时候更新) string sql = $@"update l -set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum +set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum,ClassNum=t.RealClassNum,StuCount=t.RealStuCount from Exam_ExamPlanLesson l join (select '{lesson.EPLId}' as EPLId,count(1) as RealClassNum,sum(ClassStuNum) as RealStuCount from Exam_ExamPlanClass where EPLId='{lesson.EPLId}' )t on l.EPLId=t.EPLId diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs index 3dd2fe689..88d9b16d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs @@ -216,6 +216,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public void UpdateClassNumAndStuCount(string EPLId) + { + try + { + exam_ExamPlanLessonService.UpdateClassNumAndStuCount(EPLId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 保存实体数据(新增、修改) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs index 051781014..1d0b71c78 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs @@ -45,6 +45,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void DeleteEntity(string keyValue); void Check(string keyValue,int ELCheckMark); void InitExamPlanLesson(string EPId); + void UpdateClassNumAndStuCount(string EPLId); /// /// 保存实体数据(新增、修改) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index a758d7769..5d3a310ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -311,15 +311,7 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan group by LessonNo,lessonname"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } - - //排考课程表 - var EPLIdlist = this.BaseRepository("CollegeMIS").FindList(x => x.EPId == EPId).Select(x => x.EPLId); - var EPLIds = string.Join("','", EPLIdlist); - //班级 - var classInfo = this.BaseRepository("CollegeMIS").FindList($"select ClassNo,count(1) as StuNum FROM Exam_ExamStudent where ESEnabled=1 and ESType='{exam_ExamPlan.PlanType}' and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' group by ClassNo"); - //修改应排班级数和应考人数 - var UpdSql = $"update Exam_ExamPlanLesson set ClassNum='{classInfo.Count()}',StuCount='{classInfo.Sum(x => x.StuNum)}' where EPLId in ('{EPLIds}')"; - this.BaseRepository("CollegeMIS").ExecuteBySql(UpdSql); + } catch (Exception ex) { @@ -334,6 +326,70 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan } } + /// + /// 更新应考班级数和应考人数(安排考试切换课程时更新) + /// 【一键安排班级】功能也有更新 + /// + /// 主键 + public void UpdateClassNumAndStuCount(string EPLId) + { + var db = this.BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + var lesson = db.FindEntity(x => x.EPLId == EPLId); + //排考记录表 + var examPlan = db.FindEntity(lesson.EPId); + var lessonno = lesson.LessonNo; + if (lesson.LessonNo.Contains("(")) + { + lessonno = lesson.LessonNo.Split('(')[0]; + } + + //查询课程信息 + var lessoninfo = db.FindList($@"select top 1 t.LessonTypeName,l.* from lessoninfo l + join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{lessonno}' ").FirstOrDefault(); + if (lessoninfo != null) + { + var updSql = $@"update a set a.ClassNum=b.ClassNum,a.StuCount=b.StuCount +from Exam_ExamPlanLesson a join +( +select count(1) as ClassNum,SUM(StuNum) as StuCount,'{EPLId}' as EPLId from ( +SELECT t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t + left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' + +"; + if (lessoninfo.LessonTypeName.Contains("专业")) + { + updSql += $" and c.majorno='{lessoninfo.TeachMajorNo}' "; + } + //else if (lessoninfo.LessonTypeName.Contains("公共") || lessoninfo.LessonTypeName.Contains("公开")) + //{ + // //公共课添加所有班级 + //} + + updSql += $@" group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName + ) t) b on a.EPLId=b.EPLId + where a.EPLId='{EPLId}'"; + + db.ExecuteBySql(updSql); + db.Commit(); + } + + } + catch (Exception ex) + { + db.Rollback(); + 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/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs index b6afaf0d3..5be5c89e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs @@ -130,7 +130,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + /// /// 保存实体数据(新增、修改) @@ -175,6 +175,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public (bool flag, string str) PlanRoomByEPId(string EPId) + { + try + { + return exam_ExamPlanRoomService.PlanRoomByEPId(EPId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs index c03fe1c6b..d601e4b92 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-04-15 18:12 /// 描 述:排考安排考场表 /// - public class Exam_ExamPlanRoomEntity + public class Exam_ExamPlanRoomEntity { #region 实体成员 /// @@ -75,6 +75,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration this.EPRId = keyValue; } #endregion + /// + /// 考试日期 + /// + [NotMapped] + public DateTime? ExamDate { get; set; } + /// + /// 考试时间 + /// + [NotMapped] + public string ExamTime { get; set; } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs index 21f15eed4..cc7bc85cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs @@ -47,6 +47,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 实体 void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity); void SaveList (List list); + (bool flag,string str) PlanRoomByEPId(string EPId); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs index 7a9c0aa77..a11efa94d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs @@ -128,7 +128,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindList(x => x.EPLId == EPLId && x.ClassroomNo == ClassroomNo).Count() > 0 ? true : false; + return this.BaseRepository("CollegeMIS").FindList(x => x.EPLId == EPLId && x.ClassroomNo == ClassroomNo).Count() > 0 ? true : false; } catch (Exception ex) { @@ -269,6 +269,131 @@ where l.EPLId='{EPLId}'"; } } } + + /// + /// 自动安排考场 + /// + /// 考试记录表Id + /// + public (bool flag, string str) PlanRoomByEPId(string EPId) + { + var db = this.BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + /* + * 1.查询是否已添加考试课程和班级 + * 2.查询是否生成课程排考时间 + * 3.查询考试课程并循环, + * 根据考试课程的总班级人数和排考时间,随机安排考场(同一时间段考场不能重复) + */ + //考试记录表 + var examPlan = db.FindEntity(EPId); + //考试课程 + var examLessonList = db.FindList(x => x.EPId == EPId).ToList(); + if (examLessonList.Count() <= 0) + { + return (false, "请先添加考试课程!"); + } + if (!examLessonList.Exists(x => x.ExamDate != null)) + { + return (false, "请先设置排考时间!"); + } + //考试班级 + var EPLIds = examLessonList.Select(y => y.EPLId).ToList(); + if (db.FindList(x => EPLIds.Contains(x.EPLId)).Count() <= 0) + { + return (false, "请先新增考试班级!"); + } + + List list = new List(); + //循环考试课程 + foreach (var examLesson in examLessonList) + { + //删除考场 + db.ExecuteBySql($"delete Exam_ExamPlanRoom where EPLId='{examLesson.EPLId}'"); + //已设置考试时间且已添加班级 + if (examLesson.ExamDate != null && examLesson.ExamTime.Contains("-") && examLesson.RealStuCount > 0) + { + //当前考试课程考试时间 + var examtimeStart = Convert.ToDateTime(examLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + (examLesson.ExamTime).Split('-')[0]); + var examtimeEnd = Convert.ToDateTime(examLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examLesson.ExamTime.Split('-')[1]); + + //查询与考试课程的考试时间在同一天的考场,如果存在考试时间冲突的考场 则排除此考场 + List conflictRoom = new List(); + var examRoomByDateSql = $@"select a.ClassroomNo,b.ExamDate,b.ExamTime from [dbo].[Exam_ExamPlanRoom] a + join Exam_ExamPlanLesson b on a.EPLId = b.EPLId + where ExamDate = '{examLesson.ExamDate}'"; + var examRoomsByDate = db.FindList(examRoomByDateSql).ToList(); + //并集(和当前考试记录的考试课程在同一天的) + var examDatelist = list.Where(x => x.ExamDate == examLesson.ExamDate); + examRoomsByDate = examRoomsByDate.Union(examDatelist).ToList(); + foreach (var examRoom in examRoomsByDate) + { + var examRoomTime1 = Convert.ToDateTime(examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[0]); + var examRoomTime2 = Convert.ToDateTime(examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[1]); + + //此处判断当前考场时间是否在考试课程排考时间的开始前30分钟到结束后30分钟 + if ((examRoomTime1 >= examtimeStart.AddMinutes(-30) && examRoomTime1 <= examtimeEnd.AddMinutes(30)) || (examRoomTime2 >= examtimeStart.AddMinutes(-30) && examRoomTime2 <= examtimeEnd.AddMinutes(30))) + { + conflictRoom.Add(examRoom.ClassroomNo); + } + } + + //考场座位数 + int? seatCount = 0; + var roomListSql = + $"select * from Exam_ExamRoom where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and EREnabled=1 "; + if (conflictRoom.Count() > 0) + { + var classroomNo = string.Join("','", conflictRoom.ToList()); + roomListSql += $" and ClassroomNo not in ('{classroomNo}')"; + } + var examRoomList = db.FindList(roomListSql).OrderBy(x => Guid.NewGuid()); + + foreach (var room in examRoomList) + { + list.Add(new Exam_ExamPlanRoomEntity + { + ClassroomNo = room.ClassroomNo, + ExamDate = examLesson.ExamDate, + ExamTime = examLesson.ExamTime, + }); + Exam_ExamPlanRoomEntity EPRoom = new Exam_ExamPlanRoomEntity(); + EPRoom.Create(); + EPRoom.EPLId = examLesson.EPLId; + EPRoom.ClassroomName = room.ClassroomName; + EPRoom.ClassroomNo = room.ClassroomNo; + EPRoom.SeatCount = room.SeatCount; + db.Insert(EPRoom); + seatCount += room.SeatCount; + if (seatCount >= examLesson.RealStuCount) + { + break; + } + } + + db.ExecuteBySql( + $"update Exam_ExamPlanLesson set SeatCount='{seatCount}' where EPLId='{examLesson.EPLId}'"); + } + + } + db.Commit(); + return (true, ""); + } + 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/Exam_ExamRoom/Exam_ExamRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs index 3c830ea23..0b12a54a3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs @@ -59,15 +59,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["EPLId"].IsEmpty()) { + var examLesson = this.BaseRepository("CollegeMIS").FindEntity(queryParam["EPLId"].ToString()); //排考安排课程表Id - var ELEntity = this.BaseRepository("CollegeMIS").FindList($@"select * from Exam_ExamPlan where EPId=( -select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')").FirstOrDefault(); + var ELEntity = this.BaseRepository("CollegeMIS").FindEntity(examLesson.EPId); if (ELEntity != null) { strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' "); strSql.Append($" AND t.Semester = '{ELEntity.Semester}' "); } strSql.Append($" AND t.ClassroomNo not in (select ClassroomNo from Exam_ExamPlanRoom where EPLId='{queryParam["EPLId"].ToString()}') "); + + //查询与考试课程的考试时间在同一天的考场,如果存在考试时间冲突的考场 则排除此考场 + if (examLesson.ExamDate != null && examLesson.ExamTime.Contains("-") && examLesson.RealStuCount > 0) + { + //当前考试课程考试时间 + var examtimeStart = + Convert.ToDateTime(examLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + + (examLesson.ExamTime).Split('-')[0]); + var examtimeEnd = Convert.ToDateTime(examLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + + examLesson.ExamTime.Split('-')[1]); + + List conflictRoom = new List(); + var examRoomByDateSql = + $@"select a.ClassroomNo,b.ExamDate,b.ExamTime from [dbo].[Exam_ExamPlanRoom] a + join Exam_ExamPlanLesson b on a.EPLId = b.EPLId + where ExamDate = '{examLesson.ExamDate}'"; + var examRoomsByDate = this.BaseRepository("CollegeMIS") + .FindList(examRoomByDateSql).ToList(); + + foreach (var examRoom in examRoomsByDate) + { + var examRoomTime1 = Convert.ToDateTime( + examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[0]); + var examRoomTime2 = Convert.ToDateTime( + examRoom.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examRoom.ExamTime.Split('-')[1]); + + //此处判断当前考场时间是否在考试课程排考时间的开始前30分钟到结束后30分钟 + if ((examRoomTime1 >= examtimeStart.AddMinutes(-30) && + examRoomTime1 <= examtimeEnd.AddMinutes(30)) || + (examRoomTime2 >= examtimeStart.AddMinutes(-30) && + examRoomTime2 <= examtimeEnd.AddMinutes(30))) + { + conflictRoom.Add(examRoom.ClassroomNo); + } + } + if (conflictRoom.Count() > 0) + { + var classroomNo = string.Join("','", conflictRoom.ToList()); + strSql.Append($" AND t.ClassroomNo not in ('{classroomNo}') "); + } + + } } if (!queryParam["SqlParameter"].IsEmpty()) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs new file mode 100644 index 000000000..48b16879f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public class HealthPunchTimeBLL : HealthPunchTimeIBLL + { + private HealthPunchTimeService healthPunchTimeService = new HealthPunchTimeService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return healthPunchTimeService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取HealthPunchTime表实体数据 + /// + /// 主键 + /// + public HealthPunchTimeEntity GetHealthPunchTimeEntity(string keyValue) + { + try + { + return healthPunchTimeService.GetHealthPunchTimeEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + healthPunchTimeService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, HealthPunchTimeEntity entity) + { + try + { + healthPunchTimeService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void EnableEntity(string keyValue) + { + try + { + healthPunchTimeService.EnableEntity(keyValue); + } + 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/HealthPunchTime/HealthPunchTimeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeEntity.cs new file mode 100644 index 000000000..1cb778797 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeEntity.cs @@ -0,0 +1,80 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public class HealthPunchTimeEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// StarTime + /// + [Column("STARTIME")] + public string StarTime { get; set; } + /// + /// EndTime + /// + [Column("ENDTIME")] + public string EndTime { get; set; } + /// + /// 描述 + /// + [Column("DESCRIPTION")] + public string Description { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUser + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// Remark + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CheckMark + /// + [Column("CHECKMARK")] + public int? CheckMark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs new file mode 100644 index 000000000..c62c4186b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs @@ -0,0 +1,51 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public interface HealthPunchTimeIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取HealthPunchTime表实体数据 + /// + /// 主键 + /// + HealthPunchTimeEntity GetHealthPunchTimeEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, HealthPunchTimeEntity entity); + + void EnableEntity(string keyValue); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs new file mode 100644 index 000000000..fad36cb22 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs @@ -0,0 +1,188 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-06-17 09:17 + /// 描 述:健康打卡时段 + /// + public class HealthPunchTimeService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.StarTime, + t.EndTime, + t.Description, + t.CheckMark, + t.CreateUser, + t.CreateTime, + t.Remark + "); + strSql.Append(" FROM HealthPunchTime t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Description"].IsEmpty()) + { + dp.Add("Description", queryParam["Description"].ToString(), DbType.String); + strSql.Append(" AND t.Description = @Description "); + } + if (!queryParam["CheckMark"].IsEmpty()) + { + dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); + strSql.Append(" AND t.CheckMark = @CheckMark "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取HealthPunchTime表实体数据 + /// + /// 主键 + /// + public HealthPunchTimeEntity GetHealthPunchTimeEntity(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, HealthPunchTimeEntity 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); + } + } + } + + public void EnableEntity(string keyValue) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + if (entity.CheckMark == 0) + { + entity.CheckMark = 1; + } + else if (entity.CheckMark == 1) + { + entity.CheckMark = 0; + } + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs index cda5ed42b..0b6632323 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs @@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageListElective(Pagination pagination, string queryJson) + { + try + { + return openLessonPlanOfElectiveService.GetPageListElective(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取页面显示列表数据【学子在线-选课中心】 /// /// 查询参数 @@ -89,6 +112,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取OpenLessonPlan表实体数据 + /// 主键 + /// + /// + public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson) + { + try + { + return openLessonPlanOfElectiveService.GetOpenLessonPlanEntityByJson(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取StuSelectLessonListEntity表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson) + { + try + { + return openLessonPlanOfElectiveService.GetStuSelectLessonListEntityByJson(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 @@ -141,7 +210,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - + public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity) { try @@ -160,6 +229,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity) + { + try + { + openLessonPlanOfElectiveService.SaveFormOfElective(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 扩展数据 @@ -248,6 +341,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity) + { + try + { + openLessonPlanOfElectiveService.SaveStuSelectLessonListScaleByJson(queryJson, 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/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs index c7b3e472e..1a51d8dd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs @@ -162,6 +162,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("F_SCHOOLID")] public string F_SchoolId { get; set; } + /// + /// OrdinaryScoreScale + /// + [Column("ORDINARYSCORESCALE")] + public decimal? OrdinaryScoreScale { get; set; } + /// + /// TermInScoreScale + /// + [Column("TERMINSCORESCALE")] + public decimal? TermInScoreScale { get; set; } + /// + /// TermEndScoreScale + /// + [Column("TERMENDSCORESCALE")] + public decimal? TermEndScoreScale { get; set; } + /// + /// OtherScoreScale + /// + [Column("OTHERSCORESCALE")] + + public decimal? OtherScoreScale { get; set; } + + public bool? IsAllowEdit { get; set; } + #endregion #region 扩展操作 @@ -182,6 +206,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + /// + /// 校区名称 + /// + [NotMapped] + public string F_School { get; set; } [NotMapped] public string StuNo { get; set; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs index ee3178329..28607fca3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs @@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetPageList(Pagination pagination, string queryJson); /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageListElective(Pagination pagination, string queryJson); + /// /// 获取页面显示列表数据【学子在线-选课中心】 /// /// 查询参数 @@ -34,6 +40,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// OpenLessonPlanOfElectiveEntity GetOpenLessonPlanOfElectiveEntity(string keyValue); + + /// + /// 获取OpenLessonPlanOfElectiveEntity表实体数据 + /// 主键 + /// + /// + OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson); + /// + /// 获取StuSelectLessonListEntity表实体数据 + /// 主键 + /// + /// + StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson); #endregion #region 提交数据 @@ -51,6 +70,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// void SaveEntity(string keyValue, OpenLessonPlanOfElectiveEntity entity); void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity); + + void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity); + #endregion #region 扩展数据 @@ -74,5 +96,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + /// + /// 保存StuSelectLessonList中的成绩比例 + /// 主键 + /// + /// + void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index 43d2a0eb2..be1622439 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -79,6 +79,103 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// + /// 选修成绩比例设置 + /// + /// 查询参数 + /// + public IEnumerable GetPageListElective(Pagination pagination, string queryJson) + { + try + { + var basedbname = BaseRepository().getDbConnection().Database; + + var strSql = new StringBuilder(); + strSql.Append("select t.*,c.F_FullName as F_School from OpenLessonPlanOfElective t "); + strSql.Append(" left join " + basedbname + ".dbo.LR_Base_Company c on t.F_SchoolId=c.f_CompanyId "); + 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["F_School"].IsEmpty()) + { + dp.Add("F_School", "%" + queryParam["F_School"].ToString() + "%", DbType.String); + strSql.Append(" AND c.F_FullName Like @F_School "); + } + 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["Grade"].IsEmpty()) + { + dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); + strSql.Append(" AND t.Grade = @Grade "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["DeptName"].IsEmpty()) + { + dp.Add("DeptName", "%" + queryParam["DeptName"].ToString() + "%", DbType.String); + strSql.Append(" AND d.DeptName Like @DeptName "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["MajorName"].IsEmpty()) + { + dp.Add("MajorName", "%" + queryParam["MajorName"].ToString() + "%", DbType.String); + strSql.Append(" AND m.MajorName Like @MajorName "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonName Like @LessonName "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EmpNo Like @EmpNo "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + dp.Add("ClassRoomNo", "%" + queryParam["ClassRoomNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.ClassRoomNo Like @ClassRoomNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取页面显示列表数据【学子在线-选课中心】 /// /// 查询参数 @@ -201,6 +298,81 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取OpenLessonPlan表实体数据 + /// 主键 + /// + /// + public OpenLessonPlanOfElectiveEntity GetOpenLessonPlanEntityByJson(string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var F_SchoolId = queryParam["F_SchoolId"].ToString(); + var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); + var Semester = queryParam["Semester"].ToString(); + var LessonNo = queryParam["LessonNo"].ToString(); + var LessonSection =queryParam["LessonSection"].ToString(); + var ClassRoomNo = queryParam["ClassRoomNo"].ToString(); + + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassroomNo == ClassRoomNo); + if (classInfoEntity == null) + { + return new OpenLessonPlanOfElectiveEntity(); + } + + return this.BaseRepository("CollegeMIS").FindEntity(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.ClassRoomNo == classInfoEntity.ClassroomNo && x.LessonSection == LessonSection && x.LessonNo == LessonNo && x.LessonSortNo == "2"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuSelectLessonListEntity表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveEntity GetStuSelectLessonListEntityByJson(string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var F_SchoolId = queryParam["F_SchoolId"].ToString(); + var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); + var Semester = queryParam["Semester"].ToString(); + var LessonNo = queryParam["LessonNo"].ToString(); + var LessonSection = queryParam["LessonSection"].ToString(); + var ClassRoomNo = queryParam["ClassRoomNo"].ToString(); + + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassroomNo == ClassRoomNo); + if (classInfoEntity == null) + { + return new StuSelectLessonListOfElectiveEntity(); + } + + return this.BaseRepository("CollegeMIS").FindEntity(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.LessonNo == LessonNo && x.LessonSortNo == "2" && x.ClassRoomNo == ClassRoomNo && x.LessonSection == LessonSection); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 @@ -303,7 +475,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration emItemEntity.ClassRoomName = entity.ClassRoomName; db.Insert(emItemEntity); } - + db.Commit(); } catch (Exception ex) @@ -320,6 +492,76 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveFormOfElective(string keyValue, OpenLessonPlanOfElectiveEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + //单个编辑 + //entity.Modify(keyValue); + //this.BaseRepository("CollegeMIS").Update(entity); + + //多个编辑 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var model = db.FindEntity(item); + if (model != null) + { + model.OrdinaryScoreScale = entity.OrdinaryScoreScale; + model.TermInScoreScale = entity.TermInScoreScale; + model.TermEndScoreScale = entity.TermEndScoreScale; + model.OtherScoreScale = entity.OtherScoreScale; + model.IsAllowEdit = entity.IsAllowEdit; + db.Update(model); + + //修改StuSelectLessonList中的比例 + db.ExecuteBySql("update StuSelectLessonListOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where AcademicYearNo='" + model.AcademicYearNo + "' and Semester='" + model.Semester + "' and LessonNo='" + model.LessonNo + "' and LessonSortNo='" + model.LessonSortNo + "' "); + + //修改StuScore中的成绩 + var beforeList = db.FindList(x => x.AcademicYearNo == model.AcademicYearNo && x.Semester == model.Semester && x.LessonNo == model.LessonNo && x.LessonSortNo == model.LessonSortNo); + if (beforeList.Any()) + { + foreach (var stuScoreItem in beforeList) + { + if (stuScoreItem.Score != null) + { + stuScoreItem.Score = (stuScoreItem.OrdinaryScore * (model.OrdinaryScoreScale / 100) + stuScoreItem.TermInScore * (model.TermInScoreScale / 100) + stuScoreItem.TermEndScore * (model.TermEndScoreScale / 100) + stuScoreItem.OtherScore * (model.OtherScoreScale / 100)).ToDecimal(0); + db.Update(stuScoreItem); + } + } + } + + } + } + } + else + { + entity.Create(); + db.Insert(entity); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 扩展数据 @@ -534,5 +776,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion + + /// + /// 保存StuSelectLessonList中的成绩比例 + /// 主键 + /// + /// + public void SaveStuSelectLessonListScaleByJson(string queryJson, StuSelectLessonListOfElectiveEntity entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var queryParam = queryJson.ToJObject(); + var F_SchoolId = queryParam["F_SchoolId"].ToString(); + var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); + var Semester = queryParam["Semester"].ToString(); + var LessonNo = queryParam["LessonNo"].ToString(); + var ClassRoomNo = queryParam["ClassRoomNo"].ToString(); + var LessonSection = queryParam["LessonSection"].ToString(); + + var classInfoEntity = db.FindEntity(x => x.ClassroomNo == ClassRoomNo); + if (classInfoEntity != null) + { + db.ExecuteBySql("update StuSelectLessonListOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonSection='" + LessonSection + "' and ClassroomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' "); + db.ExecuteBySql("update OpenLessonPlanOfElective set OrdinaryScoreScale=" + entity.OrdinaryScoreScale + ",TermInScoreScale=" + entity.TermInScoreScale + ",TermEndScoreScale=" + entity.TermEndScoreScale + ",OtherScoreScale=" + entity.OtherScoreScale + " where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonSection='" + LessonSection + "' and ClassroomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' "); + + //修改StuScore中的成绩 + var beforeList = db.FindList(x => x.F_SchoolId == F_SchoolId && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.ClassRoomNo == classInfoEntity.ClassroomNo && x.LessonNo == LessonNo && x.LessonSortNo == "2" && x.LessonSection == LessonSection); + if (beforeList.Any()) + { + foreach (var stuScoreItem in beforeList) + { + if (stuScoreItem.Score != null) + { + stuScoreItem.Score = (stuScoreItem.OrdinaryScore * (entity.OrdinaryScoreScale / 100) + stuScoreItem.TermInScore * (entity.TermInScoreScale / 100) + stuScoreItem.TermEndScore * (entity.TermEndScoreScale / 100) + stuScoreItem.OtherScore * (entity.OtherScoreScale / 100)).ToDecimal(0); + db.Update(stuScoreItem); + } + } + } + + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + 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/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs index cf4e029e4..fe16b50c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs @@ -547,11 +547,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 课程下拉框信息【学生成绩录入可去审核】 /// /// - public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType) + public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo="", string Semester="") { try { - return stuScoreService.GetLessonNoDataOfAll(userAccount, userType); + return stuScoreService.GetLessonNoDataOfAll(userAccount, userType,AcademicYearNo, Semester); } catch (Exception ex) { @@ -570,11 +570,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 课程下拉框信息【选修课】 /// /// - public IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType) + public IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "") { try { - return stuScoreService.GetElectiveLessonNoDataOfAll(userAccount, userType); + return stuScoreService.GetElectiveLessonNoDataOfAll(userAccount, userType,AcademicYearNo,Semester); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs index 453da19a7..840f76b7a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs @@ -145,13 +145,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 课程下拉框信息【学生成绩录入可去审核】 /// /// - IEnumerable GetLessonNoDataOfAll(string userAccount, string userType); + IEnumerable GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo="", string Semester=""); /// /// 课程下拉框信息【选修课】 /// /// - IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType); + IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = ""); /// /// 教室下拉框信息【选修课】 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index 7b0921985..a04b3c9de 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -130,8 +130,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT t.* FROM StuScore t where 1=1 "); //学籍异动的学生不显示 - strSql.Append(" and t.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) "); - + //strSql.Append(" and t.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) "); + //20220616改 休学的要录入成绩,退学和转校的不用 + strSql.Append(" and t.StuNo not in (select StuNo from StuInfoBasicChange where StuChangeType in('04','06')) "); var queryParam = queryJson.ToJObject(); var dp = new DynamicParameters(new { }); if (!queryParam["F_SchoolId"].IsEmpty()) @@ -374,7 +375,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(" and t.ClassNo=@ClassNo "); dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); } - + if (!queryParam["LessonSection"].IsEmpty()) + { + strSql.Append(" and t.LessonSection=@LessonSection "); + dp.Add("LessonSection", queryParam["LessonSection"].ToString(), DbType.String); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo=@ClassRoomNo "); + dp.Add("ClassRoomNo", queryParam["ClassRoomNo"].ToString(), DbType.String); + } return this.BaseRepository("CollegeMIS").FindEntity(strSql.ToString(), dp); } catch (Exception ex) @@ -1103,7 +1113,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad /// 课程下拉框信息【学生成绩录入可去审核】 /// /// - public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType) + public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType,string AcademicYearNo="",string Semester="") { try { @@ -1117,6 +1127,10 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad { strSql.Append(" and s.EmpNo='" + userAccount + "' "); } + if (!string.IsNullOrEmpty(AcademicYearNo)) + { + strSql.Append(" and s.AcademicYearNo='" + AcademicYearNo + "' and s.Semester='"+Semester+"' "); + } var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); return data; @@ -1138,7 +1152,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad /// 课程下拉框信息【选修课】 /// /// - public IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType) + public IEnumerable GetElectiveLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "") { try { @@ -1148,6 +1162,10 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad { strSql.Append(" and s.EmpNo='" + userAccount + "' "); } + if (!string.IsNullOrEmpty(AcademicYearNo)) + { + strSql.Append(" and s.AcademicYearNo='" + AcademicYearNo + "' and s.Semester='" + Semester + "' "); + } var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); return data; @@ -1623,16 +1641,32 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); var Semester = queryParam["Semester"].ToString(); var LessonNo = queryParam["LessonNo"].ToString(); - var ClassNo = queryParam["ClassNo"].ToString(); + var ClassNo = queryParam["ClassNo"]; + var LessonSection = queryParam["LessonSection"]; + var ClassRoomNo = queryParam["ClassRoomNo"]; var now = DateTime.Now; var loginUserInfo = LoginUserInfo.Get(); - - var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == ClassNo); - if (classInfoEntity != null) + if (!ClassNo.IsEmpty()) + { + string classno = ClassNo.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == classno); + if (classInfoEntity != null) + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno+ "' "); + } + } + else { - this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' "); + string classroomno = ClassRoomNo.ToString(); + string lessonsection = LessonSection.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassroomNo == classroomno); + if (classInfoEntity != null) + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' "); + } } + } catch (Exception ex) { @@ -1703,16 +1737,33 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); var Semester = queryParam["Semester"].ToString(); var LessonNo = queryParam["LessonNo"].ToString(); - var ClassNo = queryParam["ClassNo"].ToString(); + var ClassNo = queryParam["ClassNo"]; + var LessonSection = queryParam["LessonSection"]; + var ClassRoomNo = queryParam["ClassRoomNo"]; var now = DateTime.Now; var loginUserInfo = LoginUserInfo.Get(); - - var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == ClassNo); - if (classInfoEntity != null) + if (!ClassNo.IsEmpty()) { - this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{ClassNo}' "); + string classno = ClassNo.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == classno); + if (classInfoEntity != null) + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null,ModifyDate='{now}',ModifyUserId='{loginUserInfo.account}',ModifyUserName='{loginUserInfo.realName}' where F_SchoolId='{F_SchoolId}' and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and OpenLessonDeptNo='{classInfoEntity.DeptNo}' and OpenLessonMajorNo='{classInfoEntity.MajorNo}' and LessonNo='{LessonNo}' and LessonSortNo='1' and ClassNo='{classno}' "); + } } + else + { + string classroomno = ClassRoomNo.ToString(); + string lessonsection = LessonSection.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassroomNo == classroomno); + if (classInfoEntity != null) + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='1',EditUserId=null,BeginModifyDate=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' "); + } + } + + } catch (Exception ex) { @@ -1783,23 +1834,51 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var AcademicYearNo = queryParam["AcademicYearNo"].ToString(); var Semester = queryParam["Semester"].ToString(); var LessonNo = queryParam["LessonNo"].ToString(); - var ClassNo = queryParam["ClassNo"].ToString(); + var ClassNo = queryParam["ClassNo"]; + var LessonSection = queryParam["LessonSection"]; + var ClassRoomNo = queryParam["ClassRoomNo"]; - var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == ClassNo); - if (classInfoEntity != null) + if (!ClassNo.IsEmpty()) { - db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + ClassNo + "' "); - //教师电子成绩单 - if (checkMark == 0)//撤销 + string classno = ClassNo.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == classno); + if (classInfoEntity != null) { - db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + ClassNo + "' and LessonSortNo='1' "); + db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno + "' "); + //教师电子成绩单 + if (checkMark == 0)//撤销 + { + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + classno + "' and LessonSortNo='1' "); + } + else + { + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + classno + "' and LessonSortNo='1' "); + } } - else + db.Commit(); + } + else + { + string classroomno = ClassRoomNo.ToString(); + string lessonsection = LessonSection.ToString(); + var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassroomNo == classroomno); + if (classInfoEntity != null) { - db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassNo='" + ClassNo + "' and LessonSortNo='1' "); + db.ExecuteBySql($"update StuScore set CheckMark='{checkMark}' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and ClassRoomNo='" + classInfoEntity.ClassroomNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "' "); + //教师电子成绩单 + if (checkMark == 0)//撤销 + { + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassRoomNo='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); + } + else + { + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and classroomno='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); + } } + db.Commit(); } - db.Commit(); + + } catch (Exception ex) { 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 index c3dfede79..a50586234 100644 --- 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 @@ -167,6 +167,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration stuLessonList.F_SchoolId = item.F_SchoolId; stuLessonList.NoticeBookNo = item.NoticeBookNo; stuLessonList.StuNo = item.StuNo; + stuLessonList.StuNo = item.StuNo; stuLessonList.DeptNo = item.DeptNo; stuLessonList.MajorNo = item.MajorNo; stuLessonList.ClassNo = item.ClassNo; @@ -201,7 +202,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration stuLessonList.CheckMark = item.CheckMark; stuLessonList.InsertTime = item.InsertTime; stuLessonList.CheckMark = "1"; - db.Insert(stuLessonList); + + if (db.FindEntity(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.DeptNo == item.DeptNo && x.StuNo == item.StuNo && x.EmpNo == item.EmpNo + && x.MajorNo == item.MajorNo && x.ClassNo == item.ClassNo && x.Grade == item.Grade && x.LessonNo == item.LessonNo && x.F_SchoolId == item.F_SchoolId) == null) + { + db.Insert(stuLessonList); + } } db.Commit(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs index d27073da4..c3fb1967d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveEntity.cs @@ -170,6 +170,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("STATUS")] public int? Status { get; set; } + /// + /// F_SchoolId + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } /// /// OrdinaryScoreScale /// @@ -210,8 +215,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 - - [NotMapped] public string F_SchoolId { get; set; } [NotMapped] public string LessonTypeId { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs index 60a21345b..c0a69b63d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs @@ -82,12 +82,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("TEACHCLASSNO")] public string TeachClassNo { get; set; } /// - /// TeachClassNo - /// - /// - [Column("TEACHCLASSNAME")] - public string TeachClassName { get; set; } - /// /// 学生数 /// /// 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 index a9155f15c..d50031bb3 100644 --- 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 @@ -77,6 +77,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); strSql.Append(" AND t.EmpNo = @EmpNo "); } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.TeachClassNo = @ClassNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -300,12 +305,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration Teach.DeptNo = item.DeptNo; Teach.MajorNo = item.MajorNo; Teach.Grade = item.Grade; + Teach.EmpNo = item.EmpNo; 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); + + if (db.FindEntity(x => x.AcademicYearNo == Teach.AcademicYearNo && x.Semester == Teach.Semester + && x.DeptNo == Teach.DeptNo && x.TeachClassNo == Teach.TeachClassNo + && x.MajorNo == Teach.MajorNo && x.Grade == Teach.Grade + && x.LessonNo == Teach.LessonNo && x.F_SchoolId == Teach.F_SchoolId) == null) + { + db.Insert(Teach); + } } db.Commit(); } 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 d907d81ba..944b75ed2 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 @@ -1782,6 +1782,10 @@ + + + +