From 204dfc11b7045d04cee292eddfaa6666e04960d2 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Wed, 20 Oct 2021 11:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=83=E8=AF=95=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8F=96=E6=B6=88=E7=94=B3=E8=AF=B7=E5=90=8E=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=86=8D=E6=AC=A1=E6=8F=90=E4=BA=A4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenlion/dao/classplan/IClassPlanDao.java | 2 + .../classplan/impl/ClassPlanServiceImpl.java | 7 +- .../mapper/classplan/class-plan-mapper.xml | 6 ++ .../route/classplan/list-report-exam.html | 2 + .../route/classplan/update-exam-commit.html | 99 ++----------------- 5 files changed, 21 insertions(+), 95 deletions(-) diff --git a/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java b/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java index a99ede2..f3f7956 100644 --- a/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java +++ b/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java @@ -220,4 +220,6 @@ public interface IClassPlanDao { List> listSendDepartment(Map params); List> listSendClassPlan(Map query); + + void removeExamFile(String classPlanId); } \ No newline at end of file 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 5133662..02ce84e 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 @@ -603,10 +603,10 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl /** * CBC 准考证生成基础信息关联 2021年6月19日16:29:30加入代码 */ - DistributionSaveVO saveData = new DistributionSaveVO(); + /*DistributionSaveVO saveData = new DistributionSaveVO(); saveData.setPlanId(classPlanId); saveData.setPlanName(classPlanDTO.getPlanName()); - iDistributionService.save(saveData); + iDistributionService.save(saveData);*/ } @Override @@ -1028,6 +1028,8 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl String classPlanId = params.get("classPlanId").toString(); params.put("planId", classPlanId); classPlanDao.removeCancelPlanExam(params); + // 取消后删除之前申请上传的文件信息 + classPlanDao.removeExamFile(classPlanId); } @Override @@ -1070,7 +1072,6 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl historyMap.put("checkTime",DateUtil.getTime()); setSaveInfo(historyMap); classPlanDao.saveExamPlanHistory(historyMap); - System.out.println(params); } @Override diff --git a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml index 4eae745..7394a20 100644 --- a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml +++ b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml @@ -539,6 +539,12 @@ limit 1 + + DELETE FROM e_class_plan_exam_file + WHERE + class_plan_id = #{classPlanId} + + UPDATE e_class_plan_exam_file SET exam_images = #{examImages}, diff --git a/src/main/resources/static/route/classplan/list-report-exam.html b/src/main/resources/static/route/classplan/list-report-exam.html index 63c77d6..39d8d5f 100644 --- a/src/main/resources/static/route/classplan/list-report-exam.html +++ b/src/main/resources/static/route/classplan/list-report-exam.html @@ -272,6 +272,7 @@ anim: 2, content: top.restAjax.path('route/classplan/update-exam-commit.html?classPlanId={classPlanId}', [obj.data.classPlanId]), end: function () { + reloadTable(); } }); } @@ -285,6 +286,7 @@ anim: 2, content: top.restAjax.path('route/examination/distribution/show.html?planId={classPlanId}', [obj.data.classPlanId]), end: function () { + reloadTable(); } }); } diff --git a/src/main/resources/static/route/classplan/update-exam-commit.html b/src/main/resources/static/route/classplan/update-exam-commit.html index 1370b2b..0973946 100644 --- a/src/main/resources/static/route/classplan/update-exam-commit.html +++ b/src/main/resources/static/route/classplan/update-exam-commit.html @@ -39,7 +39,7 @@
-
+
@@ -47,7 +47,7 @@
-
+
@@ -57,7 +57,7 @@
-
+
@@ -66,7 +66,7 @@
-
+
@@ -86,36 +86,6 @@
-
-
- -
- -
- -
-
-
@@ -128,9 +98,9 @@ {{# var files = d[fileName];}} {{# for(var i = 0, item = files[i]; item = files[i++];) { }}
- - - + + + @@ -217,7 +187,6 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var classPlanId = top.restAjax.params(window.location.href).classPlanId; - var examImagesViewerObj = {}; // 初始化内容 function initData() { @@ -239,7 +208,6 @@ initExamPlaceCheckbox(dataFormData['examPlace']); $('.exam-place-div').show(); } - initExamImagesUploadFile(); initExamPDFUploadFile(); getPlanExamAuditHistory(); $('.layui-card').height($win.height()); @@ -283,59 +251,6 @@ }) } - - // 初始化图片上传 - function initExamImagesUploadFile() { - var files = $('#examImages').val(); - initFileList('examImages', files, function(fileName) { - var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false}); - examImagesViewerObj[fileName] = viewer; - }); - - form.on('button(examImagesUploadFile)', function(obj) { - var name = this.dataset.name; - var explain = this.dataset.explain; - top.dialog.file({ - type: 'image', - title: '上传'+ explain, - width: '400px', - height: '420px', - maxFileCount: '1', - onClose: function() { - var uploadFileArray = top.dialog.dialogData.uploadFileArray; - if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) { - var files = $('#'+ name).val(); - for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) { - if(files.length > 0) { - files += ','; - } - files += file.data; - } - initFileList(name, files, function(fileName) { - examImagesViewerObj[fileName].update(); - }); - } - } - }); - }); - - form.on('button(examImagesRemoveFile)', function(obj) { - var name = this.dataset.name; - var id = this.dataset.id; - var files = $('#'+ name).val().replace(id, ''); - files = files.replace(/\,+/g, ','); - if(files.charAt(0) == ',') { - files = files.substring(1); - } - if(files.charAt(files.length - 1) == ',') { - files = files.substring(0, files.length - 1); - } - initFileList(name, files, function(fileName) { - examImagesViewerObj[fileName].update(); - }); - }); - } - // 初始化PDF上传 function initExamPDFUploadFile() { var files = $('#examPDF').val();