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 afaf8ba55..87e299f0b 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 @@ -719,7 +719,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getVersionInfo(String vdr, String car,String cut) { + public List getVersionInfo(String vdr, String car, String cut) { //认证进度数据字典 certification_progress List regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress"); @@ -972,12 +972,12 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl list = new LinkedList<>(); for (String s : market.split(",")) { List collect = regionList.stream().filter(e -> e.getValue().equals(s)).collect(Collectors.toList()); - if(!collect.isEmpty()){ + if (!collect.isEmpty()) { list.add(collect.get(0).getTextEn()); } } - if(!list.isEmpty()){ - market = StringUtils.join(list,","); + if (!list.isEmpty()) { + market = StringUtils.join(list, ","); } if (StringUtils.isBlank(versionVO.getProjectVersion())) { versionVO.setVersionName(versionVO.getCar() + "-" + market); @@ -988,9 +988,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl collect = regionDictList.stream() .filter(e -> e.getItemValue().equals(versionVO.getAttestationSchedule())).collect(Collectors.toList()); - if(CutEnum.CN.getValue().equals(cut)){ + if (CutEnum.CN.getValue().equals(cut)) { versionVO.setAttestationSchedule(collect.get(0).getItemText()); - }else{ + } else { versionVO.setAttestationSchedule(collect.get(0).getEnName()); } } @@ -1142,20 +1142,48 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl queryProjectName(List list) { + public OtaManageApplyEOServiceImpl() { + super(); + } + + private Map queryProjectName(List list, String cut) { + List regionList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode()); Map res = new HashMap<>(); List idList = list.stream() .filter(e -> StringUtils.isNotBlank(e.getProjectVersion())) .map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList()); List proList = projectLibraryBaseService.getListByIds(idList); for (ProjectLibraryBase plb : proList) { + String market = plb.getTargetMarket(); + List strlist = new LinkedList<>(); + for (String s : market.split(",")) { + List collect = regionList.stream().filter(e -> e.getValue().equals(s)).collect(Collectors.toList()); + if (!collect.isEmpty()) { + strlist.add(collect.get(0).getTextEn()); + } + } + if (!strlist.isEmpty()) { + market = StringUtils.join(strlist, ","); + } + plb.setTargetMarket(market); res.put(plb.getId(), plb.getShowName()); + } + if (CutEnum.CN.getValue().equals(cut)) { + res.put(ComplianceFlowStatusEnum.UNINVOLVED.getValue(), ComplianceFlowStatusEnum.UNINVOLVED.getCnName()); + } else { + res.put(ComplianceFlowStatusEnum.UNINVOLVED.getValue(), ComplianceFlowStatusEnum.UNINVOLVED.getEnName()); + } + return res; } @Override public void temporarySave(List list, String cut) { + temporarySave(list, false, cut); + } + + public void temporarySave(List list, boolean isSubmit, String cut) { LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if (CollectionUtils.isNotEmpty(list)) { List idList = list.stream() @@ -1167,7 +1195,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl queryProNameList = new ArrayList<>(); queryProNameList.addAll(omaOldList); queryProNameList.addAll(list); - Map proNameMap = queryProjectName(queryProNameList); + Map proNameMap = queryProjectName(queryProNameList, cut); //历史记录 List hisList = new ArrayList<>(); List saveList = new ArrayList<>(); @@ -1190,12 +1218,16 @@ 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) { List> result = new ArrayList<>(); List projectLibraryBaseList = new ArrayList<>(); - if(!plbEoList.isEmpty()){ + if (!plbEoList.isEmpty()) { projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList()); } List receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch); @@ -1587,7 +1620,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl