考试申请审核功能bug修改
This commit is contained in:
parent
b4bc3d1581
commit
89bffb101a
@ -136,8 +136,21 @@ public class ExamApplyController extends DefaultBaseController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PutMapping("update-more/{ids}")
|
@PutMapping("update-more/{ids}")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult updateMore(@PathVariable("ids") String ids, @RequestBody ExamApplyVO examApplyVO) {
|
public SuccessResult updateMore(@PathVariable("ids") String ids) {
|
||||||
examApplyService.updateMore(Arrays.asList(ids.split("\\_")), examApplyVO);
|
Map<String, Object> params = requestParams();
|
||||||
|
List<String> examId = Arrays.asList(params.get("examId").toString().split(","));
|
||||||
|
List<String> point = Arrays.asList(params.get("point").toString().split(","));
|
||||||
|
Integer checkStatus = Integer.parseInt(params.get("checkStatus").toString());
|
||||||
|
List<String> examApplyIds = Arrays.asList(ids.split("\\_"));
|
||||||
|
if(null != examApplyIds && examApplyIds.size() > 0) {
|
||||||
|
for(int i=0;i<examApplyIds.size();i++) {
|
||||||
|
ExamApplyVO examApplyVO = new ExamApplyVO();
|
||||||
|
examApplyVO.setCheckStatus(checkStatus);
|
||||||
|
examApplyVO.setExamId(examId.get(i));
|
||||||
|
examApplyVO.setPoint(point.get(i));
|
||||||
|
examApplyService.update(examApplyIds.get(i), examApplyVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String token, String examApplyId, ExamApplyVO examApplyVO) {
|
public void update(String token, String examApplyId, ExamApplyVO examApplyVO) {
|
||||||
PlanCheckVO planCheckVO = null;
|
PlanCheckVO planCheckVO = new PlanCheckVO();
|
||||||
Boolean canUpdate = planCheckService.canUpdate(null, examApplyVO, planCheckVO);
|
Boolean canUpdate = planCheckService.canUpdate(null, examApplyVO, planCheckVO);
|
||||||
if(canUpdate) {
|
if(canUpdate) {
|
||||||
planCheckService.save(planCheckVO);
|
planCheckService.save(planCheckVO);
|
||||||
|
@ -216,6 +216,7 @@
|
|||||||
{field: 'point', width: 180, title: '审核人角色', align:'center',
|
{field: 'point', width: 180, title: '审核人角色', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
|
point = rowData;
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
@ -242,7 +243,6 @@
|
|||||||
},
|
},
|
||||||
{field: 'planName', width: 180, title: '计划名称', align:'center',
|
{field: 'planName', width: 180, title: '计划名称', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
point = row['point'];
|
|
||||||
checkStatus = row['checkStatus'];
|
checkStatus = row['checkStatus'];
|
||||||
var rowData = row.classPlanDTO[this.field];
|
var rowData = row.classPlanDTO[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -342,7 +342,7 @@
|
|||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
if(rowData != '1') {
|
if(rowData != '1') {
|
||||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">暂无考场信息</a>';
|
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="sentExamMsg">分配考场信息</a>';
|
||||||
}else {
|
}else {
|
||||||
rowData = '<a class="layui-btn layui-btn-xs" lay-event="addressShow">查看考场信息</a>';
|
rowData = '<a class="layui-btn layui-btn-xs" lay-event="addressShow">查看考场信息</a>';
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 考试申请批量审核
|
// 考试申请批量审核
|
||||||
function checkMore(ids, planIds) {
|
function checkMore(ids, planIds, points) {
|
||||||
top.dialog.msg('考试申请审核', {
|
top.dialog.msg('考试申请审核', {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: ['通过', '退回'],
|
btn: ['通过', '退回'],
|
||||||
@ -401,9 +401,23 @@
|
|||||||
yes: function (index) {
|
yes: function (index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
// 审核
|
// 审核
|
||||||
if('分管领导' == point && '1' == checkStatus) {
|
var layIndex;
|
||||||
sentExamMsg(planIds);
|
top.restAjax.put(top.restAjax.path('api/examapply/update-more/{ids}?checkStatus=1&point={points}&examId={planIds}', [ids, points, planIds]), {}, null, function (code, data) {
|
||||||
}
|
top.dialog.msg('审核成功', {time: 1000});
|
||||||
|
var pointIdArray = points.split(',');
|
||||||
|
if(null != pointIdArray && pointIdArray.length > 0) {
|
||||||
|
if('分管领导' == pointIdArray[0]) {
|
||||||
|
sentExamMsg(planIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reloadTable();
|
||||||
|
}, function (code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function () {
|
||||||
|
layIndex = top.dialog.msg(top.dataMessage.updating, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function () {
|
||||||
|
top.dialog.close(layIndex);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
btn2: function(index) {
|
btn2: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
@ -504,8 +518,9 @@
|
|||||||
} else {
|
} else {
|
||||||
var ids = '';
|
var ids = '';
|
||||||
var planIds = '';
|
var planIds = '';
|
||||||
|
var points = '';
|
||||||
for(var i = 0, item; item = checkDatas[i++];) {
|
for(var i = 0, item; item = checkDatas[i++];) {
|
||||||
if(item.checkStatus === 1 || item.checkStatus === 2) {
|
if(item.checkStatus === 1 || item.checkStatus === -1) {
|
||||||
top.dialog.msg('当前选择存在已经审核完成数据,请重新选择');
|
top.dialog.msg('当前选择存在已经审核完成数据,请重新选择');
|
||||||
reloadTable();
|
reloadTable();
|
||||||
return false;
|
return false;
|
||||||
@ -513,16 +528,18 @@
|
|||||||
if (i > 1) {
|
if (i > 1) {
|
||||||
ids += '_';
|
ids += '_';
|
||||||
planIds += ',';
|
planIds += ',';
|
||||||
|
points += ',';
|
||||||
}
|
}
|
||||||
ids += item['examApplyId'];
|
ids += item['examApplyId'];
|
||||||
planIds += item['examId'];
|
planIds += item['examId'];
|
||||||
|
points += item['point'];
|
||||||
}
|
}
|
||||||
if(ids.length <= 0) {
|
if(ids.length <= 0) {
|
||||||
top.dialog.msg('当前选择数据已经审核完成,请重新选择');
|
top.dialog.msg('当前选择数据已经审核完成,请重新选择');
|
||||||
reloadTable();
|
reloadTable();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
checkMore(ids, planIds);
|
checkMore(ids, planIds, points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -613,6 +630,8 @@
|
|||||||
teacher(data)
|
teacher(data)
|
||||||
}else if('examMsg' == obj.event) {
|
}else if('examMsg' == obj.event) {
|
||||||
examMsg(data)
|
examMsg(data)
|
||||||
|
}else if('sentExamMsg' == obj.event) {
|
||||||
|
sentExamMsg(data.examId)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user