|
@@ -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()); |
|
|