Browse Source

modify:

1. 首页统计修改;
tags/24082201
WendyYang 2 months ago
parent
commit
e43de241de
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 4
- 3
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java View File

@@ -395,12 +395,13 @@ public class WorkbenchManage {
break; break;
case PROJECT_PURCHASE: { case PROJECT_PURCHASE: {
Wrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class) Wrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class)
.select(Purchase::getId, Purchase::getProjectId, Purchase::getBidType)
.isNotNull(Purchase::getSupplier)
.select(Purchase::getId, Purchase::getProjectId, Purchase::getBidType, Purchase::getSupplier)
.in(Purchase::getProjectId, allProjectIds); .in(Purchase::getProjectId, allProjectIds);
List<Purchase> purchases = purchaseService.list(purchaseQuery); List<Purchase> purchases = purchaseService.list(purchaseQuery);
projectPurchaseCountMap.putAll(CollUtils.group(purchases, Purchase::getProjectId)); projectPurchaseCountMap.putAll(CollUtils.group(purchases, Purchase::getProjectId));
currStat.setProjectCount(projectPurchaseCountMap.size());
int projectCount = CollUtil.count(projectPurchaseCountMap.values(),
w -> CollUtil.allMatch(w, x -> StrUtil.isNotBlank(x.getSupplier())));
currStat.setProjectCount(projectCount);
Pair<Integer, Integer> systemReplaceCount = countReplaceSystemByProjectIds(projectPurchaseCountMap.keySet()); Pair<Integer, Integer> systemReplaceCount = countReplaceSystemByProjectIds(projectPurchaseCountMap.keySet());
currStat.setSourceCount(systemReplaceCount.getKey()); currStat.setSourceCount(systemReplaceCount.getKey());
currStat.setTargetCount(systemReplaceCount.getValue()); currStat.setTargetCount(systemReplaceCount.getValue());


Loading…
Cancel
Save