Commit 111689e6 authored by tangwei's avatar tangwei

增加配置

parent f2fde89f
......@@ -1159,12 +1159,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Object refreshEquipmentTypeAndCountNew(String bizOrgCode) {
//获取装备分类
List<EquipmentCategory> responseList= this.iEquipmentCategoryService
.getEquipmentCategoryListNew(Integer.valueOf(equipmentCategoryLeftTypeCode),"eq");
if (responseList == null || responseList.size() < 1) {
return null;
}
//分类数据处理
List<EquipmentCategory> list = typeListTreeNew(responseList, bizOrgCode);
return list;
}
......@@ -1175,11 +1176,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// 查询所有装备
List<Map<String,Object>> listMP = this.iEquipmentCategoryService.getequipmentListEQNew();
equipmentCategorys.forEach(action -> {
//根据条件获取装备数量
List<Map<String,Object>> listM= listMP.stream().filter(x->x.get("code").toString().contains(action.getCode())&&x.get("bizOrgCode").toString().contains(bizOrgCode)).collect(Collectors.toList());
int num=listM!=null?listM.size():0;
//设置装备数量
action.setCount(Double.parseDouble(num + ""));
if (action.getParentId() == null) {
list.add(action);
......@@ -1190,11 +1190,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
tmpMap.put(action.getParentId().toString(), tmplist);
} else {
if (!tmpMap.get(action.getParentId().toString()).contains(action)) {
//添加子节点
tmpMap.get(action.getParentId().toString()).add(action);
}
}
}
});
//组装数
getChildren(list, tmpMap);
return list;
}
......
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