diff --git a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java index 631e472..27e2fa6 100644 --- a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java +++ b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java @@ -234,7 +234,7 @@ public interface IApplyService { /** * 统计机构星期的报名信息 - * @param week + * @param weekTime * @param applyInstitutionId * @param applyClassId * @return diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 4e3b635..48148a6 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -59,7 +59,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic - public SuccessResultList> listPageMyApply(String token,ListPage page){ if (StringUtils.isBlank(token)) { 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){ ApplyDTO applyDTO = this.get(applyAuditVO.getApplyId()); if(applyDTO == null){ @@ -172,7 +166,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic @Override public String saveReturnId(String token, ApplyVO applyVO) { //检查报名数据 - checkSaveData(applyVO.getApplyCardNumber(),applyVO.getApplyClassId()); + checkSaveData(token,applyVO.getApplyCardNumber(),applyVO.getApplyClassId()); String applyId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(applyVO); params.put("applyId", applyId); @@ -193,11 +187,16 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic return applyId; } - public void checkSaveData(String applyCardNumber,String ApplyClassId){ - if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){ + public void checkSaveData(String token,String applyCardNumber,String ApplyClassId){ +// if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){ +// throw new SaveException("您以报名过该项目"); +// } + + if(countApplyCreator(token,ApplyClassId) != 0){ throw new SaveException("您以报名过该项目"); } + ClassPlanDTO classPlanDTO = classPlanService.get(ApplyClassId); if(classPlanDTO == null){ throw new ParamsException("未查询到计划信息"); @@ -349,6 +348,25 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + + /** + * 统计当前登录账号 报名的培训计划的次数(不包括撤回) + */ + public Integer countApplyCreator(String creator,String applyClassId){ + Map params = new HashMap<>(); + params.put("creator",creator); + params.put("applyClassId",applyClassId); + List applyAuditStates = new ArrayList<>(); + applyAuditStates.add("0"); + applyAuditStates.add("2"); + applyAuditStates.add("3"); + applyAuditStates.add("-1"); + params.put("applyAuditStates",applyAuditStates); + return count(params); + } + + + /** * 统计证件号码 报名的培训计划的次数(不包括撤回) */ diff --git a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml index bb61ada..de55404 100644 --- a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml @@ -444,6 +444,8 @@ t1.apply_class_name LIKE CONCAT('%', #{keywords}, '%') OR t1.apply_name LIKE CONCAT('%', #{keywords}, '%') + OR + t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%') ) @@ -614,6 +616,9 @@ AND t1.apply_institution_id = #{applyInstitutionId} + + AND t1.creator = #{creator} + AND t1.apply_audit_state IN diff --git a/src/main/resources/static/route/examapply/list-check.html b/src/main/resources/static/route/examapply/list-check.html index f8cf955..d140616 100644 --- a/src/main/resources/static/route/examapply/list-check.html +++ b/src/main/resources/static/route/examapply/list-check.html @@ -166,13 +166,13 @@ return '-'; } if(rowData == '0') { - rowData = '待审批'; + rowData = '待审批'; } if(rowData == '1') { rowData = '审批通过'; } if(rowData == '2') { - rowData = '审批驳回'; + rowData = '审批驳回'; } return rowData; } diff --git a/src/main/resources/static/route/examapply/list.html b/src/main/resources/static/route/examapply/list.html index f74638a..e87d2e8 100644 --- a/src/main/resources/static/route/examapply/list.html +++ b/src/main/resources/static/route/examapply/list.html @@ -166,13 +166,13 @@ return '-'; } if(rowData == '0') { - rowData = '待审批'; + rowData = '待审批'; } if(rowData == '1') { rowData = '审批通过'; } if(rowData == '2') { - rowData = '审批驳回'; + rowData = '审批驳回'; } return rowData; } @@ -184,7 +184,7 @@ return '-'; } if(rowData == '0') { - rowData = '未分配'; + rowData = '未分配'; } if(rowData == '1') { rowData = '已分配'; @@ -199,7 +199,7 @@ return '-'; } if(rowData == '0') { - rowData = '未分配'; + rowData = '未分配'; } if(rowData == '1') { rowData = '已分配'; @@ -437,6 +437,8 @@ [data.examId]), {}, null, function(code, resultData) { if(null != resultData && resultData.length > 0) { top.dialog.msg('监考老师分配失败'); + }else { + top.dialog.msg('监考老师分配成功'); } reloadTable(); }, function(code, data) { diff --git a/src/main/resources/static/route/examapply/update-check.html b/src/main/resources/static/route/examapply/update-check.html index e41e737..ec23f2c 100644 --- a/src/main/resources/static/route/examapply/update-check.html +++ b/src/main/resources/static/route/examapply/update-check.html @@ -220,10 +220,6 @@ top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) { orgNameFun.getOrgName(data.orgId, function(nameData) { data['orgName'] = nameData.institutionName; - var dataFormData = {}; - for (var i in data) { - dataFormData[i] = data[i] + ''; - } if ('1' == data.planType) { data.planType = '初训'; } else if ('2' == data.planType) { @@ -231,6 +227,10 @@ } else if ('3' == data.planType) { data.planType = '换证 '; } + var dataFormData = {}; + for (var i in data) { + dataFormData[i] = data[i] + ''; + } form.val('initDataForm', dataFormData); form.render(null, 'initDataForm'); }) diff --git a/src/main/resources/static/route/examapply/update.html b/src/main/resources/static/route/examapply/update.html index 08ec50a..38af78b 100644 --- a/src/main/resources/static/route/examapply/update.html +++ b/src/main/resources/static/route/examapply/update.html @@ -196,7 +196,7 @@
@@ -297,22 +297,39 @@ }); } - // 初始化视频 - function initVideo(fileName, data) { - for(var i = 0, item; item = data[i++];) { - var player = new ckplayer({ - container: '#'+ fileName + i, - variable: 'player', - flashplayer: false, - video: { - file: 'route/file/download/true/'+ item.fileId, - type: 'video/mp4' + // 初始化理论考试开始时间时间戳 + 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 initPracticeExamStartTimeDateTime() { laydate.render({ elem: '#practiceExamStartTime', @@ -328,7 +345,7 @@ }); } - // 初始化理论考试结束时间时间戳 + // 初始化实操考试结束时间时间戳 function initPracticeExamEndTimeDateTime() { laydate.render({ 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() { var files = $('#paymentVoucher').val(); @@ -438,6 +423,11 @@ for(var i in data) { dataFormData[i] = data[i] +''; } + if (null == data.status || '' == data.status || typeof (data.status) == 'undefined') { + $('#subBtn').show(); + } else { + $('#subBtn').hide(); + } form.val('dataForm', dataFormData); form.render(null, 'dataForm'); initPracticeExamAddressIdSelect(data['practiceExamAddressId']); @@ -463,10 +453,6 @@ top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function(code, data) { orgNameFun.getOrgName(data.orgId, function(nameData) { data['orgName'] = nameData.institutionName; - var dataFormData = {}; - for(var i in data) { - dataFormData[i] = data[i] +''; - } if ('1' == data.planType) { data.planType = '初训'; } else if ('2' == data.planType) { @@ -474,6 +460,10 @@ } else if ('3' == data.planType) { data.planType = '换证 '; } + var dataFormData = {}; + for(var i in data) { + dataFormData[i] = data[i] +''; + } form.val('initDataForm', dataFormData); form.render(null, 'initDataForm'); }) diff --git a/src/main/resources/static/route/examcheck/list.html b/src/main/resources/static/route/examcheck/list.html index a7ec176..65ab363 100644 --- a/src/main/resources/static/route/examcheck/list.html +++ b/src/main/resources/static/route/examcheck/list.html @@ -165,14 +165,17 @@ {field: 'checkStatus', width: 180, title: '审核状态', align:'center', templet: function(row) { var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') { return '-'; } + if('0' == rowData) { + rowData = '待审核'; + } if('2' == rowData) { - rowData = '审核通过'; + rowData = '审核通过'; } if('3' == rowData) { - rowData = '审核驳回'; + rowData = '审核驳回'; } return rowData; } diff --git a/src/main/resources/static/route/examcheck/update.html b/src/main/resources/static/route/examcheck/update.html index ba34870..ee40dad 100644 --- a/src/main/resources/static/route/examcheck/update.html +++ b/src/main/resources/static/route/examcheck/update.html @@ -220,10 +220,6 @@ top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) { orgNameFun.getOrgName(data.orgId, function(nameData) { data['orgName'] = nameData.institutionName; - var dataFormData = {}; - for (var i in data) { - dataFormData[i] = data[i] + ''; - } if ('1' == data.planType) { data.planType = '初训'; } else if ('2' == data.planType) { @@ -231,6 +227,10 @@ } else if ('3' == data.planType) { data.planType = '换证 '; } + var dataFormData = {}; + for (var i in data) { + dataFormData[i] = data[i] + ''; + } form.val('initDataForm', dataFormData); form.render(null, 'initDataForm'); }) diff --git a/src/main/resources/templates/index1.html b/src/main/resources/templates/index1.html index 8bc073a..4bab272 100644 --- a/src/main/resources/templates/index1.html +++ b/src/main/resources/templates/index1.html @@ -273,8 +273,6 @@ }); }, - - initTeacherEChart: function(){ top.restAjax.get('api/indexcount/count-teacher-num', {}, null, function(code, data) { var dataList = [];