bug修复

This commit is contained in:
dinggang 2022-07-01 19:55:13 +08:00
parent 52edb4edcd
commit 90dbc0d9f4
1 changed files with 3 additions and 1 deletions

View File

@ -326,7 +326,9 @@ public class CensusControllerV2 {
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目 allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
Map map = (Map) resourceService.selectTotal(); Map map = (Map) resourceService.selectTotal();
List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) map.get("total"); List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) map.get("total");
return dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum();
return dbAmount.stream().filter(index -> "基础设施".equals(index.get("type").toString()))
.mapToLong(index -> Long.parseLong(index.get("count").toString())).sum();
}).thenAccept(sum -> { }).thenAccept(sum -> {
result.add(new HashMap<String, Object>() { result.add(new HashMap<String, Object>() {
{ {