Commit 7d9c787c authored by H2T's avatar H2T

接口返回内容匹配管控形式字典值

parent 85ae7579
......@@ -1910,6 +1910,16 @@ public class PointServiceImpl implements IPointService {
content.forEach(e->{
if(e.get("id")!=null && !StringUtils.isBlank(e.get("id").toString())){
List<PointInputItemVo> inputItems = inputItemMapper.queryCustomInputItemByPointId(e.get("id").toString());
//匹配管控形式字典
//查询管控字典值,并替换到返回值
HashMap<String, String> dictMap = new HashMap<>();
List<DictionarieValueModel> result = Systemctl.dictionarieClient.dictValues(formOfManagementAndControl).getResult();
result.forEach(x-> dictMap.put(x.getDictDataKey(),x.getDictDataValue()));
inputItems.stream().peek(item->{
if (!ObjectUtils.isEmpty(item.getInputClassify())){
item.setInputClassify(dictMap.getOrDefault(item.getInputClassify(),"其他"));
}
}).collect(Collectors.toList());
e.put("equipIputDetailData",inputItems);
e.put("equipIputDetailDataNum",inputItems!=null?inputItems.size():0);
}
......
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