From 316ec47c1aeeb8f7e899b6f357463845a5783fce Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 18 Jan 2024 16:49:30 +0800 Subject: [PATCH] =?UTF-8?q?OTA-=E7=8A=B6=E6=80=81=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtaManageApplyEOController.java | 4 +- .../ota/service/IOtaManageApplyEOService.java | 4 +- .../impl/OtaManageApplyEOServiceImpl.java | 145 ++++++++++++++++-- ...PlatformProjectLibraryBaseServiceImpl.java | 2 +- .../project/entity/ProjectLibraryBase.java | 3 + .../impl/ProjectLibraryBaseServiceImpl.java | 25 ++- .../impl/ProjectStatusBoardServiceImpl.java | 2 +- .../components/otastatus.vue | 9 +- .../components/projectStatus.vue | 2 +- 9 files changed, 178 insertions(+), 18 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java index c1a3e1d47..5f29180ea 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaManageApplyEOController.java @@ -308,9 +308,9 @@ public class OtaManageApplyEOController extends JeroController getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) { + public Result getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut,String appliedVehicleProject) { List projectLibraryBaseList = new ArrayList<>(); - List> res = otaManageApplyEOService.getStatisticalStatus(projectId, plannedBpLaunchBatch, cut,projectLibraryBaseList); + List> res = otaManageApplyEOService.getStatisticalStatus(projectId, plannedBpLaunchBatch, cut,projectLibraryBaseList,appliedVehicleProject); if(!res.isEmpty()){ return Result.OK("操作成功!", res.get(0)); }else{ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java index 533e19a85..0f6e70174 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaManageApplyEOService.java @@ -130,7 +130,9 @@ public interface IOtaManageApplyEOService extends IService { List getVdrListByProject(String projectId, String cut); - List> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut,List projectLibraryBaseList); + List> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, + String cut,List projectLibraryBaseList, + String appliedVehicleProject); ModelAndView otaExportXls(HttpServletRequest request, OtaManageApplyEO otaManageApplyEO); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java index 13e1c5ac6..e01150ccd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java @@ -792,9 +792,11 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut, List plbEoList) { + public List> getStatisticalStatus(String projectId, + String plannedBpLaunchBatch, + String cut, + List plbEoList, + String appliedVehicleProject) { List> result = new ArrayList<>(); List projectLibraryBaseList = new ArrayList<>(); if (ObjectUtils.isNotEmpty(plbEoList)) { projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList()); } - List receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch); +// List receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch); + OtaManageApplyEO otaManageApplyEO = new OtaManageApplyEO(); + otaManageApplyEO.setPlannedBpLaunchBatch(plannedBpLaunchBatch); + otaManageApplyEO.setAppliedVehicleProject(appliedVehicleProject); + List receiveList = getOtaCarPage(otaManageApplyEO,cut); + +// List receiveList = this.getBaseMapper().getListByProjectId(null, plannedBpLaunchBatch); +// receiveList = receiveList.stream() +// .filter(e -> (StringUtils.isNotBlank(e.getProjectVersion()) && projectId.equals(e.getProjectVersion())) +// || (StringUtils.isBlank(e.getProjectVersion()) && "to_be_matched".equals(e.getMatchStatus()))) +// .collect(Collectors.toList()); if (!receiveList.isEmpty()) { List plannedBpLaunchBatchList = receiveList.stream() @@ -2119,7 +2134,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut, List plbEoList) { +// List> result = new ArrayList<>(); +// List projectLibraryBaseList = new ArrayList<>(); +// if (ObjectUtils.isNotEmpty(plbEoList)) { +// projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList()); +// } +// List receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch); +// +// if (!receiveList.isEmpty()) { +// List plannedBpLaunchBatchList = receiveList.stream() +// .filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch())) +// .map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList()); +// +// for (String s : plannedBpLaunchBatchList) { +// List otaManageApplyEOList = receiveList.stream() +// .filter(e -> s.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList()); +// +// int total = otaManageApplyEOList.size(); +// //匹配状态 +// int toBeMatched = 0;//待匹配 +// int toBeApproved = 0;//待审批 +// int locked = 0;//锁定 +// int rejected = 0;//退回 +// //认证进度 +// int notStart = 0;//未开始 +// int inProgress = 0;//进行中 +// int testPassed = 0;//实验通过 +// int testFailed = 0;//实验失败 +// int notSubmitted = 0;//部件报告未提交 +// int submitted = 0;//部件报告已提交 +// int stored = 0;//部件报告已入库 +// +// for (OtaManageApplyEO oma : otaManageApplyEOList) { +// if (StringUtils.isBlank(oma.getMatchStatus()) || oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())) { +// toBeMatched++; +// } else if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) { +// toBeApproved++; +// } else if (oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) { +// locked++; +// } else if (oma.getMatchStatus().equals(OtaStatusEnum.REJECTED.getKey())) { +// rejected++; +// } else { +// toBeMatched++; +// } +// if (StringUtils.isBlank(oma.getAttestationSchedule()) || oma.getAttestationSchedule().equals(CertificationProgressEnum.NOT_START.getValue())) { +// notStart++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.IN_PROGRESS.getValue())) { +// inProgress++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_PASSED.getValue())) { +// testPassed++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.TEST_FAILED.getValue())) { +// testFailed++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())) { +// notSubmitted++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())) { +// submitted++; +// } else if (oma.getAttestationSchedule().equals(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())) { +// stored++; +// } else { +// notStart++; +// } +// } +// +// Map statisticalMap = new HashMap<>(); +// statisticalMap.put("plannedBpLaunchBatch", s); +// statisticalMap.put("allCount", total); +// List> matchStatusMapList = new ArrayList<>(); +// matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched)); +// matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved)); +// matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.LOCKED.getKey(), locked)); +// matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.REJECTED.getKey(), rejected)); +// statisticalMap.put("matchStatusMapList", matchStatusMapList); +// +// Map matchStatusMap = new HashMap<>(); +// matchStatusMap.put(OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched); +// matchStatusMap.put(OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved); +// matchStatusMap.put(OtaStatusEnum.LOCKED.getKey(), locked); +// matchStatusMap.put(OtaStatusEnum.REJECTED.getKey(), rejected); +// statisticalMap.put("matchStatusMap", matchStatusMap); +// +// List> attestationScheduleMapList = new ArrayList<>(); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.NOT_START.getValue(), notStart)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.IN_PROGRESS.getValue(), inProgress)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_PASSED.getValue(), testPassed)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.TEST_FAILED.getValue(), testFailed)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue(), notSubmitted)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue(), submitted)); +// attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue(), stored)); +// statisticalMap.put("attestationScheduleMapList", attestationScheduleMapList); +// +// Map attestationScheduleMap = new HashMap<>(); +// attestationScheduleMap.put(CertificationProgressEnum.NOT_START.getValue().replace(" ", "_"), notStart); +// attestationScheduleMap.put(CertificationProgressEnum.IN_PROGRESS.getValue().replace(" ", "_"), inProgress); +// attestationScheduleMap.put(CertificationProgressEnum.TEST_PASSED.getValue().replace(" ", "_"), testPassed); +// attestationScheduleMap.put(CertificationProgressEnum.TEST_FAILED.getValue().replace(" ", "_"), testFailed); +// attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue().replace(" ", "_"), notSubmitted); +// attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue().replace(" ", "_"), submitted); +// attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ", "_"), stored); +// statisticalMap.put("attestationScheduleMap", attestationScheduleMap); +// +// if (!projectLibraryBaseList.isEmpty()) { +// statisticalMap.put("showName", projectLibraryBaseList.get(0).getShowName()); +// } +// result.add(statisticalMap); +// } +// } +// return result; +// } private Map wrapStatMap(String key, String val, String keyStr, Object valObj) { Map map = new HashMap<>(); 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 5e609c9bc..205217c74 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 @@ -3295,7 +3295,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl> mapList = otaManageApplyEOService.getStatisticalStatus(projectLibraryId, null, cut,null); + List> mapList = otaManageApplyEOService.getStatisticalStatus(projectLibraryId, null, cut,null,null); if(ObjectUtils.isNotEmpty(mapList)){ int dataIndex = 2; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java index 7c0f778cc..9b151fa95 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java @@ -269,6 +269,9 @@ public class ProjectLibraryBase implements Comparable { @ApiModelProperty(value = "平台件类型") private String platformType; + @TableField(exist = false) + private String appliedVehicleProject; + @Override public int compareTo(ProjectLibraryBase o) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java index 4d275453c..8102deb5f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java @@ -1288,6 +1288,29 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode()); for(ProjectLibraryBase projectLibraryBase: records){ + //setOtaProjectName ota状态统计传参使用 + String projectName = projectLibraryBase.getProjectName(); + if("FORCE".equals(projectName)){ + projectName = "Force"; + } + String market = projectLibraryBase.getTargetMarket(); + List projectNameAndTargetMarketList = new ArrayList<>(); + if(StringUtils.isNotBlank(market)){ + for (String marketStr : market.split(",")) { + if(marketStr.equals("China")){ + projectNameAndTargetMarketList.add(projectName+" China"); + }else if(marketStr.equals("UK")){ + projectNameAndTargetMarketList.add(projectName+" RHD"); + }else{ + projectNameAndTargetMarketList.add(projectName+" "+marketStr); + } + } + } + if(ObjectUtils.isNotEmpty(projectNameAndTargetMarketList)){ + projectLibraryBase.setAppliedVehicleProject(StringUtils.join(projectNameAndTargetMarketList,",")); + } + + //历史数据的主版本没有版本号,所以默认给00 if(StringUtils.isBlank(projectLibraryBase.getParentId()) && StringUtils.isBlank(projectLibraryBase.getProjectVersion())){ projectLibraryBase.setProjectVersion("00"); @@ -4017,7 +4040,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> mapList = otaManageApplyEOService.getStatisticalStatus(projectLibraryId, null, cut,null); + List> mapList = otaManageApplyEOService.getStatisticalStatus(projectLibraryId, null, cut,null,null); if(ObjectUtils.isNotEmpty(mapList)){ int dataIndex = 2; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java index 022bc4220..516dd0bec 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectStatusBoardServiceImpl.java @@ -686,7 +686,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService for (String projectId : projectIdListTemp) { List> statisticalStatus = otaManageApplyEOService.getStatisticalStatus(projectId, "", - projectLibraryBase.getCut(),plbEoList); + projectLibraryBase.getCut(),plbEoList,null); mapList.addAll(statisticalStatus); } } diff --git a/jero-web/src/views/projectManagement/components/otastatus.vue b/jero-web/src/views/projectManagement/components/otastatus.vue index 96716853a..abad1112d 100644 --- a/jero-web/src/views/projectManagement/components/otastatus.vue +++ b/jero-web/src/views/projectManagement/components/otastatus.vue @@ -105,7 +105,11 @@ idList: { type: Array, default: [] - } + }, + queryForm:{ + type: Object, + default: {} + }, }, data() { return { @@ -149,7 +153,8 @@ getData() { let query = { ...this.queryParam, - projectId:this.$route.query.id + projectId:this.$route.query.id, + appliedVehicleProject:this.queryForm.appliedVehicleProject } getAction('ota/otaManageApplyEO/getStatisticalStatus', query).then((res) => { if (res.success) { diff --git a/jero-web/src/views/projectManagement/components/projectStatus.vue b/jero-web/src/views/projectManagement/components/projectStatus.vue index d1fff51e3..2e2399e69 100644 --- a/jero-web/src/views/projectManagement/components/projectStatus.vue +++ b/jero-web/src/views/projectManagement/components/projectStatus.vue @@ -26,7 +26,7 @@ v-if="activeKey == $t('parameterCollectionProgressManagement')"/> - +