Browse Source

考务管理

临城职教中职
zhangli 2 years ago
parent
commit
6e02257bfd
100 changed files with 9595 additions and 0 deletions
  1. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.cshtml
  2. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js
  3. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.cshtml
  4. +101
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js
  5. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.cshtml
  6. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js
  7. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.cshtml
  8. +98
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js
  9. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml
  10. +132
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js
  11. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml
  12. +134
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js
  13. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml
  14. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js
  15. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.cshtml
  16. +106
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.js
  17. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml
  18. +77
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js
  19. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml
  20. +281
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js
  21. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.cshtml
  22. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js
  23. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml
  24. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js
  25. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml
  26. +251
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.js
  27. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.cshtml
  28. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js
  29. +85
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml
  30. +355
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
  31. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
  32. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js
  33. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml
  34. +137
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
  35. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml
  36. +87
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js
  37. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml
  38. +186
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js
  39. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.cshtml
  40. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js
  41. +84
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
  42. +295
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
  43. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.cshtml
  44. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js
  45. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.cshtml
  46. +80
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js
  47. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml
  48. +196
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js
  49. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.cshtml
  50. +101
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js
  51. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.cshtml
  52. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js
  53. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.cshtml
  54. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js
  55. +63
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml
  56. +218
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js
  57. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.cshtml
  58. +92
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js
  59. +40
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.cshtml
  60. +146
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js
  61. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.cshtml
  62. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js
  63. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.cshtml
  64. +83
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js
  65. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml
  66. +219
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js
  67. +66
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  68. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ArrangeExamTermItemNewMap.cs
  69. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ArrangeExamTermNewMap.cs
  70. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamLessonMap.cs
  71. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanClassMap.cs
  72. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.cs
  73. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanMap.cs
  74. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomMap.cs
  75. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanTimeMap.cs
  76. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamRoomMap.cs
  77. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamStudent.cs
  78. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamTeacherTimeMap.cs
  79. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_InvigilateTeacherMap.cs
  80. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  81. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewBLL.cs
  82. +129
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs
  83. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewIBLL.cs
  84. +200
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewService.cs
  85. +95
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs
  86. +198
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs
  87. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs
  88. +336
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs
  89. +225
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs
  90. +101
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs
  91. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs
  92. +319
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs
  93. +269
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs
  94. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanEntity.cs
  95. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs
  96. +580
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs
  97. +207
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs
  98. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassEntity.cs
  99. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs
  100. +396
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.cshtml View File

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "考场安排明细";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">课程编号</div>
<input id="LessonNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">课程名称</div>
<input id="LessonName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">考试日期</div>
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">考试时间</div>
<input id="ExamTime" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">监考老师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">监考老师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">座位号</div>
<input id="SitNumber" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">学生编号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" >
<div class="lr-form-item-title">学生姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js")

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js View File

@@ -0,0 +1,50 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-22 16:51
* 描 述:考场安排明细
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.cshtml View File

@@ -0,0 +1,68 @@
@{
ViewBag.Title = "考场安排明细";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">课程编号</div>
<input id="LessonNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">课程名称</div>
<input id="LessonName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">监考老师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">监考老师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生编号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考试日期</div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js")

+ 101
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js View File

@@ -0,0 +1,101 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-22 16:51
* 描 述:考场安排明细
*/
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();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPIId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPIId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetPageList',
headData: [
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"},
{ label: "课程名称", name: "LessonName", width: 100, align: "left"},
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"},
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"},
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"},
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"},
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"},
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"},
{ label: "座位号", name: "SitNumber", width: 100, align: "left"},
{ label: "学生编号", name: "StuNo", width: 100, align: "left"},
{ label: "学生姓名", name: "StuName", width: 100, align: "left"},
],
mainId:'EPIId',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "排考安排";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">课程编号</div>
<input id="LessonNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">课程名称</div>
<input id="LessonName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">考试日期</div>
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">考试时间</div>
<input id="ExamTime" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">监考老师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">监考老师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" >
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js")

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js View File

@@ -0,0 +1,50 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-22 16:00
* 描 述:排考安排
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.cshtml View File

@@ -0,0 +1,60 @@
@{
ViewBag.Title = "排考安排";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考试日期</div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程编号</div>
<input id="LessonNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程名称</div>
<input id="LessonName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">监考老师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">监考老师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js")

+ 98
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js View File

@@ -0,0 +1,98 @@
/* * 版 本 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 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();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPIId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPIId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList',
headData: [
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"},
{ label: "课程名称", name: "LessonName", width: 100, align: "left"},
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"},
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"},
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"},
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"},
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"},
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"},
],
mainId:'EPIId',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml View File

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "排考2021新";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">班级信息</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">班级信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="datesearch" class="datetime"></div>
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js")

+ 132
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js View File

@@ -0,0 +1,132 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-12-08 12:19
* 描 述:排考2021新
*/
var selectedRow;
var refreshGirdData;

var bootstrap = function ($, learun) {
"use strict";
var datebegin = '';
var dateend = '';
var ClassNo = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree',
nodeClick: function (item) {
ClassNo = item.id;
page.search({ ClassNo: item.id });
}
});
$('.datetime').each(function () {
$(this).lrdate({
dfdata: [
{ name: '清空', begin: function () { return '' }, end: function () { return '' } },
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '0',
selectfn: function (begin, end) {
datebegin = begin;
dateend = end;
}
});
});
// 查询
$('#btn_Search').on('click', function () {
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
});
//课程
//$('#LessonNo').lrselect({
// placeholder: "请选择课程",
// allowSearch: true,
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo',
// value: 'value',
// text: 'text'
//});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' });
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' });
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' });
},
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageListForClass',
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: 'ExamTime', width: 120, align: "left" },
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" },
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" },
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" },
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" },
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" },
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" },
{ label: '班级人数', name: 'ClassStuNum', width: 60, align: "left" },
{ label: '学号范围', name: 'StuNoRange', width: 200, align: "left" }
],
mainId: 'AETId',
sidx: 'examdate,examtime,lessonno,classroomname ',
sord:'asc',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = datebegin;
param.EndTime = dateend;
//console.log(param);
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml View File

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "排考2021新";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">班级信息</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">班级信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div>
</div>
<div class="lr-layout-tool-item">
<div id="datesearch" class="datetime"></div>
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js")

+ 134
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js View File

@@ -0,0 +1,134 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-12-08 12:19
* 描 述:排考2021新
*/
var selectedRow;
var refreshGirdData;

var bootstrap = function ($, learun) {
"use strict";
var datebegin = '';
var dateend = '';
var ClassNo = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree',
nodeClick: function (item) {
ClassNo = item.id;
page.search({ ClassNo: item.id });
}
});
$('.datetime').each(function () {
$(this).lrdate({
dfdata: [
{ name: '清空', begin: function () { return '' }, end: function () { return '' } },
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '0',
selectfn: function (begin, end) {
datebegin = begin;
dateend = end;
}
});
});
// 查询
$('#btn_Search').on('click', function () {
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
});
//课程
//$('#LessonNo').lrselect({
// placeholder: "请选择课程",
// allowSearch: true,
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo',
// value: 'value',
// text: 'text'
//});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' });
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' });
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' });
},
initGird: function () {
$('#gridtable').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: '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" },
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" },
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" },
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" },
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" },
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" },
{ label: '学生编号', name: 'StuNo', width: 100, align: "left" },
{ label: '学生姓名', name: 'StuName', width: 200, align: "left" },
{ label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" }
],
mainId: 'AETId',
sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = datebegin;
param.EndTime = dateend;
console.log(param);
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.cshtml View File

@@ -0,0 +1,43 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
@*<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">系<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">年级<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">课程编号<font face="宋体">*</font></div>
<input id="LessonNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">课程名称<font face="宋体">*</font></div>
<input id="LessonName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">排序号</div>
<input id="ELOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="ELEnabled" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Form.js View File

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#DeptNo').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
value: 'deptno',
text: 'deptname',
maxHeight: 200,
select: function(item) {
var NDeptNo = $("#DeptNo").lrselectGet();
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" },
value: "majorno",
text: "majorname",
maxHeight: 200
});
} else {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " },
value: "majorno",
text: "majorname",
maxHeight: 200
});
}
}
});
$("#MajorNo").lrselect();

$('#ELEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.cshtml View File

@@ -0,0 +1,11 @@
@{
ViewBag.Title = "设置考试时长";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">考试时长(分钟)<font face="宋体">*</font></div>
<input id="ExamTime" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.js")

+ 106
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormExamTime.js View File

@@ -0,0 +1,106 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#DeptNo').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
value: 'deptno',
text: 'deptname',
maxHeight: 200,
select: function (item) {
var NDeptNo = $("#DeptNo").lrselectGet();
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" },
value: "majorno",
text: "majorname",
maxHeight: 200
});
} else {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " },
value: "majorno",
text: "majorname",
maxHeight: 200
});
}
}
});
$("#MajorNo").lrselect();

$('#ELEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveExamTime?keyValue=' + keyValue,
{ ExamTime: $('#ExamTime').val() }, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.cshtml View File

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" id="ExamTimeDiv" >
<div class="lr-form-item-title">考试时长(分钟)</div>
<input id="ExamTime" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js")

+ 77
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js View File

@@ -0,0 +1,77 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});

},
initData: function () {
if (type == 1) {
$('#ExamTimeDiv').attr("style", "display:block;");
} else {
$('#ExamTimeDiv').attr("style", "display:none;");
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
ExamTime: $('#ExamTime').val()
};
//从开课计划导入
if (type == 1) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Import', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
} else if (type == 2) {
//按条件清空数据
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteWhere', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
}
};
page.init();
}

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml View File

@@ -0,0 +1,57 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">课程编号</div>
<input id="LessonNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">课程名称</div>
<input id="LessonName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>*@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>

@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_editExamTime" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;设置考试时长</a>
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;从开课计划导入</a>
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;按条件清空数据</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js")

+ 281
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js View File

