Commit 266ca1b5 authored by suhuiguang's avatar suhuiguang

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

1.删除后再删除保存报错
parent 2a2ae497
...@@ -75,6 +75,7 @@ public class EquipBackupHandler { ...@@ -75,6 +75,7 @@ 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);
if(registerInfo != null) {
Map<String, Object> item = new HashMap<>(); Map<String, Object> item = new HashMap<>();
item.put(BACKUP_JSON_KEY_OTHER_INFO, otherInfoService.getOneData(record)); item.put(BACKUP_JSON_KEY_OTHER_INFO, otherInfoService.getOneData(record));
item.put(BACKUP_JSON_KEY_REGISTER_INFO, registerInfo); item.put(BACKUP_JSON_KEY_REGISTER_INFO, registerInfo);
...@@ -90,7 +91,10 @@ public class EquipBackupHandler { ...@@ -90,7 +91,10 @@ public class EquipBackupHandler {
Optional<ESEquipmentCategoryDto> op = equipmentCategory.findById(record); Optional<ESEquipmentCategoryDto> op = equipmentCategory.findById(record);
op.ifPresent(e -> item.put(BACKUP_JSON_KEY_INSPECTION_ES_INFO, e)); op.ifPresent(e -> item.put(BACKUP_JSON_KEY_INSPECTION_ES_INFO, e));
return item; return item;
}).collect(Collectors.toList()); }
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