Commit d96f2d43 authored by KeYong's avatar KeYong

更新换流变排油阀接口查询规则

parent e57b16a9
......@@ -2943,6 +2943,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public List<Map<String, Object>> getFEquipInfoListCategory(String bizOrgCode) {
List<DataDictionary> zdsbfl = jcsFeignClient.dataDictionaryIdFillMenu("ZDSBFL").getResult();
List<DataDictionary> dictionaryList = treeMenuList(zdsbfl, "1850");
List<Map<String, Object>> list = this.baseMapper.getFEquipInfoListCategory(bizOrgCode);
ArrayList<String> strings = new ArrayList<>();
list.forEach(item -> {
......@@ -2991,7 +2992,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
List<Map<String, Object>> listNew = new ArrayList<>();
Map<String, List<Map<String, Object>>> categoryMap = resultList.stream().collect(Collectors.groupingBy(t -> t.get("category").toString()));
zdsbfl.forEach(item -> {
dictionaryList.forEach(item -> {
HashMap<String, Object> map = new HashMap<>();
map.put("code", item.getTreeCode());
map.put("name", item.getName());
......@@ -3000,4 +3001,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
return listNew;
}
private static List<DataDictionary> treeMenuList(List<DataDictionary> menuList, String treeCode) {
List<DataDictionary> childMenu = new ArrayList<>();
for (DataDictionary mu : menuList) {
//遍历出父id等于参数的id,add进子节点集合
if (mu.getTreeCode() == treeCode) {
//递归遍历下一级
treeMenuList(menuList, mu.getTreeCode());
childMenu.add(mu);
}
}
return childMenu;
}
}
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