@@ -0,0 +1,281 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return false;
}
if (learun.checkrow(keyValue)) {
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled');
if (ELEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录已启用!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 设置考试时长
$('#lr_editExamTime').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (learun.checkrow(keyValue)) {
//var ELEnabled = $('#gridtable').jfGridValue('ELEnabled');
//if (ELEnabled.indexOf('true') != -1) {
// learun.alert.warning("选中记录已启用!");
// return;
//}
learun.layerForm({
id: 'formtime',
title: '设置考试时长',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormExamTime?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});

// 导入
$('#lr_importByBasic').on('click', function () {
learun.layerForm({
id: 'form_import',
title: '导入',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=1',
width: 500,
height: 300,
btn: ['一键导入', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});

// 按条件清空数据
$('#lr_emptyWhere').on('click', function () {
learun.layerForm({
id: 'form_empty',
title: '清空数据',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=2',
width: 500,
height: 300,
btn: ['清空', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (learun.checkrow(keyValue)) {
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled');
if (ELEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (learun.checkrow(keyValue)) {
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled');
if (ELEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认启用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Lock', { keyValue: keyValue, ELEnabled: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ELId');
if (learun.checkrow(keyValue)) {
var ELEnabled = $('#gridtable').jfGridValue('ELEnabled');
if (ELEnabled.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已停用项目!");
return;
}
learun.layerConfirm('是否确认停用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Lock', { keyValue: keyValue, ELEnabled: 0 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, 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: "Grade", width: 50, align: "left" },
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left" },
{
label: "考试时长", name: "ExamTime", width: 150, align: "left",
formatter: function (cellvalue) {
if (cellvalue) {
return cellvalue + '分钟';
} else {
return "";
}
}
},
{
label: "课程类型", name: "LessonTypeId", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType',
key: value,
keyId: 'ltid',
callback: function (_data) {
callback(_data['lessontypename']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 150, 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: "ELOrder", width: 100, align: "left" },
{
label: "是否启用", name: "ELEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'ELId',
isMultiselect: true,
isPage: true,
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc,LessonNo asc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.cshtml View File

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan">
<div class="lr-form-item-title">考试类型</div>
<div id="PlanType"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js")

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/ClearForm.js View File

@@ -0,0 +1,58 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#PlanType').lrDataItemSelect({ code: 'StudentType' });
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
PlanType: $('#PlanType').lrselectGet()
};
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearTable', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "考试记录表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">排考名称<font face="宋体">*</font></div>
<input id="PlanName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">排考类型<font face="宋体">*</font></div>
<div id="PlanType" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">排考编号<font face="宋体">*</font></div>
<input id="PlanCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">是否随机座位<font face="宋体">*</font></div>
<div id="EPRandom" isvalid="yes" checkexpession="NotNull" ></div>
</div>
@*<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">是否生成<font face="宋体">*</font></div>
<div id="EPGenarate" isvalid="yes" checkexpession="NotNull" ></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" >
<div class="lr-form-item-title">排序号<font face="宋体">*</font></div>
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js")

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js View File

@@ -0,0 +1,68 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-14 18:12
* 描 述:考试记录表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#PlanType').lrDataItemSelect({ code: 'StudentType' });
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml View File

@@ -0,0 +1,22 @@
@{
ViewBag.Title = "考试记录表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
.child_delete {
padding: 6px 9px;
}
#form {
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 500px;
border: 0px solid red;
}
</style>
<div class="lr-form-wrap" id="form">
<a id="lr_add" class="btn" style="position: relative;"><i class="fa fa-plus"></i>&nbsp;</a>
<div id="content1">
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.js")

+ 251
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.js View File

@@ -0,0 +1,251 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-14 18:12
* 描 述:考试记录表
*/
var acceptClick;
var keyValue = request('keyValue');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
page.addcontent();
},
bind: function () {
// 新增
$('#lr_add').on('click', function () {
page.addcontent();
});
// 删除
$('#form').on('click',
'.child_delete',
function () {
var id = $(this).attr("id");
//删除当前行
$('#' + id).remove();
arr.forEach(item => {
if (item.iid == id) {
//如果存在删除
removeByValue(arr, 'iid', id);
}
});

////重新排序并显示
//arr.sort(sortBy("Sort"));
//page.refreshRes();
});

////失去焦点,重新排序并显示
//$('#form').on('blur',
// '.sort',
// function () {
// var id = $(this)[0].id;
// var parId = id.replace('Sort', '');
// arr.forEach(m => {
// if (m.iid == parId) {
// return m.Sort = $('#' + id).val();
// }
// });
// arr.sort(sortBy("Sort"));
// page.refreshRes();
// });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPlanTimeList?EPId=' + keyValue, function (data) {
$('#content1').html('');
var html = '';
if (data && data.length > 0) {
for (var i = 0; i < data.length; i++) {
var id = data[i].Id;
var ExamDate = learun.formatDate(data[i].ExamDate,'yyyy-MM-dd') ;

var html = '';
html += '<div id="' + id + '">';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>课程类型<font face="宋体">*</font></div>';
html += '<div id="ExamType' + id + '" isvalid="yes" checkexpession="NotNull"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div>';
html += '<input id="ExamDate' + id + '" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:\'yyyy-MM-dd\',onpicked: function () { $(\'#ExamDate\').trigger(\'change\'); } })" value="' + ExamDate + '" />';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>';
html +=
'<input id="ExamTimeStart' + id + '" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00" value="' + data[i].ExamTimeStart + '" />';
html += '</div>';

html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>';
html +=
'<input id="ExamTimeEnd' + id + '" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00" value="' + data[i].ExamTimeEnd + '" />';
html += '</div>';
html += '<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '</div>';
//html += '<div id="' + id + '">';
//html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
//html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>计算项目<font face="宋体">*</font></div>';
//html += '<div id="pro' + id + '" class="project" isvalid="yes" checkexpession="NotNull"></div>';
//html += '</div>';
//html += '<div class="col-xs-6 lr-form-item" data-table="FormulaChild">';
//html += '<div class="lr-form-item-title">顺序<font face="宋体">*</font></div>';
//html += '<input id="Sort' + id + '" type="number" class="form-control sort" isvalid="yes" checkexpession="NotNull" value="' + data[i].Sort + '"/>';
//html += '</div>';
//html += '</div>';

$('#content1').append(html);

$('#ExamType' + id).lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList',
param: { itemCode: 'ExamLessonType' },
value: 'F_ItemValue',
text: 'F_ItemName',
select:
function (item) {
if (item) {
var id = $(this).attr('id');
var parId = id.replace('ExamType', '');
arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
});
arr.push({ iid: parId});

//arr.sort(sortBy("Sort"));
//page.refreshRes();

}
}
});
$('#ExamType' + id).lrselectSet(data[i].ExamType);
}

} else {
page.addcontent();
}
//console.log('arr', arr);
});
}
},
addcontent: function () {
var id = learun.newGuid();
var html = '';
html += '<div id="' + id + '">';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>课程类型<font face="宋体">*</font></div>';
html += '<div id="ExamType' + id + '" isvalid="yes" checkexpession="NotNull"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div>';
html += '<input id="ExamDate' + id + '" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:\'yyyy-MM-dd\',onpicked: function () { $(\'#ExamDate\').trigger(\'change\'); } })" />';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>';
html +=
'<input id="ExamTimeStart' + id + '" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00" />';
html += '</div>';

html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>';
html +=
'<input id="ExamTimeEnd' + id + '" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00" />';
html += '</div>';
html += '<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanTime">';
html += '</div>';

//html += '<div class="lr-form-item-title"><a id="' + id + '" class="btn child_delete"><i class="fa fa-trash-o"></i>&nbsp;</a>计算项目<font face="宋体">*</font></div>';
//html += '<div id="pro' + id + '" class="project" isvalid="yes" checkexpession="NotNull"></div>';

//html += '</div>';
//html += '<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanTime">';
//html += '<div class="lr-form-item-title">顺序<font face="宋体">*</font></div>';
//html += '<input id="Sort' + id + '" type="number" class="form-control sort" isvalid="yes" checkexpession="NotNull" />';

$('#content1').append(html);
$('#ExamType' + id).lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList',
param: { itemCode: 'ExamLessonType' },
value: 'F_ItemValue',
text: 'F_ItemName',
select:
function (item) {
if (item) {
var id = $(this).attr('id');
var parId = id.replace('ExamType', '');
arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
});
arr.push({ iid: parId, ExamType: $('#ExamType' + parId).val(), ExamDate: $('#ExamDate' + parId).val(), ExamTimeStart: $('#ExamTimeStart' + parId).val(), ExamTimeEnd: $('#ExamTimeEnd' + parId).val() });

//arr.sort(sortBy("Sort"));
//page.refreshRes();
}
}
});
},
refreshRes: function () {
////页面显示公式结果
//var text = '';
//arr.forEach(m => {
// text += m.ProjectName;
//});
//$('#result').html(text);
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var data = [];
arr.forEach(function (item, index, array) {
data.push({Id:learun.newGuid(),EPId:keyValue, ExamType: $('#ExamType' + item.iid).lrselectGet(), ExamDate: $('#ExamDate' + item.iid).val(), ExamTimeStart: $('#ExamTimeStart' + item.iid).val(), ExamTimeEnd: $('#ExamTimeEnd' + item.iid).val() });
});
// console.log('data', data);
if (data.length == 0) {
return learun.alert.warning('请安排考试时间!');
}
var postData = {
//mainEntity: strEntity,
list: data
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/SavePlanTime?EPId=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
//删除数组元素
function removeByValue(arr, attr, value) {
var index = 0;
for (var i in arr) {
if (arr[i][attr] == value) {
index = i;
break;
}
}
arr.splice(index, 1);
}

//数组排序
function sortBy(props) {
return function (a, b) {
return a[props] - b[props];
}
}
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.cshtml View File

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan">
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div>
<div id="PlanType" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js")

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/GenerateForm.js View File

@@ -0,0 +1,69 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#PlanType').lrDataItemSelect({ code: 'StudentType' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
PlanType: $('#PlanType').lrselectGet()
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GenerateForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 85
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.cshtml View File

@@ -0,0 +1,85 @@
@{
ViewBag.Title = "考试记录表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">排考名称</div>
<input id="PlanName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">排考类型</div>
<div id="PlanType"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">排考编号</div>
<input id="PlanCode" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">生成座位</div>
<div id="EPRandom"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">是否生成</div>
<div id="EPGenarate"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_examtime" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;安排时间</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 生成排考名单</a>
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 清除排考名单</a>
<a id="lr_cleardata" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 清除排考记录</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_teacherTimeManage" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 老师时间管理</a>
</div>
<div class="btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-reorder"></i>&nbsp;<span class="lrlt">更多</span><span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<li id="lr_planks"><a><i></i>&nbsp;<span class="lrlt">安排考试</span></a></li>
<li id="lr_examlesson"><a><i></i>&nbsp;<span class="lrlt">一键安排考试课程</span></a></li>
<li id="lr_examlessontime"><a><i></i>&nbsp;<span class="lrlt">自动生成课程排考时间</span></a></li>
<li id="lr_examclass"><a><i></i>&nbsp;<span class="lrlt">一键安排班级</span></a></li>
<li id="lr_examroom"><a><i></i>&nbsp;<span class="lrlt">一键安排考场</span></a></li>
<li id="lr_examteacher"><a><i></i>&nbsp;<span class="lrlt">一键安排监考老师</span></a></li>
<li id="lr_checkAll"><a><i></i>&nbsp;<span class="lrlt">一键审核所有考试课程</span></a></li>
</ul>
</div>

</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js")

+ 355
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js View File

@@ -0,0 +1,355 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-14 18:12
* 描 述:考试记录表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#PlanType').lrDataItemSelect({ code: 'StudentType' });
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
//是否生成
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("已生成排考名单,不可编辑!");
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
//是否生成
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("已生成排考名单,不可删除!");
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  生成排考名单
$('#lr_generate').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认生成排考名单!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Generate', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  清除排考名单
$('#lr_cleargenerate').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认清除排考名单!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//清除排考记录
$('#lr_cleardata').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认清除所有排考记录!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 2 }, function () {
refreshGirdData();
});
}
});
}
});

// 安排时间
$('#lr_examtime').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerForm({
id: 'formtime',
title: '安排时间',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/FormTime?keyValue=' + keyValue,
width: 850,
height: 550,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});

}
});
//  安排考试
$('#lr_planks').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
var PlanName = $('#gridtable').jfGridValue('PlanName');
if (learun.checkrow(keyValue))
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.frameTab.open({
F_ModuleId: keyValue,
F_Icon: 'fa magic',
F_FullName: PlanName + '--安排考试',
F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue
});
});
//一键安排课程
$('#lr_examlesson').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排课程!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanLessonByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//一键安排班级
$('#lr_examclass').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排班级!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanClassByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//一键安排考场
$('#lr_examroom').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排考场!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanRoomByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//自动生成排考时间
$('#lr_examlessontime').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认生成排考时间!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanLessonTimeByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//一键安排监考老师
$('#lr_examteacher').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排监考老师!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanTeacherByEPId', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//一键审核所有考试课程
$('#lr_checkAll').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认审核所有考试课程!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/CheckAllPlanLesson', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//老师时间管理
$('#lr_teacherTimeManage').on('click', function () {
learun.layerForm({
id: 'form_teacherTimeManage',
title: '老师时间管理',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Index',
width: 1000,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});

},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "排考名称", name: "PlanName", width: 300, align: "left" },
{
label: "排考类型", name: "PlanType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StudentType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "排考编号", name: "PlanCode", width: 200, align: "left" },
{ label: "排考总人数", name: "EPStuCount", width: 100, align: "left" },
{
label: "是否随机座位", name: "EPRandom", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "是" : "否";
}
},
{
label: "是否生成", name: "EPGenarate", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "排序号", name: "EPOrder", width: 100, align: "left", },
],
mainId: 'EPId',
isPage: true,
sidx: "EPOrder asc "
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml View File

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "排考安排课程";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="lr-form-item-title">考试时间<font face="宋体">*</font></div>
<div id="ExamDateSel" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div>
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" style="display: none;">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js")

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js View File

