Commit 877644e2 authored by 王果's avatar 王果

维修告知bug修改

parent 186278b8
......@@ -278,7 +278,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode);
List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper);
ArrayList<String> installLicenseNoList = new ArrayList<>();
ArrayList<String> installLicenseExpirationDateList = new ArrayList<>();
if (!CollectionUtils.isEmpty(list)) {
......@@ -290,7 +289,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
});
}
Function<String, String> getValue = key -> installation.getOrDefault(key, "").toString();
// 组装模板变量
Map<String, Object> placeholders = new HashMap<>();
......@@ -300,13 +298,13 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
placeholders.put("productName", getValue.apply("productName"));
placeholders.put("equipType", getValue.apply("equType"));
placeholders.put("equipCode", getValue.apply("equRegisterCode"));
placeholders.put("produceCode", getValue.apply("produceCode")); // TODO: 制造编号 - 设备出厂编号
placeholders.put("produceCode", getValue.apply("produceCode"));
placeholders.put("produceUnitName", getValue.apply("produceUnitName"));
placeholders.put("produceLicenseNum", getValue.apply("produceLicenseNum"));
placeholders.put("fullAddress", getValue.apply("provinceName") + getValue.apply("cityName") +
getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address"));
placeholders.put("installStartDate", getValue.apply("installStartDate"));
placeholders.put("installType", "维修"); // TODO: 施工类别
placeholders.put("installType", "维修告知");
placeholders.put("installLicenseNo", "");
placeholders.put("installLicenseExpirationDate", "");
placeholders.put("installLeaderName", getValue.apply("installLeaderName"));// 施工负责人
......@@ -321,10 +319,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// 生成二维码
String qrCode = ImageUtils.generateQRCode(getValue.apply("applyNo"), 300, 300);
placeholders.put("qrCode", qrCode);
placeholders.put("installLicenseNoList", installLicenseNoList);
placeholders.put("installLicenseExpirationDateList", installLicenseExpirationDateList);
placeholders.put("installLicenseNoList", installLicenseNoList);//许可证编号
placeholders.put("installLicenseExpirationDateList", installLicenseExpirationDateList);//许可证有效期
String url = WordTemplateUtils.templateToPdf("installation-notification-report.ftl", placeholders);
// 更新到数据库
JgMaintainNotice.setNoticeReportUrl(url);
......
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