Browse Source

PSSR主清单 - 打包内容存在空表可能出现的问题处理

wangggziwen 2 months ago
parent
commit
77cf1f1e03
53 changed files with 569 additions and 237 deletions
  1. 3 0
      master/src/main/java/com/ruoyi/project/patrol/commonuse/controller/TCommonuseTesterController.java
  2. 3 0
      master/src/main/java/com/ruoyi/project/patrol/emergency/controller/TEmergencyEyewashController.java
  3. 3 0
      master/src/main/java/com/ruoyi/project/patrol/emergency/controller/TEmergencyPagaController.java
  4. 5 1
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAidkitController.java
  5. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAlarmController.java
  6. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAnnihilatorController.java
  7. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireGasShieldController.java
  8. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireHoseBoxController.java
  9. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFirePostFireController.java
  10. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSandboxController.java
  11. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSprinklerController.java
  12. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireStandpipeController.java
  13. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSteamCurtainController.java
  14. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireWaterCannonController.java
  15. 3 0
      master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireWeathervaneController.java
  16. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAirtightController.java
  17. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAnalyzerController.java
  18. 317 191
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java
  19. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrBlindController.java
  20. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrCircuitController.java
  21. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrCleaningController.java
  22. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFrameController.java
  23. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFranklinismController.java
  24. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrGasdetectorController.java
  25. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrHygieneController.java
  26. 15 3
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrInstrumentCalibrationController.java
  27. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLaboratoryController.java
  28. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLightingController.java
  29. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLockController.java
  30. 15 7
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialController.java
  31. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMeasureController.java
  32. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMocController.java
  33. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMotorController.java
  34. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrNitrogenController.java
  35. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulExchangerController.java
  36. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulFilterController.java
  37. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulTowerController.java
  38. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulValveController.java
  39. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPipeController.java
  40. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPowerController.java
  41. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProgrammeController.java
  42. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProtectionController.java
  43. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPublicController.java
  44. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpCleaningController.java
  45. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpFillController.java
  46. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpOverhaulController.java
  47. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBleedController.java
  48. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBreathController.java
  49. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBrustController.java
  50. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyFlamearresterController.java
  51. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyValveController.java
  52. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrTorchvocController.java
  53. 5 1
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrVesselController.java

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/commonuse/controller/TCommonuseTesterController.java

