Commit 7ca41132 authored by 刘林's avatar 刘林

fix(jg):设计年限bug修改

parent 83a81f40
......@@ -2739,12 +2739,7 @@ public class CommonServiceImpl implements ICommonService {
formData.put("equCode", v.get("equCode"));
formData.put("useRegistrationCode", v.get("useOrgCode"));
formData.put("produceUnitName", v.get("produceUnitName"));
Optional.ofNullable(v.get("produceDate"))
.map(Object::toString)
.map(String::trim)
.filter(s -> !s.isEmpty())
.map(s -> LocalDateTime.parse(s, inputFormatter).format(outputFormatter))
.ifPresent(s -> formData.put("produceDate", s));
formData.put("produceDate", v.get("produceDate"));
formData.put("factoryNum", v.get("factoryNum"));
formData.put("productName", v.get("productName"));
formData.put("useUnitName", v.get("useUnitName"));
......
......@@ -192,7 +192,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
.map(v -> (String) v.get("record"))
.collect(Collectors.toList())
);
if (designInfoList.stream().anyMatch(info -> info.getOverDesignRegNum() >= 2)) {
if (designInfoList.stream().anyMatch(info -> Optional.ofNullable(info.getOverDesignRegNum()).orElse(0) >= 2)) {
log.error("超设计使用年限变更登记设备最多延期两次, 设备record: {}", designInfoList.stream().filter(info -> info.getOverDesignRegNum() >= 2)
.map(IdxBizJgDesignInfo::getRecord).collect(Collectors.joining(",")));
throw new BadRequest("超设计使用年限变更登记设备最多延期两次!");
......
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