From b0f3ba8dc235837863c4253bc76d69abd7256298 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 12 Oct 2023 11:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E5=9E=8B=E5=BA=93=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=AF=BC=E5=87=BA=EF=BC=88=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86=EF=BC=89=20=E8=BD=A6?= =?UTF-8?q?=E5=9E=8B=E5=BA=93=E8=AF=A6=E6=83=85-=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86Pre-Homo=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=B9=B6=E5=BC=A0=E5=9B=BE=E5=B1=95=E7=A4=BA=E4=B8=AD=E5=BE=85?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E6=94=B9=E4=B8=BA=E5=BE=85=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ctCertificationInventoryEOServiceImpl.java | 4 +- ...PlatformProjectLibraryBaseServiceImpl.java | 3 +- .../IProjectLibraryStatisticsService.java | 2 + ...ctCertificationInventoryEOServiceImpl.java | 4 +- .../impl/ProjectLibraryBaseServiceImpl.java | 47 ++++++------ .../ProjectLibraryStatisticsServiceImpl.java | 76 ++++++++++++++++++- 6 files changed, 108 insertions(+), 28 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectCertificationInventoryEOServiceImpl.java index 02f0d6a96..3c6a98c03 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectCertificationInventoryEOServiceImpl.java @@ -80,6 +80,7 @@ import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; +import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum; import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService; import com.jero.modules.todoCenter.service.IProcessInfoEOService; import com.jero.modules.wkflow.enums.FlowTypeEnum; @@ -3489,7 +3490,8 @@ public class PlatformProjectCertificationInventoryEOServiceImpl extends ServiceI notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue()); notStartedMap.put("taskAffirmStatusCount",notStartedCount); - toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue()); + toConfirmMap.put("taskAffirmStatus", TodoCenterStatusEnum.TO_SUBMIT.getValue()); +// toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue()); toConfirmMap.put("taskAffirmStatusCount",toConfirmCount); acceptedMap.put("taskAffirmStatus",CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue()); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java index 8f45a7c6a..ff237b1bb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java @@ -77,6 +77,7 @@ import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.util.StringUtils; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; +import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum; import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService; import com.jero.modules.top.entity.TopProjectEO; import com.jero.modules.top.service.ITopProjectEOService; @@ -2983,7 +2984,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl prehomoMap = this.projectLibraryStatisticsService.getPrehomoStatisticeGroupByTerritory(pciEoList, params); Map prehomoNotStartedMap = (Map) prehomoMap.get(TaskAffirmStatusEnum.NOT_STARTED.getValue()); double prehomoNotStartedAmount = (double) prehomoNotStartedMap.get("amount"); - Map prehomoToConfirmMap = (Map) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue()); + Map prehomoToConfirmMap = (Map) prehomoMap.get(TodoCenterStatusEnum.TO_SUBMIT.getValue()); double prehomoToConfirmAmount = (double) prehomoToConfirmMap.get("amount"); Map prehomoAcceptedMap = (Map) prehomoMap.get(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue()); double prehomoAcceptedAmount = (double) prehomoAcceptedMap.get("amount"); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryStatisticsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryStatisticsService.java index 8bac94398..c9db860f1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryStatisticsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryStatisticsService.java @@ -75,6 +75,8 @@ public interface IProjectLibraryStatisticsService { */ Map getPartCertificationProgressStatisticsGroupByTerritory(List datas, Map params); + Map getPartCertificationProgressStatisticsGroupByTerritoryTemp(List datas, Map params); + /** * 获取认证参数收集-统计信息 * @param datas diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 2bfe78073..50a1033e7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -83,6 +83,7 @@ import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; +import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum; import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService; import com.jero.modules.todoCenter.service.IProcessInfoEOService; import com.jero.modules.wkflow.enums.FlowTypeEnum; @@ -3389,7 +3390,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl prehomoMap = this.projectLibraryStatisticsService.getPrehomoStatisticeGroupByTerritory(pciEoList, params); Map prehomoNotStartedMap = (Map) prehomoMap.get(TaskAffirmStatusEnum.NOT_STARTED.getValue()); double prehomoNotStartedAmount = (double) prehomoNotStartedMap.get("amount"); - Map prehomoToConfirmMap = (Map) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue()); + Map prehomoToConfirmMap = (Map) prehomoMap.get(TodoCenterStatusEnum.TO_SUBMIT.getValue()); +// Map prehomoToConfirmMap = (Map) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue()); double prehomoToConfirmAmount = (double) prehomoToConfirmMap.get("amount"); Map prehomoAcceptedMap = (Map) prehomoMap.get(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue()); double prehomoAcceptedAmount = (double) prehomoAcceptedMap.get("amount"); @@ -3293,7 +3305,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl certificationProgressMap = this.projectLibraryStatisticsService.getPartCertificationProgressStatisticsGroupByTerritory(pciEoList, params); + Map certificationProgressMap = this.projectLibraryStatisticsService.getPartCertificationProgressStatisticsGroupByTerritoryTemp(pciEoList, params); Map certificationProgressNotStartMap = (Map)certificationProgressMap.get(CertificationProgressEnum.NOT_START.getValue()); double certificationProgressNotStartAmount = (double) certificationProgressNotStartMap.get("amount"); Map certificationProgressInProgressMap = (Map)certificationProgressMap.get(CertificationProgressEnum.IN_PROGRESS.getValue()); @@ -3302,26 +3314,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl certificationProgressTestFailedMap = (Map)certificationProgressMap.get(CertificationProgressEnum.TEST_FAILED.getValue()); double certificationProgressTestFailedAmount = (double) certificationProgressTestFailedMap.get("amount"); - Map certificationProgressNotSubmitMap = (Map)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue()); - double certificationProgressNotSubmitAmount = (double) certificationProgressNotSubmitMap.get("amount"); - Map certificationProgressSubmitMap = (Map)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue()); - double certificationProgressSubmitAmount = (double) certificationProgressSubmitMap.get("amount"); - Map certificationProgressStoredMap = (Map)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue()); - double certificationProgressStoredAmount = (double) certificationProgressStoredMap.get("amount"); dataRow.createCell(11).setCellValue(certificationProgressNotStartAmount); dataRow.createCell(12).setCellValue(certificationProgressInProgressAmount); dataRow.createCell(13).setCellValue(certificationProgressTestPassedAmount); dataRow.createCell(14).setCellValue(certificationProgressTestFailedAmount); - dataRow.createCell(15).setCellValue(certificationProgressNotSubmitAmount); - dataRow.createCell(16).setCellValue(certificationProgressSubmitAmount); - dataRow.createCell(17).setCellValue(certificationProgressStoredAmount); double certificationProgressCount = certificationProgressNotStartAmount + certificationProgressInProgressAmount - + certificationProgressTestPassedAmount + certificationProgressTestFailedAmount - + certificationProgressNotSubmitAmount + certificationProgressSubmitAmount - + certificationProgressStoredAmount; + + certificationProgressTestPassedAmount + certificationProgressTestFailedAmount; double certificationProgressPercentage = (certificationProgressTestPassedAmount / certificationProgressCount) * 100; String certificationProgressPercentageStr = (certificationProgressPercentage != 0 && (certificationProgressCount !=0 )) ? df.format(certificationProgressPercentage) : "0"; - dataRow.createCell(18).setCellValue(certificationProgressPercentageStr + percentSign); + dataRow.createCell(15).setCellValue(certificationProgressPercentageStr + percentSign); } /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryStatisticsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryStatisticsServiceImpl.java index 18dcc91c1..bcd80f318 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryStatisticsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryStatisticsServiceImpl.java @@ -12,6 +12,7 @@ import com.jero.modules.project.enums.TaskAffirmStatusEnum; import com.jero.modules.project.service.IProjectCertificationInventoryEOService; import com.jero.modules.project.service.IProjectLawsInventoryEOService; import com.jero.modules.project.service.IProjectLibraryStatisticsService; +import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -360,6 +361,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap); result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap); +// result.put(TodoCenterStatusEnum.TO_SUBMIT.getValue(),acceptedMap); result.put(TaskAffirmStatusEnum.ACCEPTED.getValue(),acceptedMap); result.put(TaskAffirmStatusEnum.REJECTED.getValue(),rejectedMap); } @@ -436,7 +438,8 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati rejectedMap.put("percentage",rejectedPercentageStr + percentSign); result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap); - result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap); +// result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap); + result.put(TodoCenterStatusEnum.TO_SUBMIT.getValue(),acceptedMap); result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue(),acceptedMap); result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue(),rejectedMap); } @@ -514,7 +517,6 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati } return result; } - @Override public Map getCarCertificationProgressStatisticsGroupByTerritory(List datas, Map params) { Map result = new HashMap<>(); @@ -695,6 +697,76 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati } return result; } + @Override + public Map getPartCertificationProgressStatisticsGroupByTerritoryTemp(List datas, Map params) { + Map result = new HashMap<>(); + if(CollectionUtils.isNotEmpty(datas)){ + Map notStartMap = new HashMap<>(); + Map inProgressMap = new HashMap<>(); + Map testPassedMap = new HashMap<>(); + Map testFailedMap = new HashMap<>(); + + + // 未开始 + List notStartPciEoList = datas.stream().filter(data -> { + boolean flag = ( + StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue()) + ); + return flag; + }).collect(Collectors.toList()); + double notStartCount = (double) notStartPciEoList.size(); + double notStartPercentage = (notStartCount / (datas.size())) * 100; + String notStartPercentageStr = notStartPercentage != 0 ? df.format(notStartPercentage) : "0"; + notStartMap.put("amount",notStartCount); + notStartMap.put("percentage",notStartPercentageStr + percentSign); + // 进行中 + List inProgressPciEoList = datas.stream().filter(data -> { + boolean flag = ( + StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue()) + || StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue()) + ); + return flag; + }).collect(Collectors.toList()); + double inProgressCount = (double) inProgressPciEoList.size(); + double inProgressPercentage = (inProgressCount / (datas.size())) * 100; + String inProgressPercentageStr = inProgressPercentage != 0 ? df.format(inProgressPercentage) : "0"; + inProgressMap.put("amount",inProgressCount); + inProgressMap.put("percentage",inProgressPercentageStr + percentSign); + // 实验通过 + List testPassedPciEoList = datas.stream().filter(data -> { + boolean flag = ( + StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue()) + || StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue()) + || StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue()) + ); + return flag; + }).collect(Collectors.toList()); + double testPassedCount = (double) testPassedPciEoList.size(); + double testPassedPercentage = (testPassedCount / (datas.size())) * 100; + String testPassedPercentageStr = testPassedPercentage != 0 ? df.format(testPassedPercentage) : "0"; + testPassedMap.put("amount",testPassedCount); + testPassedMap.put("percentage",testPassedPercentageStr + percentSign); + + // 实验失败 + List testFailedPciEoList = datas.stream().filter(data -> { + boolean flag = ( + StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue()) + ); + return flag; + }).collect(Collectors.toList()); + double testFailedCount = (double) testFailedPciEoList.size(); + double testFailedPercentage = (testFailedCount / (datas.size())) * 100; + String testFailedPercentageStr = testFailedPercentage != 0 ? df.format(testFailedPercentage) : "0"; + testFailedMap.put("amount",testFailedCount); + testFailedMap.put("percentage",testFailedPercentageStr + percentSign); + + result.put(CertificationProgressEnum.NOT_START.getValue(),notStartMap); + result.put(CertificationProgressEnum.IN_PROGRESS.getValue(),inProgressMap); + result.put(CertificationProgressEnum.TEST_PASSED.getValue(),testPassedMap); + result.put(CertificationProgressEnum.TEST_FAILED.getValue(),testFailedMap); + } + return result; + } @Override public Map getParameterCollectingStatisticsGroupByTerritory(List datas, Map params) {