Commit b8c747f7 authored by H2T's avatar H2T

queryCustomInputItemNew接口返回-管控形式字典匹配

parent 7111bcb7
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.patrol.business.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper;
import com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper;
import com.yeejoin.amos.patrol.business.dao.repository.IInputItemDao;
......@@ -48,7 +50,8 @@ public class InputItemServiceImpl implements IInputItemService {
@Autowired
private RemoteSecurityService remoteSecurityService;
//管控形式 字典
private static final String formOfManagementAndControl= "riskForm";
/**
......@@ -250,6 +253,15 @@ public class InputItemServiceImpl implements IInputItemService {
param.put("facilitiesType",list1);
}
List<PointInputItemVo> content = inputItemMapper.queryCustomInputItem(param);
//查询管控字典值,并替换到返回值
HashMap<String, String> dictMap = new HashMap<>();
List<DictionarieValueModel> result = Systemctl.dictionarieClient.dictValues(formOfManagementAndControl).getResult();
result.forEach(x-> dictMap.put(x.getDictDataKey(),x.getDictDataValue()));
content.stream().peek(item->{
if (StringUtils.isNotEmpty(item.getInputClassify())){
item.setInputClassify(dictMap.getOrDefault(item.getInputClassify(),"其他"));
}
}).collect(Collectors.toList());
return content;
}
......
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