Commit 6178cac1 authored by 韩桐桐's avatar 韩桐桐

fix(设备代码):注销详情返回接口修改

parent 8a04f905
......@@ -53,6 +53,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 设备报废注销服务实现类
......@@ -533,11 +535,16 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
installationInfo.put("equCode", one.getEquCode());
Map<String, Object> detailFieldCamelCaseByRecord = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(jgScrapCancelEq.getEquId());
String equList = String.valueOf(detailFieldCamelCaseByRecord.getOrDefault("equList", ""));
BeanUtils.copyProperties(installationInfo, detailFieldCamelCaseByRecord);
detailFieldCamelCaseByRecord.put("equList", equList);
detailFieldCamelCaseByRecord.put("EQU_LIST_CODE", equList);
Map<String, Object> collect = Stream.concat(
installationInfo.entrySet().stream(),
detailFieldCamelCaseByRecord.entrySet().stream()
)
.filter(entry -> entry.getValue() != null)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (existing, replacement) -> existing));
collect.put("equList", equList);
collect.put("EQU_LIST_CODE", equList);
return new HashMap<String, Object>() {{
this.put(PAGE_KEY, detailFieldCamelCaseByRecord);
this.put(PAGE_KEY, collect);
}};
}
return new HashMap<String, Object>() {{
......
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