From e2be7ca10e30240aeb0ccaa7ebef4fe309e1c7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Sun, 27 Aug 2023 22:50:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OTAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OtaManageApplyEOServiceImpl.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 ebf135cb0..2ac262bd5 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 @@ -684,42 +684,42 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getOtaCarPage(OtaManageApplyEO otaManageApplyEO, String cut) { List otaManageApplyEOList = this.getBaseMapper().getOtaCarPage(otaManageApplyEO); List list = new ArrayList<>(); + Map omaMap = new HashMap<>(); String carMarket = otaManageApplyEO.getAppliedVehicleProject(); if (StringUtils.isNotBlank(carMarket) && !"全部".equals(carMarket) && !"All".equals(carMarket) && !otaManageApplyEOList.isEmpty()) { String[] conditionSplit = carMarket.split(" "); for (OtaManageApplyEO manageApplyEO : otaManageApplyEOList) { - if (StringUtils.isNotEmpty(manageApplyEO.getVehicleType()) - && !manageApplyEO.getVehicleType().equals(otaManageApplyEO.getAppliedVehicleProject())) { - manageApplyEO.setVehicleType(otaManageApplyEO.getAppliedVehicleProject()); + if (omaMap.containsKey(manageApplyEO.getVdr()) + && StringUtils.isNotEmpty(omaMap.get(manageApplyEO.getVdr()).getVehicleType()) + && omaMap.get(manageApplyEO.getVdr()).getVehicleType().equals(otaManageApplyEO.getAppliedVehicleProject())) { + continue; + } else { manageApplyEO.setId(UUID.randomUUID().toString().replace("-", "")); manageApplyEO.setProjectVersion(null); manageApplyEO.setAttestationSchedule(null); manageApplyEO.setMatchStatus(null); manageApplyEO.setRemark("--"); } - if (StringUtils.isEmpty(manageApplyEO.getId()) || manageApplyEO.getId().length() < 20) { - manageApplyEO.setId(UUID.randomUUID().toString().replace("-", "")); - } String appliedVehicleProject = manageApplyEO.getAppliedVehicleProject(); if (StringUtils.isNotBlank(appliedVehicleProject)) { String[] appliedVehicleProjectArr = appliedVehicleProject.split(","); for (String appliedVehicleProjectTemp : appliedVehicleProjectArr) { String[] split = appliedVehicleProjectTemp.split(" "); if (split.length == 1) { - list.add(manageApplyEO); + omaMap.put(manageApplyEO.getVdr(),manageApplyEO); break; } else if (split.length == 2) { if (Arrays.equals(conditionSplit, split)) { - list.add(manageApplyEO); + omaMap.put(manageApplyEO.getVdr(),manageApplyEO); break; } } else if (split.length == 3) { List listTemp = Arrays.asList(split); List conditionList = Arrays.asList(conditionSplit); if (listTemp.containsAll(conditionList)) { - list.add(manageApplyEO); + omaMap.put(manageApplyEO.getVdr(),manageApplyEO); break; } } @@ -727,6 +727,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl(omaMap.values()); if (!list.isEmpty()) { List vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null); //项目版本id