diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs index 23d942e08..520186e61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs @@ -3,6 +3,8 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; +using System; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,6 +18,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class Exam_ArrangeExamTermNewController : MvcControllerBase { private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); + private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); #region 视图功能 @@ -26,7 +30,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +39,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } /// /// 表单页 @@ -51,6 +55,44 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 表单页 + /// + /// + public ActionResult SeatForm() + { + return View(); + } + + /// + /// 场次安排 + /// + /// + [HttpGet] + public ActionResult IndexClassRoom() + { + return View(); + } + + /// + /// + /// + /// + [HttpGet] + public ActionResult TeachingQualityIndex() + { + return View(); + } + /// + /// + /// + /// + [HttpGet] + public ActionResult TeachingQualityPrint() + { + return View(); + } #endregion #region 获取数据 @@ -69,14 +111,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } - + [HttpGet] public ActionResult GetClassTree() { return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); } + /// + /// 考场数据 + /// + /// [HttpGet] [AjaxOnly] + public ActionResult GetClassRoomTree(string AcademicYearNo, string Semester) + { + return Success(exam_ArrangeExamTermNewIBLL.GetClassRoomTree(AcademicYearNo, Semester)); + } + [HttpGet] public ActionResult GetItemPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); @@ -90,6 +141,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 教学质量监测 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLessonList(string academicYearNo, string semester, string classNo) + { + var data = exam_ArrangeExamTermNewIBLL.GetLessonList(academicYearNo, semester, classNo).OrderBy(x => x.value); + return Success(data); + } + public ActionResult GetTeachingQualityPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermNewIBLL.GetTeachingQualityPageList(paginationobj, queryJson); + + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } + /// /// 获取页面显示列表数据 /// @@ -120,12 +198,74 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); - var jsonData = new { + var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity(keyValue); + var jsonData = new + { ArrangeExamTermNew = ArrangeExamTermNewData, }; return Success(jsonData); } + + /// + /// + /// + /// + /// + /// + /// + public ActionResult GetSeatData(string ClassRoomNo, string AcademicYearNo, int? Semester, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + var data = exam_ExamRoomIBLL.GetEntityByClassroomNo(ClassRoomNo, AcademicYearNo, Semester); + var studata = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime).OrderBy(x => x.SitNumber); + var StuList = new List(); + var EaxmStartTime = ""; + var EaxmEndTime = ""; + var teach = ""; + foreach (var item in studata) + { + var list = new EaxmStuList + { + SitNumber = item.SitNumber, + StuName = item.StuName, + StuNo = item.StuNo + }; + StuList.Add(list); + var times = item.ExamTime.Split('-'); + for (int i = 0; i < times.Count(); i++) + { + if (i == 0) + { + EaxmStartTime = item.ExamDate.Value.ToString("yyyy-MM-dd") + " " + times[i] + " ~ "; + } + else + { + EaxmEndTime = item.ExamDate.Value.ToString("yyyy-MM-dd") + " " + times[i]; + } + } + teach = item.EmpName; + } + var dataOne = new { tClassroomName = data.ClassroomName, AcademicYearNo, Semester, data.SeatRows, data.SeatColumns, teach, EaxmStartTime, EaxmEndTime }; + var result = new { dataOne, StuList }; + return Success(result); + } + + + [HttpGet] + [AjaxOnly] + public ActionResult GetScreeningPlan(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermNewIBLL.ScreeningPlan(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion #region 提交数据 @@ -154,7 +294,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject(); - exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); + exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } @@ -162,5 +302,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + public class EaxmStuList + { + public string StuName { get; set; } + public string StuNo { get; set; } + public string SitNumber { get; set; } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs index c2ee9a8f6..57f688694 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class Exam_ExamRoomController : MvcControllerBase { private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); + private Exam_ExamRoomDetailIBLL exam_ExamRoomDetailIBLL = new Exam_ExamRoomDetailBLL(); #region 视图功能 @@ -46,7 +48,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - + [HttpGet] + public ActionResult FormSeat() + { + return View(); + } #endregion #region 获取数据 @@ -88,6 +94,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + public ActionResult GetClassRoomDetailData(string classroomNo, string AcademicYearNo, int? Semester) + { + var Exam_ExamRoomData = exam_ExamRoomIBLL.GetEntityByClassroomNo(classroomNo, AcademicYearNo, Semester); + var Exam_ExamRoomDetailData = exam_ExamRoomDetailIBLL.GetList().Where(x => x.ClassRoomNo == classroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester).OrderBy(x => x.ECOrder); + var data = new { Exam_ExamRoomData, Exam_ExamRoomDetailData }; + return Success(data); + + } #endregion #region 提交数据 @@ -113,7 +133,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) { - int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); + int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester, SeatRows, SeatColumns); + exam_ExamRoomIBLL.SeatEntity(AcademicYearNo, Semester); return Success("导入" + res + "条数据!"); } /// @@ -139,9 +160,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Exam_ExamRoomEntity entity = strEntity.ToObject(); - + //判断考场编号有无重复 - var model = exam_ExamRoomIBLL.GetEntityByClassroomNo(entity.ClassroomNo,entity.AcademicYearNo,entity.Semester); + var model = exam_ExamRoomIBLL.GetEntityByClassroomNo(entity.ClassroomNo, entity.AcademicYearNo, entity.Semester); if (model != null && string.IsNullOrEmpty(keyValue)) { return Fail("考场编号重复!"); @@ -173,7 +194,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers exam_ExamRoomIBLL.Lock(keyValue, EREnabled); return Success("操作成功!"); } + /// + /// 座位保存允许做人 + /// + /// + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveDetailForm(string ClassroomNo, string AcademicYearNo, int Semester, List list) + { + exam_ExamRoomDetailIBLL.SaveSaveDetailEntity(ClassroomNo, AcademicYearNo, Semester, list); + return Success("保存成功!"); + } #endregion - } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs new file mode 100644 index 000000000..76b2f53ea --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs @@ -0,0 +1,113 @@ +using DocumentFormat.OpenXml.Math; +using Hangfire; +using Learun.Application.Base.SystemModule; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.IO; +using System.Linq; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public class StuScoreOfPreviousController : MvcControllerBase + { + private StuScoreOfPreviousIBLL stuScoreOfPreviousIBLL = new StuScoreOfPreviousBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 导入 + /// + /// + [HttpGet] + public ActionResult ImportForm() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuScoreOfPreviousIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + /// + /// 学年下拉框信息 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetAcademicYearNoData() + { + var data = stuScoreOfPreviousIBLL.GetAcademicYearNoData(); + + return Success(data); + } + #endregion + #region 拓展数据 + + /// + /// 导入下载模板 + /// + /// + public ActionResult DownTemplate() + { + FileStreamResult result = null; + try + { + var path = Server.MapPath("~/Content/excel/"); + var pathoffull = path + "StuScoreOfPreviousImport.xls"; + FileStream fsread = fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.ReadWrite); + result = File(fsread, "application/ms-excel", "往年成绩导入模版.xls"); + + return result; + } + catch (Exception ex) + { + return null; + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml new file mode 100644 index 000000000..e788e5af9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml @@ -0,0 +1,52 @@ +@{ + ViewBag.Title = "排考安排"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
课程
+
+
+
+
监考老师
+
+
+
+
考场
+
+
+
+
+
+
+
+
+ +  查看 +  打印 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js new file mode 100644 index 000000000..742a0f27c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js @@ -0,0 +1,154 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-04-22 16:00 + * 描 述:排考安排 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var logbegin = ''; + var logend = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + + page.search(); + } + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); + $('#ClassRoomNo').lrselect({ + placeholder: "课程", + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#lr_view').on('click', function () { + var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo'); + var Semester = $('#gridtable').jfGridValue('Semester'); + var ClassRoomNo = $('#gridtable').jfGridValue('ClassroomNo'); + var LessonNo = $('#gridtable').jfGridValue('LessonNo'); + var EmpNo = $('#gridtable').jfGridValue('EmpNo'); + var ExamDate = $('#gridtable').jfGridValue('ExamDate'); + ExamDate = learun.formatDate(ExamDate, "yyyy-MM-dd"); + var ExamTime = $('#gridtable').jfGridValue('ExamTime'); + if (learun.checkrow(ClassRoomNo)) { + learun.layerForm({ + id: 'SeatForm', + title: '排考座位表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ + AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime + }), + width: 1200, + height: 800, + btn: null + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetScreeningPlan', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { + label: "专业", name: "TeachMajorNo", width: 160, 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: "ClassroomNo", width: 100, align: "left" }, + { label: "考场名称", name: "ClassroomName", width: 100, align: "left" }, + { label: "科目编号", name: "LessonNo", width: 100, align: "left" }, + { label: "科目名称", name: "LessonName", width: 100, align: "left" }, + { + label: "考试日期", name: "ExamDate", width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { label: "考试时间", name: "ExamTime", width: 100, align: "left" }, + { label: "考场人数", name: "ClassRoomNum", width: 100, align: "left" }, + { label: "监考老师名称", name: "EmpName", width: 200, align: "left" }, + { label: "监考老师编号", name: "EmpNo", width: 200, align: "left", ishide: true }, + { label: "起止考号", name: "kh", width: 100, align: "left", ishide: true }, + ], + //mainId: 'EPIId', + isPage: true, + sidx: 'AcademicYearNo desc,Semester desc,examtime desc,TeachMajorNo desc,examdate desc,lessonno desc,classroomname desc', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + $('#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/Exam_ArrangeExamTermNew/IndexForClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml index 140f63d8f..2a0d1be1b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml @@ -41,6 +41,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js index bdfac26da..ff82a4bb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js @@ -23,7 +23,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', nodeClick: function (item) { ClassNo = item.id; - page.search({ ClassNo: item.id }); + page.search({ ClassNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); } }); $('.datetime').each(function () { @@ -89,6 +89,10 @@ var bootstrap = function ($, learun) { $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -96,9 +100,11 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, - { label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { - return learun.formatDate(v, "yyyy-MM-dd"); - } }, + { + label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, @@ -112,7 +118,7 @@ var bootstrap = function ($, learun) { ], mainId: 'AETId', sidx: 'examdate,examtime,lessonno,classroomname ', - sord:'asc', + sord: 'asc', isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml index 133107ba9..984c80591 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml @@ -5,14 +5,14 @@
-
班级信息
+
考场信息
- 班级信息 + 考场信息
@@ -25,9 +25,9 @@
-
+ @*
-
+
*@
@@ -41,6 +41,8 @@
+ @* 查看*@ +  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js index 2507f5f7c..43b08926e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js @@ -11,7 +11,9 @@ var bootstrap = function ($, learun) { "use strict"; var datebegin = ''; var dateend = ''; - var ClassNo = ''; + //var ClassNo = ''; + var ClassRoomNo = ''; + var page = { init: function () { page.initGird(); @@ -20,10 +22,11 @@ var bootstrap = function ($, learun) { bind: function () { // 初始化左侧树形数据 $('#dataTree').lrtree({ - url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', nodeClick: function (item) { - ClassNo = item.id; - page.search({ ClassNo: item.id }); + ClassRoomNo = item.id; + page.search({ ClassRoomNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + $('#titleinfo').html(item.text); } }); $('.datetime').each(function () { @@ -56,7 +59,7 @@ var bootstrap = function ($, learun) { }); // 查询 $('#btn_Search').on('click', function () { - page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + page.search({ ClassRoomNo: ClassRoomNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -78,30 +81,93 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - //课程 - //$('#LessonNo').lrselect({ - // placeholder: "请选择课程", - // allowSearch: true, - // url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - // value: 'value', - // text: 'text' - //}); + + $('#AcademicYearNo').bind('change', function () { + ClassRoomNo= '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#Semester').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + $('#lr_view').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet() || ''; + var Semester = $('#Semester').lrselectGet() || ''; + var LessonNo = $('#LessonNo').lrselectGet() || ''; + if (AcademicYearNo == '' && Semester == '' || LessonNo == '' ) { + learun.alert.warning("请选择学年,学期以及课程"); + return; + } + if (!ClassRoomNo) { + learun.alert.warning("请选择考场"); + return; + } + learun.layerForm({ + id: 'SeatForm', + title: '排考座位表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ ClassRoomNo, AcademicYearNo, Semester, LessonNo }), + width: 1200, + height: 800, + btn: null + }); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', headData: [ - { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, - { label: '学期', name: 'Semester', width: 60, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "left" }, + { label: '学生姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学籍号', name: 'StuCode', width: 130, align: "left" }, { - label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { + label: '考试日期', name: 'ExamDate', width: 90, align: "left", + formatter: function (v) { return learun.formatDate(v, "yyyy-MM-dd"); } }, - { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, @@ -109,12 +175,11 @@ var bootstrap = function ($, learun) { { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, { label: '班级名称', name: 'ClassName', width: 100, align: "left" }, - { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, - { label: '学生姓名', name: 'StuName', width: 200, align: "left" }, - { label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" }, + { label: '考号', name: 'kh', width: 140, align: "left", ishide: true }, ], mainId: 'AETId', - sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', isPage: true }); page.search(); @@ -123,7 +188,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.StartTime = datebegin; param.EndTime = dateend; - console.log(param); + param.ClassRoomNo = ClassRoomNo; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml new file mode 100644 index 000000000..186f676b6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml @@ -0,0 +1,116 @@ +@{ + ViewBag.Title = "考场信息-查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+ {{dataOne.tClassroomName}}排考座位表 +
打 印
+
+
+ 监考老师:{{dataOne.teach}} + 考试时间:{{dataOne.EaxmStartTime}}{{dataOne.EaxmEndTime}} +
+
    +
  • +
    +
    {{item.StuName||'-'}}
    + {{item.SitNumber}} +
    +
  • +
+
暂无数据
+
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml new file mode 100644 index 000000000..d479565d8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml @@ -0,0 +1,54 @@ +@{ + /**/ + + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
考场信息
+
+
+
+
+
+
+ 考场信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ + @*打印*@ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js new file mode 100644 index 000000000..df95bed53 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js @@ -0,0 +1,324 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; +//课程列 +var LessonTemp = []; +var EmpInfo = [] + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + //var ClassNo = ''; + var ClassRoomNo = ''; + + var page = { + init: function () { + //page.initGird(); + page.bind(); + }, + bind: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', + nodeClick: function (item) { + ClassRoomNo = item.id; + page.search({ ClassRoomNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + $('#titleinfo').html(item.text); + } + }); + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + //打印 + $('#lr_print').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + learun.alert.warning("请选择学期!"); + return; + } + if (p.ClassNo == null || p.ClassNo == "") { + learun.alert.warning("请选择班级!"); + return; + } + let query = JSON.parse(JSON.stringify(p)) + query.StartTime = datebegin; + query.EndTime = dateend; + query.ClassRoomNo = ClassRoomNo; + query.EmpNo = $('#EmpNo').lrselectGet() + learun.layerForm({ + id: 'TeachingQualityPrint', + title: '教学质量检测考生统计表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/TeachingQualityPrint?' + $.param({ params: JSON.stringify(p), query: JSON.stringify(query), ClassNo: p.ClassNo }), + width: 1320, + height: 900, + btn: null + }); + }); + // 查询 + $('#btn_Search').on('click', async function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + p.LessonNo = $('#LessonNo').lrselectGet(); + p.ClassRoomNo = ClassRoomNo; + p.EmpNo = $('#EmpNo').lrselectGet(); + + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + learun.alert.warning("请选择学期!"); + return; + } + if (p.ClassNo == null || p.ClassNo == "") { + learun.alert.warning("请选择班级!"); + return; + } + + //获取教师 + await new Promise((resolve) => { + learun.clientdata.getAllAsync('sourceData', { + code: 'EmpInfo', + callback: function (dataes) { + EmpInfo = dataes.map(e => { return { value: e.empno, text: e.empname } }) + resolve() + } + }); + }) + $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetLessonList', p, + function (data) { + console.log(data) + var temparr = []; + for (var i = 0; i < data.length; i++) { + var item = {}; + let obj = EmpInfo.find(e => e.value == data[i].text) + item.label = data[i].value; + item.name = data[i].text; + item.formatterAsync = function (callback, value, row, op, $cell) { + callback(obj ? obj.text : '') + } + item.width = 150; + item.align = "left"; + temparr.push(item); + } + LessonTemp = temparr; + + page.initGird(); + //page.search({ ClassRoomNo: ClassRoomNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + page.search(p); + }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#ClassNo').lrDataSourceSelect({ + placeholder: "请选择班级", + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + + $('#AcademicYearNo').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#Semester').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); + $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + }, + initGird: function () { + var headData = [ + { + label: '学校', name: 'F_SchoolId', width: 190, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "left" }, + { label: '学籍号', name: 'StuCode', width: 130, align: "left" }, + { + label: "系部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + + { + label: '考试日期', name: 'ExamDate', width: 90, align: "left", + formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, + { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, + { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" }, + //{ label: '任课教师', width: 130, align: "center", children: LessonTemp }, + ...LessonTemp, + { label: '考号', name: 'kh', width: 140, align: "left", ishide: true }, + ]; + //var headDatas = headData.concat(LessonTemp); + + $("#gridtable")[0].dfop = undefined; + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + param.ClassRoomNo = ClassRoomNo; + param.EmpNo = $('#EmpNo').lrselectGet() + param.ClassNo = $('#ClassNo').lrselectGet() + $('#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/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml new file mode 100644 index 000000000..f26d0b68d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml @@ -0,0 +1,65 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+ @* .page 一个纸张页*@ +
+
+
+
单页条数:
+
+ + 列显示 + + + +
+ + 打印 +
+
教学质量检测考生统计表
+
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js new file mode 100644 index 000000000..b2948fcfd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js @@ -0,0 +1,364 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + //传参 + var params = '{}', query = '{}'; + //课程 + var LessonTemp = []; + //教师 + var EmpInfo = []; + //第几页 + var pageNum = 1; + var rows = 26 + var headData = [ + { + label: '学校', name: 'F_SchoolId', width: 190, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "center", ishide: true }, + { label: '学期', name: 'Semester', width: 50, align: "center", ishide: true }, + { label: '姓名', name: 'StuName', width: 100, align: "center" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "center", ishide: true }, + { label: '学籍号', name: 'StuCode', width: 150, align: "center" }, + { + label: "系所", name: "DeptNo", width: 100, align: "center", ishide: true, + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + + { + label: '考试日期', name: 'ExamDate', width: 90, align: "center", ishide: true, + formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "center" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "center", ishide: true }, + { label: '课程名称', name: 'LessonName', width: 200, align: "center", ishide: true }, + { label: '监考教师编号', name: 'EmpNo', width: 130, align: "center", ishide: true }, + { label: '监考教师姓名', name: 'EmpName', width: 130, align: "center"}, + { label: '教室编号', name: 'ClassroomNo', width: 100, align: "center", ishide: true }, + { label: '教室名称', name: 'ClassroomName', width: 100, align: "center", ishide: true }, + { label: '班级名称', name: 'ClassName', width: 100, align: "center", ishide: true }, + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "center", ishide: true }, + { label: '任课教师', name: 'rkjs', width: 130, align: "center", children: LessonTemp }, + { label: '考号', name: 'kh', width: 140, align: "center", ishide: false }, + ]; + var page = { + init: async function () { + if (request('rows')) { + rows = request('rows') + } + //获取教师 + await new Promise((resolve) => { + learun.clientdata.getAllAsync('sourceData', { + code: 'EmpInfo', + callback: function (dataes) { + EmpInfo = dataes.map(e => { return { value: e.empno, text: e.empname } }) + resolve() + } + }); + }) + params = request('params') || '{}' + query = request('query') || '{}' + ////获取班级text + //learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + // key: JSON.parse(query).ClassNo, + // keyId: request('ClassNo'), + // callback: function (_data) { + // $('.printTitle').text(_data.classname+'教学质量检测考生统计表') + // } + //}); + //获取课程 + $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetLessonList', JSON.parse(params), + function (data) { + var temparr = []; + for (var i = 0; i < data.length; i++) { + let obj = EmpInfo.find(e => e.value == data[i].text ) + var item = {}; + item.label = data[i].value; + item.name = data[i].text; + item.width = 130; + item.formatterAsync = function (callback, value, row, op, $cell) { + callback(obj ? obj.text : '') + } + item.align = "center"; + temparr.push(item); + } + LessonTemp = temparr; + for (let i = 0; i < headData.length; i++) { + if (headData[i].name == 'rkjs') { + headData[i].children = LessonTemp + break; + } + } + page.initGird(); + page.search() + }); + //page.initGird(); + page.bind(); + }, + bind: function () { + //打印 + $('#lr_print').on('click', function () { + $('#printPage').jqprint() + }); + $('#rowsInput').val(rows) + $('#rowsInput').blur(e => { + if (/^\+?[1-9]\d*$/.test($('#rowsInput').val())) { + rows = $('#rowsInput').val() + let obj = getQueryString() + obj.rows = rows + let url = location.href.split('?')[0] + location.href = url + '?' + $.param(obj) + return + } + function getQueryString() { + var qs = location.search.substr(1), // 获取url中"?"符后的字串 + args = {}, // 保存参数数据的对象 + items = qs.length ? qs.split("&") : [], // 取得每一个参数项 + item = null, + len = items.length; + for (var i = 0; i < len; i++) { + item = items[i].split("="); + var name = decodeURIComponent(item[0]), + value = decodeURIComponent(item[1]); + if (name) { + args[name] = value; + } + } + return args; + } + $('#rowsInput').val(rows) + }) + function deepClone(obj) { + var copy; + + // Handle number, boolean, string, null and undefined + if (null == obj || "object" != typeof obj) return obj; + + // Handle Date + if (obj instanceof Date) { + copy = new Date(); + copy.setTime(obj.getTime()); + return copy; + } + + // Handle Array + if (obj instanceof Array) { + copy = []; + for (var i = 0, len = obj.length; i < len; i++) { + copy[i] = deepClone(obj[i]); + } + return copy; + } + + // Handle Object + if (obj instanceof Object) { + copy = {}; + for (var attr in obj) { + if (obj.hasOwnProperty(attr)) copy[attr] = deepClone(obj[attr]); + } + return copy; + } + + throw new Error("Unable to copy obj! Its type isn't supported."); + } + //列选择 + $('#lr_columns').on('click', function () { + if($('#columns').css('display') == 'block')return + let currentHeadData = deepClone(headData) + $('#columns').empty() + $('#columns').show() + //全选 + $('#columns').append(`
  •   全选
  • `) + $('#columns input[value=allSelected]').click(e => { + $.each($('#columns input[type=checkbox]'), function (index, value) { + if ($('#columns input[value=allSelected]')[0].checked) { + if (!$(value).is(":checked")) { + $(value).prop('checked', true) + } + } else { + if ($(value).is(":checked")) { + $(value).prop('checked', false) + } + } + + }); + }) + //字段列表 + currentHeadData.forEach(e => { + $('#columns').append(`
  •   ${e.label}
  • `) + }) + $('#columns input[type=checkbox]').change(e => { + for (let i = 0; i < currentHeadData.length; i++){ + if (currentHeadData[i].name == $(e.currentTarget).attr('value')) { + currentHeadData[i].ishide = currentHeadData[i].ishide ? false : true + } + } + //判断全选 + let isAllSelected = true + for (let i = 0; i < $('#columns input[type=checkbox]').length; i++) { + if (i == 0) continue + if (!$('#columns input[type=checkbox]')[i].checked) { + isAllSelected = false + break + } + } + $('#columns input[value=allSelected]').prop('checked', isAllSelected) + }) + //判断全选 + let isAllSelected = true + for (let i = 0; i < $('#columns input[type=checkbox]').length; i++) { + if (i == 0) continue + if (!$('#columns input[type=checkbox]')[i].checked) { + isAllSelected = false + break + } + } + $('#columns input[value=allSelected]').prop('checked', isAllSelected) + //确定取消 + $('#columns').append(`
  •  
  • `) + $('#cancelBtn').click(e => { + $('#columns').css('display','none') + }) + $('#confirmBtn').click(e => { + headData = null + headData = deepClone(currentHeadData) + $('#columns').css('display', 'none') + + for (let t = 1; t < pageNum; t++) { + $("#gridtablePage" + t)[0].dfop = undefined + } + pageNum = 1 + page.setHeadData() + }) + //点击其他地方关闭 + $(document).bind("click", function (e) { + if ($(e.target).closest("#columns").length == 0 && $(e.target).closest("#lr_columns").length == 0) { + $("#columns").hide() + } + }) + }); + }, + setHeadData: function () { + let id = '#gridtablePage' + pageNum + $(id).lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true, + rows, + onRenderComplete: function (list) { + if (list.length == rows) { + pageNum += 1 + //$('#printPage').append( + // `
    + //
    + //
    教学质量检测考生统计表
    + //
    + //
    + //
    ` + //) + page.setHeadData() + } else { + if (!list.length) { + $('.page' + pageNum).remove() + } + } + } + }); + + page.search(); + }, + initGird: function () { + let id = '#gridtablePage' + pageNum + $(id).jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true, + rows, + onRenderComplete: function (list) { + if (list.length == rows) { + pageNum += 1 + $('#printPage').append( + `
    +
    +
    教学质量检测考生统计表
    +
    +
    +
    ` + ) + page.initGird() + } else { + if (!list.length) { + $('.page' + pageNum).remove() + } + } + } + }); + + page.search(); + }, + search: function () { + $('#gridtablePage' + pageNum).jfGridSet('reload', { queryJson: query }, { page: pageNum }); + + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js index 6c2b15e78..bfb3411e7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js @@ -44,9 +44,10 @@ var bootstrap = function ($, learun) { { label: "学期", name: "Semester", width: 100, align: "left" }, { label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, { label: "考场名称", name: "ClassroomName", width: 200, align: "left" }, - { label: "座位行数", name: "SeatRows", width: 100, align: "left" }, - { label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, - { label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, + { label: "座位行数", name: "SeatRows", width: 60, align: "left" }, + { label: "座位列数", name: "SeatColumns", width: 60, align: "left" }, + { label: "考场座位数", name: "SeatCount", width: 60, align: "left" }, + { label: "可用座位数", name: "ActualNum", width: 60, align: "left" }, //{ // label: "是否启用", name: "EREnabled", width: 100, align: "left", // formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml index 8c4e3feee..a4d7b26d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml @@ -14,7 +14,8 @@
    考场座位数
    - + +
    监考老师
    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 4c9ea7c1c..88af61d36 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 @@ -134,6 +134,7 @@ var bootstrap = function ($, learun) { } else { $("#ClassroomName").val(temprow.ClassroomName); $('#ClassroomNo').val(temprow.ClassroomNo); + $('#ActualNum').val(temprow.ActualNum); $('#SeatCount').val(temprow.SeatCount); } }); 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 ef84b9b38..59acc059e 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 @@ -225,6 +225,7 @@ var bootstrap = function ($, learun) { { label: "考场名称", name: "ClassroomName", width: 100, align: "left" }, { label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, { label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, + { label: "可用座位数", name: "ActualNum", width: 100, align: "left" }, { label: "监考老师编号", name: "EmpNo", width: 150, align: "left" }, { label: "监考老师姓名", name: "EmpName", width: 100, align: "left" }, ], diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormSeat.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormSeat.cshtml new file mode 100644 index 000000000..4eeb6bb60 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormSeat.cshtml @@ -0,0 +1,130 @@ +@{ + ViewBag.Title = "考场信息-查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    + {{dataOne.tClassroomName}}排考座位表 +
    打 印
    +
    + @*
    + 监考老师:{{dataOne.teach}} + 考试时间:{{dataOne.EaxmStartTime}}{{dataOne.EaxmEndTime}} +
    *@ +
      +
    • +
      +
      {{item.ECEnabled?'正常':'禁用'}}
      + {{item.ECOrder}} +
      +
    • +
    +
    暂无数据
    +
    + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml index 05a38db32..a77a3c0d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml @@ -45,6 +45,7 @@
    diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js index 922009c4f..011360ccb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js @@ -59,6 +59,11 @@ var bootstrap = function ($, learun) { learun.alert.warning("选中记录已启用!"); return false; } + var IsEdit = $('#gridtable').jfGridValue('IsEdit'); + if (IsEdit === "false") { + learun.alert.warning("选中记录中包含已排考项目!"); + return; + } if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', @@ -87,7 +92,7 @@ var bootstrap = function ($, learun) { } }); }); - + // 按条件清空数据 $('#lr_emptyWhere').on('click', function () { learun.layerForm({ @@ -111,6 +116,11 @@ var bootstrap = function ($, learun) { learun.alert.warning("选中记录中包含已启用项目!"); return; } + var IsEdit = $('#gridtable').jfGridValue('IsEdit'); + if (IsEdit === "false") { + learun.alert.warning("选中记录中包含已排考项目!"); + return; + } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/DeleteForm', { keyValue: keyValue }, function () { @@ -147,6 +157,11 @@ var bootstrap = function ($, learun) { learun.alert.warning("选中记录中包含已停用项目!"); return; } + var IsEdit = $('#gridtable').jfGridValue('IsEdit'); + if (IsEdit === "false") { + learun.alert.warning("选中记录中包含已排考项目!"); + return; + } learun.layerConfirm('是否确认停用选中记录!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Lock', { keyValue: keyValue, EREnabled: 0 }, function () { @@ -156,7 +171,35 @@ var bootstrap = function ($, learun) { }); } }); - + + $('#lr_seat').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ERId'); + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + var IsEdit = $('#gridtable').jfGridValue('IsEdit'); + //if (IsEdit.indexOf('false') != -1) { + // learun.alert.warning("选中记录中包含不可编辑项目!"); + // return; + //} + if (learun.checkrow(keyValue)) { + var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo'); + var Semester = $('#gridtable').jfGridValue('Semester'); + var classroomNo = $('#gridtable').jfGridValue('ClassroomNo'); + learun.layerForm({ + id: 'form_seat', + title: '座位', + width: 1200, + height: 800, + btn: IsEdit.indexOf('false') != -1 ? [] : ['确认', '关闭'], + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormSeat?keyValue=' + keyValue + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester + '&ClassRoomNo=' + classroomNo, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -170,12 +213,20 @@ var bootstrap = function ($, learun) { { label: "座位行数", name: "SeatRows", width: 100, align: "left" }, { label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, { label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, + { label: "实际考试人数", name: "ActualNum", width: 100, align: "left" }, { label: "是否启用", name: "EREnabled", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == 1 ? "" : ""; } }, + { + label: "是否可编辑", name: "IsEdit", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "可编辑" : "不可编辑"; + } + }, + ], mainId: 'ERId', isMultiselect: true, 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 30a4ef6a1..39a7f7935 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 @@ -134,6 +134,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore > 150) { + row.OrdinaryScore = parseFloat('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); }, @@ -145,6 +148,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore > 150) { + row.TermInScore = parseFloat('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); }, @@ -156,6 +162,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('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); }, @@ -167,6 +176,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore > 150) { + row.OtherScore = parseFloat('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 cfef234fb..60ea69272 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 @@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore > 150) { + row.OrdinaryScore = parseFloat('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); }, @@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore > 150) { + row.TermInScore = parseFloat('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); }, @@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('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); }, @@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore > 150) { + row.OtherScore = parseFloat('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/InputScoreIndexOfElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js index 0d56a7cb7..406b567c7 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 @@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore > 150) { + row.OrdinaryScore = parseFloat('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); }, @@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore > 150) { + row.TermInScore = parseFloat('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); }, @@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('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); }, @@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore > 150) { + row.OtherScore = parseFloat('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/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index f8bceec91..4ec8d9078 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 @@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore > 150) { + row.OrdinaryScore = parseFloat('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); }, @@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore > 150) { + row.TermInScore = parseFloat('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); }, @@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('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); }, @@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore > 150) { + row.OtherScore = parseFloat('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/StuScoreNotPass/InputScoreIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.js index 9e288d4bb..931801d06 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.js @@ -134,6 +134,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('0'); + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js index 91bd9c321..748d8b8f8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js @@ -137,6 +137,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('0'); + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.js index 01fee5a19..cef2a98d0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.js @@ -134,6 +134,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('0'); + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js index ef05cc11f..1244e95e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js @@ -137,6 +137,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore > 150) { + row.TermEndScore = parseFloat('0'); + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.cshtml new file mode 100644 index 000000000..dc5ec1eff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.cshtml @@ -0,0 +1,24 @@ +@{ + ViewBag.Title = "Form"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + +@Html.AppendCssFile("/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.css") +
    +
    +
    上传文件
    +
    下载模板
    +
    +
    +
    +
    + +
    +
    +

    试试将电脑里的文件拖拽到此上传

    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.css new file mode 100644 index 000000000..04b556b7a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.css @@ -0,0 +1,136 @@ +.lr-form-layout-body { + padding:0 5px 5px 5px; +} +.lr-form-file-queue-wrap { + position:relative; + width:100%; + height:100%; + border:1px solid #ddd; + border-radius:4px; +} +.lr-form-file-queue { + position:relative; +} +.lr-form-file-queue { + position:relative; +} +.lr-form-file-queue-item { + position:relative; + width:100%; + height:50px; + border-bottom:1px solid #ddd; + padding-left:60px; + +} +.lr-file-image { + position:absolute; + top:5px; + left:5px; +} +.lr-file-image img { + width:40px; + height:40px; +} +.lr-file-name{ + line-height:50px; + +} +.lr-msg { + position:absolute; + top:0; + right:5px; + font-size: 25px; + line-height:50px; +} +.lr-msg .fa-check-circle{ + color: #5cb85c; +} +.lr-msg .fa-exclamation-circle { + color: #b94a48; +} +.lr-msg2 { + position:absolute; + top:0; + right:5px; + line-height:50px; +} +.lr-msg2 span { + color:#333; + font-size:14px; + margin-right:5px; +} + +.lr-tool-bar { + position:absolute; + top:0; + right:35px; + font-size: 25px; + line-height:50px; + color:#666; + cursor:pointer; +} +.lr-tool-bar > i { + margin-left:8px; +} + +.lr-tool-bar .fa-minus-circle { + color: #b94a48; +} +.lr-tool-bar .fa-cloud-download { + color: #3498db; +} + +.lr-uploader-progress { + position:absolute; + bottom:2px; + left:60px; + height:4px; + width:500px; + width:calc(100% - 90px); +} +.lr-uploader-progress-bar { + position:relative; + height:100%; + background-color:#039cfd; + border-radius:4px; +} + + +.lr-form-file-queue-bg { + position:absolute; + top:50%; + left:50%; + width:300px; + height:30px; + line-height:30px; + + margin:-15px 0 0 -150px; +} +.lr-form-file-queue-bg h1 { + color: #666; + font-size: 20px; + font-family: Microsoft Yahei; + padding-bottom: 2px; + margin: 0; +} +#lr_down_file_btn { + position:absolute; + right:5px; + background:#fff; + border:1px solid #ddd; + color:#333; +} +#lr_down_file_btn:hover { + color:#337ab7; +} +/*对百度插件的样式重写*/ +.webuploader-container { + position:absolute; +} +.webuploader-pick { + padding:8px 15px; + background-color:#039cfd; +} +.webuploader-pick-hover { + background-color:#027dcb; +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.js new file mode 100644 index 000000000..907b10e4c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/ImportForm.js @@ -0,0 +1,158 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2024-10-16 11:02 + * 描 述:导入往年成绩管理 + */ +var id = request('id'); + +var keyVaule = ''; + +var bootstrap = function ($, learun) { + "use strict"; + + var fileInfo = {}; + + // 触发合并文件碎片 + var mergeFileChunks = function (file) { + + + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileId'] = fileInfo[file.id].fileGuid; + param['chunks'] = fileInfo[file.id].chunks; + param['ext'] = file.ext; + param['templateId'] = id; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/StuScoreOfPreviousImport", param, function (res) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + if (res.code == learun.httpCode.success) { + if (res.data.Success != '0') { + learun.alert.success('导入成功' + res.data.Success + '条'); + } + // 文件保存成功后 + $fileItem.append('
    ' + res.data.Success + '/' + res.data.Fail + '
    '); + // 如果有失败 + if (res.data.Fail != '0') + { + learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + } + } + else { + $fileItem.append('
    '); + } + }); + } + // 触发清楚文件碎片 + var reomveFileChunks = function (file) { + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileGuid'] = fileInfo[file.id].fileGuid; + param['chunks'] = fileInfo[file.id].chunks; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + $fileItem.append('
    '); + } + + var page = { + uploader: null, + init: function () { + /*模板下载*/ + $('#lr_down_file_btn').on('click', function () { + learun.download({ url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/DownTemplate', param: { keyValue: id, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + }); + if (!WebUploader.Uploader.support()) { + alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); + throw new Error('WebUploader does not support the browser you are using.'); + } + + page.uploader = WebUploader.create({ + auto: true, + swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', + // 文件接收服务端。 + server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", + // 选择文件的按钮。可选。 + // 内部根据当前运行是创建,可能是input元素,也可能是flash. + pick: '#lr_add_file_btn', + dnd: '#lr_form_file_queue', + paste: 'document.body', + disableGlobalDnd: true, + accept: { + extensions: "xls,xlsx" + }, + multiple: true, + // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! + resize: false, + // 文件分片上传 + chunked: true, + chunkRetry: 3, + prepareNextFile: true, + chunkSize: '1048576', + // 上传参数 + formData: { + __RequestVerificationToken: $.lrToken + } + }); + page.uploader.on('fileQueued', page.fileQueued); + page.uploader.on('uploadStart', page.uploadStart); + page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); + page.uploader.on('uploadProgress', page.uploadProgress); + page.uploader.on('uploadSuccess', page.uploadSuccess); + page.uploader.on('uploadError', page.uploadError); + page.uploader.on('uploadComplete', page.uploadComplete); + page.uploader.on('error', page.error); + + $('#lr_form_file_queue').lrscroll(); + + }, + fileQueued: function (file) {// 文件加载到队列 + fileInfo[file.id] = { name: file.name }; + $('#lr_form_file_queue .lr-form-file-queue-bg').hide(); + // 添加一条文件记录 + var $item = $('
    '); + $item.append('
    '); + $item.append('' + file.name + '(' + learun.countFileSize(file.size) + ')'); + + $('#lr_form_file_queue_list').append($item); + }, + uploadStart: function (file) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.append('
    '); + }, + uploadBeforeSend: function (object, data, headers) { + data.chunk = data.chunk || 0; + data.chunks = data.chunks || 1; + fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); + data.fileGuid = fileInfo[data.id].fileGuid; + fileInfo[data.id].chunks = data.chunks; + }, + uploadProgress: function (file, percentage) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); + }, + uploadSuccess: function (file, res) { + if (res.code == 200) {// 上传成功 + mergeFileChunks(file); + } + else {// 上传失败 + reomveFileChunks(file); + } + }, + uploadError: function (file, code) { + reomveFileChunks(file); + }, + uploadComplete: function (file) { + }, + error: function (type) { + switch (type) { + case 'Q_TYPE_DENIED': + learun.alert.error('当前文件类型不允许上传'); + break; + }; + } + }; + page.init(); + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml new file mode 100644 index 000000000..6ab23d3d0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml @@ -0,0 +1,45 @@ +@{ + ViewBag.Title = "往年成绩管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +  查询 +
    +
    +
    +
    + +
    +
    +  导入 +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js new file mode 100644 index 000000000..2ca4bfaa4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js @@ -0,0 +1,137 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2024-10-16 11:02 + * 描 述:往年成绩管理 + */ +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程类型 + $('#LessonSortNo').lrselect({ + placeholder: "课程类型", + allowSearch: false, + data: [{ id: "1", text: "必修课" }, { id: "2", text: "选修课" }] + }); + //查询 + $('#btn_Search').on('click', function () { + var param = { + AcademicYearNo: $("#AcademicYearNo").lrselectGet(), + Semester: $("#Semester").lrselectGet(), + LessonSortNo: $("#LessonSortNo").lrselectGet(), + keyword: $("#keyword").val() + }; + page.search(param); + }); + //导入弹窗 + $('#importBtn').on('click', function () { + learun.layerForm({ + id: 'form_import', + title: '导入数据', + url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/ImportForm', + width: 600, + height: 400, + btn: null + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/GetPageList', + headData: [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "系所", name: "DeptNo", width: 100, align: "left" + }, + { + label: "专业", name: "MajorNo", width: 100, align: "left" + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left" + }, + { label: "年级", name: "Grade", width: 100, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 100, align: "left" }, + { label: '学期', name: 'Semester', width: 80, align: "left" }, + { + label: '课程类型', name: 'LessonSortNo', width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "1" ? "必修课" : "选修课"; + } + }, + { label: '课程编号', name: 'LessonNo', width: 150, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 150, align: "left" }, + { label: '学分', name: 'StudyScore', width: 100, align: "left" }, + { + label: '平时成绩', name: 'OrdinaryScore', width: 100, align: "left" + }, + { label: '期中成绩', name: 'TermInScore', width: 100, align: "left" }, + { + label: '期末成绩', name: 'TermEndScore', width: 100, align: "left" + }, + { label: '总成绩', name: 'Score', width: 100, align: "left" }, + { label: '教师编号', name: 'EmpNo', width: 100, 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: 'ModifyDate', width: 150, align: "left" }, + { label: '编辑用户', name: 'ModifyUserName', width: 100, align: "left" }, + { + label: "审核状态", name: "CheckMark", width: 80, align: "center", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已审核" : "未审核"; + } + }, + ], + mainId: 'ScoreId', + isPage: true, + sidx: 'AcademicYearNo desc,Semester desc,LessonNo,StuNo', + sord: "" + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs index be98a21af..249e30646 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs @@ -22,6 +22,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers private ExcelImportIBLL excelImportIBLL = new ExcelImportBLL(); private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); + private StuScoreOfPreviousIBLL stuScoreOfPreviousIBLL = new StuScoreOfPreviousBLL(); #region 视图功能 /// /// 导入模板管理页面 @@ -289,7 +290,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers } } /// - /// + /// 课表导入 /// /// /// @@ -317,6 +318,36 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers return Fail("导入数据失败!"); } } + /// + /// 往年成绩管理导入 + /// + /// + /// + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult StuScoreOfPreviousImport(string fileId, int chunks, string ext) + { + UserInfo userInfo = LoginUserInfo.Get(); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); + if (!string.IsNullOrEmpty(path)) + { + DataTable dt = ExcelHelper.ExcelImport(path); + var res = stuScoreOfPreviousIBLL.StuScoreOfPreviousImport(dt, fileId); + var data = new + { + Success = res.Split('|')[0], + Fail = res.Split('|')[1] + }; + return JsonResult(data); + } + else + { + return Fail("导入数据失败!"); + } + } + /// /// 下载文件(导入文件未被导入的数据) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuScoreOfPreviousImport.xls b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuScoreOfPreviousImport.xls new file mode 100644 index 000000000..3975359fc Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuScoreOfPreviousImport.xls differ 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 8bd0f7db0..e85603232 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 @@ -23,7 +23,8 @@ ..\..\..\ true - + + @@ -109,9 +110,6 @@ ..\packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.RegistrationByConvention.dll - - False - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll True @@ -378,6 +376,7 @@ + @@ -1015,6 +1014,12 @@ + + + + + + @@ -7999,6 +8004,13 @@ + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs new file mode 100644 index 000000000..9a1210318 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomDetailMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-12 15:47 + /// 描 述:考试课程表 + /// + public class Exam_ExamRoomDetailMap : EntityTypeConfiguration + { + public Exam_ExamRoomDetailMap() + { + #region 表、主键 + //表 + this.ToTable("Exam_ExamRoomDetail"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuScoreOfPreviousMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuScoreOfPreviousMap.cs new file mode 100644 index 000000000..059a405f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuScoreOfPreviousMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public class StuScoreOfPreviousMap : EntityTypeConfiguration + { + public StuScoreOfPreviousMap() + { + #region 表、主键 + //表 + this.ToTable("STUSCOREOFPREVIOUS"); + //主键 + this.HasKey(t => t.ScoreId); + #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 87f819316..d68d10840 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 @@ -85,6 +85,7 @@ + @@ -110,6 +111,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs index 9d6e2717c..62212fffb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs @@ -53,6 +53,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 考场 + /// + /// + public List GetClassRoomTree(string AcademicYearNo, string Semester) + { + try + { + var list = exam_ArrangeExamTermNewService.GetClassRoomTree(AcademicYearNo, Semester); + List treeList = new List(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.ClassroomNo, + text = item.ClassroomName, + value = item.ClassroomNo, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "0" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetPageListForClass(Pagination pagination, string queryJson) { try @@ -72,6 +110,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable ScreeningPlan(Pagination pagination, string queryJson) + { + try + { + return exam_ArrangeExamTermNewService.ScreeningPlan(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetItemPageList(Pagination pagination, string queryJson) { @@ -91,6 +147,62 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetTeachingQualityPageList(Pagination pagination, string queryJson) + { + try + { + return exam_ArrangeExamTermNewService.GetTeachingQualityPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetLessonList(string academicYearNo, string semester, string classNo) + { + try + { + return exam_ArrangeExamTermNewService.GetLessonList(academicYearNo, semester, classNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + try + { + return exam_ArrangeExamTermNewService.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime); + } + 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_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs index 1253fa375..9c04cd506 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs @@ -1,6 +1,7 @@ using Learun.Util; using System.Data; using System.Collections.Generic; +using System; namespace Learun.Application.TwoDevelopment.EducationalAdministration { @@ -16,8 +17,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 获取数据 List GetClassTree(); + List GetClassRoomTree(string AcademicYearNo, string Semester); IEnumerable GetPageListForClass(Pagination pagination, string queryJson); + /// + /// 场次安排表 + /// + /// + /// + /// + IEnumerable ScreeningPlan(Pagination pagination, string queryJson); IEnumerable GetItemPageList(Pagination pagination, string queryJson); + IEnumerable GetTeachingQualityPageList(Pagination pagination, string queryJson); + /// + /// 教学质量监测 + /// + /// + /// + /// + /// + IEnumerable GetLessonList(string academicYearNo, string semester, string classNo); + + IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate + , string ExamTime); /// /// 获取页面显示列表数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs index 182f07d5b..d31ddf75f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs @@ -23,7 +23,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null group by ClassNo,ClassName order by ClassNo"); + return this.BaseRepository("CollegeMIS").FindList(@"select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null and ClassName is not null group by ClassNo,ClassName order by ClassNo"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 考场数据去重 + /// + /// + public IEnumerable GetClassRoomTree(string AcademicYearNo, string Semester) + { + try + { + + var sql = @" select e.ClassroomNo,e.ClassroomName from Exam_ArrangeExamTermItemNew e join ( + select ClassroomNo, ClassroomName from Exam_ExamRoom where 1 = 1 "; + if (!AcademicYearNo.IsEmpty()) + { + sql += $" and AcademicYearNo ='{AcademicYearNo}' "; + } + if (!Semester.IsEmpty()) + { + sql += $" and Semester ={Semester} "; + } + sql += @" ) a on e.ClassroomName=a.ClassroomName and e.ClassroomNo =a.ClassroomNo + group by e.ClassroomNo,e.ClassroomName"; + return this.BaseRepository("CollegeMIS").FindList(sql); } catch (Exception ex) { @@ -107,6 +143,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 场次安排 + /// + /// + /// + /// + public IEnumerable ScreeningPlan(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName,l.TeachMajorNo,e.AcademicYearNo ,e.Semester,count(*) as ClassRoomNum + from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId + left join LessonInfo l on l.LessonNo = t.LessonNo where 1=1 and t.ClassNo is not null "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( t.ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND t.ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } + strSql.Append(@"group by t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName ,l.TeachMajorNo,e.AcademicYearNo ,e.Semester "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取排考详情 /// @@ -118,7 +209,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null "); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester,s.StuCode from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId "); + strSql.Append(@" left join stuinfobasic s on s.StuNo=t.StuNo where 1=1 and t.ClassNo is not null "); var queryParam = queryJson.ToJObject(); if (!queryParam["AcademicYearNo"].IsEmpty()) { @@ -132,10 +224,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); } + if (!queryParam["LessonName"].IsEmpty()) + { + strSql.Append(" and t.LessonName like '%" + queryParam["LessonName"].ToString() + "%' "); + } if (!queryParam["ClassNo"].IsEmpty()) { strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); } + if (!queryParam["ClassName"].IsEmpty()) + { + strSql.Append(" and t.ClassName like'%" + queryParam["ClassName"].ToString() + "%' "); + } if (!queryParam["StuNo"].IsEmpty()) { strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); @@ -144,10 +244,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append(" and t.EmpName like '%" + queryParam["EmpName"].ToString() + "%' "); + } if (!queryParam["ClassRoomNo"].IsEmpty()) { strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); } + if (!queryParam["ClassRoomName"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomName like '%" + queryParam["ClassRoomName"].ToString() + "%' "); + } if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) { strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); @@ -168,6 +276,110 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取排考详情 + /// + /// + /// + /// + public IEnumerable GetTeachingQualityPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester,s.StuCode,s.DeptNo,s.MajorNo,s.StuId from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId "); + strSql.Append(@" left join stuinfobasic s on s.StuNo=t.StuNo where 1=1 and t.ClassNo is not null "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + strSql.Append(" and t.LessonName like '%" + queryParam["LessonName"].ToString() + "%' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["ClassName"].IsEmpty()) + { + strSql.Append(" and t.ClassName like'%" + queryParam["ClassName"].ToString() + "%' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append(" and t.EmpName like '%" + queryParam["EmpName"].ToString() + "%' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["ClassRoomName"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomName like '%" + queryParam["ClassRoomName"].ToString() + "%' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 课程信息【班级成绩查看】 + /// + /// + public IEnumerable GetLessonList(string academicYearNo, string semester, string classNo) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("select distinct s.LessonName as value,s.EmpNo as text from stuscore s "); + strSql.Append(" where s.AcademicYearNo='" + academicYearNo + "' and s.Semester='" + semester + "' and s.ClassNo='" + classNo + "' and s.LessonSortNo='1' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()).Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + //data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取页面显示列表数据 /// @@ -180,18 +392,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.EPIId, - t.LessonNo, - t.LessonName, - t.ExamDate, - t.ExamTime, - t.EmpNo, - t.EmpName, - t.ClassroomNo, - t.ClassroomName - "); - strSql.Append(" FROM Exam_ArrangeExamTermNew t "); + strSql.Append(@" t.*,e.AcademicYearNo,e.Semester "); + strSql.Append(" FROM Exam_ArrangeExamTermNew t join Exam_ExamPlan e on t.EPId=e.EPId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -231,6 +433,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); strSql.Append(" AND t.ClassroomName Like @ClassroomName "); } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -270,6 +476,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取排考详情 + /// + /// + /// + /// + public IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null + and e.AcademicYearNo ='" + AcademicYearNo + "' and e.Semester='" + Semester + "' and EmpNo='" + EmpNo + + "' and Classroomno= '" + ClassRoomNo + "' and LessonNo = '" + LessonNo + "' AND ExamDate >= '" + ExamDate + "' AND ExamTime <= '" + ExamTime + "' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs index 1f59b908c..d61cb0e32 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs @@ -153,6 +153,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { + var Entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + this.BaseRepository("CollegeMIS").ExecuteBySql($"update Exam_ExamRoom set isedit =1 where AcademicYearNo='{Entity.AcademicYearNo}' and Semester='{Entity.Semester}' "); this.BaseRepository("CollegeMIS").Delete(t => t.EPId == keyValue); } catch (Exception ex) @@ -349,7 +351,17 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); //排考安排考场 var planRoomData = db.FindList(x => x.EPLId == planLesson.EPLId).ToList(); - + #region 允许有空的考场 + var newclassroomno = new List(); + foreach (var item in planRoomData) + { + if (item.SeatCount != item.ActualNum) + { + newclassroomno.Add(item); + } + } + var ClassroomNoDisable = string.Join("','", newclassroomno.Select(x => x.ClassroomNo)); + #endregion //添加排考安排数据 foreach (var planRoom in planRoomData) { @@ -384,7 +396,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); item.EmpNo = planRoom.EmpNo; item.ClassroomName = planRoom.ClassroomName; item.ClassroomNo = planRoom.ClassroomNo; - item.F_SchoolId = LoginUserInfo.Get().userId; + item.F_SchoolId = LoginUserInfo.Get().companyId; item.SitNumber = sealNumArr[n].ToString().PadLeft(3, '0'); itemList.Add(item); } @@ -396,8 +408,35 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); string stuSql = $"select * from Exam_ExamStudent where ESEnabled=1 and AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; //所有考生 var stuInfoList = db.FindList(stuSql).ToList(); - + //从此获取到 同学年学期考场禁用+本次考试并且可以做编号 + var DisableNumber = db.FindList + (x => x.ECEnabled == true && x.AcademicYearNo == examPlan.AcademicYearNo && x.Semester == examPlan.Semester && ClassroomNoDisable.Contains(x.ClassRoomNo)).ToList(); + foreach (var item in DisableNumber) + { + item.ECSOrder = item.ECOrder.ToString().PadLeft(3, '0'); + } itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList(); + List newitemList = itemList.Where(x => ClassroomNoDisable.Contains(x.ClassroomNo)).ToList(); + foreach (var item in newitemList) + { + itemList.Remove(item); + } + int s = 0; + if (itemList.Count() > 0) + { + for (int i = 0; i < DisableNumber.Count(); i++) + { + for (int j = 0; j < newitemList.Count(); j++) + { + if (DisableNumber[i].ECSOrder == newitemList[j].SitNumber && DisableNumber[i].ClassRoomNo == newitemList[j].ClassroomNo) + { + itemList.Add(newitemList[j]); + s = s + 1; + } + } + } + } + var a = s; if (itemList.Count >= stuInfoList.Count()) { //随机安排座位 @@ -507,6 +546,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); entity.EPStuCount = 0; this.BaseRepository("CollegeMIS").Insert(entity); } + this.BaseRepository("CollegeMIS").ExecuteBySql($"update Exam_ExamRoom set isedit =0 where AcademicYearNo='{entity.AcademicYearNo}' and Semester='{entity.Semester}' "); } catch (Exception ex) { 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 d601e4b92..ecc1915c1 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 @@ -56,6 +56,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("EMPNAME")] public string EmpName { get; set; } + /// + /// ActualNum + /// + /// + [Column("ACTUALNUM")] + public int? ActualNum { get; set; } #endregion #region 扩展操作 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 7dec2cc0d..bb4a7bda5 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 @@ -341,8 +341,9 @@ where l.EPLId='{EPLId}'"; } //考场座位数 - int? seatCount = 0; - var roomListSql = + int? seatCount = 0; + int? ActualNum = 0; + var roomListSql = $"select * from Exam_ExamRoom where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and EREnabled=1 "; if (conflictRoom.Count() > 0) { @@ -365,16 +366,19 @@ where l.EPLId='{EPLId}'"; EPRoom.ClassroomName = room.ClassroomName; EPRoom.ClassroomNo = room.ClassroomNo; EPRoom.SeatCount = room.SeatCount; + EPRoom.ActualNum = room.ActualNum; db.Insert(EPRoom); seatCount += room.SeatCount; - if (seatCount >= examLesson.RealStuCount) + ActualNum += room.ActualNum; + room.IsEdit = false; + if (ActualNum >= examLesson.RealStuCount) { break; } } - + db.Update(examRoomList); db.ExecuteBySql( - $"update Exam_ExamPlanLesson set SeatCount='{seatCount}' where EPLId='{examLesson.EPLId}'"); + $"update Exam_ExamPlanLesson set SeatCount='{seatCount}',SeatCount='{seatCount}'ActualNum='{ActualNum}' where EPLId='{examLesson.EPLId}'"); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomBLL.cs index 5f2d6e9f3..a8c509eae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomBLL.cs @@ -166,7 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return exam_ExamRoomService.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); + return exam_ExamRoomService.Import(AcademicYearNo, Semester, SeatRows, SeatColumns); } catch (Exception ex) { @@ -200,6 +200,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void SeatEntity(string AcademicYearNo, string Semester) + { + try + { + exam_ExamRoomService.SeatEntity(AcademicYearNo, Semester); + } + 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_ExamRoom/Exam_ExamRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs index 86498a0cf..075cdb0ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs @@ -64,6 +64,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("ERENABLED")] public bool? EREnabled { get; set; } + /// + /// Isedit + /// + /// + [Column("ISEDIT")] + public bool? IsEdit { get; set; } + /// + /// 实际考试人数 + /// + [Column("ACTUALNUM")] + public int? ActualNum { get; set; } #endregion #region 扩展操作 @@ -73,6 +84,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public void Create() { this.ERId = Guid.NewGuid().ToString(); + this.IsEdit = true; } /// /// 编辑调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomIBLL.cs index 104571f48..db769c9f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomIBLL.cs @@ -52,7 +52,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns); int DeleteWhere(string AcademicYearNo, string Semester); - + void SeatEntity(string AcademicYearNo, string Semester); #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 0b12a54a3..b2b4a7fb1 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 @@ -296,8 +296,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ,[SeatColumns] ,[SeatCount] ,[EROrder] - ,[EREnabled]) -select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1 from ClassroomInfo where CheckMark=1 + ,[EREnabled] + ,[IsEdit] + ,[ActualNum] +) +select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1,1,{SeatRows}*{SeatColumns} from ClassroomInfo where CheckMark=1 and [ClassroomNo] not in (select [ClassroomNo] from Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) "; return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); @@ -325,7 +328,7 @@ select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{Seat { try { - string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; + string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and IsEdit = 'true';delete Exam_ExamRoomdetail where AcademicYearNo ='" + AcademicYearNo + "' and Semester='" + Semester + "' and EcEnabled = 1 ;"; return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } catch (Exception ex) @@ -340,6 +343,58 @@ select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{Seat } } } + + + + /// + /// 考场座位表 + /// + /// 主键 + public void SeatEntity(string AcademicYearNo, string Semester) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var intSemester = Convert.ToInt32(Semester); + var room = db.FindList().Where(x => x.AcademicYearNo == AcademicYearNo && x.Semester == intSemester).ToList(); + List entityList = new List(); + if (room.Count() > 0) + { + for (int i = 0; i < room.Count(); i++) + { + for (int j = 0; j < room[i].SeatCount; j++) + { + var entity = new Exam_ExamRoomDetailEntity(); + entity.AcademicYearNo = AcademicYearNo; + entity.Semester = intSemester; + entity.ClassRoomNo = room[i].ClassroomNo; + entity.ClassRoomName = room[i].ClassroomName; + entity.ECOrder = j + 1; + entity.ECEnabled = true; + entity.Create(); + entityList.Add(entity); + } + room[i].IsEdit = true; + room[i].ActualNum = room[i].SeatCount; + } + } + db.Insert(entityList); + db.Update(room); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs new file mode 100644 index 000000000..77b07a9b9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs @@ -0,0 +1,185 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public class Exam_ExamRoomDetailBLL : Exam_ExamRoomDetailIBLL + { + private Exam_ExamRoomDetailService exam_ExamRoomDetailService = new Exam_ExamRoomDetailService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return exam_ExamRoomDetailService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetList(string queryJson) + { + try + { + return exam_ExamRoomDetailService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetList() + { + try + { + return exam_ExamRoomDetailService.GetList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取实体数据 + /// + /// 主键 + /// + public Exam_ExamRoomDetailEntity GetEntity(string keyValue) + { + try + { + return exam_ExamRoomDetailService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + exam_ExamRoomDetailService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Exam_ExamRoomDetailEntity entity) + { + try + { + exam_ExamRoomDetailService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveSaveDetailEntity(string ClassroomNo, string AcademicYearNo, int Semester, List entity) + { + try + { + exam_ExamRoomDetailService.SaveSaveDetailEntity(ClassroomNo, AcademicYearNo, Semester, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailEntity.cs new file mode 100644 index 000000000..192621ccb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailEntity.cs @@ -0,0 +1,138 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 18:12 + /// 描 述:排考安排考场表 + /// + public class Exam_ExamRoomDetailEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("ID")] + public string ID { get; set; } + /// + /// ClassRoomNo + /// + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// ECEmpNo + /// + /// + [Column("ECEMPNO")] + public string ECEmpNo { get; set; } + /// + /// ECEmpName + /// + /// + [Column("ECEMPNAME")] + public string ECEmpName { get; set; } + /// + /// AcademicYearNo + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + /// + [Column("Semester")] + public int? Semester { get; set; } + /// + /// StuNo + /// + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// Grade + /// + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// DeptNo + /// + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// ECOrder + /// + /// + [Column("ECORDER")] + public int? ECOrder { get; set; } + /// + /// ECEnabled + /// + /// + [Column("ECENABLED")] + public bool? ECEnabled { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + /// + /// 考试日期 + /// + [NotMapped] + public DateTime? ExamDate { get; set; } + /// + /// 考试时间 + /// + [NotMapped] + public string ExamTime { get; set; } + + /// + /// ECSOrder + /// + [NotMapped] + public string ECSOrder { get; set; } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs new file mode 100644 index 000000000..540336abe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs @@ -0,0 +1,54 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public interface Exam_ExamRoomDetailIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + IEnumerable GetList(string queryJson); + IEnumerable GetList(); + /// + /// 获取实体数据 + /// + /// 主键 + /// + Exam_ExamRoomDetailEntity GetEntity(string keyValue); + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Exam_ExamRoomDetailEntity entity); + void SaveSaveDetailEntity(string ClassroomNo, string AcademicYearNo, int Semester, List entity); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs new file mode 100644 index 000000000..1e6109ebe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs @@ -0,0 +1,285 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-04-15 15:03 + /// 描 述:排考安排考场 + /// + public class Exam_ExamRoomDetailService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Exam_ExamRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EPLId"].IsEmpty()) + { + dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); + strSql.Append(" AND t.EPLId = @EPLId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Exam_ExamRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EPLId"].IsEmpty()) + { + dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); + strSql.Append(" AND t.EPLId = @EPLId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM Exam_ExamRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取Exam_ExamPlanLesson表实体数据 + /// + /// 主键 + /// + public Exam_ExamRoomDetailEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + var entity = new Exam_ExamPlanRoomEntity(); + if (keyValue.Contains(",")) + { + entity = this.BaseRepository("CollegeMIS").FindEntity((keyValue.Split(','))[0]); + + keyValue = string.Join("','", keyValue.Split(',')); + } + else + { + entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + + string sql = $"delete from Exam_ExamPlanRoom where EPRId in ('{keyValue}')"; + + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Exam_ExamRoomDetailEntity 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 SaveSaveDetailEntity(string ClassroomNo, string AcademicYearNo, int Semester, List entity) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var del = db.FindList(x => x.ClassRoomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); + foreach (var item in del) + { + db.Delete(item); + } + List enList = new List(); + if (entity.Count() > 0) + { + entity.OrderBy(x => x.ECOrder); + for (int i = 0; i < entity.Count(); i++) + { + var insertEntity = new Exam_ExamRoomDetailEntity + { + ClassRoomNo = entity[i].ClassRoomNo, + ClassRoomName = entity[i].ClassRoomName, + AcademicYearNo = AcademicYearNo, + Semester = Semester, + ECEnabled = entity[i].ECEnabled, + ECOrder = i + 1 + }; + insertEntity.Create(); + enList.Add(insertEntity); + } + } + db.Insert(enList); + //修改实际考试人数 + var Update = db.FindEntity(x => x.ClassroomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); + Update.ActualNum = enList.Where(x => x.ECEnabled == true).Count(); + db.Update(Update); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs new file mode 100644 index 000000000..5851cb792 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs @@ -0,0 +1,98 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; +using static Learun.Application.TwoDevelopment.EducationalAdministration.StuScoreOfPreviousService; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public class StuScoreOfPreviousBLL : StuScoreOfPreviousIBLL + { + private StuScoreOfPreviousService stuScoreOfPreviousService = new StuScoreOfPreviousService(); + + #region 获取数据 + + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuScoreOfPreviousService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 学年下拉框信息 + /// + /// + public IEnumerable GetAcademicYearNoData() + { + try + { + return stuScoreOfPreviousService.GetAcademicYearNoData(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + #region 拓展数据 + + /// + /// 导入 + /// + /// + /// + /// + public string StuScoreOfPreviousImport(DataTable dt, string fileId) + { + try + { + return stuScoreOfPreviousService.StuScoreOfPreviousImport(dt, fileId); + } + 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/StuScoreOfPrevious/StuScoreOfPreviousEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousEntity.cs new file mode 100644 index 000000000..5e5f54f37 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousEntity.cs @@ -0,0 +1,344 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public class StuScoreOfPreviousEntity + { + #region 实体成员 + /// + /// ScoreId + /// + /// + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("SCOREID")] + public int? ScoreId { get; set; } + /// + /// 通知书号 + /// + /// + [Column("NOTICEBOOKNO")] + public string NoticeBookNo { get; set; } + /// + /// 学号 + /// + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 学生所在系部 + /// + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 学生所在专业号 + /// + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 行政班号 + /// + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// 姓名 + /// + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// GenderNo + /// + /// + [Column("GENDERNO")] + public string GenderNo { get; set; } + /// + /// 学年度 + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// 开课系部码 + /// + /// + [Column("OPENLESSONDEPTNO")] + public string OpenLessonDeptNo { get; set; } + /// + /// 开课专业码 + /// + /// + [Column("OPENLESSONMAJORNO")] + public string OpenLessonMajorNo { get; set; } + /// + /// 课程号 + /// + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// 课程名称 + /// + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// LessonNameEn + /// + /// + [Column("LESSONNAMEEN")] + public string LessonNameEn { get; set; } + /// + /// 教学班号 + /// + /// + [Column("TEACHCLASSNO")] + public string TeachClassNo { get; set; } + /// + /// 课程类别码 + /// + /// + [Column("LESSONSORTNO")] + public string LessonSortNo { get; set; } + /// + /// 学生类别 + /// + /// + [Column("STUSORTNO")] + public string StuSortNo { get; set; } + /// + /// 年级 + /// + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 学分 + /// + /// + [Column("STUDYSCORE")] + public decimal? StudyScore { get; set; } + /// + /// 总学时 + /// + /// + [Column("TOTALSTUDYHOUR")] + public decimal? TotalStudyHour { get; set; } + /// + /// 专业属性 + /// + /// + [Column("ZYSX")] + public string zysx { get; set; } + /// + /// 考核(试)方式码(关联表BCdTestMode) + /// + /// + [Column("TESTMODENO")] + public string TestModeNo { get; set; } + /// + /// ScoreRecordStyleNo + /// + /// + [Column("SCORERECORDSTYLENO")] + public string ScoreRecordStyleNo { get; set; } + /// + /// 平时成绩 + /// + /// + [Column("ORDINARYSCORE")] + public decimal? OrdinaryScore { get; set; } + /// + /// 期中成绩 + /// + /// + [Column("TERMINSCORE")] + public decimal? TermInScore { get; set; } + /// + /// 期末成绩 学期 + /// + /// + [Column("TERMENDSCORE")] + public decimal? TermEndScore { get; set; } + /// + /// OtherScore + /// + /// + [Column("OTHERSCORE")] + public decimal? OtherScore { get; set; } + /// + /// 总评成绩 + /// + /// + [Column("SCORE")] + public decimal? Score { get; set; } + /// + /// 绩点 + /// + /// + [Column("SCOREPOINT")] + public decimal? ScorePoint { get; set; } + /// + /// 考试日期 + /// + /// + [Column("TESTDATE")] + public DateTime? TestDate { get; set; } + /// + /// 是否有效 + /// + /// + [Column("ISINEFFECT")] + public string IsInEffect { get; set; } + /// + /// 备注 + /// + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 冲突课程代码 + /// + /// + [Column("CONFLICTLESSONNO")] + public string ConflictLessonNo { get; set; } + /// + /// 是否重修成绩 + /// + /// + [Column("ISRESTUDY")] + public string IsReStudy { get; set; } + /// + /// 审查标志 + /// + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// 是否选中 + /// + /// + [Column("ISPITCHON")] + public string IsPitchOn { get; set; } + /// + /// 教师号 + /// + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 专业教学计划编码 + /// + /// + [Column("TECHPLANNO")] + public string TechPlanNo { get; set; } + /// + /// 考试性质码(关联表CdTestKind) + /// + /// + [Column("TESTKINDNO")] + public string TestKindNo { get; set; } + /// + /// 课程区别码(此编码针对同一课程编号,同一门课程、不同课时、学分的情况而加,由系统自动产生以区分此类课程) + /// + /// + [Column("PARTCODE")] + public string PartCode { get; set; } + /// + /// LessonSection + /// + /// + [Column("LESSONSECTION")] + public string LessonSection { get; set; } + /// + /// ClassRoomNo + /// + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// IsEditable + /// + /// + [Column("ISEDITABLE")] + public string IsEditable { get; set; } + /// + /// EditUserId + /// + /// + [Column("EDITUSERID")] + public string EditUserId { get; set; } + /// + /// ModifyDate + /// + /// + [Column("MODIFYDATE")] + public DateTime? ModifyDate { get; set; } + + [Column("BEGINMODIFYDATE")] + public DateTime? BeginModifyDate { get; set; } + /// + /// ModifyUserId + /// + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyUserName + /// + /// + [Column("MODIFYUSERNAME")] + public string ModifyUserName { get; set; } + /// + /// 学校主键 + /// + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + } + /// + /// 编辑调用 + /// + /// + public void Modify(int? keyValue) + { + this.ScoreId = keyValue; + } + #endregion + + + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs new file mode 100644 index 000000000..eabd8569e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs @@ -0,0 +1,44 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; +using static Learun.Application.TwoDevelopment.EducationalAdministration.StuScoreOfPreviousService; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public interface StuScoreOfPreviousIBLL + { + #region 获取数据 + + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 学年下拉框信息 + /// + /// + IEnumerable GetAcademicYearNoData(); + #endregion + + #region 拓展数据 + + /// + /// 导入 + /// + /// + /// + /// + string StuScoreOfPreviousImport(DataTable dt, string fileId); + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs new file mode 100644 index 000000000..11682a72c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs @@ -0,0 +1,357 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; +using Learun.Cache.Base; +using Learun.Cache.Factory; +using Learun.Application.Organization; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-10-16 11:02 + /// 描 述:往年成绩管理 + /// + public class StuScoreOfPreviousService : RepositoryFactory + { + private ICache cache = CacheFactory.CaChe(); + private string cacheKey = "Learun_adms_excelError_"; + #region 构造函数和属性 + + private string fieldSql; + public StuScoreOfPreviousService() + { + fieldSql = @"t.*"; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM StuScoreOfPrevious t where 1=1 "); + var queryParam = queryJson.ToJObject(); + var dp = new DynamicParameters(new { }); + if (!queryParam["keyword"].IsEmpty()) + { + strSql.Append(" and (t.stuno like @keyword or t.stuname like @keyword )"); + dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo = @AcademicYearNo "); + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester = @Semester "); + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + } + if (!queryParam["LessonSortNo"].IsEmpty()) + { + strSql.Append(" and t.LessonSortNo = @LessonSortNo "); + dp.Add("LessonSortNo", queryParam["LessonSortNo"].ToString(), DbType.String); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 学年下拉框信息 + /// + /// + public IEnumerable GetAcademicYearNoData() + { + try + { + var data = this.BaseRepository("CollegeMIS").FindList("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreOfPrevious s "); + data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + return data; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + #region 拓展数据 + + /// + /// 导入 + /// + /// + /// + /// + public string StuScoreOfPreviousImport(DataTable dt, string fileId) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + int snum = 0; + int fnum = 0; + //插入时间 + var Insertdate = DateTime.Now; + if (dt.Rows.Count > 0) + { + DataTable failDt = new DataTable(); + dt.Columns.Add("导入错误", typeof(string)); + foreach (DataColumn dc in dt.Columns) + { + failDt.Columns.Add(dc.ColumnName, dc.DataType); + } + + IEnumerable StuScoreOfPreviousHistory = db.FindList("select * from StuScoreOfPrevious"); + var StuScoreOfPreviousinsert = new List(); + + // 循环遍历导入 + foreach (DataRow dr in dt.Rows) + { + try + { + #region 必填项空验证 + if (dr["学号"].ToString().IsEmpty()) + { + throw (new Exception("学号不能为空")); + } + if (dr["学生姓名"].ToString().IsEmpty()) + { + throw (new Exception("学生姓名不能为空")); + } + if (dr["系部编号"].ToString().IsEmpty()) + { + throw (new Exception("系部编号不能为空")); + } + if (dr["专业编号"].ToString().IsEmpty()) + { + throw (new Exception("专业编号不能为空")); + } + if (dr["班级编号"].ToString().IsEmpty()) + { + throw (new Exception("班级编号不能为空")); + } + if (dr["性别"].ToString().IsEmpty()) + { + throw (new Exception("性别不能为空")); + } + if (dr["学年"].ToString().IsEmpty()) + { + throw (new Exception("学年不能为空")); + } + if (dr["学期"].ToString().IsEmpty()) + { + throw (new Exception("学期不能为空")); + } + if (dr["课程编号"].ToString().IsEmpty()) + { + throw (new Exception("课程编号不能为空")); + } + if (dr["课程名称"].ToString().IsEmpty()) + { + throw (new Exception("课程名称不能为空")); + } + if (dr["课程类型"].ToString().IsEmpty()) + { + throw (new Exception("课程类型不能为空")); + } + if (dr["年级"].ToString().IsEmpty()) + { + throw (new Exception("年级不能为空")); + } + if (dr["总成绩"].ToString().IsEmpty()) + { + throw (new Exception("总成绩不能为空")); + } + if (dr["教师编号"].ToString().IsEmpty()) + { + throw (new Exception("教师编号不能为空")); + } + if (dr["校区"].ToString().IsEmpty()) + { + throw (new Exception("校区不能为空")); + } + #endregion + + #region 选择性必填判断 + if (dr["课程类型"].ToString() == "1") + { + if (dr["开课系部编号"].ToString().IsEmpty()) + { + throw (new Exception("必修课的开课系部编号不能为空")); + } + if (dr["开课专业编号"].ToString().IsEmpty()) + { + throw (new Exception("必修课的开课专业编号不能为空")); + } + if (dr["教学班级编号"].ToString().IsEmpty()) + { + throw (new Exception("必修课的教学班级编号不能为空")); + } + } + else if (dr["课程类型"].ToString() == "2") + { + if (dr["上课节次"].ToString().IsEmpty()) + { + throw (new Exception("选修课的上课节次不能为空")); + } + if (dr["教室编号"].ToString().IsEmpty()) + { + throw (new Exception("选修课的教室编号不能为空")); + } + if (dr["教室名称"].ToString().IsEmpty()) + { + throw (new Exception("选修课的教室名称不能为空")); + } + } + + #endregion + + //基础数据 + var empinfoEntity = db.FindList($"select * from EmpInfo where EmpNo='" + dr["教师编号"].ToString().Trim() + "' and CheckMark=1 "); + var CompanyEntity = BaseRepository().FindList(x => x.F_EnabledMark == 1).ToList().FirstOrDefault(); + if (empinfoEntity.Count() <= 0) + throw (new Exception("查无此教师")); + var dataItemDetailEntity = BaseRepository().FindEntity($@"select dd.F_ItemName,dd.F_ItemValue from LR_Base_DataItem d left join LR_Base_DataItemDetail dd on d.F_ItemId=dd.F_ItemId +where d.F_ItemCode = 'usersex' and dd.F_EnabledMark = 1 and dd.F_DeleteMark = 0 and dd.F_ItemName = '{dr["性别"].ToString()}' ", null); + if (dataItemDetailEntity == null) + { + throw (new Exception("数据字典找不到对应值")); + } + + //写入要导入替换的数据 + StuScoreOfPreviousEntity stuScoreOfPreviousEntity = new StuScoreOfPreviousEntity + { + StuNo = dr["学号"].ToString(), + StuName = dr["学生姓名"].ToString(), + DeptNo = dr["系部编号"].ToString(), + MajorNo = dr["专业编号"].ToString(), + ClassNo = dr["班级编号"].ToString(), + GenderNo = dataItemDetailEntity.F_ItemValue, + AcademicYearNo = dr["学年"].ToString(), + Semester = dr["学期"].ToString(), + OpenLessonDeptNo = dr["开课系部编号"].ToString(), + OpenLessonMajorNo = dr["开课专业编号"].ToString(), + LessonNo = dr["课程编号"].ToString(), + LessonName = dr["课程名称"].ToString(), + TeachClassNo = dr["教学班级编号"].ToString(), + LessonSortNo = dr["课程类型"].ToString(), + Grade = dr["年级"].ToString(), + StudyScore = dr["学分"].ToDecimal(), + zysx = "1", + TestModeNo = "1", + ScoreRecordStyleNo = "1", + OrdinaryScore = dr["平时成绩"].ToDecimal(), + TermInScore = dr["期中成绩"].ToDecimal(), + TermEndScore = dr["期末成绩"].ToDecimal(), + OtherScore = dr["其他成绩"].ToDecimal(), + Score = dr["总成绩"].ToDecimal(), + IsInEffect = "1", + Remark = dr["备注"].ToString(), + CheckMark = "1", + IsPitchOn = "1", + EmpNo = dr["教师编号"].ToString(), + TestKindNo = "1", + LessonSection = dr["上课节次"].ToString(), + ClassRoomNo = dr["教室编号"].ToString(), + ClassRoomName = dr["教室名称"].ToString(), + IsEditable = "1", + ModifyDate = Insertdate, + ModifyUserId = LoginUserInfo.Get().userId, + ModifyUserName = LoginUserInfo.Get().realName, + F_SchoolId = CompanyEntity.F_CompanyId + }; + + #region 判断是否重复 + if (StuScoreOfPreviousHistory.Count(m => m.AcademicYearNo == stuScoreOfPreviousEntity.AcademicYearNo && m.Semester == stuScoreOfPreviousEntity.Semester + && m.LessonNo == stuScoreOfPreviousEntity.LessonNo && m.StuNo == stuScoreOfPreviousEntity.StuNo + && m.LessonSortNo == stuScoreOfPreviousEntity.LessonSortNo && m.EmpNo == stuScoreOfPreviousEntity.EmpNo + && m.F_SchoolId == stuScoreOfPreviousEntity.F_SchoolId) == 0 + && StuScoreOfPreviousinsert.Count(m => m.AcademicYearNo == stuScoreOfPreviousEntity.AcademicYearNo && m.Semester == stuScoreOfPreviousEntity.Semester + && m.LessonNo == stuScoreOfPreviousEntity.LessonNo && m.StuNo == stuScoreOfPreviousEntity.StuNo + && m.LessonSortNo == stuScoreOfPreviousEntity.LessonSortNo && m.EmpNo == stuScoreOfPreviousEntity.EmpNo + && m.F_SchoolId == stuScoreOfPreviousEntity.F_SchoolId) == 0) + { + StuScoreOfPreviousinsert.Add(stuScoreOfPreviousEntity); + snum++; + } + else + { + throw (new Exception("当前数据重复")); + } + #endregion + } + catch (Exception ex) + { + fnum++; + dr["导入错误"] = ex.Message; + failDt.Rows.Add(dr.ItemArray); + } + } + //执行导入 + db.Insert(StuScoreOfPreviousinsert); + db.Commit(); + if (failDt.Rows.Count > 0) + { + string errordt = failDt.ToJson(); + cache.Write(cacheKey + fileId, errordt, CacheId.excel); + } + } + return snum + "|" + fnum; + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 8ed737ba9..79af3f518 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 @@ -183,6 +183,10 @@ + + + + @@ -289,6 +293,10 @@ + + + +