|
@@ -747,7 +747,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
String msg = "";//导出方法文件名
|
|
|
String downloadPath = getProfile() + "/download/";//导出方法默认目录
|
|
|
String path = "";//导出方法默认文件路径=msg+downloadPath
|
|
|
- String rootPath = getProfile() + "/download/pssr/" + id + "/";//即将被打包的根目录
|
|
|
+ String rootPath = getProfile() + "/download/pssr_" + id + "_" + UUID.randomUUID().toString() + "/";//即将被打包的根目录
|
|
|
String subTitle = "";//子表目录字符串
|
|
|
List<File> files = new ArrayList<>();//文件路径集合
|
|
|
TPssrSubcontent queryParams = new TPssrSubcontent();
|
|
@@ -828,7 +828,13 @@ public class TPssrApproveController extends BaseController {
|
|
|
path = downloadPath + msg;
|
|
|
Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
files.add(new File(rootPath + subTitle + msg));
|
|
|
- //todo:附件
|
|
|
+ //附件
|
|
|
+ List<TPssrProgramme> tPssrProgrammes = tPssrProgrammeService.selectTPssrProgrammeList(programme);
|
|
|
+ for (TPssrProgramme tPssrProgramme : tPssrProgrammes) {
|
|
|
+ String fileUrl = tPssrProgramme.getFileUrl();
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
+ }
|
|
|
break;
|
|
|
case "sjbg"://设计变更
|
|
|
subTitle = "03设计变更/";
|
|
@@ -1093,10 +1099,28 @@ public class TPssrApproveController extends BaseController {
|
|
|
files.add(new File(rootPath + subTitle + msg));
|
|
|
break;
|
|
|
case "yblscs"://仪表联锁测试
|
|
|
- //todo:附件
|
|
|
+ subTitle = "24仪表联锁测试/";
|
|
|
+ TPssrInstrumentTest instrumentTest = new TPssrInstrumentTest();
|
|
|
+ instrumentTest.setSubId(tPssrSubcontent.getId());//子表id
|
|
|
+ //附件
|
|
|
+ List<TPssrInstrumentTest> instrumentTests = tPssrInstrumentTestService.selectTPssrInstrumentTestList(instrumentTest);
|
|
|
+ for (TPssrInstrumentTest test : instrumentTests) {
|
|
|
+ String fileUrl = test.getFileUrl();
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
+ }
|
|
|
break;
|
|
|
case "bjlszqr"://报警/联锁值确认
|
|
|
- //todo:附件
|
|
|
+ subTitle = "25报警、联锁值确认/";
|
|
|
+ TPssrAlarm alarm = new TPssrAlarm();
|
|
|
+ alarm.setSubId(tPssrSubcontent.getId());//子表id
|
|
|
+ //附件
|
|
|
+ List<TPssrAlarm> alarms = tPssrAlarmService.selectTPssrAlarmList(alarm);
|
|
|
+ for (TPssrAlarm a : alarms) {
|
|
|
+ String fileUrl = a.getFileUrl();
|
|
|
+ String newFileUrl = getProfile() + fileUrl.replace("/profile","");
|
|
|
+ Files.copy(Paths.get(newFileUrl), Paths.get(rootPath + subTitle + fileUrl.substring(fileUrl.lastIndexOf("/"))), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
+ }
|
|
|
break;
|
|
|
case "lsdy"://临时电源
|
|
|
subTitle = "26临时电源/";
|
|
@@ -1169,7 +1193,7 @@ public class TPssrApproveController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
- ZipUtil.toZipWithDirectory(rootPath, downloadPath + id + "pssr.zip");//打包
|
|
|
+ ZipUtil.toZipWithDirectory(rootPath, downloadPath + "pssr.zip");//打包
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -1209,11 +1233,6 @@ public class TPssrApproveController extends BaseController {
|
|
|
boolean mkdir31 = new File(rootPath + "31在线分析仪").mkdirs();
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/downloadAboveall")
|
|
|
- public AjaxResult downloadAboveall(TPssrAboveall aboveall) {
|
|
|
- return AjaxResult.success(aboveall.getId() + "pssr.zip");//fileName
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 氮气置换审批流程发起申请
|
|
|
*
|