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 b57a42a..6510589 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 @@ -485,7 +485,7 @@ public class PurchaseManage { .ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) .eq(req.getStatus() != null, function, req.getStatus()) .notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT - + "and np.stage != {0}", ProjectStatus.STOPPED.getCode()) + + "and np.stage = {0}", ProjectStatus.STOPPED.getCode()) .isNotNull(function) .orderByDesc(Purchase::getCreateOn); boolean display = !Boolean.FALSE.equals(req.getDisplay()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java index 7722cb8..e63c083 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/impl/PurchaseServiceImpl.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.hz.pm.api.common.helper.UserInfoHelper; +import com.hz.pm.api.common.model.constant.ExistsSqlConst; import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.datascope.model.DataScopeDTO; import com.hz.pm.api.datascope.utils.DataScopeUtil; @@ -19,6 +20,7 @@ import com.hz.pm.api.projectdeclared.model.vo.XcfhxApplyListVO; import com.hz.pm.api.projectdeclared.service.IContractService; import com.hz.pm.api.projectdeclared.service.IPurchaseService; import com.hz.pm.api.projectlib.model.entity.Project; +import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; import com.hz.pm.api.projectlib.model.enumeration.status.TenderXcfhxApplyStatus; import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.user.helper.MhUnitCache; @@ -63,6 +65,8 @@ public class PurchaseServiceImpl extends ServiceImpl .ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) .eq(req.getStatus() != null, Purchase::getXcfhxApplyStatus, req.getStatus()) .eq(req.getSourceType() != null, Purchase::getSourceType, req.getSourceType()) + .notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT + + " np.stage = {0}", ProjectStatus.STOPPED.getCode()) .orderByDesc(Purchase::getCreateOn); if (Boolean.TRUE.equals(req.getFinished())) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java index bb62405..5b5cbea 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java @@ -200,13 +200,12 @@ public class TodoCenterManage { return Boolean.TRUE; }).collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId()))); - List instCodes = CollUtils.fieldList(projectInstList,ProjectInst::getInstCode); - if (CollUtil.isEmpty(instCodes)) { + if (projectInfoMap.isEmpty()) { return PageVo.empty(); } // 查出用户工作流 TodoCenterListReqDTO req = new TodoCenterListReqDTO(); - req.setInstCodes(instCodes); + req.setInstCodes(new ArrayList<>(projectInfoMap.keySet())); Integer pageNumber = param.getPageNumber(); Integer pageSize = param.getPageSize(); req.setProcessDefId(param.getProcessDefId());