@@ -101,6 +101,24 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
} | |||
public RoleEntity GetEntityByRoleCode(string code) | |||
{ | |||
try | |||
{ | |||
return roleService.GetEntityByRoleCode(code); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取分页数据 | |||
/// </summary> | |||
@@ -36,7 +36,8 @@ namespace Learun.Application.Organization | |||
/// <param name="roleName"></param> | |||
/// <returns></returns> | |||
RoleEntity GetRoleByRoleName(string roleName); | |||
/// <summary> | |||
RoleEntity GetEntityByRoleCode(string code); | |||
/// <summary> | |||
/// 获取角色数据列表 | |||
/// </summary> | |||
/// <param name="roleIds">主键串</param> | |||
@@ -231,5 +231,24 @@ namespace Learun.Application.Organization | |||
} | |||
#endregion | |||
public RoleEntity GetEntityByRoleCode(string code) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<RoleEntity>(a => a.F_EnCode == code); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamLessonController : MvcControllerBase | |||
{ | |||
private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +30,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +57,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -119,9 +141,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime) | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime,string ImportDeptNo) | |||
{ | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime); | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -130,9 +152,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester,string ImportDeptNo) | |||
{ | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
using System.Linq; | |||
using Learun.Application.Organization; | |||
using Newtonsoft.Json; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
@@ -22,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); | |||
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL(); | |||
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -32,6 +35,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -41,6 +53,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamRoomController : MvcControllerBase | |||
{ | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +29,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +56,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -111,9 +132,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); | |||
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -122,9 +143,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamStudentController : MvcControllerBase | |||
{ | |||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,6 +29,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -44,6 +56,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormImport() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -53,6 +74,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormClear() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -169,15 +199,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpPost] | |||
[AjaxOnly] | |||
[ValidateAntiForgeryToken] | |||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType) | |||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType); | |||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType) | |||
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType, string ImportDeptNo) | |||
{ | |||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType); | |||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
return Success("同步(" + res + ")条数据成功!"); | |||
} | |||
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,7 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_InvigilateTeacherController : MvcControllerBase | |||
{ | |||
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); | |||
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); | |||
private RoleIBLL roleIbll = new RoleBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
@@ -26,7 +28,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +46,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -44,6 +55,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) | |||
{ | |||
ViewBag.IsTwoDept = true; | |||
var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); | |||
if (empinfo != null) | |||
{ | |||
ViewBag.DeptNo = empinfo.DeptNo; | |||
} | |||
} | |||
return View(); | |||
} | |||
@@ -164,9 +184,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
public ActionResult Import(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
@@ -175,9 +195,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
@@ -11,9 +11,17 @@ | |||
<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">系部</div> | |||
<div id="ImportDeptNo"></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> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") |
@@ -31,7 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
if (type == 1) { | |||
@@ -49,7 +55,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ExamTime: $('#ExamTime').val() | |||
ExamTime: $('#ExamTime').val(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
//从开课计划导入 | |||
if (type == 1) { | |||
@@ -58,4 +58,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.js") |
@@ -267,7 +267,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
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>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -280,6 +280,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,6 +11,10 @@ | |||
<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="ImportDeptNo"></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" /> | |||
@@ -36,4 +40,8 @@ | |||
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") |
@@ -30,6 +30,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
@@ -82,4 +82,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") |
@@ -346,6 +346,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,6 +11,10 @@ | |||
<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">系部</div> | |||
<div id="ImportDeptNo"></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" /> | |||
@@ -20,4 +24,8 @@ | |||
<input id="SeatColumns" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/FormYearSemester.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -56,4 +56,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js") |
@@ -182,7 +182,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
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>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -195,6 +195,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,9 +11,17 @@ | |||
<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">系部</div> | |||
<div id="ImportDeptNo"></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> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js") |
@@ -30,6 +30,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
} | |||
}; | |||
@@ -41,7 +48,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
ESType: $('#ESType').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
learun.layerConfirm('是否确认清空!', function (res) { | |||
if (res) { | |||
@@ -11,9 +11,17 @@ | |||
<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">系部</div> | |||
<div id="ImportDeptNo"></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> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||
}, | |||
initData: function () { | |||
@@ -56,7 +63,8 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet(), | |||
ESType: $('#ESType').lrselectGet() | |||
ESType: $('#ESType').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ImportTable?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
@@ -68,4 +68,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js") |
@@ -203,7 +203,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
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>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -217,6 +217,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -11,5 +11,13 @@ | |||
<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">系部</div> | |||
<div id="ImportDeptNo"></div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js") |
@@ -31,6 +31,13 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ImportDeptNo').lrDataSourceSelect({ code: "CdDeptInfo", text: "deptname", value: "deptno" }); | |||
//判断是否分院老师,是就锁定系 | |||
$('#ImportDeptNo').attr("disabled", "disabled"); | |||
if (IsTwoDept) { | |||
//绑定当前系 | |||
$('#ImportDeptNo').lrselectSet(CurrentDeptNo); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -55,7 +62,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
var postData = { | |||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||
Semester: $('#Semester').lrselectGet() | |||
Semester: $('#Semester').lrselectGet(), | |||
ImportDeptNo: $("#ImportDeptNo").lrselectGet() | |||
}; | |||
//导入 | |||
if (type == 1) { | |||
@@ -55,4 +55,8 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
var CurrentDeptNo = "@ViewBag.DeptNo"; | |||
var IsTwoDept = "@ViewBag.IsTwoDept"; | |||
</script> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js") |
@@ -205,7 +205,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
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>"; | |||
return cellvalue == 1 ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-default\" >否</span>"; | |||
} | |||
}, | |||
], | |||
@@ -218,6 +218,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (IsTwoDept) | |||
param.ImportDeptNo = CurrentDeptNo; | |||
else | |||
param.ImportDeptNo = "0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -181,11 +181,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public int Import(string AcademicYearNo, string Semester,string ExamTime) | |||
public int Import(string AcademicYearNo, string Semester,string ExamTime,string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamLessonService.Import(AcademicYearNo, Semester, ExamTime); | |||
return exam_ExamLessonService.Import(AcademicYearNo, Semester, ExamTime, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -201,11 +201,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester,string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester); | |||
return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -51,8 +51,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <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); | |||
int Import(string AcademicYearNo, string Semester,string ExamTime,string ImportDeptNo); | |||
int DeleteWhere(string AcademicYearNo, string Semester,string ImportDeptNo); | |||
#endregion | |||
@@ -54,6 +54,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("ELEnabled", queryParam["ELEnabled"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ELEnabled = @ELEnabled "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); | |||
@@ -258,10 +271,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int Import(string AcademicYearNo, string Semester, string ExamTime) | |||
public int Import(string AcademicYearNo, string Semester, string ExamTime, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sqldept = ""; | |||
if (!string.IsNullOrEmpty(ImportDeptNo)) | |||
{ | |||
sqldept = $" and t.DeptNo='{ImportDeptNo}'"; | |||
} | |||
//导入专业开课计划中是必修的(lessonsortno=1)、考核方式是考试的(ExamType='1',2022.6.23新增) | |||
string sql = $@"insert into Exam_ExamLesson([ELId] | |||
,[AcademicYearNo] | |||
@@ -270,14 +288,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
,[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 | |||
,[ELEnabled],ExamTime,LessonTypeId,DeptNo,MajorNo,ImportDeptNo) | |||
select NEWID(),AcademicYearNo,t.Semester,Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo,'{ImportDeptNo}' 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}' ) | |||
where t.ExamType='1' and t.lessonsortno=1 and t.AcademicYearNo='{AcademicYearNo}' and t.Semester='{Semester}' {sqldept} | |||
and t.[LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}' ) | |||
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) | |||
@@ -299,11 +317,11 @@ left join lessoninfo a on t.lessonno=a.lessonno | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||
string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}'"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
@@ -29,6 +29,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public int? Semester { get; set; } | |||
[Column("IMPORTDEPTNO")] | |||
public string ImportDeptNo { get; set; } | |||
/// <summary> | |||
/// 排考名称 | |||
/// </summary> | |||
@@ -84,6 +84,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("EPGenarate", queryParam["EPGenarate"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EPGenarate = @EPGenarate "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -162,11 +162,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamRoomService.Import(AcademicYearNo, Semester,SeatRows,SeatColumns); | |||
return exam_ExamRoomService.Import(AcademicYearNo, Semester,SeatRows,SeatColumns, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -182,11 +182,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamRoomService.DeleteWhere(AcademicYearNo, Semester); | |||
return exam_ExamRoomService.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -50,8 +50,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamRoomEntity entity); | |||
int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns); | |||
int DeleteWhere(string AcademicYearNo, string Semester); | |||
int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns, string ImportDeptNo); | |||
int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo); | |||
#endregion | |||
@@ -62,6 +62,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
var examLesson = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(queryParam["EPLId"].ToString()); | |||
@@ -288,7 +301,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="SeatRows">座位行数</param> | |||
/// <param name="SeatColumns">座位列数</param> | |||
/// <returns></returns> | |||
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
@@ -301,9 +314,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
,[SeatColumns] | |||
,[SeatCount] | |||
,[EROrder] | |||
,[EREnabled]) | |||
select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1 from ClassroomInfo where CheckMark=1 | |||
and [ClassroomNo] not in (select [ClassroomNo] from Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||
,[EREnabled],ImportDeptNo) | |||
select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1,'{ImportDeptNo}' from ClassroomInfo where CheckMark=1 | |||
and [ClassroomNo] not in (select [ClassroomNo] from Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}' ) | |||
"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
@@ -326,11 +339,11 @@ select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{Seat | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||
string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}'"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
@@ -192,11 +192,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType) | |||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamStudentService.ClaerForm(AcademicYearNo, Semester, ESType); | |||
return exam_ExamStudentService.ClaerForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -217,11 +217,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
public int ImportForm(string AcademicYearNo, int Semester, string ESType) | |||
public int ImportForm(string AcademicYearNo, int Semester, string ESType, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamStudentService.ImportForm(AcademicYearNo, Semester, ESType); | |||
return exam_ExamStudentService.ImportForm(AcademicYearNo, Semester, ESType, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -64,7 +64,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
int ClaerForm(string AcademicYearNo, string Semester, string ESType); | |||
int ClaerForm(string AcademicYearNo, string Semester, string ESType, string ImportDeptNo); | |||
/// <summary> | |||
/// 同步学生考试信息 | |||
/// </summary> | |||
@@ -72,7 +72,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
int ImportForm(string AcademicYearNo, int Semester, string ESType); | |||
int ImportForm(string AcademicYearNo, int Semester, string ESType, string ImportDeptNo); | |||
#endregion | |||
} | |||
@@ -74,6 +74,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
if (!queryParam["ESType"].IsEmpty()) | |||
{ | |||
dp.Add("ESType", queryParam["ESType"].ToString(), DbType.String); | |||
@@ -138,6 +151,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
if (!queryParam["ESType"].IsEmpty()) | |||
{ | |||
dp.Add("ESType", queryParam["ESType"].ToString(), DbType.String); | |||
@@ -328,18 +354,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType) | |||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sql = ""; | |||
if (!string.IsNullOrEmpty(ESType)) | |||
{ | |||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType= '{ESType}'"; | |||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType= '{ESType}' and ImportDeptNo='{ImportDeptNo}'"; | |||
} | |||
else | |||
{ | |||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}'"; | |||
} | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
@@ -362,25 +388,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int ImportForm(string AcademicYearNo, int Semester, string ESType) | |||
public int ImportForm(string AcademicYearNo, int Semester, string ESType, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sqldept = ""; | |||
if (!string.IsNullOrEmpty(ImportDeptNo)) | |||
{ | |||
sqldept = $" and DeptNo='{ImportDeptNo}'"; | |||
} | |||
StringBuilder strSql = new StringBuilder(); | |||
if (ESType == "1") | |||
{ | |||
strSql.Append( | |||
$@"insert into Exam_ExamStudent(ESId,ClassNo,DeptNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) | |||
select newid(), a.classno,DeptNo, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade | |||
from StuInfoBasic a where CheckMark = '1' and (ChangeStatus is null or len(ChangeStatus)=0 or ChangeStatus='0') and stuno not in | |||
(select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' | |||
$@"insert into Exam_ExamStudent(ESId,ClassNo,DeptNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade,ImportDeptNo) | |||
select newid(), a.classno,DeptNo, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade,'{ImportDeptNo}' | |||
from StuInfoBasic a where CheckMark = '1' and (ChangeStatus is null or len(ChangeStatus)=0 or ChangeStatus='0') {sqldept} and stuno not in | |||
(select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' and ImportDeptNo='{ImportDeptNo}' | |||
)"); | |||
} | |||
else | |||
{ | |||
strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) "); | |||
strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1,b.Grade from "); | |||
string sqldept2 = ""; | |||
if (!string.IsNullOrEmpty(ImportDeptNo)) | |||
{ | |||
sqldept2 = $" and b.DeptNo='{ImportDeptNo}'"; | |||
} | |||
strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade,ImportDeptNo) "); | |||
strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1,b.Grade,'{ImportDeptNo}' from "); | |||
if (ESType == "2") | |||
{ | |||
strSql.Append(" StuScore "); | |||
@@ -390,11 +426,11 @@ from StuInfoBasic a where CheckMark = '1' and (ChangeStatus is null or len(Chang | |||
strSql.Append(" StuScoreNotPass "); | |||
} | |||
strSql.Append(@" a left join StuInfoBasic b on b.StuNo=a.StuNo | |||
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); | |||
where 1=1 and a.LessonSortNo='1' and a.Score>=0 and a.Score<60 "); | |||
strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' "); | |||
strSql.Append(" and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) "); | |||
strSql.Append(" and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) "+ sqldept2); | |||
strSql.Append($@" and a.stuno not in | |||
(select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' | |||
(select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' and ImportDeptNo='{ImportDeptNo}' | |||
) "); | |||
strSql.Append(" group by a.stuno,a.stuname,a.classno,b.Grade"); | |||
@@ -173,11 +173,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public int Import(string AcademicYearNo, string Semester) | |||
public int Import(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_InvigilateTeacherService.Import(AcademicYearNo, Semester); | |||
return exam_InvigilateTeacherService.Import(AcademicYearNo, Semester, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -191,11 +191,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
return exam_InvigilateTeacherService.DeleteWhere(AcademicYearNo, Semester); | |||
return exam_InvigilateTeacherService.DeleteWhere(AcademicYearNo, Semester, ImportDeptNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -46,8 +46,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void SaveEntity(string keyValue, Exam_InvigilateTeacherEntity entity); | |||
void Lock(string keyValue, int ITEnabled); | |||
int Import(string AcademicYearNo, string Semester); | |||
int DeleteWhere(string AcademicYearNo, string Semester); | |||
int Import(string AcademicYearNo, string Semester, string ImportDeptNo); | |||
int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo); | |||
#endregion | |||
@@ -65,6 +65,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["ImportDeptNo"].IsEmpty()) | |||
{ | |||
if (queryParam["ImportDeptNo"].ToString() == "0") | |||
{ | |||
strSql.Append(" AND t.ImportDeptNo='' "); | |||
} | |||
else | |||
{ | |||
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo "); | |||
} | |||
} | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
//考试课程数据 | |||
@@ -354,10 +367,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int Import(string AcademicYearNo, string Semester) | |||
public int Import(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sqldept = ""; | |||
if (!string.IsNullOrEmpty(ImportDeptNo)) | |||
{ | |||
sqldept = $" and DeptNo='{ImportDeptNo}'"; | |||
} | |||
string sql = $@"INSERT INTO [dbo].[Exam_InvigilateTeacher] | |||
([ITId] | |||
,[AcademicYearNo] | |||
@@ -366,9 +384,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
,[EmpNo] | |||
,[DeptNo] | |||
,[ITOrder] | |||
,[ITEnabled]) | |||
select newid(),'{AcademicYearNo}','{Semester}',empname,empno,DeptNo,0,1 from empinfo where checkmark=1 and IsHasLesson=1 and IsInActiveStatus=1 | |||
and empno not in (select empno from Exam_InvigilateTeacher where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}') | |||
,[ITEnabled],ImportDeptNo) | |||
select newid(),'{AcademicYearNo}','{Semester}',empname,empno,DeptNo,0,1,'{ImportDeptNo}' from empinfo where checkmark=1 and IsHasLesson=1 and IsInActiveStatus=1 {sqldept} | |||
and empno not in (select empno from Exam_InvigilateTeacher where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}') | |||
"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
@@ -391,11 +409,11 @@ select newid(),'{AcademicYearNo}','{Semester}',empname,empno,DeptNo,0,1 from emp | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||
public int DeleteWhere(string AcademicYearNo, string Semester, string ImportDeptNo) | |||
{ | |||
try | |||
{ | |||
string sql = $"delete Exam_InvigilateTeacher where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||
string sql = $"delete Exam_InvigilateTeacher where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ImportDeptNo='{ImportDeptNo}'"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||