修改VDR问题
This commit is contained in:
+1
@@ -153,6 +153,7 @@
|
||||
oma.attestation_schedule,
|
||||
oma.project_version,
|
||||
pni.project_name car,
|
||||
oma.vehicle_type,
|
||||
pyni.year_name
|
||||
FROM
|
||||
project_library_base plb
|
||||
|
||||
+33
-3
@@ -1303,13 +1303,32 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
*/
|
||||
@Override
|
||||
public List<VersionVO> getVersionInfo(String vdr, String car, String cut) {
|
||||
List<VersionVO> result = new LinkedList<>();
|
||||
OtaManageReceive omr = otaManageReceiveService.getById(vdr);
|
||||
//获取到版本号,然后获取所有车型
|
||||
String plannedBpLaunchBatch = omr.getPlannedBpLaunchBatch();
|
||||
if (StringUtils.isNotEmpty(plannedBpLaunchBatch)) {
|
||||
List<OtaManageReceiveNsdp> dataList = otaManageReceiveNsdpService.getListByReleaseName(plannedBpLaunchBatch);
|
||||
//车型
|
||||
Set<String> vehicleSet = new HashSet<>();
|
||||
for (OtaManageReceiveNsdp omrn : dataList) {
|
||||
String appliedVehicleProject = omrn.getVehicle();
|
||||
if (StringUtils.isNotEmpty(appliedVehicleProject)) {
|
||||
for (String s : appliedVehicleProject.split(",")) {
|
||||
String[] split = s.split(" ");
|
||||
if (split.length == 3) {
|
||||
vehicleSet.add(split[0] + " " + split[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//认证进度数据字典 certification_progress
|
||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
||||
|
||||
List<DictModel> regionList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
|
||||
List<VersionVO> versionVOList = this.getBaseMapper().getVersionInfo(vdr);
|
||||
List<VersionVO> result = new LinkedList<>();
|
||||
if (!versionVOList.isEmpty()) {
|
||||
List<VersionVO> oneList = versionVOList.stream().filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
|
||||
List<VersionVO> twoList = versionVOList.stream().filter(e -> StringUtils.isNotBlank(e.getParentId())).collect(Collectors.toList());
|
||||
@@ -1354,11 +1373,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.isEmpty()) {
|
||||
for (String vehicleStr : vehicleSet) {
|
||||
boolean flag = false;
|
||||
for (VersionVO ver : result) {
|
||||
if(ver.getVehicleType().equals(vehicleStr)){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
VersionVO versionVO = new VersionVO();
|
||||
versionVO.setVersionName(car);
|
||||
versionVO.setVersionName(vehicleStr);
|
||||
versionVO.setVehicleType(vehicleStr);
|
||||
result.add(versionVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ public class VersionVO {
|
||||
private String versionName;
|
||||
|
||||
@ApiModelProperty(value = "项目版本-id")
|
||||
private java.lang.String projectVersion;
|
||||
private String projectVersion;
|
||||
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
private String vehicleType;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user