@@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System; | using System; | ||||
using System.Linq; | |||||
using DocumentFormat.OpenXml.Office.CustomUI; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -17,6 +19,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class ClassPlanController : MvcControllerBase | public class ClassPlanController : MvcControllerBase | ||||
{ | { | ||||
private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL(); | private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL(); | ||||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||||
private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -38,6 +42,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -106,17 +111,86 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
classPlanIBLL.DelRelation(keyValue); | |||||
} | |||||
OpenLessonPlanEntity entity = strEntity.ToObject<OpenLessonPlanEntity>(); | OpenLessonPlanEntity entity = strEntity.ToObject<OpenLessonPlanEntity>(); | ||||
if (!string.IsNullOrEmpty(keyValue)) | if (!string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
entity.AmendDate = DateTime.Now; | entity.AmendDate = DateTime.Now; | ||||
} | } | ||||
entity.IsAllowEdit = true; | |||||
entity.MakeDate = DateTime.Now; | entity.MakeDate = DateTime.Now; | ||||
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); | |||||
if (model != null) | |||||
{ | |||||
if (keyValue != model.ID.ToString()) | |||||
{ | |||||
return Fail("此课程已重复!不可再次添加此课程"); | |||||
} | |||||
} | |||||
classPlanIBLL.SaveEntity(keyValue, entity); | classPlanIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 排课 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CourseArranging(string keyValue) | |||||
{ | |||||
var data = classPlanIBLL.GetClassPlanEntity(keyValue); | |||||
data.State = 1; | |||||
List<TeachClassEntity> TeachList = new List<TeachClassEntity>(); | |||||
TeachClassEntity TeachEntity = new TeachClassEntity(); | |||||
List<string> stringList = classInfoIBLL.GetAllClass(). | |||||
Where(x => x.DeptNo == data.DeptNo && x.MajorNo == data.MajorNo && x.Grade == data.Grade) | |||||
.OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList(); | |||||
if (stringList.Count > 0) | |||||
{ | |||||
var teachInfo = teachClassIBLL.GetAllClass().Where(s => | |||||
s.DeptNo == data.DeptNo && s.MajorNo == data.MajorNo && s.Grade == data.Grade && s.Semester == data.Semester | |||||
&& s.LessonNo == data.LessonNo && s.AcademicYearNo == data.AcademicYearNo).OrderBy(s => s.ID).ToList(); | |||||
if (teachInfo.Count > 0) | |||||
{ | |||||
return Fail("排课失败!已存在此课程信息"); | |||||
} | |||||
for (int i = 0; i < stringList.Count; i++) | |||||
{ | |||||
TeachEntity.TeachClassNo = stringList[i]; | |||||
TeachEntity.AcademicYearNo = data.AcademicYearNo; | |||||
TeachEntity.DeptNo = data.DeptNo; | |||||
TeachEntity.MajorNo = data.MajorNo; | |||||
TeachEntity.Grade = data.Grade; | |||||
TeachEntity.Semester = data.Semester; | |||||
TeachEntity.LessonNo = data.LessonNo; | |||||
TeachEntity.StuNum = data.StuNum; | |||||
TeachEntity.EmpNo = data.TeachNo; | |||||
TeachEntity.LessonSortNo = data.LessonSortNo; | |||||
TeachEntity.F_SchoolId = data.F_SchoolId; | |||||
TeachList.Add(TeachEntity); | |||||
} | |||||
teachClassIBLL.SaveEntityList(TeachList); | |||||
classPlanIBLL.SaveEntity(keyValue, data); | |||||
return Success("排课成功"); | |||||
} | |||||
else | |||||
{ | |||||
return Fail("排课失败!暂无排课班级"); | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -0,0 +1,188 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
using System; | |||||
using System.Linq; | |||||
using DocumentFormat.OpenXml.Office.CustomUI; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-08-21 17:28 | |||||
/// 描 述:设置教师 | |||||
/// </summary> | |||||
public class ClassPlanTeachController : MvcControllerBase | |||||
{ | |||||
private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); | |||||
private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); | |||||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult TeachForm() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = teachClassIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var ClassPlanData = teachClassIBLL.GetTeachClassEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
ClassPlan = ClassPlanData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
teachClassIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
TeachClassEntity entity = strEntity.ToObject<TeachClassEntity>(); | |||||
teachClassIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 设置教师 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SetTeach(string keyValue, string Teach) | |||||
{ | |||||
var entity = teachClassIBLL.GetTeachClassEntity(keyValue); | |||||
entity.EmpNo = Teach; | |||||
teachClassIBLL.SaveEntity(keyValue, entity); | |||||
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => | |||||
s.DeptNo == entity.DeptNo && s.MajorNo == entity.MajorNo && s.F_SchoolId == entity.F_SchoolId && entity.TeachClassNo.Contains(s.ClassNo)) | |||||
.ToList(); | |||||
if (stuDataList.Count < 0) | |||||
{ | |||||
List<StuSelectLessonListEntity> TeachList = new List<StuSelectLessonListEntity>(); | |||||
StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); | |||||
for (int i = 0; i < stuDataList.Count; i++) | |||||
{ | |||||
TeachEntity.NoticeBookNo = stuDataList[i].NoticeNo; | |||||
TeachEntity.StuNo = stuDataList[i].StuNo; | |||||
TeachEntity.DeptNo = stuDataList[i].DeptNo; | |||||
TeachEntity.MajorNo = stuDataList[i].MajorNo; | |||||
TeachEntity.ClassNo = stuDataList[i].ClassNo; | |||||
TeachEntity.MajorDetailNo = stuDataList[i].MajorDetailNo; | |||||
TeachEntity.MajorDetailName = stuDataList[i].MajorDetailName; | |||||
TeachEntity.StuName = stuDataList[i].StuName; | |||||
TeachEntity.GenderNo = stuDataList[i].GenderNo.ToString(); | |||||
TeachEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
TeachEntity.Semester = entity.Semester; | |||||
TeachEntity.OpenLessonDeptNo = entity.DeptNo; | |||||
TeachEntity.OpenLessonMajorNo = entity.MajorNo; | |||||
TeachEntity.LessonNo = entity.LessonNo; | |||||
TeachEntity.PartCode = entity.PartCode; | |||||
TeachEntity.OrdinaryScoreScale = 0; | |||||
TeachEntity.TermInScoreScale = 0; | |||||
TeachEntity.TermEndScoreScale = 0; | |||||
TeachEntity.OtherScoreScale = 0; | |||||
TeachEntity.TeachClassNo = entity.TeachClassNo; | |||||
TeachEntity.LessonSortNo = entity.LessonSortNo; | |||||
TeachEntity.StuSortNo = entity.LessonSortNo; | |||||
TeachEntity.Grade = entity.Grade; | |||||
TeachEntity.StudyScore = 2; | |||||
TeachEntity.TotalStudyHour = 2; | |||||
TeachEntity.IsInEffect = "1"; | |||||
TeachEntity.IsPitchOn = "1"; | |||||
TeachEntity.IsPitchOn = "1"; | |||||
TeachEntity.F_SchoolId = entity.F_SchoolId; | |||||
TeachEntity.InsertTime = DateTime.Now; | |||||
TeachList.Add(TeachEntity); | |||||
} | |||||
StuSelectLesson.SaveEntityList(TeachList); | |||||
return Success("设置成功!"); | |||||
} | |||||
else | |||||
{ | |||||
return Fail("设置失败!"); | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -15,15 +15,15 @@ | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | <div class="lr-form-item-title">学期<font face="宋体">*</font></div> | ||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | <div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | <div class="lr-form-item-title">系部<font face="宋体">*</font></div> | ||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | <div class="lr-form-item-title">年级<font face="宋体">*</font></div> | ||||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | <div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
@@ -32,15 +32,15 @@ | |||||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
<input id="LessonName" type="hidden" /> | <input id="LessonName" type="hidden" /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
@*<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">课程类别码</div> | <div class="lr-form-item-title">课程类别码</div> | ||||
<input id="LessonSortNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div id="LessonSortNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">课程细类码</div> | <div class="lr-form-item-title">课程细类码</div> | ||||
<input id="LessonSortDetailNo" type="text" class="form-control" /> | |||||
<div id="LessonSortDetailNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">开合课</div> | <div class="lr-form-item-title">开合课</div> | ||||
<input id="StuSortNo" type="text" class="form-control" /> | <input id="StuSortNo" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
@@ -77,7 +77,7 @@ | |||||
<div id="TeachDeptNo"></div> | <div id="TeachDeptNo"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | <div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | ||||
<div class="lr-form-item-title">学分<font face="宋体">*</font></div> | |||||
<div class="lr-form-item-title">学分</div> | |||||
<input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" /> | <input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ClassPlan"> | <div class="col-xs-12 lr-form-item" data-table="ClassPlan"> | ||||
@@ -23,6 +23,7 @@ var bootstrap = function ($, learun) { | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#LessonSortDetailNo').lrDataSourceSelect({ code: 'CdLessonSortDetail', value: 'lessonsortdetailno', text: 'lessonsortdetailname' }); | |||||
//年级 | //年级 | ||||
$('#Grade').lrselect({ | $('#Grade').lrselect({ | ||||
placeholder: "请选择年级", | placeholder: "请选择年级", | ||||
@@ -82,7 +83,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
$('#StuSortNo').val('02'); | $('#StuSortNo').val('02'); | ||||
//$('#StudyScore').val('2.0'); | |||||
$('#LessonSortNo').val('2'); | |||||
$('#CheckStyleNo').val('1'); | $('#CheckStyleNo').val('1'); | ||||
$('#ScoreRecordStyleNo').val('1'); | $('#ScoreRecordStyleNo').val('1'); | ||||
$('#CheckMark').val('1'); | $('#CheckMark').val('1'); | ||||
@@ -36,9 +36,9 @@ | |||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</div> | </div> | ||||
@*<div class="col-xs-6 lr-form-item"> | @*<div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div>*@ | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">年级</div> | <div class="lr-form-item-title">年级</div> | ||||
<div id="Grade"></div> | <div id="Grade"></div> | ||||
@@ -59,6 +59,7 @@ | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_courses" class="btn btn-default"><i class="fa fa-print"></i> 排课</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -18,7 +18,7 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 250, 400); | }, 250, 400); | ||||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_shortname' }); | |||||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
placeholder: "请选择学年", | placeholder: "请选择学年", | ||||
allowSearch: true, | allowSearch: true, | ||||
@@ -35,32 +35,6 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | $('#Semester').lrDataItemSelect({ code: 'Semester' }); | ||||
//$('#DeptNo').lrselect({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
// value: 'deptno', | |||||
// text: 'deptname', | |||||
// maxHeight: 200, | |||||
// select: function(item) { | |||||
// var NDeptNo = $("#DeptNo").lrselectGet(); | |||||
// if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||||
// value: "majorno", | |||||
// text: "majorname", | |||||
// maxHeight: 200 | |||||
// }); | |||||
// } else { | |||||
// $('#MajorNo').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
// param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
// value: "majorno", | |||||
// text: "majorname", | |||||
// maxHeight: 200 | |||||
// }); | |||||
// } | |||||
// } | |||||
//}); | |||||
$("#MajorNo").lrselect(); | $("#MajorNo").lrselect(); | ||||
$('#LessonNo').lrselect({ | $('#LessonNo').lrselect({ | ||||
placeholder: "请选择课程", | placeholder: "请选择课程", | ||||
@@ -81,7 +55,7 @@ var bootstrap = function ($, learun) { | |||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form', | url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form', | ||||
width: 800, | width: 800, | ||||
height: 400, | |||||
height: 450, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | return top[id].acceptClick(refreshGirdData); | ||||
} | } | ||||
@@ -91,25 +65,71 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
var state = $('#gridtable').jfGridValue('State'); | |||||
if (state == 0) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 450, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.layerConfirm('是否确认修改,修改后可能会造成不可弥补的错误!!!', function (res) { | |||||
if (res) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 450, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
} | } | ||||
}); | }); | ||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var state = $('#gridtable').jfGridValue('State'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (state == 0) { | |||||
learun.layerConfirm('是否确认删除该项!', | |||||
function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', | |||||
{ keyValue: keyValue }, | |||||
function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.layerConfirm('是否确认删除该项,删除数据后不可恢复!!!', function (item) { | |||||
if (item) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
//排课 | |||||
$('#lr_courses').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('确定要进行排课么!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', { keyValue: keyValue }, function () { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/CourseArranging', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
@@ -206,6 +226,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | { label: "年级", name: "Grade", width: 50, align: "left" }, | ||||
{ label: "课程编码", name: "LessonNo", width: 200, align: "left" }, | |||||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | { label: "课程名称", name: "LessonName", width: 200, align: "left" }, | ||||
{ label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" }, | { label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" }, | ||||
{ label: "人数", name: "StuNum", width: 80, align: "left" }, | { label: "人数", name: "StuNum", width: 80, align: "left" }, | ||||
@@ -231,7 +252,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | { label: "备注", name: "Remark", width: 100, align: "left" }, | ||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
sidx: 'ID desc', | |||||
sidx: 'MakeDate desc', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
@@ -0,0 +1,68 @@ | |||||
@{ | |||||
ViewBag.Title = "开课计划"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<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 lrlt ">学校信息</div> | |||||
<div id="cddeptTree" 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> - <span class="lrlt">专业信息</span> | |||||
</div> | |||||
<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="F_SchoolId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<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> | |||||
<div id="DeptNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">年级</div> | |||||
<div id="Grade"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">课程</div> | |||||
<div id="LessonNo"></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_teach" class="btn btn-default"><i class="fa fa-plus"></i> 设置教师</a> | |||||
<a id="lr_qzteach" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 生成成绩</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js") |
@@ -0,0 +1,243 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-11-29 11:43 | |||||
* 描 述:开课计划 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.inittree(); | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 250, 400); | |||||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "请选择学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//年级 | |||||
$('#Grade').lrselect({ | |||||
placeholder: "请选择年级", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | |||||
$("#MajorNo").lrselect(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200 | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/TeachForm', | |||||
width: 800, | |||||
height: 450, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 设置教师 | |||||
$('#lr_teach').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var empno = $('#gridtable').jfGridValue('EmpNo'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (empno) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '设置教师', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/TeachForm?keyValue=' + keyValue, | |||||
width: 400, | |||||
height: 300, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(); | |||||
} | |||||
}); | |||||
} else { | |||||
learun.alert.warning("所选班级已设置教师不能重复设置!!!"); | |||||
} | |||||
} | |||||
}); | |||||
// 强制设置教师 | |||||
$('#lr_qzteach').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var loginInfo = learun.clientdata.get(['userinfo']); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '设置教师', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SelectForm?objectId=' + keyValue + '&companyId=' + loginInfo.F_CompanyId + '&departmentId=' + loginInfo.F_DepartmentId + '&category=1', | |||||
width: 800, | |||||
height: 520, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
inittree: function () { | |||||
$('#cddeptTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree', | |||||
param: { parentId: '0' }, | |||||
nodeClick: page.treeNodeClick | |||||
}); | |||||
//$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); | |||||
}, | |||||
treeNodeClick: function (item) { | |||||
cddeptname = item.id; | |||||
$('#titleinfo').text(item.text); | |||||
page.search(); | |||||
var NDeptNo = item.id; | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200 | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||||
key: value, | |||||
keyId: 'f_companyid', | |||||
callback: function (_data) { | |||||
callback(_data['f_fullname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||||
{ | |||||
label: "学期", name: "Semester", width: 50, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'Semester', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "系部", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||||
{ | |||||
label: "课程", name: "LessonNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||||
key: value, | |||||
keyId: 'lessonno', | |||||
callback: function (_data) { | |||||
callback(_data['lessonname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "人数", name: "StuNum", width: 80, align: "left" }, | |||||
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, | |||||
{ label: "课程区别码", name: "PartCode", width: 80, align: "left" }, | |||||
{ label: "班级", name: "TeachClassNo", width: 80, align: "left" }, | |||||
{ | |||||
label: "教师", name: "EmpNo", width: 80, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "合上班", name: "RelatedClassNo", width: 80, align: "left" }, | |||||
{ label: "拟开教学班数", name: "LessonSortNo", width: 100, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'ID', | |||||
sidx: 'ID desc', | |||||
isMultiselect: true, | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -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="ClassPlanTeach"> | |||||
<div class="lr-form-item-title">教师<font face="宋体">*</font></div> | |||||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js") |
@@ -0,0 +1,47 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-11-29 11:43 | |||||
* 描 述:开课计划 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
//page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||||
//$('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'realname' }); | |||||
} | |||||
//initData: function () { | |||||
// if (!!keyValue) { | |||||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/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) { | |||||
console.log(keyValue, 111); | |||||
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach?keyValue=' + keyValue, function (res) { | |||||
// // 保存成功后才回调 | |||||
// if (!!callBack) { | |||||
// callBack(); | |||||
// } | |||||
//}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1,4 +1,4 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
@@ -319,6 +319,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateManageController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\CertificateManageController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateResultController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\CertificateResultController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\ClassPlanTeachController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\ClassPlanController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\ClassPlanController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\DispatchController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\DispatchController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaCodeOfContuctController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\EvaCodeOfContuctController.cs" /> | ||||
@@ -946,6 +947,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\CertificateResult\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormType.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormType.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Dispatch\Form.js" /> | ||||
@@ -1079,6 +1081,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.js" /> | <Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | <Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | <Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | ||||
@@ -7460,6 +7463,8 @@ | |||||
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\QualityReport\Index.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachForm.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\SyncByConditionForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\SyncByConditionForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexItem.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexItem.cshtml" /> | ||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
@@ -120,5 +120,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 去重 | |||||
/// </summary> | |||||
/// <param name="School"></param> | |||||
/// <param name="Year"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="Dept"></param> | |||||
/// <param name="Major"></param> | |||||
/// <param name="Grade"></param> | |||||
/// <param name="Lesson"></param> | |||||
/// <returns></returns> | |||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, | |||||
string Major, string Grade, string Lesson) | |||||
{ | |||||
try | |||||
{ | |||||
return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DelRelation(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
classPlanService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -44,5 +44,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void SaveEntity(string keyValue, OpenLessonPlanEntity entity); | void SaveEntity(string keyValue, OpenLessonPlanEntity entity); | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 去重 | |||||
/// </summary> | |||||
/// <param name="ID">主键</param> | |||||
/// <param name="School">校区</param> | |||||
/// <param name="Year">学年</param> | |||||
/// <param name="Semester">学期</param> | |||||
/// <param name="Dept">系部</param> | |||||
/// <param name="Major">专业</param> | |||||
/// <param name="Grade">年级</param> | |||||
/// <param name="Lesson">课程</param> | |||||
/// <returns></returns> | |||||
OpenLessonPlanEntity GetRepetitions( string School, string Year, string Semester, string Dept, string Major, string Grade, string Lesson); | |||||
/// <summary> | |||||
/// 编辑时删除关联数据 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
void DelRelation(string keyValue); | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -122,13 +122,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
public void DeleteEntity(string keyValue) | public void DeleteEntity(string keyValue) | ||||
{ | { | ||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | try | ||||
{ | { | ||||
var keyvalue = Convert.ToInt32(keyValue); | var keyvalue = Convert.ToInt32(keyValue); | ||||
this.BaseRepository("CollegeMIS").Delete<OpenLessonPlanEntity>(t => t.ID == keyvalue); | |||||
var OpList = this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>(t => t.ID == keyvalue); | |||||
if (OpList != null) | |||||
{ | |||||
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | |||||
x => x.DeptNo == OpList.DeptNo && | |||||
x.MajorNo == OpList.MajorNo && | |||||
x.Grade == OpList.Grade && | |||||
x.Semester == OpList.Semester && | |||||
x.LessonNo == OpList.LessonNo && | |||||
x.AcademicYearNo == OpList.AcademicYearNo | |||||
).ToList(); | |||||
List<string> StrTeach = null; | |||||
if (TeachList.Count > 0) | |||||
{ | |||||
StrTeach = TeachList.Select(x => x.TeachClassNo).ToList(); | |||||
if (StrTeach.Count() > 0) | |||||
{ | |||||
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | |||||
y => y.DeptNo == OpList.DeptNo && | |||||
y.MajorNo == OpList.MajorNo && | |||||
y.Grade == OpList.Grade && | |||||
y.Semester == OpList.Semester && | |||||
y.LessonNo == OpList.LessonNo && | |||||
y.AcademicYearNo == OpList.AcademicYearNo && | |||||
StrTeach.Contains(y.ClassNo) | |||||
); | |||||
foreach (var item in LessonList) | |||||
{ | |||||
db.Delete<StuSelectLessonListEntity>(m => m.SelectId == Convert.ToInt32(item.SelectId)); | |||||
} | |||||
foreach (var item in TeachList) | |||||
{ | |||||
db.Delete<TeachClassEntity>(m => m.ID == item.ID); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
//this.BaseRepository("CollegeMIS").Delete<OpenLessonPlanEntity>(t => t.ID == keyvalue); | |||||
db.Delete<OpenLessonPlanEntity>(m => m.ID == keyvalue); | |||||
db.Commit(); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -175,5 +217,105 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 去重 | |||||
/// </summary> | |||||
/// <param name="ID">主键</param> | |||||
/// <param name="School">校区</param> | |||||
/// <param name="Year">学年</param> | |||||
/// <param name="Semester">学期</param> | |||||
/// <param name="Dept">系部</param> | |||||
/// <param name="Major">专业</param> | |||||
/// <param name="Grade">年级</param> | |||||
/// <param name="Lesson">课程</param> | |||||
/// <returns></returns> | |||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, | |||||
string Major, string Grade, string Lesson) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>( | |||||
x => x.F_SchoolId == School | |||||
&& x.AcademicYearNo == Year | |||||
&& x.Semester == Semester | |||||
&& x.DeptNo == Dept | |||||
&& x.MajorNo == Major | |||||
&& x.Grade == Grade | |||||
&& x.LessonNo == Lesson | |||||
); | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
Console.WriteLine(e); | |||||
throw; | |||||
} | |||||
} | |||||
public void DelRelation(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var keyvalue = Convert.ToInt32(keyValue); | |||||
var OpList = this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>(t => t.ID == keyvalue); | |||||
if (OpList != null) | |||||
{ | |||||
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | |||||
x => x.DeptNo == OpList.DeptNo && | |||||
x.MajorNo == OpList.MajorNo && | |||||
x.Grade == OpList.Grade && | |||||
x.Semester == OpList.Semester && | |||||
x.LessonNo == OpList.LessonNo && | |||||
x.AcademicYearNo == OpList.AcademicYearNo | |||||
).ToList(); | |||||
List<string> StrTeach = null; | |||||
if (TeachList.Count > 0) | |||||
{ | |||||
StrTeach = TeachList.Select(x => x.TeachClassNo).ToList(); | |||||
if (StrTeach.Count > 0) | |||||
{ | |||||
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | |||||
y => y.DeptNo == OpList.DeptNo && | |||||
y.MajorNo == OpList.MajorNo && | |||||
y.Grade == OpList.Grade && | |||||
y.Semester == OpList.Semester && | |||||
y.LessonNo == OpList.LessonNo && | |||||
y.AcademicYearNo == OpList.AcademicYearNo && | |||||
StrTeach.Contains(y.ClassNo) | |||||
); | |||||
foreach (var item in LessonList) | |||||
{ | |||||
db.Delete<StuSelectLessonListEntity>(m => m.SelectId == Convert.ToInt32(item.SelectId)); | |||||
} | |||||
foreach (var item in TeachList) | |||||
{ | |||||
db.Delete<TeachClassEntity>(m => m.ID == item.ID); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -270,6 +270,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("ISALLOWEDIT")] | [Column("ISALLOWEDIT")] | ||||
public bool? IsAllowEdit { get; set; } | public bool? IsAllowEdit { get; set; } | ||||
/// <summary> | |||||
/// 排课标识 | |||||
/// </summary> | |||||
[Column("STATE")] | |||||
public int? State { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -305,6 +310,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[NotMapped] | [NotMapped] | ||||
public string MajorName { get; set; } | public string MajorName { get; set; } | ||||
/// <summary> | |||||
/// 教师 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string TeachNo { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -0,0 +1,145 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-01 11:49 | |||||
/// 描 述:收文报告 | |||||
/// </summary> | |||||
public class StuSelectLessonListBLL : StuSelectLessonListIBLL | |||||
{ | |||||
private StuSelectLessonListService stuSelectLessonListService = new StuSelectLessonListService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuSelectLessonListEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return stuSelectLessonListService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Dispatch表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuSelectLessonListEntity GetListEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return stuSelectLessonListService.GetListEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
stuSelectLessonListService.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> | |||||
public void SaveEntity(string keyValue, StuSelectLessonListEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuSelectLessonListService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
public void SaveEntityList(List<StuSelectLessonListEntity> entity) | |||||
{ | |||||
try | |||||
{ | |||||
stuSelectLessonListService.SaveEntityList(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,50 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-01 11:49 | |||||
/// 描 述:收文报告 | |||||
/// </summary> | |||||
public interface StuSelectLessonListIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<StuSelectLessonListEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Dispatch表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
StuSelectLessonListEntity GetListEntity(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, StuSelectLessonListEntity entity); | |||||
void SaveEntityList(List<StuSelectLessonListEntity> entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,235 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-06-01 11:49 | |||||
/// 描 述:收文报告 | |||||
/// </summary> | |||||
public class StuSelectLessonListService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StuSelectLessonListEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM Dispatch t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.DisFrom like @keyword "); | |||||
} | |||||
string beginDate = queryParam["StartTime"].ToString(); | |||||
string endDate = queryParam["EndTime"].ToString(); | |||||
if (!string.IsNullOrEmpty(beginDate) && !string.IsNullOrEmpty(endDate)) | |||||
{ | |||||
#region 获取日期(年 月 日) | |||||
string bYaer = beginDate.Substring(0, 4); | |||||
string bMonth = beginDate.Substring(5, 2); | |||||
string bdate = beginDate.Substring(8, 2); | |||||
string eYaer = endDate.Substring(0, 4); | |||||
string eMonth = endDate.Substring(5, 2); | |||||
#endregion | |||||
string edate = endDate.Substring(8, 2); | |||||
strSql.Append(@" and (t.DisYear BETWEEN '" + bYaer + "' and '" + eYaer + "') " + | |||||
"and (t.DisMonth BETWEEN '" + bMonth + "' and '" + eMonth + "') " + | |||||
" and (t.DisDay BETWEEN '" + bdate + "' and '" + edate + "') "); | |||||
} | |||||
if (!queryParam["userId"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" AND t.Id Not in(select DisId from DispatchAudit where AuditUser ='" + queryParam["userId"].ToString() + "') "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Dispatch表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public StuSelectLessonListEntity GetListEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuSelectLessonListEntity>(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 keyvalue = Convert.ToInt32(keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<StuSelectLessonListEntity>(t => t.SelectId == keyvalue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, StuSelectLessonListEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
var keyvalue = Convert.ToInt32(keyValue); | |||||
entity.Modify(keyvalue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
public void SaveEntityList(List<StuSelectLessonListEntity> entity) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
foreach (var item in entity) | |||||
{ | |||||
StuSelectLessonListEntity stuLessonList = new StuSelectLessonListEntity(); | |||||
stuLessonList.F_SchoolId = item.F_SchoolId; | |||||
stuLessonList.NoticeBookNo = item.NoticeBookNo; | |||||
stuLessonList.StuNo = item.StuNo; | |||||
stuLessonList.DeptNo = item.DeptNo; | |||||
stuLessonList.MajorNo = item.MajorNo; | |||||
stuLessonList.ClassNo = item.ClassNo; | |||||
stuLessonList.MajorDetailNo = item.MajorDetailNo; | |||||
stuLessonList.MajorDetailName = item.MajorDetailName; | |||||
stuLessonList.StuName = item.StuName; | |||||
stuLessonList.TeachClassNo = item.TeachClassNo; | |||||
stuLessonList.GenderNo = item.GenderNo; | |||||
stuLessonList.AcademicYearNo = item.AcademicYearNo; | |||||
stuLessonList.Semester = item.Semester; | |||||
stuLessonList.OpenLessonDeptNo = item.OpenLessonDeptNo; | |||||
stuLessonList.OpenLessonMajorNo = item.OpenLessonMajorNo; | |||||
stuLessonList.LessonNo = item.LessonNo; | |||||
stuLessonList.LessonName = item.LessonName; | |||||
stuLessonList.PartCode = item.PartCode; | |||||
stuLessonList.LessonNameEng = item.LessonNameEng; | |||||
stuLessonList.OrdinaryScoreScale = item.OrdinaryScoreScale; | |||||
stuLessonList.TermInScoreScale = item.TermInScoreScale; | |||||
stuLessonList.TermEndScoreScale = item.TermEndScoreScale; | |||||
stuLessonList.OtherScoreScale = item.OtherScoreScale; | |||||
stuLessonList.TeachClassNo = item.TeachClassNo; | |||||
stuLessonList.LessonSortNo = item.LessonSortNo; | |||||
stuLessonList.StuSortNo = item.StuSortNo; | |||||
stuLessonList.Grade = item.Grade; | |||||
stuLessonList.StudyScore = item.StudyScore; | |||||
stuLessonList.TotalStudyHour = item.TotalStudyHour; | |||||
stuLessonList.IsInEffect = item.IsInEffect; | |||||
stuLessonList.Remark = item.Remark; | |||||
stuLessonList.ConflictLessonNo = item.ConflictLessonNo; | |||||
stuLessonList.EmpNo = item.EmpNo; | |||||
stuLessonList.TeachPlanNo = item.TeachPlanNo; | |||||
stuLessonList.IsPitchOn = item.IsPitchOn; | |||||
stuLessonList.CheckMark = item.CheckMark; | |||||
stuLessonList.InsertTime = item.InsertTime; | |||||
db.Insert(stuLessonList); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,247 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-01-29 11:08 | |||||
/// 描 述:班级信息管理 | |||||
/// </summary> | |||||
public class TeachClassBLL : TeachClassIBLL | |||||
{ | |||||
private TeachClassService teachClassEntity = new TeachClassService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TeachClassEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return teachClassEntity.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public bool GetAny() | |||||
{ | |||||
try | |||||
{ | |||||
return teachClassEntity.GetAny(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ClassInfo表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public TeachClassEntity GetTeachClassEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return teachClassEntity.GetTeachClassEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ClassInfo表实体数据 | |||||
/// <param name="classNo">班级编号</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
#endregion | |||||
#region 提交数据 | |||||
public void Lock(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.Lock(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void UnLock(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.UnLock(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, TeachClassEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SaveEntityList(List<TeachClassEntity> entity) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.SaveEntityList(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<TeachClassEntity> GetAllClass() | |||||
{ | |||||
try | |||||
{ | |||||
return teachClassEntity.GetAllClass(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SetTeach(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
teachClassEntity.SetTeach(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,65 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-01-29 11:08 | |||||
/// 描 述:班级信息管理 | |||||
/// </summary> | |||||
public interface TeachClassIBLL | |||||
{ | |||||
#region 获取数据 | |||||
bool GetAny(); | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<TeachClassEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取ClassInfo表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
TeachClassEntity GetTeachClassEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
void Lock(string keyValue); | |||||
void UnLock(string keyValue); | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void SaveEntity(string keyValue, TeachClassEntity entity); | |||||
#endregion | |||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 设置教师 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
void SetTeach(string keyValue); | |||||
void SaveEntityList(List<TeachClassEntity> entity); | |||||
IEnumerable<TeachClassEntity> GetAllClass(); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,365 @@ | |||||
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-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-01-29 11:08 | |||||
/// 描 述:班级信息管理 | |||||
/// </summary> | |||||
public class TeachClassService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TeachClassEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM TeachClass t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||||
{ | |||||
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); | |||||
} | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Semester = @Semester "); | |||||
} | |||||
if (!queryParam["DeptNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||||
} | |||||
if (!queryParam["MajorNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||||
} | |||||
if (!queryParam["Grade"].IsEmpty()) | |||||
{ | |||||
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Grade Like @Grade "); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LessonNo = @LessonNo "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
internal bool GetAny() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>().ToList().Count > 0 ? true : false; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ClassInfo表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public TeachClassEntity GetTeachClassEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<TeachClassEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
public void Lock(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//单个启用 | |||||
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=1 where ClassId='" + keyValue + "'"); | |||||
//多个启用 | |||||
var keyValueArr = keyValue.Split(','); | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
db.ExecuteBySql("update ClassInfo set CheckMark=1 where ClassId='" + item + "'"); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void UnLock(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//单个停用 | |||||
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=0 where ClassId='" + keyValue + "'"); | |||||
//多个停用 | |||||
var keyValueArr = keyValue.Split(','); | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
db.ExecuteBySql("update ClassInfo set CheckMark=0 where ClassId='" + item + "'"); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//单个删除 | |||||
//this.BaseRepository("CollegeMIS").Delete<TeachClassEntity>(t => t.ClassId == keyValue); | |||||
//多个删除 | |||||
var keyValueArr = keyValue.Split(','); | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
db.Delete<TeachClassEntity>(t => t.ID == Convert.ToInt32(item)); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, TeachClassEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
var keyvalue = Convert.ToInt32(keyValue); | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyvalue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 扩展数据 | |||||
public IEnumerable<TeachClassEntity> GetAllClass() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
public void SetTeach(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
//foreach (var item in List) | |||||
//{ | |||||
// TeachClassEntity Teach = new TeachClassEntity(); | |||||
// Teach.TeachClassNo = item.TeachClassNo; | |||||
// Teach.AcademicYearNo = item.AcademicYearNo; | |||||
// Teach.DeptNo = item.DeptNo; | |||||
// Teach.MajorNo = item.MajorNo; | |||||
// Teach.Grade = item.Grade; | |||||
// Teach.Semester = item.Semester; | |||||
// Teach.LessonNo = item.LessonNo; | |||||
// Teach.StuNum = item.StuNum; | |||||
// Teach.LessonSortNo = item.LessonSortNo; | |||||
// Teach.F_SchoolId = item.F_SchoolId; | |||||
// db.Insert(Teach); | |||||
//} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity"></param> | |||||
public void SaveEntityList(List<TeachClassEntity> List) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
foreach (var item in List) | |||||
{ | |||||
TeachClassEntity Teach = new TeachClassEntity(); | |||||
Teach.TeachClassNo = item.TeachClassNo; | |||||
Teach.AcademicYearNo = item.AcademicYearNo; | |||||
Teach.DeptNo = item.DeptNo; | |||||
Teach.MajorNo = item.MajorNo; | |||||
Teach.Grade = item.Grade; | |||||
Teach.Semester = item.Semester; | |||||
Teach.LessonNo = item.LessonNo; | |||||
Teach.StuNum = item.StuNum; | |||||
Teach.LessonSortNo = item.LessonSortNo; | |||||
Teach.F_SchoolId = item.F_SchoolId; | |||||
db.Insert(Teach); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -211,6 +211,9 @@ | |||||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreEntity.cs" /> | <Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreIBLL.cs" /> | <Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreService.cs" /> | <Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePre\StuSelectLessonListOfElectivePreService.cs" /> | ||||
<Compile Include="EducationalAdministration\StuSelectLessonList\StuSelectLessonListBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuSelectLessonList\StuSelectLessonListIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\StuSelectLessonList\StuSelectLessonListService.cs" /> | |||||
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigBLL.cs" /> | <Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigEntity.cs" /> | <Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigIBLL.cs" /> | <Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigIBLL.cs" /> | ||||
@@ -228,6 +231,9 @@ | |||||
<Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceIBLL.cs" /> | <Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceService.cs" /> | <Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceService.cs" /> | ||||
<Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceEntity.cs" /> | <Compile Include="EducationalAdministration\TeachAttendance\TeachAttendanceEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\TeachClass\TeachClassBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\TeachClass\TeachClassIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\TeachClass\TeachClassService.cs" /> | |||||
<Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialBLL.cs" /> | <Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialEntity.cs" /> | <Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialIBLL.cs" /> | <Compile Include="EducationalAdministration\TeachingMaterial\TeachingMaterialIBLL.cs" /> | ||||