From e43de241de46ddd3fbb63d5a0286481e6ec48f34 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 22 Aug 2024 16:16:18 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E9=A6=96=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java index e7158c4..c6d4962 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java @@ -395,12 +395,13 @@ public class WorkbenchManage { break; case PROJECT_PURCHASE: { Wrapper 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); List purchases = purchaseService.list(purchaseQuery); 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 systemReplaceCount = countReplaceSystemByProjectIds(projectPurchaseCountMap.keySet()); currStat.setSourceCount(systemReplaceCount.getKey()); currStat.setTargetCount(systemReplaceCount.getValue());