@@ -0,0 +1,69 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-15 15:03
* 描 述:排考安排课程
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ExamDateSel').lrselect({
placeholder: "请选择考试时间",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetExamDateSel?EPLId='+keyValue,
value: 'edate',
text: 'edate',
select: function(item) {
if (item) {
$('#ExamDate').val(item.ExamDate);
$('#ExamTimeStart').val(item.ExamTimeStart);
$('#ExamTimeEnd').val(item.ExamTimeEnd);
}
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
if (!!data[id] && !!data[id].ExamDate) {
var edate=learun.formatDate(data[id].ExamDate,'yyyy-MM-dd')+" "+data[id].ExamTimeStart+'-'+data[id].ExamTimeEnd;
$('#ExamDateSel').lrselectSet(edate);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml View File

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "添加排考班级";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级名称</div>
<input id="ClassName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级编号</div>
<input id="ClassNo" type="text" class="form-control" />
</div>
@*<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>*@
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js")

+ 137
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js View File

@@ -0,0 +1,137 @@

var refreshGirdData;
var acceptClick;
//考试安排课程表Id
var EPLId = request('EPLId');
var EPId = request('EPId');
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);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetClassInfoPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
//{
// label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
// key: row.ClassNo,
// keyId: 'classno',
// callback: function (_data) {
// callback(_data['classname']);
// }
// });
// }
//},
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "学生人数", name: "StuNum", width: 80, align: "left" },
//{
// label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
// key: value,
// keyId: 'f_encode',
// callback: function (_data) {
// callback(_data['f_realname']);
// }
// });
// }
//},
//{
// label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
// key: value,
// keyId: 'f_encode',
// callback: function (_data) {
// callback(_data['f_realname']);
// }
// });
// }
//},
],
mainId: 'ESId',
isPage: true,
isMultiselect: true,
sidx: 'ClassNo',
sord: 'ASC'
});
page.search();
},
search: function (param) {
param = param || {};
//考试安排课程表Id
param.EPLId = EPLId;
param.EPId = EPId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack,i) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
if (selectedRow.length == 0) {
return learun.alert.warning("请选择班级!");
}
var list = [];
$.each(selectedRow,
function (i, item) {
var name = '';
if (!!item.ClassNo) {
learun.clientdata.getAsync('custmerData',
{
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: item.ClassNo,
keyId: 'classno',
callback: function (_data) {
name = _data['classname'];
}
});
}

var entity = {
ClassName: name,
ClassNo: item.ClassNo,
ClassStuNum: item.StuNum,
EPCId: learun.newGuid(),
EPLId: EPLId
}
list.push(entity);

});
var postData = {};
postData.strEntity = JSON.stringify(list);
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, postData, function (res) {
//console.log(res);
// 保存成功后才回调
if (!!callBack) {
callBack(res, '', i);
}
});
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml View File

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "添加排考考场";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js")

+ 87
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js View File

@@ -0,0 +1,87 @@

var refreshGirdData;
var acceptClick;
//考试安排课程表Id
var EPLId = request('EPLId');
var EPId = request('EPId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ 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: "EREnabled", width: 100, align: "left",
// formatter: function (cellvalue) {
// return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
// }
//},
],
mainId: 'ERId',
isPage: true,
//isMultiselect: true,

});
page.search();
},
search: function (param) {
param = param || {};
//考试安排课程表Id
param.EPLId = EPLId;
param.SqlParameter = " and t.EREnabled=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
if (!!selectedRow) {
learun.layerClose(window.name);
callBack(selectedRow);
} else {
return learun.alert.warning("请选择考场!");
}
};
page.init();
}

+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml View File

@@ -0,0 +1,28 @@
@{
ViewBag.Title = "添加排考考场";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom">
<div class="lr-form-item-title">考场名称<font face="宋体">*</font></div>
<input id="ClassroomName" type="text" readonly="readonly" class="form-control" style="width: 85%;" />
<button class="btn btn-primary" id="selectRoom" style="float: right;margin-top: -28px;margin-right: 20px;">选择考场</button>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" readonly="readonly" type="text" class="form-control">
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom">
<div class="lr-form-item-title">考场座位数</div>
<input id="SeatCount" readonly="readonly" type="text" class="form-control">
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">监考老师</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Exam_ExamPlanTeacher"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js")

+ 186
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js View File

@@ -0,0 +1,186 @@

//考试安排课程表Id
var EPLId = request('EPLId');
var EPId = request('EPId');
var keyValue = request('keyValue');
var acceptClick;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var refreshGirdData;
var refreshRoomData;
var selectedRow;
var tempdatra = new Array();
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formitem',
title: '新增明细',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormTeacher?EPLId=' + EPLId + '&EPRId=' + keyValue,
width: 860,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detaildel").on('click', function () {
var keyValue = $('#Exam_ExamPlanTeacher').jfGridValue('EmpNo');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (!!val && val.EmpNo === keyValue) {
tempdatra.splice(key, 1);
}
});
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra);
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$("#selectRoom").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formroom1',
title: '选择考场',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoom?EPLId=' + EPLId,
width: 850,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshRoomData);
}
});
});

