diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/dashboard/controller/PmsDashboardController.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/dashboard/controller/PmsDashboardController.java index a331f1e42..9b87e0868 100644 --- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/dashboard/controller/PmsDashboardController.java +++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/dashboard/controller/PmsDashboardController.java @@ -192,7 +192,7 @@ public class PmsDashboardController extends BaseController { PmsProductStatVo statVo = new PmsProductStatVo(); String pmsProductIdentifier = e.getProductIdentifier(); Integer requirementCount = pmsProductRequirementService.countByIdentifierAndStatus(pmsProductIdentifier, getUserReqList()); - Integer reqSpecsCount = pmsProductRequirementService.countByIdentifierAndStatus(pmsProductIdentifier, getReqSpecsList()); + Integer reqSpecsCount = pmsProductRequirementService.countByIdentifierAndStatus(pmsProductIdentifier, getTotalReqSpecsList()); BeanUtils.copyProperties(e, statVo); statVo.setReqSpecsCount(reqSpecsCount); statVo.setUserReqCount(requirementCount); @@ -253,7 +253,7 @@ public class PmsDashboardController extends BaseController { /** - * 获取 需求规格状态list + * 获取 统计饼图所需的需求规格状态list * @return 需求规格状态list */ private List getReqSpecsList() { @@ -265,6 +265,20 @@ public class PmsDashboardController extends BaseController { .collect(Collectors.toList()); } + /** + * 获取Count总数时,需求规格的状态list + * @return 需求规格状态list + */ + private List getTotalReqSpecsList() { + return Stream.of(ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey(), + ProductReqStatus.PLANNED_REQ_SPECS.getKey(), + ProductReqStatus.REJECTED_REQ_SPECS.getKey(), + ProductReqStatus.REVIEWED_REQ_SPECS.getKey(), + ProductReqStatus.COMPLETED_REQ_SPECS.getKey(), + ProductReqStatus.CHANGING_REQ_SPECS.getKey()) + .collect(Collectors.toList()); + } + /** * 获取 用户需求状态list * @return 用户需求状态list