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