Merge branch 'master' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup

This commit is contained in:
wans 2021-05-12 10:52:12 +08:00
commit dd6746a3bd
10 changed files with 96 additions and 80 deletions

View File

@ -234,7 +234,7 @@ public interface IApplyService {
/** /**
* 统计机构星期的报名信息 * 统计机构星期的报名信息
* @param week * @param weekTime
* @param applyInstitutionId * @param applyInstitutionId
* @param applyClassId * @param applyClassId
* @return * @return

View File

@ -59,7 +59,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
public SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage page){ public SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage page){
if (StringUtils.isBlank(token)) { if (StringUtils.isBlank(token)) {
page.getParams().put("creator",securityComponent.getCurrentUser().getUserId()); page.getParams().put("creator",securityComponent.getCurrentUser().getUserId());
@ -85,11 +84,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
public void audit(String token,ApplyAuditVO applyAuditVO){ public void audit(String token,ApplyAuditVO applyAuditVO){
ApplyDTO applyDTO = this.get(applyAuditVO.getApplyId()); ApplyDTO applyDTO = this.get(applyAuditVO.getApplyId());
if(applyDTO == null){ if(applyDTO == null){
@ -172,7 +166,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override @Override
public String saveReturnId(String token, ApplyVO applyVO) { public String saveReturnId(String token, ApplyVO applyVO) {
//检查报名数据 //检查报名数据
checkSaveData(applyVO.getApplyCardNumber(),applyVO.getApplyClassId()); checkSaveData(token,applyVO.getApplyCardNumber(),applyVO.getApplyClassId());
String applyId = UUIDUtil.getUUID(); String applyId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(applyVO); Map<String, Object> params = HashMapUtil.beanToMap(applyVO);
params.put("applyId", applyId); params.put("applyId", applyId);
@ -193,11 +187,16 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
return applyId; return applyId;
} }
public void checkSaveData(String applyCardNumber,String ApplyClassId){ public void checkSaveData(String token,String applyCardNumber,String ApplyClassId){
if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){ // if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){
// throw new SaveException("您以报名过该项目");
// }
if(countApplyCreator(token,ApplyClassId) != 0){
throw new SaveException("您以报名过该项目"); throw new SaveException("您以报名过该项目");
} }
ClassPlanDTO classPlanDTO = classPlanService.get(ApplyClassId); ClassPlanDTO classPlanDTO = classPlanService.get(ApplyClassId);
if(classPlanDTO == null){ if(classPlanDTO == null){
throw new ParamsException("未查询到计划信息"); throw new ParamsException("未查询到计划信息");
@ -349,6 +348,25 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
} }
/**
* 统计当前登录账号 报名的培训计划的次数不包括撤回
*/
public Integer countApplyCreator(String creator,String applyClassId){
Map<String, Object> params = new HashMap<>();
params.put("creator",creator);
params.put("applyClassId",applyClassId);
List<String> applyAuditStates = new ArrayList<>();
applyAuditStates.add("0");
applyAuditStates.add("2");
applyAuditStates.add("3");
applyAuditStates.add("-1");
params.put("applyAuditStates",applyAuditStates);
return count(params);
}
/** /**
* 统计证件号码 报名的培训计划的次数不包括撤回 * 统计证件号码 报名的培训计划的次数不包括撤回
*/ */

View File

@ -444,6 +444,8 @@
t1.apply_class_name LIKE CONCAT('%', #{keywords}, '%') t1.apply_class_name LIKE CONCAT('%', #{keywords}, '%')
OR OR
t1.apply_name LIKE CONCAT('%', #{keywords}, '%') t1.apply_name LIKE CONCAT('%', #{keywords}, '%')
OR
t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%')
) )
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
@ -614,6 +616,9 @@
<if test="applyInstitutionId != null and applyInstitutionId != ''"> <if test="applyInstitutionId != null and applyInstitutionId != ''">
AND t1.apply_institution_id = #{applyInstitutionId} AND t1.apply_institution_id = #{applyInstitutionId}
</if> </if>
<if test="creator != null and creator != ''">
AND t1.creator = #{creator}
</if>
<if test="applyAuditStates != null and applyAuditStates != ''"> <if test="applyAuditStates != null and applyAuditStates != ''">
AND t1.apply_audit_state IN AND t1.apply_audit_state IN
<foreach collection="applyAuditStates" index="index" open="(" separator="," close=")"> <foreach collection="applyAuditStates" index="index" open="(" separator="," close=")">

View File

@ -166,13 +166,13 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>'; rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
} }
if(rowData == '2') { if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
} }
return rowData; return rowData;
} }

