@@ -108,7 +108,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetPageListOfMerge(string pagination, string queryJson) | public ActionResult GetPageListOfMerge(string pagination, string queryJson) | ||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
var data = openLessonPlanOfElectiveIBLL.GetPageListOfMerge(paginationobj, queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo); | |||||
var data = openLessonPlanOfElectiveIBLL.GetPageListOfMerge(paginationobj, queryJson); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -157,6 +157,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 批量拒绝【审核学生页面】 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="OLPEId"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnPass(string keyValue, string OLPEId) | public ActionResult UnPass(string keyValue, string OLPEId) | ||||
@@ -174,6 +180,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 批量拒绝【已审学生页面】 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="OLPEId"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult UnPassOfFinish(string keyValue, string OLPEId) | |||||
{ | |||||
var stulist = keyValue.Split(','); | |||||
var olpentity = openLessonPlanOfElectiveIBLL.GetOpenLessonPlanOfElectiveEntity(OLPEId); | |||||
if (olpentity != null) | |||||
{ | |||||
stuSelectLessonListOfElectiveIBLL.UnPassOfFinish(stulist, olpentity); | |||||
} | |||||
else | |||||
{ | |||||
return Fail("当前选课数据不存在!"); | |||||
} | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <summary> | /// <summary> | ||||
@@ -162,18 +162,21 @@ var bootstrap = function ($, learun) { | |||||
{ label: "学年", name: "AcademicYearNo", width: 45, align: "left" }, | { label: "学年", name: "AcademicYearNo", width: 45, align: "left" }, | ||||
{ label: "学期", name: "Semester", width: 35, align: "left" }, | { label: "学期", name: "Semester", width: 35, align: "left" }, | ||||
{ label: "课程号", name: "LessonNo", width: 70, align: "left" }, | { label: "课程号", name: "LessonNo", width: 70, align: "left" }, | ||||
//{ | |||||
// label: "课程名称", name: "LessonNo2", width: 170, 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: "LessonNo2", width: 170, 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: "LessonName", width: 170, align: "left" | |||||
}, | }, | ||||
{ | { | ||||
label: "上课节次", name: "LessonSection", width: 100, align: "left", | label: "上课节次", name: "LessonSection", width: 100, align: "left", | ||||
@@ -233,7 +236,7 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isPage: true, | isPage: true, | ||||
sidx: 'AcademicYearNo,Semester', | |||||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', | |||||
sord: 'desc' | sord: 'desc' | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
@@ -28,7 +28,7 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize=""> | <div class=" btn-group btn-group-sm" learun-authorize=""> | ||||
<a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 单个审核</a> | <a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 单个审核</a> | ||||
<a id="lr_auditpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量审核</a> | |||||
<a id="lr_auditpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量审核通过</a> | |||||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | <a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//批量审核 | |||||
//批量审核通过 | |||||
$('#lr_auditpass').on('click', function () { | $('#lr_auditpass').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -59,6 +59,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//批量拒绝 | |||||
$('#lr_auditunpass').on('click', function () { | $('#lr_auditunpass').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -26,6 +26,9 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize=""> | |||||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -21,6 +21,20 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
//批量拒绝 | |||||
$('#lr_auditunpass').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认拒绝?', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/UnPassOfFinish', { keyValue: keyValue, OLPEId: OLPEId }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -71,6 +85,7 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId:'Id', | mainId:'Id', | ||||
isPage: true, | isPage: true, | ||||
isMultiselect: true, | |||||
sidx: 'StuNo', | sidx: 'StuNo', | ||||
sord:'asc' | sord:'asc' | ||||
}); | }); | ||||
@@ -28,7 +28,7 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize=""> | <div class=" btn-group btn-group-sm" learun-authorize=""> | ||||
<a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 单个审核</a> | <a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 单个审核</a> | ||||
<a id="lr_auditpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量审核</a> | |||||
<a id="lr_auditpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量审核通过</a> | |||||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | <a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//批量审核 | |||||
//批量审核通过 | |||||
$('#lr_auditpass').on('click', function () { | $('#lr_auditpass').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -59,6 +59,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//批量拒绝 | |||||
$('#lr_auditunpass').on('click', function () { | $('#lr_auditunpass').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -26,6 +26,9 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize=""> | |||||
<a id="lr_auditunpass" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 批量拒绝</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -21,6 +21,20 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
//批量拒绝 | |||||
$('#lr_auditunpass').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认拒绝?', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectivePre/UnPass', { keyValue: keyValue, OLPEId: OLPEId }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -71,6 +85,7 @@ var bootstrap = function ($, learun) { | |||||
], | ], | ||||
mainId:'Id', | mainId:'Id', | ||||
isPage: true, | isPage: true, | ||||
isMultiselect: true, | |||||
sidx: 'StuNo', | sidx: 'StuNo', | ||||
sord:'asc' | sord:'asc' | ||||
}); | }); | ||||
@@ -1545,7 +1545,6 @@ | |||||
} | } | ||||
} | } | ||||
console.log(head); | |||||
}, | }, | ||||
// 单击行 | // 单击行 | ||||
clickRow: function ($self, $et, op) { | clickRow: function ($self, $et, op) { | ||||
@@ -242,6 +242,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity) | |||||
{ | |||||
try | |||||
{ | |||||
stuSelectLessonListOfElectiveService.UnPassOfFinish(stulist, olpentity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<StuSelectLessonListOfElectiveEntity> GetAllElectiveLesson(string academicYearNo, string semester) | public IEnumerable<StuSelectLessonListOfElectiveEntity> GetAllElectiveLesson(string academicYearNo, string semester) | ||||
{ | { | ||||
@@ -70,6 +70,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
IEnumerable<StuSelectLessonListOfElectiveEntity> GetQueryStuSelectResultList(Pagination pagination, string queryJson); | IEnumerable<StuSelectLessonListOfElectiveEntity> GetQueryStuSelectResultList(Pagination pagination, string queryJson); | ||||
void Pass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); | void Pass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); | ||||
void UnPass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); | void UnPass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); | ||||
void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); | |||||
IEnumerable<StuSelectLessonListOfElectiveEntity> GetAllElectiveLesson(string academicYearNo, string semester); | IEnumerable<StuSelectLessonListOfElectiveEntity> GetAllElectiveLesson(string academicYearNo, string semester); | ||||
} | } | ||||
} | } |
@@ -243,6 +243,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity) | |||||
{ | |||||
var db = BaseRepository("CollegeMIS"); | |||||
try | |||||
{ | |||||
db.BeginTrans(); | |||||
int count = 0;//待拒绝学生数量 | |||||
foreach (var item in stulist) | |||||
{ | |||||
var model = db.FindEntity<StuSelectLessonListOfElectiveEntity>(item); | |||||
if (model != null) | |||||
{ | |||||
count++; | |||||
db.ExecuteBySql("update StuSelectLessonListOfElective set Status=3 where Id='" + item + "'"); | |||||
} | |||||
} | |||||
//修改OpenLessonPlanOfElective通过人数 | |||||
if (count > 0) | |||||
{ | |||||
olpentity.StuNum = olpentity.StuNum - count; | |||||
db.Update(olpentity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||