Commit 74d8bde2 authored by 刘林's avatar 刘林

fix(jg):设计年限bug修改-可多次发起,不限制次数

parent d153a998
...@@ -230,7 +230,8 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign ...@@ -230,7 +230,8 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
BeanUtils.copyProperties(overDesignDto, overDesignServiceLife); BeanUtils.copyProperties(overDesignDto, overDesignServiceLife);
overDesignServiceLife.setCreateUserId(reginParams.getUserModel().getUserId()); overDesignServiceLife.setCreateUserId(reginParams.getUserModel().getUserId());
overDesignServiceLife.setCreateUserName(reginParams.getUserModel().getRealName()); overDesignServiceLife.setCreateUserName(reginParams.getUserModel().getRealName());
overDesignServiceLife.setUseRegistrationCode(String.join(",", registrationNoList)); overDesignServiceLife.setUseRegistrationCode(
registrationNoList.stream().distinct().collect(Collectors.joining(",")));
Function<String, String> getFirstValue = key -> equipmentLists.stream() Function<String, String> getFirstValue = key -> equipmentLists.stream()
.findFirst() .findFirst()
.map(e -> Objects.toString(e.get(key), "")) .map(e -> Objects.toString(e.get(key), ""))
...@@ -706,7 +707,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign ...@@ -706,7 +707,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
designInfoList.forEach(designInfo -> { designInfoList.forEach(designInfo -> {
// List<IdxBizJgInspectionDetectionInfo> inspectionList = // List<IdxBizJgInspectionDetectionInfo> inspectionList =
// iIdxBizJgInspectionDetectionInfoService.queryInspectionListByRecord(designInfo.getRecord()); // iIdxBizJgInspectionDetectionInfoService.queryInspectionListByRecord(designInfo.getRecord());
designInfo.setOverDesignRegNum(Math.min(designInfo.getOverDesignRegNum() + 1, 2)); designInfo.setOverDesignRegNum(Optional.ofNullable(designInfo.getOverDesignRegNum()).orElse(0) + 1);
designInfo.setDelayServiceLifeDate(jgOverDesignServiceLife.getExtendUseDeadline()); designInfo.setDelayServiceLifeDate(jgOverDesignServiceLife.getExtendUseDeadline());
// IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = inspectionList.stream() // IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = inspectionList.stream()
// .filter(info -> "6000".equals(equListCode) || "WTJY".equals(info.getInspectType())) // .filter(info -> "6000".equals(equListCode) || "WTJY".equals(info.getInspectType()))
......
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