Browse Source

modify:

1. 适配改造列表查询修改;
tags/24082201
WendyYang 2 months ago
parent
commit
3ac511c302
2 changed files with 31 additions and 5 deletions
  1. +27
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  2. +4
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/IStatus.java

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

@@ -481,8 +481,29 @@ public class PurchaseManage {
}
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())
.eq(req.getStatus() != null, Purchase::getStatus, req.getStatus());
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin());
if (req.getStatus() != null) {
ITenderStatus tenderStatus = TenderMainStatus.getNoNull(req.getStatus());
if (tenderStatus.eq(TenderMainStatus.TO_BE_SUBMIT_OPERATION_PLAN)) {
query.eq(Purchase::getStatus, TenderMainStatus.TO_BE_SUBMIT_OPERATION_PLAN.getCode());
} else if (tenderStatus.eq(TenderAdaptStatus.WITHOUT_ADAPT_INFO)) {
query.in(Purchase::getStatus, TenderAdaptStatus.WITHOUT_ADAPT_INFO.getCode(),
TenderAdaptStatus.ADAPT_INFO_FAILED.getCode(),
TenderAdaptStatus.ADAPT_INFO_AUDIT.getCode());
} else if (tenderStatus.eq(TenderSelfTestStatus.WITHOUT_SELF_TEST_INFO)) {
query.in(Purchase::getStatus, TenderSelfTestStatus.WITHOUT_SELF_TEST_INFO.getCode(),
TenderSelfTestStatus.SELF_TEST_INFO_FAILED.getCode(),
TenderSelfTestStatus.SELF_TEST_INFO_AUDIT.getCode());
} else if (tenderStatus.eq(TenderTestValidStatus.WITHOUT_TEST_VALID_INFO)) {
query.in(Purchase::getStatus, TenderTestValidStatus.WITHOUT_TEST_VALID_INFO.getCode(),
TenderTestValidStatus.TEST_VALID_INFO_FAILED.getCode(),
TenderTestValidStatus.TEST_VALID_INFO_AUDIT.getCode());
} else if (tenderStatus.eq(TenderMainStatus.WAIT_ORG_CONFIRM)) {
query.eq(Purchase::getStatus, TenderMainStatus.WAIT_ORG_CONFIRM.getCode());
} else {
return PageVo.empty();
}
}
Page<Purchase> page = purchaseService.page(req.page(), query);
if (page.getTotal() == 0) {
return PageVo.empty();
@@ -523,9 +544,10 @@ public class PurchaseManage {
.ne(Project::getStage, ProjectStatus.STOPPED.getCode())
.eq(Project::getNewest, Boolean.TRUE)
.like(StrUtil.isNotBlank(req.getProjectName()), Project::getProjectName, req.getProjectName())
.like(StrUtil.isNotBlank(req.getBuildOrgName()), Project::getBuildOrgName, req.getBuildOrgName())
.in(req.getBuildOrgCode() != null, Project::getBuildOrgCode,
mhUnitCache.getViewChildIdsRecursion(req.getBuildOrgCode()));
.like(StrUtil.isNotBlank(req.getBuildOrgName()), Project::getBuildOrgName, req.getBuildOrgName());
if (req.getBuildOrgCode() != null) {
projQuery.in(Project::getBuildOrgCode, mhUnitCache.getViewChildIdsRecursion(req.getBuildOrgCode()));
}
List<Project> projects = projectService.list(projQuery);
return CollUtils.fieldList(projects, Project::getId);
}


+ 4
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/IStatus.java View File

@@ -18,4 +18,8 @@ public interface IStatus<C, D> {
return this.getCode().equals(code);
}

default boolean eq(IStatus<C, D> status) {
return this.getCode().equals(status.getCode());
}

}

Loading…
Cancel
Save