统计报表修改
This commit is contained in:
parent
4aab62391a
commit
c64c3b4278
|
@ -121,7 +121,7 @@ public class HibrianApiGateway implements ApiGateway {
|
|||
//建路由(接口url)
|
||||
HashMap routeEntity = new HashMap();
|
||||
routeEntity.put("name", "api:1:" + resourceDTO.getName());
|
||||
routeEntity.put("service_id", id);
|
||||
routeEntity.put("serviceId", id);
|
||||
routeEntity.put("methods", methods);
|
||||
routeEntity.put("uris", apiPrefix + uris);
|
||||
routeEntity.put("enableMetric", true);
|
||||
|
|
|
@ -2018,12 +2018,30 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||
ArrayList<Map> resultList = new ArrayList<>();
|
||||
Map<String, Integer> countMap = new HashMap<>();
|
||||
typeCountListMap.forEach((k, v) -> {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
map.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||
map.put("name", k);
|
||||
v.forEach(item -> map.put(item.get("type").toString(), item.get("count")));
|
||||
v.forEach(item -> {
|
||||
map.put(item.get("type").toString(), item.get("count"));
|
||||
if (countMap.containsKey(item.get("type"))) {
|
||||
countMap.replace(item.get("type").toString(), Integer.parseInt(item.get("count").toString()) + countMap.get(item.get("type")));
|
||||
} else {
|
||||
countMap.put(item.get("type").toString(), Integer.parseInt(item.get("count").toString()));
|
||||
}
|
||||
});
|
||||
resultList.add(map);
|
||||
});
|
||||
Integer total=0;
|
||||
for(Integer count : countMap.values()){
|
||||
total+=count;
|
||||
}
|
||||
countMap.put("count", total);
|
||||
HashMap<String, Object> count = new HashMap<>();
|
||||
count.put("name", "总计");
|
||||
count.putAll(countMap);
|
||||
resultList.add(count);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
@ -2032,12 +2050,30 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
||||
Map<String, List<Map<String, Object>>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString()));
|
||||
ArrayList<Map> resultList = new ArrayList<>();
|
||||
Map<String, Integer> countMap = new HashMap<>();
|
||||
typeCountListMap.forEach((k, v) -> {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
map.put("count", v.stream().mapToInt(it -> Integer.parseInt(it.get("count").toString())).sum());
|
||||
map.put("name", k);
|
||||
v.forEach(item -> map.put(item.get("type").toString(), item.get("count")));
|
||||
v.forEach(item -> {
|
||||
map.put(item.get("type").toString(), item.get("count"));
|
||||
if (countMap.containsKey(item.get("type"))) {
|
||||
countMap.replace(item.get("type").toString(), Integer.parseInt(item.get("count").toString()) + countMap.get(item.get("type")));
|
||||
} else {
|
||||
countMap.put(item.get("type").toString(), Integer.parseInt(item.get("count").toString()));
|
||||
}
|
||||
});
|
||||
resultList.add(map);
|
||||
});
|
||||
Integer total=0;
|
||||
for(Integer count : countMap.values()){
|
||||
total+=count;
|
||||
}
|
||||
countMap.put("count", total);
|
||||
HashMap<String, Object> count = new HashMap<>();
|
||||
count.put("name", "总计");
|
||||
count.putAll(countMap);
|
||||
resultList.add(count);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
|
|
@ -1715,6 +1715,7 @@
|
|||
AND taa.user_id = su.id
|
||||
AND su.dept_id = sd.id
|
||||
AND taa.resource_id = tdr.id
|
||||
AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR tdr.type = '业务组件')
|
||||
<choose>
|
||||
<when test="approveStatus != null and approveStatus != ''">
|
||||
AND taa.approve_status = #{approveStatus}
|
||||
|
@ -1754,6 +1755,7 @@
|
|||
WHERE
|
||||
1 = 1
|
||||
AND tdr.dept_id = sd.id
|
||||
AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR tdr.type = '业务组件')
|
||||
<choose>
|
||||
<when test="approveStatus != null and approveStatus == '通过'">
|
||||
AND tdr.del_flag = 0
|
||||
|
|
Loading…
Reference in New Issue