Commit abd6ee98 authored by 刘林's avatar 刘林

fix(jg):证打印标记功能开发

parent 62b1de02
...@@ -85,6 +85,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -85,6 +85,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
private static final String EQUIP_INFO_FORM_ID = "equipInfo"; private static final String EQUIP_INFO_FORM_ID = "equipInfo";
public static final String USE_UNIT_CREDIT_CODE = "useUnitCreditCode"; public static final String USE_UNIT_CREDIT_CODE = "useUnitCreditCode";
public static final String USE_UNIT_NAME = "useUnitName"; public static final String USE_UNIT_NAME = "useUnitName";
public static final String EXPORT_SUMMARY_TABLE = "exportSummaryTable";
@Resource @Resource
private IdxBizJgUseInfoServiceImpl useInfoService; private IdxBizJgUseInfoServiceImpl useInfoService;
@Resource @Resource
...@@ -505,6 +506,11 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -505,6 +506,11 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
if (ValidationUtil.isEmpty(idxBizJgProjectContraption)) { if (ValidationUtil.isEmpty(idxBizJgProjectContraption)) {
throw new BadRequest("没有查询到汇总信息!"); throw new BadRequest("没有查询到汇总信息!");
} }
JSONObject tagJson = Optional.ofNullable(idxBizJgProjectContraption.getCertificatePrintTag())
.map(JSONObject::parseObject)
.orElse(new JSONObject());
tagJson.put(EXPORT_SUMMARY_TABLE, 2);
idxBizJgProjectContraption.setCertificatePrintTag(JSONObject.toJSONString(tagJson));
List<Map<String, Object>> allEquipment = baseMapper.selectEquipListByExport(sequenceNbr); List<Map<String, Object>> allEquipment = baseMapper.selectEquipListByExport(sequenceNbr);
total = allEquipment.size(); total = allEquipment.size();
AgencyUserModel result = new AgencyUserModel(); AgencyUserModel result = new AgencyUserModel();
...@@ -523,6 +529,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -523,6 +529,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
List<CompletableFuture<byte[]>> futures = pressurePipeDataPreparation(page, idxBizJgProjectContraption, size, total, allEquipment, wordPath, filePrefix, result,category); List<CompletableFuture<byte[]>> futures = pressurePipeDataPreparation(page, idxBizJgProjectContraption, size, total, allEquipment, wordPath, filePrefix, result,category);
// byte[]压缩zip // byte[]压缩zip
toZipFile(response, futures, filePrefix, customFileName); toZipFile(response, futures, filePrefix, customFileName);
baseMapper.updateById(idxBizJgProjectContraption);
} }
} }
......
...@@ -122,7 +122,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -122,7 +122,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private static final String TABLE_PAGE_ID = "1734141426742095873"; private static final String TABLE_PAGE_ID = "1734141426742095873";
public static final String CONSTRUCTION_TYPE = "SGLX"; public static final String CONSTRUCTION_TYPE = "SGLX";
public static final String CONSTRUCTION_TYPE_NAME = "安装"; public static final String CONSTRUCTION_TYPE_NAME = "安装";
public static final String EXPORT_SUMMARY_TABLE = "exportSummaryTable";
@Autowired @Autowired
JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper; JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper;
@Autowired @Autowired
...@@ -695,8 +695,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -695,8 +695,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
maps.add(placeholders); maps.add(placeholders);
}); });
} }
JSONObject tagJson = Optional.ofNullable(jgInstallationNotice.getCertificatePrintTag())
.map(JSONObject::parseObject)
.orElse(new JSONObject());
tagJson.put(EXPORT_SUMMARY_TABLE, 2);
jgInstallationNotice.setCertificatePrintTag(JSONObject.toJSONString(tagJson));
jgInstallationNoticeMapper.updateById(jgInstallationNotice);
String tempFileName = "安装告知单_" + System.currentTimeMillis() + "_temp"; String tempFileName = "安装告知单_" + System.currentTimeMillis() + "_temp";
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders); // String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
// //
......
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