Commit 266ca1b5 authored by suhuiguang's avatar suhuiguang

refactor(大编辑):管道增减功能开发

1.删除后再删除保存报错
parent 2a2ae497
...@@ -75,22 +75,26 @@ public class EquipBackupHandler { ...@@ -75,22 +75,26 @@ public class EquipBackupHandler {
private String buildDeleteData(List<String> records) { private String buildDeleteData(List<String> records) {
List<Map<String, Object>> data = records.stream().map(record -> { List<Map<String, Object>> data = records.stream().map(record -> {
IdxBizJgRegisterInfo registerInfo = registerInfoService.getOneData(record); IdxBizJgRegisterInfo registerInfo = registerInfoService.getOneData(record);
Map<String, Object> item = new HashMap<>(); if(registerInfo != null) {
item.put(BACKUP_JSON_KEY_OTHER_INFO, otherInfoService.getOneData(record)); Map<String, Object> item = new HashMap<>();
item.put(BACKUP_JSON_KEY_REGISTER_INFO, registerInfo); item.put(BACKUP_JSON_KEY_OTHER_INFO, otherInfoService.getOneData(record));
item.put(BACKUP_JSON_KEY_SUPERVISION_INFO, supervisionInfoService.getOneData(record)); item.put(BACKUP_JSON_KEY_REGISTER_INFO, registerInfo);
item.put(BACKUP_JSON_KEY_FACTORY_INFO, factoryInfoService.getOneData(record)); item.put(BACKUP_JSON_KEY_SUPERVISION_INFO, supervisionInfoService.getOneData(record));
item.put(BACKUP_JSON_KEY_USE_INFO, useInfoService.getOneData(record)); item.put(BACKUP_JSON_KEY_FACTORY_INFO, factoryInfoService.getOneData(record));
// 技术参数 item.put(BACKUP_JSON_KEY_USE_INFO, useInfoService.getOneData(record));
item.put(BACKUP_JSON_KEY_TECH_PARAM_INFO, this.getTechParamByEquListAndRecord(registerInfo.getEquList(), record)); // 技术参数
// 检验流水数组 item.put(BACKUP_JSON_KEY_TECH_PARAM_INFO, this.getTechParamByEquListAndRecord(registerInfo.getEquList(), record));
item.put(BACKUP_JSON_KEY_INSPECTION_DETECTION_INFO, this.getInspectList(record)); // 检验流水数组
// 施工流水 item.put(BACKUP_JSON_KEY_INSPECTION_DETECTION_INFO, this.getInspectList(record));
item.put(BACKUP_JSON_KEY_CONSTRUCTION_INFO, this.getConstructionList(record)); // 施工流水
Optional<ESEquipmentCategoryDto> op = equipmentCategory.findById(record); item.put(BACKUP_JSON_KEY_CONSTRUCTION_INFO, this.getConstructionList(record));
op.ifPresent(e -> item.put(BACKUP_JSON_KEY_INSPECTION_ES_INFO, e)); Optional<ESEquipmentCategoryDto> op = equipmentCategory.findById(record);
return item; op.ifPresent(e -> item.put(BACKUP_JSON_KEY_INSPECTION_ES_INFO, e));
}).collect(Collectors.toList()); return item;
}
return null;
}).filter(Objects::nonNull).collect(Collectors.toList());
return JSONObject.toJSONString(data); return JSONObject.toJSONString(data);
} }
......
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