View File

@ -166,13 +166,13 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>'; rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
} }
if(rowData == '2') { if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
} }
return rowData; return rowData;
} }
@ -184,7 +184,7 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>'; rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
@ -199,7 +199,7 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>'; rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
@ -437,6 +437,8 @@
[data.examId]), {}, null, function(code, resultData) { [data.examId]), {}, null, function(code, resultData) {
if(null != resultData && resultData.length > 0) { if(null != resultData && resultData.length > 0) {
top.dialog.msg('监考老师分配失败'); top.dialog.msg('监考老师分配失败');
}else {
top.dialog.msg('监考老师分配成功');
} }
reloadTable(); reloadTable();
}, function(code, data) { }, function(code, data) {

View File

@ -220,10 +220,6 @@
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) { top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) {
orgNameFun.getOrgName(data.orgId, function(nameData) { orgNameFun.getOrgName(data.orgId, function(nameData) {
data['orgName'] = nameData.institutionName; data['orgName'] = nameData.institutionName;
var dataFormData = {};
for (var i in data) {
dataFormData[i] = data[i] + '';
}
if ('1' == data.planType) { if ('1' == data.planType) {
data.planType = '初训'; data.planType = '初训';
} else if ('2' == data.planType) { } else if ('2' == data.planType) {
@ -231,6 +227,10 @@
} else if ('3' == data.planType) { } else if ('3' == data.planType) {
data.planType = '换证 '; data.planType = '换证 ';
} }
var dataFormData = {};
for (var i in data) {
dataFormData[i] = data[i] + '';
}
form.val('initDataForm', dataFormData); form.val('initDataForm', dataFormData);
form.render(null, 'initDataForm'); form.render(null, 'initDataForm');
}) })

View File

@ -196,7 +196,7 @@
<div class="layui-form-item layui-layout-admin"> <div class="layui-form-item layui-layout-admin">
<div class="layui-input-block"> <div class="layui-input-block">
<div class="layui-footer" style="left: 0;"> <div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button> <button type="button" class="layui-btn" id="subBtn" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button> <button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div> </div>
</div> </div>
@ -297,22 +297,39 @@
}); });
} }
// 初始化视频 // 初始化理论考试开始时间时间戳
function initVideo(fileName, data) { function initTheoryExamStartTimeDateTime() {
for(var i = 0, item; item = data[i++];) { laydate.render({
var player = new ckplayer({ elem: '#theoryExamStartTime',
container: '#'+ fileName + i, type: 'datetime',
variable: 'player', trigger: 'click',
flashplayer: false, done: function (value, date, endDate) {
video: { var startDate = new Date(value).getTime();
file: 'route/file/download/true/'+ item.fileId, var endTime = new Date($('#theoryExamEndTime').val()).getTime();
type: 'video/mp4' if (endTime <= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
} }
}); }
} });
} }
// 初始化理论考试开始时间时间戳 // 初始化理论考试结束时间时间戳
function initTheoryExamEndTimeDateTime() {
laydate.render({
elem: '#theoryExamEndTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化实操考试开始时间时间戳
function initPracticeExamStartTimeDateTime() { function initPracticeExamStartTimeDateTime() {
laydate.render({ laydate.render({
elem: '#practiceExamStartTime', elem: '#practiceExamStartTime',
@ -328,7 +345,7 @@
}); });
} }
// 初始化理论考试结束时间时间戳 // 初始化实操考试结束时间时间戳
function initPracticeExamEndTimeDateTime() { function initPracticeExamEndTimeDateTime() {
laydate.render({ laydate.render({
elem: '#practiceExamEndTime', elem: '#practiceExamEndTime',
@ -344,38 +361,6 @@
}); });
} }
// 初始化实操考试开始时间时间戳
function initTheoryExamStartTimeDateTime() {
laydate.render({
elem: '#theoryExamStartTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamEndTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化实操考试结束时间时间戳
function initTheoryExamEndTimeDateTime() {
laydate.render({
elem: '#theoryExamEndTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化缴费凭证图片上传 // 初始化缴费凭证图片上传
function initPaymentVoucherUploadFile() { function initPaymentVoucherUploadFile() {
var files = $('#paymentVoucher').val(); var files = $('#paymentVoucher').val();
@ -438,6 +423,11 @@
for(var i in data) { for(var i in data) {
dataFormData[i] = data[i] +''; dataFormData[i] = data[i] +'';
} }
if (null == data.status || '' == data.status || typeof (data.status) == 'undefined') {
$('#subBtn').show();
} else {
$('#subBtn').hide();
}
form.val('dataForm', dataFormData); form.val('dataForm', dataFormData);
form.render(null, 'dataForm'); form.render(null, 'dataForm');
initPracticeExamAddressIdSelect(data['practiceExamAddressId']); initPracticeExamAddressIdSelect(data['practiceExamAddressId']);
@ -463,10 +453,6 @@
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function(code, data) { top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
orgNameFun.getOrgName(data.orgId, function(nameData) { orgNameFun.getOrgName(data.orgId, function(nameData) {
data['orgName'] = nameData.institutionName; data['orgName'] = nameData.institutionName;
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
if ('1' == data.planType) { if ('1' == data.planType) {
data.planType = '初训'; data.planType = '初训';
} else if ('2' == data.planType) { } else if ('2' == data.planType) {
@ -474,6 +460,10 @@
} else if ('3' == data.planType) { } else if ('3' == data.planType) {
data.planType = '换证 '; data.planType = '换证 ';
} }
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('initDataForm', dataFormData); form.val('initDataForm', dataFormData);
form.render(null, 'initDataForm'); form.render(null, 'initDataForm');
}) })

View File

@ -165,14 +165,17 @@
{field: 'checkStatus', width: 180, title: '审核状态', align:'center', {field: 'checkStatus', width: 180, title: '审核状态', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-'; return '-';
} }
if('0' == rowData) {
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审核</a>';
}
if('2' == rowData) { if('2' == rowData) {
rowData = '审核通过'; rowData = '<a class="layui-btn layui-btn-xs">审核通过</a>';
} }
if('3' == rowData) { if('3' == rowData) {
rowData = '审核驳回'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审核驳回</a>';
} }
return rowData; return rowData;
} }

View File

@ -220,10 +220,6 @@
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) { top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) {
orgNameFun.getOrgName(data.orgId, function(nameData) { orgNameFun.getOrgName(data.orgId, function(nameData) {
data['orgName'] = nameData.institutionName; data['orgName'] = nameData.institutionName;
var dataFormData = {};
for (var i in data) {
dataFormData[i] = data[i] + '';
}
if ('1' == data.planType) { if ('1' == data.planType) {
data.planType = '初训'; data.planType = '初训';
} else if ('2' == data.planType) { } else if ('2' == data.planType) {
@ -231,6 +227,10 @@
} else if ('3' == data.planType) { } else if ('3' == data.planType) {
data.planType = '换证 '; data.planType = '换证 ';
} }
var dataFormData = {};
for (var i in data) {
dataFormData[i] = data[i] + '';
}
form.val('initDataForm', dataFormData); form.val('initDataForm', dataFormData);
form.render(null, 'initDataForm'); form.render(null, 'initDataForm');
}) })

View File

@ -273,8 +273,6 @@
}); });
}, },
initTeacherEChart: function(){ initTeacherEChart: function(){
top.restAjax.get('api/indexcount/count-teacher-num', {}, null, function(code, data) { top.restAjax.get('api/indexcount/count-teacher-num', {}, null, function(code, data) {
var dataList = []; var dataList = [];