@@ -86,6 +86,9 @@ public class TCommonuseTesterController extends BaseController {
         try {
             tCommonuseTester.setIssuesFlag("0");
             List<TCommonuseTester> list = tCommonuseTesterService.selectTCommonuseTesterListToExcel(tCommonuseTester);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             XSSFSheet sheet = workbook.createSheet();// 设置列宽
             sheet.setColumnWidth(0, 1200);

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/emergency/controller/TEmergencyEyewashController.java

@@ -80,6 +80,9 @@ public class TEmergencyEyewashController extends BaseController {
     public AjaxResult export(TEmergencyEyewash tEmergencyEyewash) throws Exception {
         tEmergencyEyewash.setIssuesFlag("0");
         List<TEmergencyEyewash> list = tEmergencyEyewashService.selectTEmergencyEyewashList(tEmergencyEyewash);
+        if (list.size() == 0) {
+            return AjaxResult.error("暂无可导出数据");
+        }
         XSSFWorkbook workbook = new XSSFWorkbook();
         // 创建工作簿
         XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/emergency/controller/TEmergencyPagaController.java

@@ -84,6 +84,9 @@ public class TEmergencyPagaController extends BaseController {
         try {
             tEmergencyPaga.setIssuesFlag("0");
             List<TEmergencyPaga> list = tEmergencyPagaService.selectTEmergencyPagaList(tEmergencyPaga);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 5 - 1
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAidkitController.java

@@ -71,7 +71,11 @@ public class TFireAidkitController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TFireAidkit tFireAidkit) {
         List<TFireAidkit> list = tFireAidkitService.selectTFireAidkitList(tFireAidkit);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TFireAidkit> list) {

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAlarmController.java

@@ -87,6 +87,9 @@ public class TFireAlarmController extends BaseController {
         try {
             tFireAlarm.setIssuesFlag("0");
             List<TFireAlarm> list = tFireAlarmService.selectTFireAlarmList(tFireAlarm);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireAnnihilatorController.java

@@ -86,6 +86,9 @@ public class TFireAnnihilatorController extends BaseController {
     public AjaxResult export(TFireAnnihilator tFireAnnihilator) throws IOException {
         tFireAnnihilator.setIssuesFlag("0");
         List<TFireAnnihilator> list = tFireAnnihilatorService.selectTFireAnnihilatorList(tFireAnnihilator);
+        if (list.size() == 0) {
+            return AjaxResult.error("暂无可导出数据");
+        }
         XSSFWorkbook workbook = new XSSFWorkbook();
         // 创建工作簿
         XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireGasShieldController.java

@@ -82,6 +82,9 @@ public class TFireGasShieldController extends BaseController {
         try {
             tFireGasShield.setIssuesFlag("0");
             List<TFireGasShield> list = tFireGasShieldService.selectTFireGasShieldList(tFireGasShield);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireHoseBoxController.java

@@ -83,6 +83,9 @@ public class TFireHoseBoxController extends BaseController {
         try {
             tFireHoseBox.setIssuesFlag("0");
             List<TFireHoseBox> list = tFireHoseBoxService.selectTFireHoseBoxList(tFireHoseBox);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFirePostFireController.java

@@ -83,6 +83,9 @@ public class TFirePostFireController extends BaseController {
         try {
             tFirePostFire.setIssuesFlag("0");
             List<TFirePostFire> list = tFirePostFireService.selectTFirePostFireList(tFirePostFire);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSandboxController.java

@@ -82,6 +82,9 @@ public class TFireSandboxController extends BaseController {
         try {
             tFireSandbox.setIssuesFlag("0");
             List<TFireSandbox> list = tFireSandboxService.selectTFireSandboxList(tFireSandbox);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSprinklerController.java

@@ -82,6 +82,9 @@ public class TFireSprinklerController extends BaseController {
         try {
             tFireSprinkler.setIssuesFlag("0");
             List<TFireSprinkler> list = tFireSprinklerService.selectTFireSprinklerList(tFireSprinkler);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireStandpipeController.java

@@ -82,6 +82,9 @@ public class TFireStandpipeController extends BaseController {
         try {
             tFireStandpipe.setIssuesFlag("0");
             List<TFireStandpipePatrol> list = tFireStandpipeService.selectTFireStandpipeList(tFireStandpipe);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireSteamCurtainController.java

@@ -82,6 +82,9 @@ public class TFireSteamCurtainController extends BaseController {
         try {
             tFireSteamCurtain.setIssuesFlag("0");
             List<TFireSteamCurtain> list = tFireSteamCurtainService.selectTFireSteamCurtainList(tFireSteamCurtain);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireWaterCannonController.java

@@ -83,6 +83,9 @@ public class TFireWaterCannonController extends BaseController {
         try {
             tFireWaterCannon.setIssuesFlag("0");
             List<TFireWaterCannon> list = tFireWaterCannonService.selectTFireWaterCannonList(tFireWaterCannon);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 3 - 0
master/src/main/java/com/ruoyi/project/patrol/fire/controller/TFireWeathervaneController.java

@@ -87,6 +87,9 @@ public class TFireWeathervaneController extends BaseController {
         try {
             tFireWeathervane.setIssuesFlag("0");
             List<TFireWeathervane> list = tFireWeathervaneService.selectTFireWeathervaneList(tFireWeathervane);
+            if (list.size() == 0) {
+                return AjaxResult.error("暂无可导出数据");
+            }
             XSSFWorkbook workbook = new XSSFWorkbook();
             // 创建工作簿
             XSSFSheet sheet = workbook.createSheet();

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAirtightController.java

@@ -197,7 +197,11 @@ public class TPssrAirtightController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrAirtight tPssrAirtight) {
         List<TPssrAirtight> list = tPssrAirtightService.selectTPssrAirtightList(tPssrAirtight);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     /**

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAnalyzerController.java

@@ -189,7 +189,11 @@ public class TPssrAnalyzerController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrAnalyzer tPssrAnalyzer) {
         List<TPssrAnalyzer> list = tPssrAnalyzerService.selectTPssrAnalyzerList(tPssrAnalyzer);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrAnalyzer> list) {

+ 317 - 191
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java

@@ -1660,27 +1660,33 @@ public class TPssrApproveController extends BaseController {
                     TPssrOverhaulFilter filter = new TPssrOverhaulFilter();//过滤器
                     filter.setSubId(tPssrSubcontent.getId());//子表id
                     result = filterController.export(filter);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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));
 
@@ -1688,41 +1694,51 @@ public class TPssrApproveController extends BaseController {
                     exchanger.setSubId(tPssrSubcontent.getId());//子表id
                     exchanger.setDevType(1L);
                     result = exchangerController.export(exchanger);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1731,9 +1747,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrProgramme programme = new TPssrProgramme();
                     programme.setSubId(tPssrSubcontent.getId());//子表id
                     result = programmeController.export(programme);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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));
                     //附件
@@ -1750,10 +1768,12 @@ public class TPssrApproveController extends BaseController {
                     TPssrMoc moc = new TPssrMoc();
                     moc.setSubId(tPssrSubcontent.getId());//子表id
                     result = mocController.export(moc);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    files.add(new File(path));
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + msg;
+                        files.add(new File(path));
+                        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;
@@ -1762,9 +1782,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrBlind blind = new TPssrBlind();
                     blind.setSubId(tPssrSubcontent.getId());//子表id
                     result = blindController.export(blind);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1773,9 +1795,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrHygiene hygiene = new TPssrHygiene();
                     hygiene.setSubId(tPssrSubcontent.getId());//子表id
                     result = hygieneController.export(hygiene);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1784,17 +1808,21 @@ public class TPssrApproveController extends BaseController {
                     TPssrProtection protection = new TPssrProtection();
                     protection.setSubId(tPssrSubcontent.getId());//子表id
                     result = protectionController.export(protection);
-                    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));
+                    if (result != null) {
+                        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));
+                    }
 
                     TPssrMeasure measure = new TPssrMeasure();
                     measure.setSubId(tPssrSubcontent.getId());//子表id
                     result = measureController.export(measure);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1803,9 +1831,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrCleaning cleaning = new TPssrCleaning();
                     cleaning.setSubId(tPssrSubcontent.getId());//子表id
                     result = cleaningController.export(cleaning);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1814,9 +1844,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrAirtight airtight = new TPssrAirtight();
                     airtight.setSubId(tPssrSubcontent.getId());//子表id
                     result = airtightController.export(airtight);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1825,9 +1857,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrLock lock = new TPssrLock();
                     lock.setSubId(tPssrSubcontent.getId());//子表id
                     result = lockController.export(lock);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1836,9 +1870,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrLaboratory laboratory = new TPssrLaboratory();
                     laboratory.setSubId(tPssrSubcontent.getId());//子表id
                     result = laboratoryController.export(laboratory);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1847,9 +1883,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrCircuit circuit = new TPssrCircuit();
                     circuit.setSubId(tPssrSubcontent.getId());//子表id
                     result = circuitController.export(circuit);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1858,9 +1896,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrNitrogen nitrogen = new TPssrNitrogen();
                     nitrogen.setSubId(tPssrSubcontent.getId());//子表id
                     result = nitrogenController.export(nitrogen);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -1874,9 +1914,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireAnnihilator annihilator = new TFireAnnihilator();
                                 annihilator.setPlanId(planId);
                                 result = annihilatorController.export(annihilator);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1884,9 +1926,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireWaterCannon waterCannon = new TFireWaterCannon();
                                 waterCannon.setPlanId(planId);
                                 result = waterCannonController.export(waterCannon);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1894,9 +1938,11 @@ public class TPssrApproveController extends BaseController {
                                 TFirePostFire postFire = new TFirePostFire();
                                 postFire.setPlanId(planId);
                                 result = postFireController.export(postFire);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1904,9 +1950,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireHoseBox hoseBox = new TFireHoseBox();
                                 hoseBox.setPlanId(planId);
                                 result = hoseBoxController.export(hoseBox);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1914,9 +1962,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireStandpipePatrol standpipe = new TFireStandpipePatrol();
                                 standpipe.setPlanId(planId);
                                 result = standpipeController.export(standpipe);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1924,9 +1974,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireSprinkler sprinkler = new TFireSprinkler();
                                 sprinkler.setPlanId(planId);
                                 result = sprinklerController.export(sprinkler);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1934,9 +1986,11 @@ public class TPssrApproveController extends BaseController {
                                 TEmergencyCabinet cabinet = new TEmergencyCabinet();
                                 cabinet.setPlanId(planId);
                                 result = cabinetController.export(cabinet);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1944,9 +1998,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireAlarm alarm = new TFireAlarm();
                                 alarm.setPlanId(planId);
                                 result = alarmController.export(alarm);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1954,9 +2010,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireGasShield gasShield = new TFireGasShield();
                                 gasShield.setPlanId(planId);
                                 result = gasShieldController.export(gasShield);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1964,9 +2022,11 @@ public class TPssrApproveController extends BaseController {
                                 TEmergencyEyewash eyewash = new TEmergencyEyewash();
                                 eyewash.setPlanId(planId);
                                 result = eyewashController.export(eyewash);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1974,9 +2034,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireSandbox sandbox = new TFireSandbox();
                                 sandbox.setPlanId(planId);
                                 result = sandboxController.export(sandbox);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1984,9 +2046,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireDoor door = new TFireDoor();
                                 door.setPlanId(planId);
                                 result = doorController.export(door);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -1994,9 +2058,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireWeathervane weathervane = new TFireWeathervane();
                                 weathervane.setPlanId(planId);
                                 result = weathervaneController.export(weathervane);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2004,9 +2070,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireSteamCurtain steamCurtain = new TFireSteamCurtain();
                                 steamCurtain.setPlanId(planId);
                                 result = steamCurtainController.export(steamCurtain);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2014,9 +2082,11 @@ public class TPssrApproveController extends BaseController {
                                 TFireAidkit aidkit = new TFireAidkit();
                                 aidkit.setPlanId(planId);
                                 result = aidkitController.export(aidkit);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2028,45 +2098,55 @@ public class TPssrApproveController extends BaseController {
                     TPssrSafetyBleed bleed = new TPssrSafetyBleed();
                     bleed.setSubId(tPssrSubcontent.getId());//子表id
                     result = bleedController.export(bleed);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2080,9 +2160,11 @@ public class TPssrApproveController extends BaseController {
                                 TEmergencyPaga paga = new TEmergencyPaga();
                                 paga.setPlanId(planId);
                                 result = pagaController.export(paga);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2090,9 +2172,11 @@ public class TPssrApproveController extends BaseController {
                                 TEmergencyCctv cctv = new TEmergencyCctv();
                                 cctv.setPlanId(planId);
                                 result = cctvController.export(cctv);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2109,9 +2193,11 @@ public class TPssrApproveController extends BaseController {
                                 TCommonuseTester tester = new TCommonuseTester();
                                 tester.setPlanId(planId);
                                 result = testerController.export(tester);
-                                msg = (String) result.get("msg");
-                                path = downloadPath + msg;
-                                this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                                if (result != null) {
+                                    msg = (String) result.get("msg");
+                                    path = downloadPath + 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;
@@ -2123,9 +2209,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrPublic tPssrPublic = new TPssrPublic();
                     tPssrPublic.setSubId(tPssrSubcontent.getId());//子表id
                     result = publicController.export(tPssrPublic);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2135,17 +2223,21 @@ public class TPssrApproveController extends BaseController {
                     torchvoc.setSubId(tPssrSubcontent.getId());//子表id
                     torchvoc.setTorchvocType("1");
                     result = torchvocController.export(torchvoc);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2154,9 +2246,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrMaterial material = new TPssrMaterial();
                     material.setSubId(tPssrSubcontent.getId());//子表id
                     result = materialController.export(material);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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));
 
@@ -2174,27 +2268,33 @@ public class TPssrApproveController extends BaseController {
                     TPssrPumpCleaning pumpCleaning = new TPssrPumpCleaning();
                     pumpCleaning.setSubId(tPssrSubcontent.getId());//子表id
                     result = pumpCleaningController.export(pumpCleaning);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2203,9 +2303,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrFrame frame = new TPssrFrame();
                     frame.setSubId(tPssrSubcontent.getId());//子表id
                     result = frameController.export(frame);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2214,18 +2316,22 @@ public class TPssrApproveController extends BaseController {
                     TPssrPipe pipe = new TPssrPipe();
                     pipe.setSubId(tPssrSubcontent.getId());//子表id
                     result = pipeController.export(pipe);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2236,21 +2342,27 @@ public class TPssrApproveController extends BaseController {
                     //调节阀
                     calibration.setDevType("1");
                     result = instrumentCalibrationController.export(calibration);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + msg;
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    }
                     //液位计
                     calibration.setDevType("2");
                     result = instrumentCalibrationController.export(calibration);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + msg;
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    }
                     //流量计
                     calibration.setDevType("3");
                     result = instrumentCalibrationController.export(calibration);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + msg;
+                        this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    }
 //                    try {
 //                        Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
 //                    } catch (IOException e) {
@@ -2297,9 +2409,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrPower power = new TPssrPower();
                     power.setSubId(tPssrSubcontent.getId());//子表id
                     result = powerController.export(power);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2308,9 +2422,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrMotor motor = new TPssrMotor();
                     motor.setSubId(tPssrSubcontent.getId());//子表id
                     result = motorController.export(motor);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2320,17 +2436,21 @@ public class TPssrApproveController extends BaseController {
                     lighting.setSubId(tPssrSubcontent.getId());//子表id
                     lighting.setLightingType("1");
                     result = lightingController.export(lighting);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2339,9 +2459,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrFranklinism franklinism = new TPssrFranklinism();
                     franklinism.setSubId(tPssrSubcontent.getId());//子表id
                     result = franklinismController.export(franklinism);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2350,9 +2472,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrGasdetector gasdetector = new TPssrGasdetector();
                     gasdetector.setSubId(tPssrSubcontent.getId());//子表id
                     result = gasdetectorController.export(gasdetector);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;
@@ -2361,9 +2485,11 @@ public class TPssrApproveController extends BaseController {
                     TPssrAnalyzer analyzer = new TPssrAnalyzer();
                     analyzer.setSubId(tPssrSubcontent.getId());//子表id
                     result = analyzerController.export(analyzer);
-                    msg = (String) result.get("msg");
-                    path = downloadPath + msg;
-                    this.copyFileIgnoreException(path, rootPath + subTitle + msg, files, rootPath + subTitle + msg);
+                    if (result != null) {
+                        msg = (String) result.get("msg");
+                        path = downloadPath + 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;

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrBlindController.java

@@ -226,7 +226,11 @@ public class TPssrBlindController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrBlind tPssrBlind) {
         List<TPssrBlind> list = tPssrBlindService.selectTPssrBlindList(tPssrBlind);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrBlind> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrCircuitController.java

@@ -200,7 +200,11 @@ public class TPssrCircuitController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrCircuit tPssrCircuit) {
         List<TPssrCircuit> list = tPssrCircuitService.selectTPssrCircuitList(tPssrCircuit);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrCircuit> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrCleaningController.java

@@ -194,7 +194,11 @@ public class TPssrCleaningController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrCleaning tPssrCleaning) {
         List<TPssrCleaning> list = tPssrCleaningService.selectTPssrCleaningList(tPssrCleaning);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrCleaning> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFrameController.java

@@ -205,7 +205,11 @@ public class TPssrFrameController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrFrame tPssrFrame) {
         List<TPssrFrame> list = tPssrFrameService.selectTPssrFrameList(tPssrFrame);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrFrame> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFranklinismController.java

@@ -193,7 +193,11 @@ public class TPssrFranklinismController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrFranklinism tPssrFranklinism) {
         List<TPssrFranklinism> list = tPssrFranklinismService.selectTPssrFranklinismList(tPssrFranklinism);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrFranklinism> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrGasdetectorController.java

@@ -185,7 +185,11 @@ public class TPssrGasdetectorController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrGasdetector tPssrGasdetector) {
         List<TPssrGasdetector> list = tPssrGasdetectorService.selectTPssrGasdetectorList(tPssrGasdetector);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrGasdetector> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrHygieneController.java

@@ -193,7 +193,11 @@ public class TPssrHygieneController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrHygiene tPssrHygiene) {
         List<TPssrHygiene> list = tPssrHygieneService.selectTPssrHygieneList(tPssrHygiene);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrHygiene> list) {

+ 15 - 3
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrInstrumentCalibrationController.java

@@ -202,11 +202,23 @@ public class TPssrInstrumentCalibrationController extends BaseController {
     public AjaxResult export(TPssrInstrumentCalibration tPssrInstrumentCalibration) {
         List<TPssrInstrumentCalibration> list = tPssrInstrumentCalibrationService.selectTPssrInstrumentCalibrationList(tPssrInstrumentCalibration);
         if (tPssrInstrumentCalibration.getDevType().equals("1")) {
-            return AjaxResult.success(exportTmpl3(list));
+            if (list.size() != 0) {
+                return AjaxResult.success(exportTmpl3(list));
+            } else {
+                return AjaxResult.error("暂无可导出数据");
+            }
         } else if (tPssrInstrumentCalibration.getDevType().equals("2")) {
-            return AjaxResult.success(exportTmpl2(list));
+            if (list.size() != 0) {
+                return AjaxResult.success(exportTmpl2(list));
+            } else {
+                return AjaxResult.error("暂无可导出数据");
+            }
         } else if (tPssrInstrumentCalibration.getDevType().equals("3")) {
-            return AjaxResult.success(exportTmpl1(list));
+            if (list.size() != 0) {
+                return AjaxResult.success(exportTmpl1(list));
+            } else {
+                return AjaxResult.error("暂无可导出数据");
+            }
         }
         return AjaxResult.error("导出失败,请联系管理员!");
     }

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLaboratoryController.java

@@ -189,7 +189,11 @@ public class TPssrLaboratoryController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrLaboratory tPssrLaboratory) {
         List<TPssrLaboratory> list = tPssrLaboratoryService.selectTPssrLaboratoryList(tPssrLaboratory);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrLaboratory> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLightingController.java

@@ -111,7 +111,11 @@ public class TPssrLightingController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrLighting tPssrLighting) {
         List<TPssrLighting> list = tPssrLightingService.selectTPssrLightingList(tPssrLighting);
-        return AjaxResult.success(exportTmpl(list, tPssrLighting.getLightingType()));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list, tPssrLighting.getLightingType()));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrLighting> list, String LightingType) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrLockController.java

@@ -119,7 +119,11 @@ public class TPssrLockController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrLock tPssrLock) {
         List<TPssrLock> list = tPssrLockService.selectTPssrLockList(tPssrLock);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrLock> list) {

+ 15 - 7
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMaterialController.java

@@ -125,7 +125,11 @@ public class TPssrMaterialController extends BaseController {
         TPssrMaterialRaw materialRaw = new TPssrMaterialRaw();
         materialRaw.setSubId(tPssrMaterial.getSubId());
         List<TPssrMaterialRaw> list2 = tPssrMaterialRawService.selectTPssrMaterialRawList(materialRaw);
-        return AjaxResult.success(exportTmpl(list1, list2));
+        if (list1.size() != 0 && list2.size() != 0) {
+            return AjaxResult.success(exportTmpl(list1, list2));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrMaterial> list1, List<TPssrMaterialRaw> list2) {
@@ -254,9 +258,11 @@ public class TPssrMaterialController extends BaseController {
             title4.createCell(3).setCellValue("确认人:");
             title4.createCell(4);
             try {
-                SysUser sysUser = sysUserService.selectUserById(Long.valueOf(list1.get(0).getConfirm1()));
-                String confirm = sysUser.getSignUrl();
-                ExcelUtils.insertPicture(wb, sheet, confirm, rowIndex, 4, 0.25, 1);
+                if (list1.size() != 0) {
+                    SysUser sysUser = sysUserService.selectUserById(Long.valueOf(list1.get(0).getConfirm1()));
+                    String confirm = sysUser.getSignUrl();
+                    ExcelUtils.insertPicture(wb, sheet, confirm, rowIndex, 4, 0.25, 1);
+                }
             } catch (NumberFormatException e) {
                 throw new RuntimeException(e);
             }
@@ -272,9 +278,11 @@ public class TPssrMaterialController extends BaseController {
             title5.createCell(1);
             title5.createCell(2);
             title5.createCell(3).setCellValue("确认时间:");
-            title5.createCell(4).setCellValue(DateUtils.dateTime(list1.get(0).getConfirmationDate()));
-            for (int i = 0; i < 5; i++) {
-                title5.getCell(i).setCellStyle(originalStyleCopy);
+            if (list1.size() != 0) {
+                title5.createCell(4).setCellValue(DateUtils.dateTime(list1.get(0).getConfirmationDate()));
+                for (int i = 0; i < 5; i++) {
+                    title5.getCell(i).setCellStyle(originalStyleCopy);
+                }
             }
             rowIndex++;
 

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMeasureController.java

@@ -195,7 +195,11 @@ public class TPssrMeasureController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrMeasure tPssrMeasure) {
         List<TPssrMeasure> list = tPssrMeasureService.selectTPssrMeasureList(tPssrMeasure);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrMeasure> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMocController.java

@@ -122,7 +122,11 @@ public class TPssrMocController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrMoc tPssrMoc) {
         List<TPssrMoc> list = tPssrMocService.selectTPssrMocList(tPssrMoc);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrMoc> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrMotorController.java

@@ -188,7 +188,11 @@ public class TPssrMotorController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrMotor tPssrMotor) {
         List<TPssrMotor> list = tPssrMotorService.selectTPssrMotorList(tPssrMotor);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrMotor> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrNitrogenController.java

@@ -194,7 +194,11 @@ public class TPssrNitrogenController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrNitrogen tPssrNitrogen) {
         List<TPssrNitrogen> list = tPssrNitrogenService.selectTPssrNitrogenList(tPssrNitrogen);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrNitrogen> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulExchangerController.java

@@ -129,7 +129,11 @@ public class TPssrOverhaulExchangerController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrOverhaulExchanger tPssrOverhaulExchanger) {
         List<TPssrOverhaulExchanger> list = tPssrOverhaulExchangerService.selectTPssrOverhaulExchangerList(tPssrOverhaulExchanger);
-        return AjaxResult.success(exportTmpl(list, tPssrOverhaulExchanger.getDevType()));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list, tPssrOverhaulExchanger.getDevType()));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrOverhaulExchanger> list, Long devType) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulFilterController.java

@@ -286,7 +286,11 @@ public class TPssrOverhaulFilterController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrOverhaulFilter tPssrOverhaulFilter) {
         List<TPssrOverhaulFilter> list = tPssrOverhaulFilterService.selectTPssrOverhaulFilterList(tPssrOverhaulFilter);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrOverhaulFilter> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulTowerController.java

@@ -281,7 +281,11 @@ public class TPssrOverhaulTowerController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrOverhaulTower tPssrOverhaulTower) {
         List<TPssrOverhaulTower> list = tPssrOverhaulTowerService.selectTPssrOverhaulTowerList(tPssrOverhaulTower);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrOverhaulTower> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrOverhaulValveController.java

@@ -311,7 +311,11 @@ public class TPssrOverhaulValveController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrOverhaulValve tPssrOverhaulValve) {
         List<TPssrOverhaulValve> list = tPssrOverhaulValveService.selectTPssrOverhaulValveList(tPssrOverhaulValve);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrOverhaulValve> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPipeController.java

@@ -168,7 +168,11 @@ public class TPssrPipeController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPipe tPssrPipe) {
         List<TPssrPipe> list = tPssrPipeService.selectTPssrPipeList(tPssrPipe);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPipe> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPowerController.java

@@ -113,7 +113,11 @@ public class TPssrPowerController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPower tPssrPower) {
         List<TPssrPower> list = tPssrPowerService.selectTPssrPowerList(tPssrPower);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPower> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProgrammeController.java

@@ -110,7 +110,11 @@ public class TPssrProgrammeController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrProgramme tPssrProgramme) {
         List<TPssrProgramme> list = tPssrProgrammeService.selectTPssrProgrammeList(tPssrProgramme);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrProgramme> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrProtectionController.java

@@ -201,7 +201,11 @@ public class TPssrProtectionController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrProtection tPssrProtection) {
         List<TPssrProtection> list = tPssrProtectionService.selectTPssrProtectionList(tPssrProtection);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrProtection> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPublicController.java

@@ -114,7 +114,11 @@ public class TPssrPublicController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPublic tPssrPublic) {
         List<TPssrPublic> list = tPssrPublicService.selectTPssrPublicList(tPssrPublic);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPublic> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpCleaningController.java

@@ -198,7 +198,11 @@ public class TPssrPumpCleaningController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPumpCleaning tPssrPumpCleaning) {
         List<TPssrPumpCleaning> list = tPssrPumpCleaningService.selectTPssrPumpCleaningList(tPssrPumpCleaning);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPumpCleaning> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpFillController.java

@@ -198,7 +198,11 @@ public class TPssrPumpFillController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPumpFill tPssrPumpFill) {
         List<TPssrPumpFill> list = tPssrPumpFillService.selectTPssrPumpFillList(tPssrPumpFill);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPumpFill> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrPumpOverhaulController.java

@@ -196,7 +196,11 @@ public class TPssrPumpOverhaulController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrPumpOverhaul tPssrPumpOverhaul) {
         List<TPssrPumpOverhaul> list = tPssrPumpOverhaulService.selectTPssrPumpOverhaulList(tPssrPumpOverhaul);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrPumpOverhaul> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBleedController.java

@@ -194,7 +194,11 @@ public class TPssrSafetyBleedController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrSafetyBleed tPssrSafetyBleed) {
         List<TPssrSafetyBleed> list = tPssrSafetyBleedService.selectTPssrSafetyBleedList(tPssrSafetyBleed);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrSafetyBleed> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBreathController.java

@@ -194,7 +194,11 @@ public class TPssrSafetyBreathController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrSafetyBreath tPssrSafetyBreath) {
         List<TPssrSafetyBreath> list = tPssrSafetyBreathService.selectTPssrSafetyBreathList(tPssrSafetyBreath);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrSafetyBreath> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyBrustController.java

@@ -192,7 +192,11 @@ public class TPssrSafetyBrustController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrSafetyBrust tPssrSafetyBrust) {
         List<TPssrSafetyBrust> list = tPssrSafetyBrustService.selectTPssrSafetyBrustList(tPssrSafetyBrust);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrSafetyBrust> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyFlamearresterController.java

@@ -190,7 +190,11 @@ public class TPssrSafetyFlamearresterController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrSafetyFlamearrester tPssrSafetyFlamearrester) {
         List<TPssrSafetyFlamearrester> list = tPssrSafetyFlamearresterService.selectTPssrSafetyFlamearresterList(tPssrSafetyFlamearrester);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrSafetyFlamearrester> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSafetyValveController.java

@@ -136,7 +136,11 @@ public class TPssrSafetyValveController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrSafetyValve tPssrSafetyValve) {
         List<TPssrSafetyValve> list = tPssrSafetyValveService.selectTPssrSafetyValveList(tPssrSafetyValve);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrSafetyValve> list) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrTorchvocController.java

@@ -113,7 +113,11 @@ public class TPssrTorchvocController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrTorchvoc tPssrTorchvoc) {
         List<TPssrTorchvoc> list = tPssrTorchvocService.selectTPssrTorchvocList(tPssrTorchvoc);
-        return AjaxResult.success(exportTmpl(list, tPssrTorchvoc.getTorchvocType()));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list, tPssrTorchvoc.getTorchvocType()));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrTorchvoc> list, String torchvocType) {

+ 5 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrVesselController.java

@@ -124,7 +124,11 @@ public class TPssrVesselController extends BaseController {
     @GetMapping("/export")
     public AjaxResult export(TPssrVessel tPssrVessel) {
         List<TPssrVessel> list = tPssrVesselService.selectTPssrVesselList(tPssrVessel);
-        return AjaxResult.success(exportTmpl(list));
+        if (list.size() != 0) {
+            return AjaxResult.success(exportTmpl(list));
+        } else {
+            return AjaxResult.error("暂无可导出数据");
+        }
     }
 
     public String exportTmpl(List<TPssrVessel> list) {