Compare commits
No commits in common. "53816fae1fcef7257378d51d0fd22b0f065e5be5" and "671444662473e4182f6891f0e5792375fe444671" have entirely different histories.
53816fae1f
...
6714446624
|
@ -2482,7 +2482,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
count.putAll(countMap);
|
count.putAll(countMap);
|
||||||
resultList.add(count);
|
resultList.add(count);
|
||||||
return resultList;
|
return resultList;
|
||||||
} else { // 全量
|
} else {
|
||||||
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
if (cloud) {
|
if (cloud) {
|
||||||
|
@ -2522,6 +2522,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
|
index.put("level", "municipal"); // 市级别
|
||||||
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
|
||||||
|
@ -2533,7 +2534,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
index.put("level", "municipal"); // 市级别
|
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
@ -2542,7 +2542,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在使用信息
|
index.put("level", "county"); // 区县级别
|
||||||
|
if (typeCountListMap1.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap1.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap1.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
|
|
||||||
|
@ -2554,8 +2555,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
index.put("hys", 0); // 填充会议室为0
|
|
||||||
index.put("level", "county"); // 区县级别
|
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
@ -2564,7 +2563,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
||||||
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在使用信息
|
index.put("level", "other"); // 企业级别
|
||||||
|
if (typeCountListMap2.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", typeCountListMap2.get(index.get("dept_id").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
typeCountListMap2.get(index.get("dept_id").toString()).stream().forEach(count -> {
|
||||||
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
||||||
|
@ -2574,15 +2574,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
index.put("level", "other"); // 企业级别
|
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
Map<String, List<Map<String, Object>>> typeCountListMap3 = // 会客厅 99 为sql查询出结果标识
|
Map<String, List<Map<String, Object>>> typeCountListMap3 = // 会客厅
|
||||||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("99")).collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("99")).collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||||
resultList = resultList.stream().map(index -> {
|
resultList = resultList.stream().map(index -> {
|
||||||
if (typeCountListMap3.keySet().contains(index.get("name").toString())) { // 该部门存在使用信息
|
if (typeCountListMap3.keySet().contains(index.get("name").toString())) { // 该部门存在上架信息
|
||||||
index.put("count", Integer.parseInt(index.get("count").toString()) + typeCountListMap3.get(index.get("name").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
index.put("count", Integer.parseInt(index.get("count").toString()) + typeCountListMap3.get(index.get("name").toString()).stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||||
typeCountListMap3.get(index.get("name").toString()).stream().forEach(count -> {
|
typeCountListMap3.get(index.get("name").toString()).stream().forEach(count -> {
|
||||||
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
index.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + Integer.parseInt(index.getOrDefault(count.get("type").toString(), "0").toString()));
|
||||||
|
@ -2603,7 +2602,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
typeCountListMap3.get(index_).stream().forEach(count -> {
|
typeCountListMap3.get(index_).stream().forEach(count -> {
|
||||||
map.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
map.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||||
map.put("count", Integer.parseInt(count.get("count").toString())); // 只存在会客厅的总计栏
|
|
||||||
if (countMap.containsKey(count.get("type"))) {
|
if (countMap.containsKey(count.get("type"))) {
|
||||||
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||||
} else {
|
} else {
|
||||||
|
@ -2634,10 +2632,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
countMap.put("count", total);
|
countMap.put("count", total);
|
||||||
HashMap<String, Object> count = new HashMap<>();
|
HashMap<String, Object> count = new HashMap<>();
|
||||||
count.put("name", "总计");
|
count.put("name", "总计");
|
||||||
if (!cloud) { // 不统计云资源时
|
|
||||||
count.put("yzy", "0");
|
|
||||||
count.put("ysp", "0");
|
|
||||||
}
|
|
||||||
count.putAll(countMap);
|
count.putAll(countMap);
|
||||||
resultList.add(count);
|
resultList.add(count);
|
||||||
return resultList;
|
return resultList;
|
||||||
|
|
Loading…
Reference in New Issue