Browse Source

modify:

1. 招标采购、项目立项、适配改造、项目库查询修改;
tags/24083002^0
WendyYang 4 months ago
parent
commit
0cb5d03a61
3 changed files with 25 additions and 3 deletions
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java
  2. +11
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  3. +12
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java View File

@@ -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")


+ 11
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -540,7 +540,7 @@ public class PurchaseManage {
projectService.updateById(project);
}

public AdaptionProgressStatVO adaptionProgressStatistics() {
public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) {
LambdaQueryWrapper<Purchase> 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<Long> 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<Purchase> purchases = purchaseService.list(query);
return adaptionProgressStatistics(purchases);
}


+ 12
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml View File

@@ -362,6 +362,18 @@
<if test="req.stage != null">
and p.stage = #{req.stage}
</if>
<if test="req.statusList != null and req.statusList.size > 0">
and p.status in
<foreach collection="req.statusList" open="(" close=")" separator="," item="statusItem">
#{statusItem}
</foreach>
</if>
<if test="req.stageList != null and req.stageList.size > 0">
and p.stage in
<foreach collection="req.stageList" open="(" close=")" separator="," item="stageItem">
#{stageItem}
</foreach>
</if>
<if test="req.projectYear != null">
and p.project_year = #{req.projectYear}
</if>


Loading…
Cancel
Save