From 182db3e87220143025932bf5cfea63a0084a842a Mon Sep 17 00:00:00 2001 From: wanjia <553039491@qq.com> Date: Wed, 15 Jan 2025 09:27:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=BB=84=E7=BB=87=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0):#124149=20=E6=88=91=E7=9A=84=E4=BA=A7=E5=93=81=20?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E8=A7=84=E6=A0=BC=E7=BB=9F=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PmsDashboardController.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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