Compare commits
No commits in common. "9d99754895f619ee8370e95c8c825fdf095b5ce1" and "14941565b131087ec8d40915c8f24fe4d06d2dde" have entirely different histories.
9d99754895
...
14941565b1
|
@ -2337,7 +2337,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
|
||||
}
|
||||
|
||||
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())) { // 部门精准查
|
||||
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())) {// 部门精准查
|
||||
|
||||
List<Map<String, Object>> zwyCountListByapplyDept = new ArrayList<>();
|
||||
List<Map<String, Object>> lcDept = sysDeptDao.selectLCDeptByUcsDeptName(params.get("deptId").toString());
|
||||
|
@ -2482,7 +2482,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
count.putAll(countMap);
|
||||
resultList.add(count);
|
||||
return resultList;
|
||||
} else { // 全量
|
||||
} else {
|
||||
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
|
||||
try {
|
||||
if (cloud) {
|
||||
|
@ -2522,6 +2522,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
resultList = resultList.stream().map(index -> {
|
||||
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());
|
||||
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()));
|
||||
}
|
||||
});
|
||||
index.put("level", "municipal"); // 市级别
|
||||
}
|
||||
return index;
|
||||
}).collect(Collectors.toList());
|
||||
|
@ -2542,7 +2542,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("3"))
|
||||
.collect(Collectors.groupingBy(m -> m.get("district").toString()));
|
||||
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());
|
||||
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()));
|
||||
}
|
||||
});
|
||||
index.put("hys", 0); // 填充会议室为0
|
||||
index.put("level", "county"); // 区县级别
|
||||
}
|
||||
return index;
|
||||
}).collect(Collectors.toList());
|
||||
|
@ -2564,7 +2563,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
typeCountListByApplyDept.stream().filter(index -> index.get("deptType").toString().equals("4"))
|
||||
.collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||
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());
|
||||
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()));
|
||||
|
@ -2574,15 +2574,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
countMap.put(count.get("type").toString(), Integer.parseInt(count.get("count").toString()));
|
||||
}
|
||||
});
|
||||
index.put("level", "other"); // 企业级别
|
||||
}
|
||||
return index;
|
||||
}).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()));
|
||||
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());
|
||||
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()));
|
||||
|
@ -2603,7 +2602,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
HashMap<String, Object> map = new HashMap<>();
|
||||
typeCountListMap3.get(index_).stream().forEach(count -> {
|
||||
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"))) {
|
||||
countMap.replace(count.get("type").toString(), Integer.parseInt(count.get("count").toString()) + countMap.get(count.get("type")));
|
||||
} else {
|
||||
|
@ -2634,10 +2632,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
countMap.put("count", total);
|
||||
HashMap<String, Object> count = new HashMap<>();
|
||||
count.put("name", "总计");
|
||||
if (!cloud) { // 不统计云资源时
|
||||
count.put("yzy", "0");
|
||||
count.put("ysp", "0");
|
||||
}
|
||||
count.putAll(countMap);
|
||||
resultList.add(count);
|
||||
return resultList;
|
||||
|
|
Loading…
Reference in New Issue