填充默认0

This commit is contained in:
wangliwen 2023-01-16 10:25:44 +08:00
parent 1cbeb17eee
commit 3b671cb670
1 changed files with 4 additions and 0 deletions

View File

@ -2444,6 +2444,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
countMap.put("sjzy", 0);
countMap.put("yzy", 0);
countMap.put("ysp", 0);
countMap.put("hys", 0); // 填充会议室为0
typeCountListMap.forEach((k, v) -> {
HashMap<Object, Object> map = new HashMap<>();
map.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
@ -2456,6 +2457,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
map.put("jcss", "0");
map.put("zsk", "0");
map.put("sjzy", "0");
map.put("yzy", "0");
map.put("ysp", "0");
map.put("hys", "0");
v.forEach(item -> {
map.put(item.get("type").toString(), item.get("count"));
if (countMap.containsKey(item.get("type"))) {