From 6c5c50201d8953ffdfc14f03fa9c0be701d863e3 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Wed, 12 May 2021 15:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E6=96=B0=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E8=80=83=E8=AF=95=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classplan/impl/ClassPlanServiceImpl.java | 14 +++++++++++--- .../static/route/classplan/save-report-exam.html | 14 ++------------ .../route/classplan/update-report-exam.html | 16 +++------------- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index 6d32ffa..4fbcdc5 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -402,11 +402,19 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl examApplyVO.setExamType(Integer.parseInt(classPlanVO.getExamType())); examApplyVO.setTheoryExamStartTime(classPlanVO.getEstimateStart()); examApplyVO.setTheoryExamEndTime(classPlanVO.getEstimateEnd()); + examApplyVO.setCheckStatus(0); + examApplyVO.setUserStatus(0); + examApplyVO.setStatus(0); + examApplyVO.setReason("重新申请"); if("3".equals(classPlanVO.getExamType())){ examApplyVO.setPracticeExamStartTime(classPlanVO.getEstimateStart()); examApplyVO.setPracticeExamEndTime(classPlanVO.getEstimateEnd()); } - examApplyService.save(examApplyVO); + //先查询再修改 + Map queryMap = getHashMap(8); + queryMap.put("examId",classPlanId); + ExamApplyDTO history = examApplyService.get(queryMap); + examApplyService.update(history.getExamApplyId(),examApplyVO); } @Override @@ -422,13 +430,13 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl examDTO.setExamApplyId(examApplyDTO.getExamApplyId()); examDTO.setTheoryExamStartTime(examApplyDTO.getTheoryExamStartTime()); examDTO.setTheoryExamEndTime(examApplyDTO.getTheoryExamEndTime()); - if(examApplyDTO.getCheckStatus() == 1){ + if(examApplyDTO.getExamType() != 2 && examApplyDTO.getCheckStatus() == 1){ InstitutionDTO institutionDTO = iInstitutionService.get(examApplyDTO.getTheoryExamAddressId()); examDTO.setTheoryExamAddress(institutionDTO.getInstitutionName() + "-" + institutionDTO.getInstitutionAddress()); } examDTO.setPracticeExamStartTime(examApplyDTO.getPracticeExamStartTime()); examDTO.setPracticeExamEndTime(examApplyDTO.getPracticeExamEndTime()); - if(examApplyDTO.getCheckStatus() == 2){ + if(examApplyDTO.getExamType() != 1 && examApplyDTO.getCheckStatus() == 1){ InstitutionDTO institutionDTO = iInstitutionService.get(examApplyDTO.getPracticeExamAddressId()); examDTO.setPracticeExamAddress(institutionDTO.getInstitutionName() + "-" + institutionDTO.getInstitutionAddress()); } diff --git a/src/main/resources/static/route/classplan/save-report-exam.html b/src/main/resources/static/route/classplan/save-report-exam.html index 991df0d..e302dff 100644 --- a/src/main/resources/static/route/classplan/save-report-exam.html +++ b/src/main/resources/static/route/classplan/save-report-exam.html @@ -88,18 +88,8 @@ top.dialog.close(index); var loadLayerIndex; top.restAjax.put(top.restAjax.path('api/classplan/update-exam/{classPlanId}', [classPlanId]), formData.field, null, function(code, data) { - var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { - time: 0, - btn: [top.dataMessage.button.yes, top.dataMessage.button.no], - shade: 0.3, - yes: function(index) { - top.dialog.close(index); - window.location.reload(); - }, - btn2: function() { - closeBox(); - } - }); + top.dialog.msg("提交成功"); + closeBox(); }, function(code, data) { top.dialog.msg(data.msg); }, function() { diff --git a/src/main/resources/static/route/classplan/update-report-exam.html b/src/main/resources/static/route/classplan/update-report-exam.html index 11dc862..f99120d 100644 --- a/src/main/resources/static/route/classplan/update-report-exam.html +++ b/src/main/resources/static/route/classplan/update-report-exam.html @@ -43,7 +43,7 @@