修改OTAbug

This commit is contained in:
高嵩
2023-08-27 22:50:32 +08:00
parent c75fc7ba48
commit e2be7ca10e
@@ -684,42 +684,42 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
public List<OtaManageApplyEO> getOtaCarPage(OtaManageApplyEO otaManageApplyEO, String cut) {
List<OtaManageApplyEO> otaManageApplyEOList = this.getBaseMapper().getOtaCarPage(otaManageApplyEO);
List<OtaManageApplyEO> list = new ArrayList<>();
Map<String,OtaManageApplyEO> 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<String> listTemp = Arrays.asList(split);
List<String> 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<OtaManageApplyEOMap
}
}
}
list = new ArrayList<>(omaMap.values());
if (!list.isEmpty()) {
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null);
//项目版本id