diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java index 0b736ab..0c369d0 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java @@ -88,8 +88,8 @@ public class PurchaseController { @GetMapping("/adaptionProgressStatistics") @ApiOperation("获取采购进度统计") - public AdaptionProgressStatVO adaptionProgressStatistics() { - return purchaseManage.adaptionProgressStatistics(); + public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) { + return purchaseManage.adaptionProgressStatistics(req); } @GetMapping("/pageAdaption") diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java index 2b19e00..16d7471 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java @@ -540,7 +540,7 @@ public class PurchaseManage { projectService.updateById(project); } - public AdaptionProgressStatVO adaptionProgressStatistics() { + public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) { LambdaQueryWrapper query = Wrappers.lambdaQuery(Purchase.class) .select(Purchase::getStatus, Purchase::getId) .eq(Purchase::getBidType, BidTypeEnum.BUILD_APP.getCode()) @@ -554,6 +554,16 @@ public class PurchaseManage { if (!purchaseService.buildPurchaseQueryPermission(query, user)) { return null; } + if (req.hasProjectQuery()) { + List projectIds = filterProjectIdsForPurchase(req); + if (projectIds.isEmpty()) { + return null; + } + query.in(Purchase::getProjectId, projectIds); + } + query.like(StrUtil.isNotBlank(req.getBidName()), Purchase::getBidName, req.getBidName()) + .le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) + .ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()); List purchases = purchaseService.list(query); return adaptionProgressStatistics(purchases); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml index 52e7ac5..49644e5 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml @@ -362,6 +362,18 @@ and p.stage = #{req.stage} + + and p.status in + + #{statusItem} + + + + and p.stage in + + #{stageItem} + + and p.project_year = #{req.projectYear}