Commit 1dfc8810 authored by chenhao's avatar chenhao

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

parent 2d283e19
......@@ -983,12 +983,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public Object getEquipmentTypeAndCount(String bizOrgCode) {
if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) {
return JSONArray.parseArray(
JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
} else {
// if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) {
// return JSONArray.parseArray(
// JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
// } else {
return refreshEquipmentTypeAndCount(bizOrgCode);
}
// }
}
@Override
......@@ -998,7 +998,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return null;
}
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());
List<EquipmentCategory> list = typeListTree(equipmentTypeList, bizOrgCode, SourceTypeEnum.EQUIPMENT);
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