Commit bbd62bcd authored by hezhuozhi's avatar hezhuozhi

压力管道安装告知告知书打印调整

parent ee90f7b0
...@@ -669,10 +669,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -669,10 +669,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
byte[] templateToPdfData = WordTemplateUtils.getTemplateToPdfData(tempFileName, "installation-notification-report.ftl", map); byte[] templateToPdfData = WordTemplateUtils.getTemplateToPdfData(tempFileName, "installation-notification-report.ftl", map);
//获取管道和气瓶的基本信息汇总表 //获取管道和气瓶的基本信息汇总表
List<CompletableFuture<byte[]>> exportSummaryBasicInfoData = jgUseRegistrationService.getExportSummaryBasicInfoData(Collections.singletonList(Long.valueOf(sequenceNbr)), jgInstallationNotice.getEquCategoryCode(),"安装告知"); List<CompletableFuture<byte[]>> exportSummaryBasicInfoData = jgUseRegistrationService.getExportSummaryBasicInfoData(Collections.singletonList(Long.valueOf(sequenceNbr)), jgInstallationNotice.getEquCategoryCode(),"安装告知");
//压缩包名称
String customFileName="";
//将安装告知单和汇总表压缩到zip中 //将安装告知单和汇总表压缩到zip中
toZipFileByData(response, exportSummaryBasicInfoData, templateToPdfData, customFileName,jgInstallationNotice.getEquCategoryCode()); toZipFileByData(response, exportSummaryBasicInfoData, templateToPdfData, jgInstallationNotice.getApplyNo(),jgInstallationNotice.getEquCategoryCode());
} }
/** /**
...@@ -680,17 +678,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -680,17 +678,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param response * @param response
* @param exportSummaryBasicInfoData * @param exportSummaryBasicInfoData
* @param templateToPdfData * @param templateToPdfData
* @param customFileName * @param applyNo
* @param category * @param category
*/ */
private void toZipFileByData(HttpServletResponse response, List<CompletableFuture<byte[]>> exportSummaryBasicInfoData, byte[] templateToPdfData, String customFileName, String category) { private void toZipFileByData(HttpServletResponse response, List<CompletableFuture<byte[]>> exportSummaryBasicInfoData, byte[] templateToPdfData, String applyNo, String category) {
String filePrefix ="汇总表"; String filePrefix ="汇总表";
String customFileName="设备基本信息汇总表";
if ("8300".equals(category) || "8200".equals(category) || "8100".equals(category)) { if ("8300".equals(category) || "8200".equals(category) || "8100".equals(category)) {
// 文件名前缀 // 文件名前缀
filePrefix= "压力管道基本信息汇总表_"; filePrefix= "压力管道基本信息汇总表_";
customFileName="压力管道告知单_设备基本信息汇总表_" + applyNo + ".zip";
}else if ("2300".equals(category)) { }else if ("2300".equals(category)) {
// 文件名前缀 // 文件名前缀
filePrefix = "气瓶基本信息汇总表_"; filePrefix = "气瓶基本信息汇总表_";
customFileName="气瓶告知单_设备基本信息汇总表_" + applyNo + ".zip";
} }
// 打包zip // 打包zip
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment