Преглед на файлове

PSSR主清单导出异常处理

wangggziwen преди 6 месеца
родител
ревизия
4867301c8c
променени са 2 файла, в които са добавени 218 реда и са изтрити 142 реда
  1. 204 128
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java
  2. 14 14
      ui/src/views/pssr/aboveall/index.vue

+ 204 - 128
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java

@@ -45,6 +45,7 @@ import javax.annotation.Resource;
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.util.*;
@@ -1612,8 +1613,9 @@ public class TPssrApproveController extends BaseController {
         result = subcontentController.export(subcontent);
         msg = (String) result.get("msg");
         path = getProfile() + msg.replace("/profile", "");
-        Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg.replace("/profile/pssr/", "")), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-        files.add(new File(rootPath + subTitle + msg));
+        this.copyFileIgnoreException(path, rootPath + subTitle + msg.replace("/profile/pssr/", ""), files, rootPath + subTitle + msg);
+//        Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg.replace("/profile/pssr/", "")), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//        files.add(new File(rootPath + subTitle + msg));
 
         for (TPssrSubcontent tPssrSubcontent : tPssrSubcontents) {
             TPssrPatrol patrol = new TPssrPatrol();
@@ -1627,24 +1629,27 @@ public class TPssrApproveController extends BaseController {
                     result = filterController.export(filter);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrOverhaulTower tower = new TPssrOverhaulTower();//塔罐
                     tower.setSubId(tPssrSubcontent.getId());//子表id
                     result = towerController.export(tower);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrOverhaulValve valve = new TPssrOverhaulValve();//阀门
                     valve.setSubId(tPssrSubcontent.getId());//子表id
                     result = valveController.export(valve);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrOverhaulExchanger exchanger = new TPssrOverhaulExchanger();//换热器
                     exchanger.setSubId(tPssrSubcontent.getId());//子表id
@@ -1652,36 +1657,41 @@ public class TPssrApproveController extends BaseController {
                     result = exchangerController.export(exchanger);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     exchanger.setDevType(2L);
                     result = exchangerController.export(exchanger);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     exchanger.setDevType(3L);
                     result = exchangerController.export(exchanger);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     exchanger.setDevType(4L);
                     result = exchangerController.export(exchanger);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     exchanger.setDevType(5L);
                     result = exchangerController.export(exchanger);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "kgfa"://开工方案
                     subTitle = "02开工方案/";
@@ -1690,14 +1700,16 @@ public class TPssrApproveController extends BaseController {
                     result = programmeController.export(programme);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     //附件
                     List<TPssrProgramme> tPssrProgrammes = tPssrProgrammeService.selectTPssrProgrammeList(programme);
                     for (TPssrProgramme tPssrProgramme : tPssrProgrammes) {
                         String fileUrl = tPssrProgramme.getFileUrl();
                         String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
-                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
                     }
                     break;
                 case "sjbg"://设计变更
@@ -1708,8 +1720,9 @@ public class TPssrApproveController extends BaseController {
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
                     files.add(new File(path));
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "mb"://盲板
                     subTitle = "04盲板/";
@@ -1718,8 +1731,9 @@ public class TPssrApproveController extends BaseController {
                     result = blindController.export(blind);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "xcws"://现场卫生
                     subTitle = "05现场卫生/";
@@ -1728,8 +1742,9 @@ public class TPssrApproveController extends BaseController {
                     result = hygieneController.export(hygiene);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "rsfh"://人身防护
                     subTitle = "06人身防护/";
@@ -1746,8 +1761,9 @@ public class TPssrApproveController extends BaseController {
                     result = measureController.export(measure);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "sbqjd"://设备清洁度
                     subTitle = "07设备清洁度/";
@@ -1756,8 +1772,9 @@ public class TPssrApproveController extends BaseController {
                     result = cleaningController.export(cleaning);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "qm"://气密
                     subTitle = "08气密/";
@@ -1766,9 +1783,10 @@ public class TPssrApproveController extends BaseController {
                     result = airtightController.export(airtight);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
-//                    break;
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
+                    break;
                 case "sksgfmzt"://锁开锁关阀门状态
                     subTitle = "09锁开锁关阀门状态/";
                     TPssrLock lock = new TPssrLock();
@@ -1776,8 +1794,9 @@ public class TPssrApproveController extends BaseController {
                     result = lockController.export(lock);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "sys"://实验室
                     subTitle = "10实验室/";
@@ -1786,8 +1805,9 @@ public class TPssrApproveController extends BaseController {
                     result = laboratoryController.export(laboratory);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "dj"://短接
                     subTitle = "11短接/";
@@ -1796,8 +1816,9 @@ public class TPssrApproveController extends BaseController {
                     result = circuitController.export(circuit);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "dqzh"://氮气置换
                     subTitle = "12氮气置换/";
@@ -1806,8 +1827,9 @@ public class TPssrApproveController extends BaseController {
                     result = nitrogenController.export(nitrogen);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "xqf"://消气防设施(巡检)
                     subTitle = "13消气防设施/";
@@ -1821,8 +1843,9 @@ public class TPssrApproveController extends BaseController {
                                 result = annihilatorController.export(annihilator);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "2"://消防水炮检查记录
                                 TFireWaterCannon waterCannon = new TFireWaterCannon();
@@ -1830,8 +1853,9 @@ public class TPssrApproveController extends BaseController {
                                 result = waterCannonController.export(waterCannon);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "3"://地上消火栓检查记录
                                 TFirePostFire postFire = new TFirePostFire();
@@ -1839,8 +1863,9 @@ public class TPssrApproveController extends BaseController {
                                 result = postFireController.export(postFire);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "4"://消防水带箱检查记录
                                 TFireHoseBox hoseBox = new TFireHoseBox();
@@ -1848,8 +1873,9 @@ public class TPssrApproveController extends BaseController {
                                 result = hoseBoxController.export(hoseBox);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "5"://消防竖管检查记录
                                 TFireStandpipePatrol standpipe = new TFireStandpipePatrol();
@@ -1857,8 +1883,9 @@ public class TPssrApproveController extends BaseController {
                                 result = standpipeController.export(standpipe);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "6"://自动喷淋灭火系统检查记录
                                 TFireSprinkler sprinkler = new TFireSprinkler();
@@ -1866,8 +1893,9 @@ public class TPssrApproveController extends BaseController {
                                 result = sprinklerController.export(sprinkler);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "7"://应急事故柜检查记录
                                 TEmergencyCabinet cabinet = new TEmergencyCabinet();
@@ -1875,8 +1903,9 @@ public class TPssrApproveController extends BaseController {
                                 result = cabinetController.export(cabinet);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "8"://现场可燃气体检测器/火灾报警系统检查记录
                                 TFireAlarm alarm = new TFireAlarm();
@@ -1884,8 +1913,9 @@ public class TPssrApproveController extends BaseController {
                                 result = alarmController.export(alarm);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "9"://CO2气体保护系统检查记录
                                 TFireGasShield gasShield = new TFireGasShield();
@@ -1893,8 +1923,9 @@ public class TPssrApproveController extends BaseController {
                                 result = gasShieldController.export(gasShield);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "12"://淋浴洗眼器检查记录
                                 TEmergencyEyewash eyewash = new TEmergencyEyewash();
@@ -1902,8 +1933,9 @@ public class TPssrApproveController extends BaseController {
                                 result = eyewashController.export(eyewash);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "13"://应急沙箱检查记录
                                 TFireSandbox sandbox = new TFireSandbox();
@@ -1911,8 +1943,9 @@ public class TPssrApproveController extends BaseController {
                                 result = sandboxController.export(sandbox);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "14"://常闭式防爆门/防火门检查记录
                                 TFireDoor door = new TFireDoor();
@@ -1920,8 +1953,9 @@ public class TPssrApproveController extends BaseController {
                                 result = doorController.export(door);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "15"://风向标/风向袋/新风系统正压计检查记录
                                 TFireWeathervane weathervane = new TFireWeathervane();
@@ -1929,8 +1963,9 @@ public class TPssrApproveController extends BaseController {
                                 result = weathervaneController.export(weathervane);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "16"://蒸汽幕检查记录
                                 TFireSteamCurtain steamCurtain = new TFireSteamCurtain();
@@ -1938,8 +1973,9 @@ public class TPssrApproveController extends BaseController {
                                 result = steamCurtainController.export(steamCurtain);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "27"://急救箱检查记录
                                 TFireAidkit aidkit = new TFireAidkit();
@@ -1947,8 +1983,9 @@ public class TPssrApproveController extends BaseController {
                                 result = aidkitController.export(aidkit);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                         }
                     }
@@ -1960,40 +1997,45 @@ public class TPssrApproveController extends BaseController {
                     result = bleedController.export(bleed);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrSafetyBreath breath = new TPssrSafetyBreath();
                     breath.setSubId(tPssrSubcontent.getId());//子表id
                     result = breathController.export(breath);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrSafetyBrust brust = new TPssrSafetyBrust();
                     brust.setSubId(tPssrSubcontent.getId());//子表id
                     result = brustController.export(brust);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrSafetyFlamearrester flamearrester = new TPssrSafetyFlamearrester();
                     flamearrester.setSubId(tPssrSubcontent.getId());//子表id
                     result = flamearresterController.export(flamearrester);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrSafetyValve safetyValve = new TPssrSafetyValve();
                     safetyValve.setSubId(tPssrSubcontent.getId());//子表id
                     result = safetyValveController.export(safetyValve);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "txjk"://通讯监控(巡检)
                     subTitle = "15通讯监控/";
@@ -2007,8 +2049,9 @@ public class TPssrApproveController extends BaseController {
                                 result = pagaController.export(paga);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                             case "11"://CCTV系统检查记录
                                 TEmergencyCctv cctv = new TEmergencyCctv();
@@ -2016,8 +2059,9 @@ public class TPssrApproveController extends BaseController {
                                 result = cctvController.export(cctv);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                         }
                     }
@@ -2034,8 +2078,9 @@ public class TPssrApproveController extends BaseController {
                                 result = testerController.export(tester);
                                 msg = (String) result.get("msg");
                                 path = downloadPath + msg;
-                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                                files.add(new File(rootPath + subTitle + msg));
+                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                                Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                                files.add(new File(rootPath + subTitle + msg));
                                 break;
                         }
                     }
@@ -2047,8 +2092,9 @@ public class TPssrApproveController extends BaseController {
                     result = publicController.export(tPssrPublic);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "hbss"://环保设施
                     subTitle = "18环保设施/";
@@ -2058,15 +2104,17 @@ public class TPssrApproveController extends BaseController {
                     result = torchvocController.export(torchvoc);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     torchvoc.setTorchvocType("2");
                     result = torchvocController.export(torchvoc);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "yfl"://原辅料
                     subTitle = "19原辅料/";
@@ -2075,16 +2123,18 @@ public class TPssrApproveController extends BaseController {
                     result = materialController.export(material);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrMaterialRaw materialRaw = new TPssrMaterialRaw();
                     materialRaw.setSubId(tPssrSubcontent.getId());//子表id
                     result = materialRawController.export(materialRaw);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "jb"://机泵
                     subTitle = "20机泵/";
@@ -2093,24 +2143,27 @@ public class TPssrApproveController extends BaseController {
                     result = pumpCleaningController.export(pumpCleaning);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrPumpFill pumpFill = new TPssrPumpFill();
                     pumpFill.setSubId(tPssrSubcontent.getId());//子表id
                     result = pumpFillController.export(pumpFill);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrPumpOverhaul pumpOverhaul = new TPssrPumpOverhaul();
                     pumpOverhaul.setSubId(tPssrSubcontent.getId());//子表id
                     result = pumpOverhaulController.export(pumpOverhaul);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "zdj"://支(吊)架
                     subTitle = "21支(吊)架/";
@@ -2119,8 +2172,9 @@ public class TPssrApproveController extends BaseController {
                     result = frameController.export(frame);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "tzsb"://压力管道/压力容器
                     subTitle = "22压力管道、压力容器/";
@@ -2129,16 +2183,18 @@ public class TPssrApproveController extends BaseController {
                     result = pipeController.export(pipe);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     TPssrVessel vessel = new TPssrVessel();
                     vessel.setSubId(tPssrSubcontent.getId());//子表id
                     result = vesselController.export(vessel);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "ybjy"://仪表校验
                     subTitle = "23仪表校验/";
@@ -2147,8 +2203,9 @@ public class TPssrApproveController extends BaseController {
                     result = instrumentCalibrationController.export(calibration);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "yblscs"://仪表联锁测试
                     subTitle = "24仪表联锁测试/";
@@ -2159,7 +2216,8 @@ public class TPssrApproveController extends BaseController {
                     for (TPssrInstrumentTest test : instrumentTests) {
                         String fileUrl = test.getFileUrl();
                         String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
-                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
                     }
                     break;
                 case "bjlszqr"://报警/联锁值确认
@@ -2171,7 +2229,8 @@ public class TPssrApproveController extends BaseController {
                     for (TPssrAlarm a : alarms) {
                         String fileUrl = a.getFileUrl();
                         String newFileUrl = getProfile() + fileUrl.replace("/profile", "");
-                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                        Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
                     }
                     break;
                 case "lsdy"://临时电源
@@ -2181,8 +2240,9 @@ public class TPssrApproveController extends BaseController {
                     result = powerController.export(power);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "djsb"://电机设备
                     subTitle = "27电机设备/";
@@ -2191,8 +2251,9 @@ public class TPssrApproveController extends BaseController {
                     result = motorController.export(motor);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "zmdbr"://照明、电伴热
                     subTitle = "28照明、电伴热/";
@@ -2202,15 +2263,17 @@ public class TPssrApproveController extends BaseController {
                     result = lightingController.export(lighting);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
 
                     lighting.setLightingType("2");
                     result = lightingController.export(lighting);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "jdjdkj"://静电接地/跨接
                     subTitle = "29静电接地、跨接/";
@@ -2219,8 +2282,9 @@ public class TPssrApproveController extends BaseController {
                     result = franklinismController.export(franklinism);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "qtjcy"://气体检测仪
                     subTitle = "30气体检测仪/";
@@ -2229,8 +2293,9 @@ public class TPssrApproveController extends BaseController {
                     result = gasdetectorController.export(gasdetector);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
                 case "zxfxy"://在线分析仪
                     subTitle = "31在线分析仪/";
@@ -2239,8 +2304,9 @@ public class TPssrApproveController extends BaseController {
                     result = analyzerController.export(analyzer);
                     msg = (String) result.get("msg");
                     path = downloadPath + msg;
-                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
-                    files.add(new File(rootPath + subTitle + msg));
+                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+//                    Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+//                    files.add(new File(rootPath + subTitle + msg));
                     break;
             }
         }
@@ -2254,6 +2320,16 @@ public class TPssrApproveController extends BaseController {
         }
     }
 
+    private void copyFileIgnoreException(String source, String target, List<File> files, String fileName) {
+        try {
+            Files.copy(Paths.get(source), Paths.get(target), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
+            files.add(new File(fileName));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
     private void createSubitemDirectory(String rootPath) {
         boolean mkdir0 = new File(rootPath + "00主清单").mkdirs();//子项文件目录
         boolean mkdir1 = new File(rootPath + "01检修项目").mkdirs();//子项文件目录

+ 14 - 14
ui/src/views/pssr/aboveall/index.vue

@@ -129,20 +129,20 @@
             @click="gotoSubIndex(scope.row)"
           >检查内容
           </el-button>
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-download"-->
-<!--            @click="handleZip(scope.row)"-->
-<!--          >打包-->
-<!--          </el-button>-->
-          <!--<el-button-->
-            <!--size="mini"-->
-            <!--type="text"-->
-            <!--icon="el-icon-download"-->
-            <!--@click="handleDownload(scope.row)"-->
-          <!--&gt;导出-->
-          <!--</el-button>-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-download"
+            @click="handleZip(scope.row)"
+          >打包
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-download"
+            @click="handleDownload(scope.row)"
+          >导出
+          </el-button>
           <el-button
             size="mini"
             type="text"