$('#Exam_ExamPlanTeacher').jfGrid({
headData: [
{
label: '编号', name: 'EmpNo', width: 150, align: 'left'
},
{
label: '姓名', name: 'EmpName', width: 150, align: 'left'
}
],
height: 400,
mainId: 'AAIId',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(
top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormRoom?keyValue=' + keyValue,
function (data) {
tempdatra = [];
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);

} else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
if (data[id].EmpNo && (data[id].EmpNo).indexOf(',') != -1) {
var empnoArr = data[id].EmpNo.split(',');
var empnameArr = data[id].EmpName.split(',');
$.each(empnoArr, function (i, val) {
if (!!val) {
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] });
}
});
}
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
//console.log('temprow', temprow);
if (!!temprow) {
//求数组并集
//两数组连接(包括重复值)
var arr3 = tempdatra.concat(temprow);
//var result = [];
var obj = [];
//去重
tempdatra = arr3.reduce(function (prev, cur, index, arr) {
//console.log(prev, cur);
obj[cur.EmpNo] ? '' : obj[cur.EmpNo] = true && prev.push(cur);
return prev;
}, []);
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra);
}
};
refreshRoomData = function (temprow) {
// console.log('teacherRow', temprow);
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/ValidateRoom?EPLId=' + EPLId + '&ClassroomNo=' + temprow.ClassroomNo, function (res) {

if (res.data == true) {
return learun.alert.warning("考场不可重复选择!");
} else {
$("#ClassroomName").val(temprow.ClassroomName);
$('#ClassroomNo').val(temprow.ClassroomNo);
$('#SeatCount').val(temprow.SeatCount);
}
});
};
// 验证数据是否填写完整
validForm = function () {
if (!$('.lr-form-wrap').lrValidform()) {
return false;
}
var ClassroomName = $('#ClassroomName').val();
if (!ClassroomName) {
learun.alert.warning("请选择考场!");
return false;
}
var datas = $('#Exam_ExamPlanTeacher').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("请新增监考老师!");
return false;
}
return true;
};
// 保存数据
acceptClick = function (callBack, i) {
var bool = validForm();
if (bool) {
var postData = {};
var formData = $('[data-table="Exam_ExamPlanRoom"]').lrGetFormData();
if (!formData.ClassroomName) {
return learun.alert.warning("请选择考场!");
}
formData.EPLId = EPLId;
postData.strEntity = JSON.stringify(formData);
postData.Exam_ExamPlanTeacherList = JSON.stringify($('#Exam_ExamPlanTeacher').jfGridGet('rowdatas'));

$.lrSaveForm(
top.$.rootUrl +
'/EducationalAdministration/Exam_ExamPlanLesson/SaveRoomAndTeacher?keyValue=' +
keyValue,
postData,
function (res) {

// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
}
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.cshtml View File

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "添加排考监考老师";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>*@
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js View File

@@ -0,0 +1,105 @@

var refreshGirdData;
var acceptClick;
//考试安排课程表Id
var EPLId = request('EPLId');
//安排考场表Id
var EPRId = request('EPRId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" },
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" },
{
label: "是否启用", name: "ITEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'ITId',
isPage: true,
isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
//考试安排课程表Id
param.EPLId = EPLId;
//安排考场表Id
param.EPRId = EPRId;
param.SqlParameter = " and t.ITEnabled=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
learun.layerClose(window.name);
callBack(selectedRow);
//var list = [];
//$.each(selectedRow,
// function (i, item) {
// var entity = {
// ClassroomName: item.ClassroomName,
// ClassroomNo: item.ClassroomNo,
// SeatCount: item.SeatCount,
// EPRId: learun.newGuid(),
// EPLId: EPLId
// }
// list.push(entity);

// });
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoom?EPLId=' + EPLId,
// { list: list }), function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack();
// }
// };

//if (!!callBack) {
// callBack();
//}
};
page.init();
}

+ 84
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml View File

@@ -0,0 +1,84 @@
@{
ViewBag.Title = "排考安排课程";
Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
#div_gridtable_Class {
float: left;
width: 50%;
height: 50%;
}

#div_gridtable_Room {
float: right;
width: 50%;
height: 50%;
padding-left: 10px;
}

.tbTitle {
float: left;
line-height: 32px;
color: #666;
padding-left: 15px;
}

.examTimeShow {
line-height: 60px;
font-size: 12px;
margin-right: 15px;
}
</style>
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlg ">考试课程</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlg">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<span class="examTimeShow">考试日期:<span id="examDate"></span></span>
<span class="examTimeShow"> 考试时间:<span id="examTime"></span></span>
<span id="checkspan" style="color: red;"></span>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_ExamTime" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置考试时间</a>
<a id="lr_check" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;审核</a>
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;去审</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div id="div_gridtable_Class">
<div>
<div class="tbTitle"><span>班级信息</span></div>
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes">
<a id="lr_add_Class" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_delete_Class" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
<div class="lr-layout-body" id="gridtable_Class"></div>
</div>
<div id="div_gridtable_Room">
<div class="tbTitle"><span>考场信息</span></div>
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes">
<a id="lr_add_Room" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit_Room" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete_Room" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class="lr-layout-body" id="gridtable_Room"></div>
</div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js")

+ 295
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js View File

@@ -0,0 +1,295 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-15 15:03
* 描 述:排考安排课程
*/
var refreshGirdData;
//排考记录Id
var EPId = request('EPId');
//安排课程表Id
var EPLId;
var ELCheckMark;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree?EPId=' + EPId,
nodeClick: function (item) {
//安排课程表ID(Exam_ExamPlanLesson)
EPLId = item.id;
//显示考试时间
page.show(EPLId);
page.search({ EPLId: item.id });

$('#titleinfo').html(item.text);
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//设置考试时间
$('#lr_ExamTime').on('click', function () {
if (!!EPLId) {
if (ELCheckMark == 1) {
return learun.alert.warning('该项已审核!');
}
learun.layerForm({
id: 'form',
title: '设置考试时间',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
//审核
$('#lr_check').on('click', function () {
if (!!EPLId) {
if (ELCheckMark == 1) {
return learun.alert.warning('该项已审核!');
}
learun.layerConfirm('是否确认审核!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 1 }, function () {
refreshGirdData();
});
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
//去审核
$('#lr_nocheck').on('click', function () {
if (!!EPLId) {
learun.layerConfirm('是否确认去审核!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 0 }, function () {
refreshGirdData();
});
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
//班级 新增
$('#lr_add_Class').on('click', function () {
if (!!EPLId) {
if (ELCheckMark == 1) {
return learun.alert.warning("该项已审核!");
}
learun.layerForm({
id: 'formclass',
title: '新增班级',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?EPLId=' + EPLId + '&EPId=' + EPId,
width: 850,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
// 班级删除
$('#lr_delete_Class').on('click', function () {
var keyValue = $('#gridtable_Class').jfGridValue('EPCId');
if (learun.checkrow(keyValue)) {
if (ELCheckMark == 1) {
return learun.alert.warning("该项已审核!");
}
learun.layerConfirm('是否确认删除选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteClass', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

//考场 新增
$('#lr_add_Room').on('click', function () {
if (!!EPLId) {
if (ELCheckMark == 1) {
return learun.alert.warning("该项已审核!");
}
var param = {};
param.EPId = EPId;
param.EPLId = EPLId;
//判断是否已设置考试时间
if (!$('#examDate').html() || !$('#examTime').html()) {
return learun.alert.warning("请先设置考试时间!");
}
//判断是否已新增班级
var data = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass?queryJson=' + JSON.stringify(param));

if (data.data.length > 0) {
learun.layerForm({
id: 'formteacherRoom',
title: '新增考场',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId,
width: 850,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请先添加班级!");
}

} else {
return learun.alert.warning("请选择考试课程!");
}
});

//考场 编辑
$('#lr_edit_Room').on('click', function () {
if (!!EPLId) {
if (ELCheckMark == 1) {
return learun.alert.warning("该项已审核!");
}
var keyValue = $('#gridtable_Room').jfGridValue('EPRId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formteacherRoom',
title: '编辑考场',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId + '&keyValue=' + keyValue,
width: 850,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
} else {
return learun.alert.warning("请选择考试课程!");
}
});
// 考场删除
$('#lr_delete_Room').on('click', function () {
var keyValue = $('#gridtable_Room').jfGridValue('EPRId');
if (learun.checkrow(keyValue)) {
if (ELCheckMark == 1) {
return learun.alert.warning("该项已审核!");
}
learun.layerConfirm('是否确认删除选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteRoom', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
//班级
$('#gridtable_Class').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass',
headData: [
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "班级人数", name: "ClassStuNum", width: 100, align: "left" },
],
mainId: 'EPCId',
//isPage: true,
isMultiselect: true,
sidx: 'ClassNo asc',
});
//考场
$('#gridtable_Room').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForRoom',
headData: [
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" },
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" },
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" },
{ label: "监考老师编号", name: "EmpNo", width: 150, align: "left" },
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" },
],
mainId: 'EPRId',
//isPage: true,
isMultiselect: true,
sidx: 'ClassroomNo asc',
});
page.search();
},
search: function (param) {
if (!!EPLId) {
param = param || {};
param.EPId = EPId;
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) });
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
},
//显示考试时间
show: function () {
if (!!EPLId) {
var res = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + EPLId);

var data = res.data.Exam_ExamPlanLesson;
ELCheckMark = data.ELCheckMark;
if (ELCheckMark == 1) {
$('#checkspan').html('(已审核)');
} else {
$('#checkspan').html('(未审核)');
}
if (!!data.ExamDate) {
$('#examDate').html(learun.formatDate(data.ExamDate, 'yyyy-MM-dd'));
$('#examTime').html(data.ExamTime);
} else {
$('#examDate').html('');
$('#examTime').html('');
//未设置考试时间
learun.layerConfirm('请先设置考试时间!', function (res) {
if (res) {
if (!!EPLId) {
learun.layerForm({
id: 'form',
title: '设置考试时间',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
}
});
}
}
}
};
refreshGirdData = function () {
if (!!EPLId) {
$('#gridtable_Room').jfGridSet('reload');
$('#gridtable_Class').jfGridSet('reload');
page.show();
}
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "考场表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">考场编号<font face="宋体">*</font></div>
<input id="ClassroomNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">考场名称<font face="宋体">*</font></div>
<input id="ClassroomName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">座位行数<font face="宋体">*</font></div>
<input id="SeatRows" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">座位列数<font face="宋体">*</font></div>
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">排序号</div>
<input id="EROrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="EREnabled" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js")

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Form.js View File

@@ -0,0 +1,70 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考场表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});

$('#EREnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.cshtml View File

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "考场表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item SeatClass" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">座位行数<font face="宋体">*</font></div>
<input id="SeatRows" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item SeatClass" data-table="Exam_ExamRoom">
<div class="lr-form-item-title">座位列数<font face="宋体">*</font></div>
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js")

+ 80
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js View File

@@ -0,0 +1,80 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考场表
*/
var acceptClick;
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});

},
initData: function () {
//从教室导入
if (type == 1) {
$('body').find('.SeatClass').show();
$('body').find('.SeatClass input').attr('isvalid', 'yes');
$('body').find('.SeatClass input').attr('checkexpession', 'PositiveInteger');
} else if (type == 2) {//按条件清空
$('body').find('.SeatClass input').removeAttr('isvalid');
$('body').find('.SeatClass input').removeAttr('checkexpession');
$('body').find('.SeatClass').hide();
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = $('body').lrGetFormData();

//从教室导入
if (type == 1) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Import', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
} else if (type == 2) {
//按条件清空数据
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/DeleteWhere', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
}
};
page.init();
}

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml View File

@@ -0,0 +1,55 @@
@{
ViewBag.Title = "考场表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>*@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>

</div>
<div class=" btn-group btn-group-sm">
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;从教室导入</a>
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;按条件清空数据</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js")

+ 196
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js View File

@@ -0,0 +1,196 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考场表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ERId');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return false;
}
var EREnabled = $('#gridtable').jfGridValue('EREnabled');
if (EREnabled == "true") {
learun.alert.warning("选中记录已启用!");
return false;
}
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});

// 导入
$('#lr_importByBasic').on('click', function () {
learun.layerForm({
id: 'form_import',
title: '导入',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormYearSemester?type=1',
width: 500,
height: 300,
btn: ['一键导入', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 按条件清空数据
$('#lr_emptyWhere').on('click', function () {
learun.layerForm({
id: 'form_empty',
title: '清空数据',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormYearSemester?type=2',
width: 500,
height: 300,
btn: ['清空', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ERId');
if (learun.checkrow(keyValue)) {
var EREnabled = $('#gridtable').jfGridValue('EREnabled');
if (EREnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ERId');
if (learun.checkrow(keyValue)) {
var EREnabled = $('#gridtable').jfGridValue('EREnabled');
if (EREnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认启用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Lock', { keyValue: keyValue, EREnabled: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ERId');
if (learun.checkrow(keyValue)) {
var EREnabled = $('#gridtable').jfGridValue('EREnabled');
if (EREnabled.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已停用项目!");
return;
}
learun.layerConfirm('是否确认停用选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/Lock', { keyValue: keyValue, EREnabled: 0 }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ 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: "EREnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'ERId',
isMultiselect: true,
isPage: true,
sidx: 'AcademicYearNo desc,Semester desc,EROrder asc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">学生学号<font face="宋体">*</font></div>
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div>
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div>
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">排序号</div>
<input id="ESOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div>
<div id="ESEnabled" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js")

+ 101
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js View File

@@ -0,0 +1,101 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ESType').lrDataItemSelect({ code: 'StudentType' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
$('#ESEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
//监听学号
$("#StuNo").on('blur', function () {
var StuNo = $(this).val();
if (StuNo) {
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) {
if (data) {
$("#StuNo").val(data.StuNo);
$("#StuName").val(data.StuName);
} else {
learun.alert.warning("学生不存在!");
//return false;
}
});
}
});
//监听姓名
$("#StuName").on('blur', function () {
var StuName = $(this).val().trim();
if (StuName) {
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfoBasicEntityByStuName?name=' + StuName, '', function (data) {
if (data) {
$("#StuNo").val(data.StuNo);
$("#StuName").val(data.StuName);
} else {
learun.alert.warning("学生不存在!");
return false;
}
});
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.cshtml View File

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">考试类型</div>
<div id="ESType"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js")

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js View File

@@ -0,0 +1,58 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ESType').lrDataItemSelect({ code: 'StudentType' });
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
ESType: $('#ESType').lrselectGet()
};
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ClearTable', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
};
page.init();
}

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.cshtml View File

@@ -0,0 +1,19 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent">
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div>
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js")

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js View File

@@ -0,0 +1,69 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ESType').lrDataItemSelect({ code: 'StudentType' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet(),
ESType: $('#ESType').lrselectGet()
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ImportTable?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 63
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml View File

@@ -0,0 +1,63 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学生学号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学生名称</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考试类型</div>
<div id="ESType"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>*@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;一键生成考生信息</a>
<a id="lr_clearBy" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;按条件清空学生考试信息</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js")

+ 218
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js View File

@@ -0,0 +1,218 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
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);
}, 245, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ESType').lrDataItemSelect({ code: 'StudentType' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ESId');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return false;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ESId');
if (learun.checkrow(keyValue)) {
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled');
if (ESEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//启用
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ESId');
if (learun.checkrow(keyValue)) {
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled');
if (ESEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认启用选中记录!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ESId');
if (learun.checkrow(keyValue)) {
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled');
if (ESEnabled.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已停用项目!");
return;
}
learun.layerConfirm('是否确认停用选中记录!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 0 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
// 一键生成
$('#lr_importBy').on('click', function () {
learun.layerForm({
id: 'form_import',
title: '生成考生信息',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport',
width: 500,
height: 300,
btn: ['一键生成', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 导入
$('#lr_clearBy').on('click', function () {
learun.layerForm({
id: 'form_clear',
title: '按条件清空学生考试信息',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormClear',
width: 500,
height: 300,
btn: ['确定', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: "学生编号", name: "StuNo", width: 100, align: "left" },
{ label: "学生姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{
label: "考试类型", name: "ESType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StudentType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "是否启用", name: "ESEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'ESId',
isMultiselect: true,
isPage: true,
sidx: 'AcademicYearNo desc,Semester desc',
sord: 'ASC'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.cshtml View File

@@ -0,0 +1,28 @@
@{
ViewBag.Title = "老师时间管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">时间段<font face="宋体">*</font></div>
<input id="ExamTimeStart" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: left;" data-dateFmt="yyyy-MM-dd hh:mm" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeStart').trigger('change'); } })" />
<span>&nbsp;&nbsp; —</span>
<input id="ExamTimeEnd" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: right;" data-dateFmt="yyyy-MM-dd hh:mm" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeEnd').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title">不能监考的老师<font face="宋体">*</font></div>
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime">
<div class="lr-form-item-title"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js")

+ 92
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js View File

@@ -0,0 +1,92 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-06-13 15:41
* 描 述:老师时间管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
var Semester = $('#Semester').lrselectGet();
if (!!Semester) {
$('#EmpNo').lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + Semester,
value: 'EmpNo',
text: 'EmpName'
});
}
}
}
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$('#EmpNo').lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(),
value: 'EmpNo',
text: 'EmpName'
});
}
}
});
$('#EmpNo').lrselect({
type: 'multiple',
allowSearch: true,
value: 'EmpNo',
text: 'EmpName'
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 40
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.cshtml View File

@@ -0,0 +1,40 @@
@{
ViewBag.Title = "老师时间管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js")

+ 146
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js View File

@@ -0,0 +1,146 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-06-13 15:41
* 描 述:老师时间管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{
label: "时间段", name: "ExamTimeStart", width: 300, align: "left",
formatter: function (value, row) {
return value + " - " + row.ExamTimeEnd;
}
},
{
label: "不能监考的老师", name: "EmpNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
if (value.indexOf(',') != -1) {
var name = '';
var attr = value.split(',');
for (var i = 0; i < attr.length; i++) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: attr[i],
keyId: 'empno',
callback: function (_data) {
name += _data['empname'] + ",";
if (name.indexOf(',') != -1) {
callback(name.substring(0, name.length - 1));
} else {
callback(name);
}
}
});
}
} else {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
}
}
},
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 31
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.cshtml View File

@@ -0,0 +1,31 @@
@{
ViewBag.Title = "监考老师";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">教师编号<font face="宋体">*</font></div>
<input id="EmpNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div>
<input id="EmpName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">排序号</div>
<input id="ITOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" >
<div class="lr-form-item-title">是否启用</div>
<div id="ITEnabled"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js")

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js View File

@@ -0,0 +1,69 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-14 09:50
* 描 述:监考老师
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#ITEnabled').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoBit',
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.cshtml View File

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "考试课程表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" >
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" >
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js")

+ 83
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js View File

@@ -0,0 +1,83 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-12 15:47
* 描 述:考试课程表
*/
var acceptClick;
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
//page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});

},
initData: function () {
//if (!!keyValue) {
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) {
// for (var id in data) {
// if (!!data[id].length && data[id].length > 0) {
// $('#' + id ).jfGridSet('refreshdata', data[id]);
// }
// else {
// $('[data-table="' + id + '"]').lrSetFormData(data[id]);
// }
// }
// });
//}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
AcademicYearNo: $('#AcademicYearNo').lrselectGet(),
Semester: $('#Semester').lrselectGet()
};
//导入
if (type == 1) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Import', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
} else if (type == 2) {
//按条件清空数据
learun.layerConfirm('是否确认清空!', function (res) {
if (res) {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteWhere', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
});
}
};
page.init();
}

+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml View File

@@ -0,0 +1,54 @@
@{
ViewBag.Title = "监考老师";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师编号</div>
<input id="EmpNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教师姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>*@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>
</div>
<div class=" btn-group btn-group-sm">
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;从教师信息导入</a>
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;按条件清空数据</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js")

+ 219
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js View File

@@ -0,0 +1,219 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-04-14 09:50
* 描 述:监考老师
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
},
220,
400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click',
function () {
location.reload();
});
// 新增
$('#lr_add').on('click',
function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('ITId');
if (learun.checkrow(keyValue)) {
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled');
if (ITEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录已启用!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl +
'/EducationalAdministration/Exam_InvigilateTeacher/Form?keyValue=' +
keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('ITId');
if (learun.checkrow(keyValue)) {
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled');
if (ITEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录已启用!");
return;
}
learun.layerConfirm('是否确认删除该项!',
function (res) {
if (res) {
learun.deleteForm(
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteForm',
{ keyValue: keyValue },
function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click',
function () {
$('#gridtable').jqprintTable();
});
//启用
$('#lr_lock').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('ITId');
if (learun.checkrow(keyValue)) {
var ITEnabled = $('#gridtable').jfGridValue('ITEnabled');
if (ITEnabled.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认启用选中记录!',
function (res) {
if (res) {
learun.deleteForm(
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock',
{ keyValue: keyValue, ITEnabled: 1 },
function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_unlock').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('ITId');
if (learun.checkrow(keyValue)) {
var ELEnabled = $('#gridtable').jfGridValue('ITEnabled');
if (ELEnabled.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已停用项目!");
return;
}
learun.layerConfirm('是否确认停用选中记录!',
function (res) {
if (res) {
learun.deleteForm(
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock',
{ keyValue: keyValue, ITEnabled: 0 },
function () {
refreshGirdData();
});
}
});
}
});
// 导入
$('#lr_importByBasic').on('click',
function () {
learun.layerForm({
id: 'form_import',
title: '导入',
url: top.$.rootUrl +
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=1',
width: 500,
height: 300,
btn: ['一键导入', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});

// 按条件清空数据
$('#lr_emptyWhere').on('click',
function () {
learun.layerForm({
id: 'form_empty',
title: '清空数据',
url: top.$.rootUrl +
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=2',
width: 500,
height: 300,
btn: ['清空', '关闭'],
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" },
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" },
{
label: "是否启用", name: "ITEnabled", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
],
mainId: 'ITId',
isMultiselect: true,
isPage: true,
sidx: 'AcademicYearNo desc,Semester desc,ITOrder asc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 66
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1035,6 +1035,39 @@
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\FormTime.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormClear.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" />
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\JournalSend\FormOfDC.js" />
@@ -1144,6 +1177,39 @@
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\GraduateFeeSettle.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\GraduateFileTransfer.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\GraduateReturnBooks.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\FormTime.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormClear.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ArrangeExamTermItemNewMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public class Exam_ArrangeExamTermItemNewMap : EntityTypeConfiguration<Exam_ArrangeExamTermItemNewEntity>
{
public Exam_ArrangeExamTermItemNewMap()
{
#region 表、主键
//表
this.ToTable("EXAM_ARRANGEEXAMTERMITEMNEW");
//主键
this.HasKey(t => t.EPIId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ArrangeExamTermNewMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ArrangeExamTermNewMap : EntityTypeConfiguration<Exam_ArrangeExamTermNewEntity>
{
public Exam_ArrangeExamTermNewMap()
{
#region 表、主键
//表
this.ToTable("EXAM_ARRANGEEXAMTERMNEW");
//主键
this.HasKey(t => t.EPIId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamLessonMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamLessonMap : EntityTypeConfiguration<Exam_ExamLessonEntity>
{
public Exam_ExamLessonMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMLESSON");
//主键
this.HasKey(t => t.ELId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanClassMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 18:07
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassMap : EntityTypeConfiguration<Exam_ExamPlanClassEntity>
{
public Exam_ExamPlanClassMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANCLASS");
//主键
this.HasKey(t => t.EPCId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 15:03
/// 描 述:排考安排课程
/// </summary>
public class Exam_ExamPlanLessonMap : EntityTypeConfiguration<Exam_ExamPlanLessonEntity>
{
public Exam_ExamPlanLessonMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANLESSON");
//主键
this.HasKey(t => t.EPLId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanMap : EntityTypeConfiguration<Exam_ExamPlanEntity>
{
public Exam_ExamPlanMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLAN");
//主键
this.HasKey(t => t.EPId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 18:12
/// 描 述:排考安排考场表
/// </summary>
public class Exam_ExamPlanRoomMap : EntityTypeConfiguration<Exam_ExamPlanRoomEntity>
{
public Exam_ExamPlanRoomMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANROOM");
//主键
this.HasKey(t => t.EPRId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanTimeMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanTimeMap : EntityTypeConfiguration<Exam_ExamPlanTimeEntity>
{
public Exam_ExamPlanTimeMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANTIME");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamRoomMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考场表
/// </summary>
public class Exam_ExamRoomMap : EntityTypeConfiguration<Exam_ExamRoomEntity>
{
public Exam_ExamRoomMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMROOM");
//主键
this.HasKey(t => t.ERId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamStudent.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamStudentMap : EntityTypeConfiguration<Exam_ExamStudentEntity>
{
public Exam_ExamStudentMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMSTUDENT");
//主键
this.HasKey(t => t.ESId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamTeacherTimeMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-06-13 15:41
/// 描 述:老师时间管理
/// </summary>
public class Exam_ExamTeacherTimeMap : EntityTypeConfiguration<Exam_ExamTeacherTimeEntity>
{
public Exam_ExamTeacherTimeMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMTEACHERTIME");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_InvigilateTeacherMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 09:49
/// 描 述:监考老师
/// </summary>
public class Exam_InvigilateTeacherMap : EntityTypeConfiguration<Exam_InvigilateTeacherEntity>
{
public Exam_InvigilateTeacherMap()
{
#region 表、主键
//表
this.ToTable("EXAM_INVIGILATETEACHER");
//主键
this.HasKey(t => t.ITId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -84,6 +84,18 @@
<Compile Include="EducationalAdministration\CertificateManageMap.cs" />
<Compile Include="EducationalAdministration\CertificateResultMap.cs" />
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" />
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNewMap.cs" />
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNewMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClassMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanLessonMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanTimeMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamRoomMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamStudent.cs" />
<Compile Include="EducationalAdministration\Exam_ExamTeacherTimeMap.cs" />
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" />
<Compile Include="EducationalAdministration\LeaveSchoolMap.cs" />
<Compile Include="EducationalAdministration\MealCardRunTabMap.cs" />
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" />


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewBLL.cs View File

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public class Exam_ArrangeExamTermItemNewBLL : Exam_ArrangeExamTermItemNewIBLL
{
private Exam_ArrangeExamTermItemNewService exam_ArrangeExamTermItemNewService = new Exam_ArrangeExamTermItemNewService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ArrangeExamTermItemNewService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Exam_ArrangeExamTermItemNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue)
{
try
{
return exam_ArrangeExamTermItemNewService.GetExam_ArrangeExamTermItemNewEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
exam_ArrangeExamTermItemNewService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity)
{
try
{
exam_ArrangeExamTermItemNewService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 129
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs View File

@@ -0,0 +1,129 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public class Exam_ArrangeExamTermItemNewEntity
{
#region 实体成员
/// <summary>
/// EPIId
/// </summary>
[Column("EPIID")]
public string EPIId { get; set; }
/// <summary>
/// 排考记录主表Id
/// </summary>
[Column("EPID")]
public string EPId { get; set; }
/// <summary>
/// 课程名称
/// </summary>
[Column("LESSONNAME")]
public string LessonName { get; set; }
/// <summary>
/// 课程编号
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 考试日期
/// </summary>
[Column("EXAMDATE")]
public DateTime? ExamDate { get; set; }
/// <summary>
/// 考试起止时间
/// </summary>
[Column("EXAMTIME")]
public string ExamTime { get; set; }
/// <summary>
/// 监考老师姓名
/// </summary>
[Column("EMPNAME")]
public string EmpName { get; set; }
/// <summary>
/// 监考老师编号
/// </summary>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// 考场名称
/// </summary>
[Column("CLASSROOMNAME")]
public string ClassroomName { get; set; }
/// <summary>
/// 考场编号
/// </summary>
[Column("CLASSROOMNO")]
public string ClassroomNo { get; set; }
/// <summary>
/// 班级
/// </summary>
[Column("CLASSNAME")]
public string ClassName { get; set; }
/// <summary>
/// 班级
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 校区Id
/// </summary>
[Column("F_SCHOOLID")]
public string F_SchoolId { get; set; }
/// <summary>
/// 坐位号
/// </summary>
[Column("SITNUMBER")]
public string SitNumber { get; set; }
/// <summary>
/// 学生编号
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// 学生姓名
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPIId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPIId = keyValue;
}
#endregion
#region 扩展字段
[NotMapped]
public int ClassStuNum { get; set; }
[NotMapped]
public string StuNoRange { get; set; }
[NotMapped]
public string AcademicYearNo { get; set; }
[NotMapped]
public string Semester { get; set; }

#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewIBLL.cs View File

@@ -0,0 +1,48 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public interface Exam_ArrangeExamTermItemNewIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Exam_ArrangeExamTermItemNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity);
#endregion

}
}

+ 200
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewService.cs View File

@@ -0,0 +1,200 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public class Exam_ArrangeExamTermItemNewService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
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,
t.SitNumber,
t.StuNo,
t.StuName
");
strSql.Append(" FROM Exam_ArrangeExamTermItemNew t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonNo Like @LessonNo ");
}
if (!queryParam["LessonName"].IsEmpty())
{
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonName Like @LessonName ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpNo Like @EmpNo ");
}
if (!queryParam["EmpName"].IsEmpty())
{
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpName Like @EmpName ");
}
if (!queryParam["ClassroomNo"].IsEmpty())
{
dp.Add("ClassroomNo", "%" + queryParam["ClassroomNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassroomNo Like @ClassroomNo ");
}
if (!queryParam["ClassroomName"].IsEmpty())
{
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassroomName Like @ClassroomName ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["ExamDate"].IsEmpty())
{
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String);
strSql.Append(" AND t.ExamDate = @ExamDate ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Exam_ArrangeExamTermItemNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ArrangeExamTermItemNewEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermItemNewEntity>(t=>t.EPIId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 95
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs View File

@@ -0,0 +1,95 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:00
/// 描 述:排考安排
/// </summary>
public class Exam_ArrangeExamTermNewEntity
{
#region 实体成员
/// <summary>
/// EPIId
/// </summary>
[Column("EPIID")]
public string EPIId { get; set; }
/// <summary>
/// 排考记录主表Id
/// </summary>
[Column("EPID")]
public string EPId { get; set; }
/// <summary>
/// 课程名称
/// </summary>
[Column("LESSONNAME")]
public string LessonName { get; set; }
/// <summary>
/// 课程编号
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 考试日期
/// </summary>
[Column("EXAMDATE")]
public DateTime? ExamDate { get; set; }
/// <summary>
/// 考试起止时间
/// </summary>
[Column("EXAMTIME")]
public string ExamTime { get; set; }
/// <summary>
/// 监考老师姓名
/// </summary>
[Column("EMPNAME")]
public string EmpName { get; set; }
/// <summary>
/// 监考老师编号
/// </summary>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// 考场名称
/// </summary>
[Column("CLASSROOMNAME")]
public string ClassroomName { get; set; }
/// <summary>
/// 考场编号
/// </summary>
[Column("CLASSROOMNO")]
public string ClassroomNo { get; set; }
/// <summary>
/// 校区Id
/// </summary>
[Column("F_SCHOOLID")]
public string F_SchoolId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPIId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPIId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 198
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs View File

@@ -0,0 +1,198 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:00
/// 描 述:排考安排
/// </summary>
public class Exam_ArrangeExamTermNewBLL : Exam_ArrangeExamTermNewIBLL
{
private Exam_ArrangeExamTermNewService exam_ArrangeExamTermNewService = new Exam_ArrangeExamTermNewService();

#region 获取数据

public List<TreeModel> GetClassTree()
{
try
{
var list = exam_ArrangeExamTermNewService.GetClassTree();
List<TreeModel> treeList = new List<TreeModel>();
foreach (var item in list)
{
TreeModel node = new TreeModel
{
id = item.ClassNo,
text = item.ClassName,
value = item.ClassNo,
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = "0"
};
treeList.Add(node);
}
return treeList.ToTree();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson)
{
try
{
return exam_ArrangeExamTermNewService.GetPageListForClass(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ArrangeExamTermNewService.GetItemPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ArrangeExamTermNewService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取ArrangeExamTermNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue)
{
try
{
return exam_ArrangeExamTermNewService.GetExam_ArrangeExamTermNewEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
exam_ArrangeExamTermNewService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity)
{
try
{
exam_ArrangeExamTermNewService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs View File

@@ -0,0 +1,51 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:00
/// 描 述:排考安排
/// </summary>
public interface Exam_ArrangeExamTermNewIBLL
{
#region 获取数据

List<TreeModel> GetClassTree();
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson);
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取ArrangeExamTermNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity);
#endregion

}
}

+ 336
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs View File

@@ -0,0 +1,336 @@
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:00
/// 描 述:排考安排
/// </summary>
public class Exam_ArrangeExamTermNewService : RepositoryFactory
{
#region 获取数据
public IEnumerable<ClassInfoEntity> GetClassTree()
{
try
{
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo 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<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append(@"select t.EPId,AcademicYearNo, Semester, ExamDate, ExamTime, LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName, count(StuNo) as ClassStuNum
from [dbo].[Exam_ArrangeExamTermItemNew] t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 ");
var queryParam = queryJson.ToJObject();
if (!queryParam["AcademicYearNo"].IsEmpty())
{
strSql.Append(" and AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' ");
}
if (!queryParam["Semester"].IsEmpty())
{
strSql.Append(" and Semester='" + queryParam["Semester"].ToString() + "' ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
strSql.Append(" and LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
strSql.Append(" and ClassNo='" + queryParam["ClassNo"].ToString() + "' ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
strSql.Append(" and EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' ");
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
strSql.Append(" and ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) ");
}
strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId
having count(StuNo)>0");

var list = this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), pagination);
var stulist = BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>("select * from Exam_ArrangeExamTermItemNew");
foreach (var item in list)
{
if (item.ClassStuNum > 0)
{
var stunolist = stulist.Where(x => x.EPId == item.EPId && x.ClassNo == item.ClassNo && x.ClassroomNo == item.ClassroomNo).OrderBy(x => x.StuNo);// stulist.Where(m => m.AcademicYearNo == item.AcademicYearNo && m.Semester == item.Semester
//&& m.LessonNo == item.LessonNo && m.ExamDate == item.ExamDate && m.ExamTime == item.ExamTime
//&& m.ClassRoomNo == item.ClassRoomNo && m.EmpNo == item.EmpNo && m.ClassNo == item.ClassNo).OrderBy(m => m.StuNo);
if (stunolist.Count() > 0)
{
item.StuNoRange = stunolist.First().StuNo + "~" + stunolist.Last().StuNo;
}
}
}
return list;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取排考详情
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson)
{
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 ");
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["ClassNo"].IsEmpty())
{
strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' ");
}
if (!queryParam["StuNo"].IsEmpty())
{
strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' ");
}
if (!queryParam["ClassRoomNo"].IsEmpty())
{
strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) ");
}

return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), null, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
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(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["ExamDate"].IsEmpty())
{
dp.Add("ExamDate", queryParam["ExamDate"].ToString(), DbType.String);
strSql.Append(" AND t.ExamDate = @ExamDate ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonNo Like @LessonNo ");
}
if (!queryParam["LessonName"].IsEmpty())
{
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonName Like @LessonName ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpNo Like @EmpNo ");
}
if (!queryParam["EmpName"].IsEmpty())
{
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EmpName Like @EmpName ");
}
if (!queryParam["ClassroomNo"].IsEmpty())
{
dp.Add("ClassroomNo", "%" + queryParam["ClassroomNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassroomNo Like @ClassroomNo ");
}
if (!queryParam["ClassroomName"].IsEmpty())
{
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassroomName Like @ClassroomName ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermNewEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ArrangeExamTermNew表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ArrangeExamTermNewEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermNewEntity>(t => t.EPIId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 225
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonBLL.cs View File

@@ -0,0 +1,225 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamLessonBLL : Exam_ExamLessonIBLL
{
private Exam_ExamLessonService exam_ExamLessonService = new Exam_ExamLessonService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamLessonEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ExamLessonService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamLesson表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue)
{
try
{
return exam_ExamLessonService.GetExam_ExamLessonEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester)
{
try
{
return exam_ExamLessonService.GetEntityByLessonNo(lessonNo, AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
exam_ExamLessonService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ELEnabled"></param>
public void Lock(string keyValue, int ELEnabled)
{
try
{
exam_ExamLessonService.Lock(keyValue, ELEnabled);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveExamTime(string keyValue, int ExamTime)
{
try
{
exam_ExamLessonService.SaveExamTime(keyValue, ExamTime);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Exam_ExamLessonEntity entity)
{
try
{
exam_ExamLessonService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public int Import(string AcademicYearNo, string Semester,string ExamTime)
{
try
{
return exam_ExamLessonService.Import(AcademicYearNo, Semester, ExamTime);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public int DeleteWhere(string AcademicYearNo, string Semester)
{
try
{
return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 101
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonEntity.cs View File

@@ -0,0 +1,101 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamLessonEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ELID")]
public string ELId { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 考试时长
/// </summary>
[Column("EXAMTIME")]
public int? ExamTime { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public int? Semester { get; set; }
/// <summary>
/// 课程名称
/// </summary>
[Column("LESSONNAME")]
public string LessonName { get; set; }
/// <summary>
/// 课程编号
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 课程类型
/// </summary>
[Column("LESSONTYPEID")]
public string LessonTypeId { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 系
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 排序号
/// </summary>
[Column("ELORDER")]
public int? ELOrder { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("ELENABLED")]
public bool? ELEnabled { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ELId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ELId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonIBLL.cs View File

@@ -0,0 +1,60 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public interface Exam_ExamLessonIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamLessonEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Exam_ExamLesson表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue);
Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo,string AcademicYearNo, int? Semester);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ELEnabled"></param>
void Lock(string keyValue, int ELEnabled);
void SaveExamTime(string keyValue, int ExamTime);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamLessonEntity entity);

int Import(string AcademicYearNo, string Semester,string ExamTime);
int DeleteWhere(string AcademicYearNo, string Semester);

#endregion

}
}

+ 319
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs View File

@@ -0,0 +1,319 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamLessonService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamLessonEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM Exam_ExamLesson t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonNo Like @LessonNo ");
}
if (!queryParam["LessonName"].IsEmpty())
{
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LessonName Like @LessonName ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamLessonEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamLesson表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamLesson表实体数据
/// </summary>
/// <param name="lessonNo"></param>
/// <returns></returns>
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo, string AcademicYearNo, int? Semester)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(x => x.LessonNo == lessonNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
if (keyValue.Contains(","))
{
keyValue = string.Join("','", keyValue.Split(','));
}

string sql = $"delete Exam_ExamLesson where ELId in ('{keyValue}')";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ELEnabled"></param>
public void Lock(string keyValue, int ELEnabled)
{
try
{
if (keyValue.Contains(","))
{
keyValue = string.Join("','", keyValue.Split(','));
}

string sql = $"update Exam_ExamLesson set ELEnabled='{ELEnabled}' where ELId in ('{keyValue}')";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 设置考试时间
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ExamTime"></param>
public void SaveExamTime(string keyValue, int ExamTime)
{
try
{
if (keyValue.Contains(","))
{
keyValue = string.Join("','", keyValue.Split(','));
}

string sql = $"update Exam_ExamLesson set ExamTime='{ExamTime}' where ELId in ('{keyValue}')";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Exam_ExamLessonEntity 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);
}
}
}

/// <summary>
/// 导入
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
public int Import(string AcademicYearNo, string Semester, string ExamTime)
{
try
{
//导入专业开课计划中是必修的(lessonsortno=1)、考核方式是考试的(ExamType='1',2022.6.23新增)
string sql = $@"insert into Exam_ExamLesson([ELId]
,[AcademicYearNo]
,[Semester]
,Grade
,[LessonName]
,[LessonNo]
,[ELOrder]
,[ELEnabled],ExamTime,LessonTypeId,DeptNo,MajorNo)
select NEWID(),AcademicYearNo,t.Semester,Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo from OpenLessonPlan t
left join lessoninfo a on t.lessonno=a.lessonno
where t.ExamType='1' and t.lessonsortno=1 and t.AcademicYearNo='{AcademicYearNo}' and t.Semester='{Semester}'
and t.[LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' )
group by t.LessonNo,t.LessonName,t.AcademicYearNo,t.Semester,Grade,a.lessontypeid,t.DeptNo,t.MajorNo
";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 清空数据
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
public int DeleteWhere(string AcademicYearNo, string Semester)
{
try
{
string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 269
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanBLL.cs View File

@@ -0,0 +1,269 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanBLL : Exam_ExamPlanIBLL
{
private Exam_ExamPlanService exam_ExamPlanService = new Exam_ExamPlanService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ExamPlanService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue)
{
try
{
return exam_ExamPlanService.GetExam_ExamPlanEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<Exam_ExamPlanTimeEntity> GetPlanTimeList(string EPId)
{
try
{
return exam_ExamPlanService.GetPlanTimeList(EPId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
exam_ExamPlanService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void ClearGenerate(string keyValue, int type)
{
try
{
exam_ExamPlanService.ClearGenerate(keyValue, type);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void Generate(string keyValue)
{
try
{
exam_ExamPlanService.Generate(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SavePlanTime(string EPId, List<Exam_ExamPlanTimeEntity> list)
{
try
{
exam_ExamPlanService.SavePlanTime(EPId, list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public (bool flag, string str) IsGenerate(string keyValue)
{
try
{
return exam_ExamPlanService.IsGenerate(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Exam_ExamPlanEntity entity)
{
try
{
exam_ExamPlanService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 清空
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
public int ClaerForm(string AcademicYearNo, string Semester, string PlanType)
{
try
{
return exam_ExamPlanService.ClaerForm(AcademicYearNo, Semester, PlanType);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 生成
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
public int GenerateForm(string AcademicYearNo, string Semester, string PlanType)
{
try
{
return exam_ExamPlanService.GenerateForm(AcademicYearNo, Semester, PlanType);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanEntity.cs View File

@@ -0,0 +1,90 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanEntity
{
#region 实体成员
/// <summary>
/// EPId
/// </summary>
[Column("EPID")]
public string EPId { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public int? Semester { get; set; }
/// <summary>
/// 排考名称
/// </summary>
[Column("PLANNAME")]
public string PlanName { get; set; }
/// <summary>
/// 排考类型
/// </summary>
[Column("PLANTYPE")]
public string PlanType { get; set; }
/// <summary>
/// 排考编号
/// </summary>
[Column("PLANCODE")]
public string PlanCode { get; set; }
/// <summary>
/// 排考总人数
/// </summary>
[Column("EPSTUCOUNT")]
public int? EPStuCount { get; set; }
/// <summary>
/// 是否随机生成座位
/// </summary>
[Column("EPRANDOM")]
public bool? EPRandom { get; set; }
/// <summary>
/// 是否已生成
/// </summary>
[Column("EPGENARATE")]
public bool? EPGenarate { get; set; }
/// <summary>
/// 排序号
/// </summary>
[Column("EPORDER")]
public int? EPOrder { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanIBLL.cs View File

@@ -0,0 +1,75 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public interface Exam_ExamPlanIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Exam_ExamPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue);
IEnumerable<Exam_ExamPlanTimeEntity> GetPlanTimeList(string EPId);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);

void ClearGenerate(string keyValue, int type);
void Generate(string keyValue);
void SavePlanTime(string EPId, List<Exam_ExamPlanTimeEntity> list);
(bool flag,string str) IsGenerate(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamPlanEntity entity);

/// <summary>
/// 清空
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
int ClaerForm(string AcademicYearNo, string Semester, string PlanType);
/// <summary>
/// 生成
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
int GenerateForm(string AcademicYearNo, string Semester, string PlanType);




#endregion

}
}

+ 580
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs View File

@@ -0,0 +1,580 @@
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.EPId,
t.AcademicYearNo,
t.Semester,
t.PlanName,
t.PlanType,
t.PlanCode,
t.EPStuCount,
t.EPRandom,
t.EPGenarate,
t.EPOrder
");
strSql.Append(" FROM Exam_ExamPlan t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["PlanName"].IsEmpty())
{
dp.Add("PlanName", "%" + queryParam["PlanName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PlanName Like @PlanName ");
}
if (!queryParam["PlanType"].IsEmpty())
{
dp.Add("PlanType", queryParam["PlanType"].ToString(), DbType.String);
strSql.Append(" AND t.PlanType = @PlanType ");
}
if (!queryParam["PlanCode"].IsEmpty())
{
dp.Add("PlanCode", "%" + queryParam["PlanCode"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PlanCode Like @PlanCode ");
}
if (!queryParam["EPRandom"].IsEmpty())
{
dp.Add("EPRandom", queryParam["EPRandom"].ToString(), DbType.String);
strSql.Append(" AND t.EPRandom = @EPRandom ");
}
if (!queryParam["EPGenarate"].IsEmpty())
{
dp.Add("EPGenarate", queryParam["EPGenarate"].ToString(), DbType.String);
strSql.Append(" AND t.EPGenarate = @EPGenarate ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Exam_ExamPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public IEnumerable<Exam_ExamPlanTimeEntity> GetPlanTimeList(string EPId)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanTimeEntity>(x => x.EPId == EPId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanEntity>(t => t.EPId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 安排时间
/// </summary>
/// <param name="EPId"></param>
/// <param name="list"></param>
public void SavePlanTime(string EPId, List<Exam_ExamPlanTimeEntity> list)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
db.Delete<Exam_ExamPlanTimeEntity>(x => x.EPId == EPId);
db.Insert(list);

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 清除排考名单/清除所有排考记录
/// </summary>
/// <param name="keyValue">排考记录主表Id</param>
/// <param name="type">1:清除排考名单;2:清除所有排考记录</param>
/// <returns></returns>
public void ClearGenerate(string keyValue, int type)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
//清除排考名单
db.ExecuteBySql($@"delete from Exam_ArrangeExamTermNew where EPId='{keyValue}';
delete from Exam_ArrangeExamTermItemNew where EPId='{keyValue}';");
if (type == 2)
{
//清除所有排考记录

//考试安排课程表
var planLessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue);
var planLessonIds = "";
if (planLessonList.Count() > 1)
{
planLessonIds = string.Join("','", planLessonList.Select(x => x.EPLId).ToList());
}
else if (planLessonList.Count() == 1)
{
planLessonIds = planLessonList.Select(x => x.EPLId).FirstOrDefault();
}

if (!string.IsNullOrEmpty(planLessonIds))
{
db.ExecuteBySql($@"delete from Exam_ExamPlanClass where EPLId in ('{planLessonIds}');
delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
db.ExecuteBySql($@"delete from Exam_ExamPlanLesson where EPId='{keyValue}'");
}
}

//修改排考记录表是否生成字段
db.ExecuteBySql($"update Exam_ExamPlan set EPGenarate=0,EPStuCount=0 where EPId='{keyValue}'");
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 是否可以生成排考名单
/// </summary>
/// <param name="keyValue">排考记录主表Id</param>
public (bool flag, string str) IsGenerate(string keyValue)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
//排考记录表
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(keyValue);
//安排考试数据
var EPTimeList = db.FindList<Exam_ExamPlanTimeEntity>(x => x.EPId == keyValue);
if (EPTimeList.Count() <= 0)
{
return (false, "请先安排时间!");
}

//排考安排课程已审核的数据
var planLessonData = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue);
if (planLessonData.Count() <= 0)
{
return (false, "请先安排考试课程!");
}
//考试课程ids
var EPLIds = string.Join("','", planLessonData.Select(x => x.EPLId).ToList());
//排考班级
var EPClass = db.FindList<Exam_ExamPlanClassEntity>($"select * from Exam_ExamPlanClass where eplid in ('{EPLIds}')");
if (EPClass.Count() <= 0)
{
return (false, "请安排班级!");
}

//排考考场
var EPRoom = db.FindList<Exam_ExamPlanRoomEntity>($"select * from Exam_ExamPlanRoom where eplid in ('{EPLIds}')");
if (EPRoom.Count() <= 0)
{
return (false, "请安排考场!");
}
if (EPRoom.Where(x => string.IsNullOrEmpty(x.EmpNo)).Count() > 0)
{
return (false, "请安排监考老师!");
}

if (planLessonData.Where(x => x.ELCheckMark == true).Count() <= 0)
{
return (false, "请先安排考试!");
}

return (true, "");
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 生成排考名单
/// </summary>
/// <param name="keyValue">排考记录主表Id</param>
public void Generate(string keyValue)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
//排考记录表
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(keyValue);
//排考安排课程已审核的数据
var planLessonData = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue && x.ELCheckMark == true);

//删除
db.ExecuteBySql($"delete Exam_ArrangeExamTermNew where EPId='{keyValue}'");
//删除考场明细
db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'");

var classInfo = db.FindList<ClassInfoEntity>();
//排考班级
var planClassList = db.FindList<Exam_ExamPlanClassEntity>();
foreach (var planLesson in planLessonData)
{
//排考安排明细数据
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>();

//排考安排考场
var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList();

//添加排考安排数据
foreach (var planRoom in planRoomData)
{
//排考安排表
Exam_ArrangeExamTermNewEntity ExamTermNewEntity = new Exam_ArrangeExamTermNewEntity();
ExamTermNewEntity.Create();
ExamTermNewEntity.EPId = keyValue;
ExamTermNewEntity.LessonName = planLesson.LessonName;
ExamTermNewEntity.LessonNo = planLesson.LessonNo;
ExamTermNewEntity.ExamDate = planLesson.ExamDate;
ExamTermNewEntity.ExamTime = planLesson.ExamTime;
ExamTermNewEntity.EmpName = planRoom.EmpName;
ExamTermNewEntity.EmpNo = planRoom.EmpNo;
ExamTermNewEntity.ClassroomName = planRoom.ClassroomName;
ExamTermNewEntity.ClassroomNo = planRoom.ClassroomNo;
ExamTermNewEntity.F_SchoolId = LoginUserInfo.Get().companyId;
db.Insert(ExamTermNewEntity);

//生成考场顺序数
var sealNumArr = getRanNum(planRoom.SeatCount.Value);
for (int n = 0; n < sealNumArr.Count; n++)
{
//考场安排明细
Exam_ArrangeExamTermItemNewEntity item = new Exam_ArrangeExamTermItemNewEntity();
item.Create();
item.EPId = keyValue;
item.LessonNo = planLesson.LessonNo;
item.LessonName = planLesson.LessonName;
item.ExamDate = planLesson.ExamDate;
item.ExamTime = planLesson.ExamTime;
item.EmpName = planRoom.EmpName;
item.EmpNo = planRoom.EmpNo;
item.ClassroomName = planRoom.ClassroomName;
item.ClassroomNo = planRoom.ClassroomNo;
item.F_SchoolId = LoginUserInfo.Get().userId;
item.SitNumber = sealNumArr[n].ToString().PadLeft(3, '0');
itemList.Add(item);
}
}

//排考安排班级
var planClassData = planClassList.Where(x => x.EPLId == planLesson.EPLId);
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList());
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<Exam_ExamStudentEntity>(stuSql).ToList();

itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList();
if (itemList.Count >= stuInfoList.Count())
{
//随机安排座位
if (examPlan.EPRandom == true)
{
stuInfoList = stuInfoList.OrderBy(x => Guid.NewGuid()).ToList();
//为考生安排座位
for (int i = 0; i < stuInfoList.Count; i++)
{
itemList[i].StuNo = stuInfoList[i].StuNo;
itemList[i].StuName = stuInfoList[i].StuName;
itemList[i].ClassNo = stuInfoList[i].ClassNo;
itemList[i].ClassName = classInfo.Where(x => x.ClassNo == stuInfoList[i].ClassNo)
.Select(x => x.ClassName).FirstOrDefault();
}

db.Insert(itemList);
}
else
{
//不随机安排座位
stuInfoList = stuInfoList.OrderBy(x => x.StuNo).OrderBy(x => x.ClassNo).ToList();
//为考生安排座位
for (int i = 0; i < stuInfoList.Count; i++)
{
itemList[i].StuNo = stuInfoList[i].StuNo;
itemList[i].StuName = stuInfoList[i].StuName;
itemList[i].ClassNo = stuInfoList[i].ClassNo;
itemList[i].ClassName = classInfo.Where(x => x.ClassNo == stuInfoList[i].ClassNo)
.Select(x => x.ClassName).FirstOrDefault();
}

db.Insert(itemList);
}
}
}

var RealStuCount = planLessonData.Sum(x => x.RealStuCount);
//修改排考记录表是否生成字段
db.ExecuteBySql($"update Exam_ExamPlan set EPGenarate=1, EPStuCount='{RealStuCount}' where EPId='{keyValue}'");
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 生成随机数组
/// </summary>
/// <param name="maxValue"></param>
/// <returns></returns>
private List<int> getRanNum(int maxValue)
{
//座位号不打乱,生成顺序数组
int[] arr = Enumerable.Range(1, maxValue).ToArray();
//Random ra = new Random(unchecked((int)DateTime.Now.Ticks));
//int[] arrNum = { };
//var list = new List<int>();
//int tmp = 0;
//int minValue = 1;
//for (int i = 0; i < maxValue; i++)
//{
// tmp = ra.Next(minValue, maxValue + 1); //随机取数
// list.Add(getNum(list, tmp, minValue, maxValue + 1, ra)); //取出值赋到数组中
//}

return arr.ToList();
}

private int getNum(List<int> list, int tmp, int minValue, int maxValue, Random ra)
{
if (list.Exists(x => x == tmp))
{
tmp = ra.Next(minValue, maxValue); //重新随机获取。
tmp = getNum(list, tmp, minValue, maxValue, ra);//递归:如果取出来的数字和已取得的数字有重复就重新随机获取。

}
return tmp;
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Exam_ExamPlanEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
entity.EPStuCount = 0;
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 清空
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
public int ClaerForm(string AcademicYearNo, string Semester, string PlanType)
{
try
{
string sql = "";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 生成
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
public int GenerateForm(string AcademicYearNo, string Semester, string PlanType)
{
try
{
string sql = "";
return this.BaseRepository("CollegeMIS").Insert(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 207
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs View File

@@ -0,0 +1,207 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 15:03
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassBLL : Exam_ExamPlanClassIBLL
{
private Exam_ExamPlanClassService exam_ExamPlanClassService = new Exam_ExamPlanClassService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ExamPlanClassService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson)
{
try
{
return exam_ExamPlanClassService.GetList( queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanClassEntity GetEntity(string keyValue)
{
try
{
return exam_ExamPlanClassService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
exam_ExamPlanClassService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity)
{
try
{
exam_ExamPlanClassService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveList(List<Exam_ExamPlanClassEntity> list)
{
try
{
exam_ExamPlanClassService.SaveList(list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public (bool flag, string msg) IsExamConflict(List<Exam_ExamPlanClassEntity> list)
{
try
{
return exam_ExamPlanClassService.IsExamConflict(list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public void PlanClassByEPId(string keyValue)
{
try
{
exam_ExamPlanClassService.PlanClassByEPId(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassEntity.cs View File

@@ -0,0 +1,68 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 18:07
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassEntity
{
#region 实体成员
/// <summary>
/// EPCId
/// </summary>
/// <returns></returns>
[Column("EPCID")]
public string EPCId { get; set; }
/// <summary>
/// EPLId
/// </summary>
/// <returns></returns>
[Column("EPLID")]
public string EPLId { get; set; }
/// <summary>
/// ClassName
/// </summary>
/// <returns></returns>
[Column("CLASSNAME")]
public string ClassName { get; set; }
/// <summary>
/// ClassNo
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// ClassStuNum
/// </summary>
/// <returns></returns>
[Column("CLASSSTUNUM")]
public int? ClassStuNum { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPCId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPCId = keyValue;
}
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs View File

@@ -0,0 +1,56 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 15:03
/// 描 述:排考安排课程
/// </summary>
public interface Exam_ExamPlanClassIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamPlanClassEntity GetEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity);

void SaveList(List<Exam_ExamPlanClassEntity> list);
(bool flag, string msg) IsExamConflict(List<Exam_ExamPlanClassEntity> list);

void PlanClassByEPId(string keyValue);

#endregion

}
}

+ 396
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs View File

@@ -0,0 +1,396 @@
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 15:03
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM Exam_ExamPlanClass 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<Exam_ExamPlanClassEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM Exam_ExamPlanClass 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<Exam_ExamPlanClassEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanClassEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
var entity = new Exam_ExamPlanClassEntity();
if (keyValue.Contains(","))
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>((keyValue.Split(','))[0]);
keyValue = string.Join("','", keyValue.Split(','));
}
else
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(keyValue);
}

string sql = $"delete from Exam_ExamPlanClass where EPCId in ('{keyValue}')";

this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

UpdateExamPlanLesson(entity.EPLId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, Exam_ExamPlanClassEntity 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);
}
}
}

/// <summary>
/// 判断排考班级的考试时间是否冲突
/// </summary>
/// <param name="list"></param>
public (bool flag, string msg) IsExamConflict(List<Exam_ExamPlanClassEntity> list)
{
try
{
//排考安排课程表Id
var EPLId = list.Select(x => x.EPLId).FirstOrDefault();
var examPlanLesson = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(EPLId);
//开始时间
var startTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[0]);
//结束时间
var endTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[1]);
foreach (var classs in list)
{
//查询和entity考试日期同一天的考试课程
string sql = $@"select * from [dbo].[Exam_ExamPlanLesson] where eplid in (
select distinct eplid from [dbo].[Exam_ExamPlanclass] where classno='{classs.ClassNo}') and eplid <> '{examPlanLesson.EPLId}'
and examtime is not null and datediff(day, examdate, '{examPlanLesson.ExamDate}') = 0";
var eplList = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(sql);
foreach (var epl in eplList)
{
//开始时间
var startTime1 = Convert.ToDateTime(epl.ExamDate.Value.ToString("yyyy-MM-dd") + " " + epl.ExamTime.Split('-')[0]);
//结束时间
var endTime1 = Convert.ToDateTime(epl.ExamDate.Value.ToString("yyyy-MM-dd") + " " + epl.ExamTime.Split('-')[1]);
if ((startTime >= startTime1 && startTime <= endTime1) ||
(endTime >= startTime1 && endTime <= endTime1))
{
var ep = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(epl.EPId);
return (true, classs.ClassName + "与" + ep.PlanName + "--" + epl.LessonName + "的考试时间冲突!");
}
}
}
return (false, "");

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 排考安排班级
/// </summary>
/// <param name="list"></param>
public void SaveList(List<Exam_ExamPlanClassEntity> list)
{
try
{
//var stuinfo = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>();
////计算班级人数
//foreach (var entity in list)
//{
// entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo);
//}
this.BaseRepository("CollegeMIS").Insert(list);
//更新排考安排课程表实排班级数、实排人数
//排考安排课程表Id
var EPLId = list.Select(x => x.EPLId).FirstOrDefault();
UpdateExamPlanLesson(EPLId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 更新排考安排课程
/// </summary>
/// <param name="EPLId">排考安排课程表Id</param>
private void UpdateExamPlanLesson(string EPLId)
{
try
{
//更新排考安排课程表实排班级数、实排人数
string sql = $@"update l
set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum
from Exam_ExamPlanLesson l
join (select '{EPLId}' as EPLId,count(1) as RealClassNum,sum(ClassStuNum) as RealStuCount from Exam_ExamPlanClass where EPLId='{EPLId}'
)t on l.EPLId=t.EPLId
where l.EPLId='{EPLId}'
";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 一键安排班级
/// </summary>
public void PlanClassByEPId(string EPId)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
//排考记录表
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(EPId);
//查询当前考试记录所有考试课程
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId);
foreach (var lesson in lessonList)
{
var lessonno = lesson.LessonNo;
if (lesson.LessonNo.Contains("("))
{
lessonno = lesson.LessonNo.Split('(')[0];
}

//查询课程信息
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{lessonno}' ").FirstOrDefault();
if (lessoninfo != null)
{
if (lessoninfo.LessonTypeName.Contains("专业"))
{
//专业课添加此专业的所有班级
var addSql = $@"insert into Exam_ExamPlanClass
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}'
and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}'
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}')
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
db.ExecuteBySql(addSql);
}
else if (lessoninfo.LessonTypeName.Contains("公共") || lessoninfo.LessonTypeName.Contains("公开"))
{
//公共课添加所有班级
var addSql = $@"insert into Exam_ExamPlanClass
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}'
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}')
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
db.ExecuteBySql(addSql);
}

}

//更新排考安排课程表实排班级数、实排人数和应排班级数、应排人数(如果没有点击【一键安排班级】,应排班级数、应排人数在安排考试页面切换课程时候更新)
string sql = $@"update l
set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum,ClassNum=t.RealClassNum,StuCount=t.RealStuCount
from Exam_ExamPlanLesson l
join (select '{lesson.EPLId}' as EPLId,count(1) as RealClassNum,sum(ClassStuNum) as RealStuCount from Exam_ExamPlanClass where EPLId='{lesson.EPLId}'
)t on l.EPLId=t.EPLId
where l.EPLId='{lesson.EPLId}'
";
db.ExecuteBySql(sql);
}
db.Commit();

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save