Commit 1dfc8810 authored by chenhao's avatar chenhao

解决消防装备多展示类型树的问题

parent 2d283e19
...@@ -983,12 +983,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -983,12 +983,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override @Override
public Object getEquipmentTypeAndCount(String bizOrgCode) { public Object getEquipmentTypeAndCount(String bizOrgCode) {
if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) { // if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) {
return JSONArray.parseArray( // return JSONArray.parseArray(
JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class); // JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
} else { // } else {
return refreshEquipmentTypeAndCount(bizOrgCode); return refreshEquipmentTypeAndCount(bizOrgCode);
} // }
} }
@Override @Override
...@@ -998,7 +998,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -998,7 +998,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return null; return null;
} }
List<EquipmentCategory> equipmentTypeList = responseList.stream() List<EquipmentCategory> equipmentTypeList = responseList.stream()
.filter(i -> !i.getCode().startsWith("2") && "2".equals(i.getIndustryCode())) .filter(i -> !i.getCode().startsWith("2") && "2".equals(i.getIndustryCode()))
.filter(m->!m.getCode().startsWith("9306") && "2".equals(m.getIndustryCode()))
.collect(Collectors.toList()); .collect(Collectors.toList());
List<EquipmentCategory> list = typeListTree(equipmentTypeList, bizOrgCode, SourceTypeEnum.EQUIPMENT); List<EquipmentCategory> list = typeListTree(equipmentTypeList, bizOrgCode, SourceTypeEnum.EQUIPMENT);
redisUtils.set(equipTypeAndCount + bizOrgCode, list, 86400); redisUtils.set(equipTypeAndCount + bizOrgCode, list, 86400);
......
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