修改OTA版本号字段

This commit is contained in:
高嵩
2023-08-24 10:36:17 +08:00
parent 9005110a87
commit d5a3a967e0
2 changed files with 16 additions and 15 deletions
@@ -81,7 +81,7 @@
and omr.impact_eu_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%')) and omr.impact_eu_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%'))
</if> </if>
<if test="otaManageApplyEO.appliedVehicleProject != null and otaManageApplyEO.appliedVehicleProject != ''"> <if test="otaManageApplyEO.appliedVehicleProject != null and otaManageApplyEO.appliedVehicleProject != ''">
and omr.applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%' and omr.applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%')
</if> </if>
</where> </where>
order by omr.id desc order by omr.id desc
@@ -765,9 +765,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
public List<String> getCarList(String cut) { public List<String> getCarList(String cut) {
List<OtaManageApplyEO> otaManageApplyEOS = this.getBaseMapper().getOtaCarList(); List<OtaManageApplyEO> otaManageApplyEOS = this.getBaseMapper().getOtaCarList();
List<String> result = new LinkedList<>(); List<String> result = new LinkedList<>();
if(CutEnum.CN.getValue().equals(cut)){ if (CutEnum.CN.getValue().equals(cut)) {
result.add("全部"); result.add("全部");
}else{ } else {
result.add("All"); result.add("All");
} }
if (!otaManageApplyEOS.isEmpty()) { if (!otaManageApplyEOS.isEmpty()) {
@@ -777,13 +777,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
.filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject())) .filter(e -> StringUtils.isNotBlank(e.getAppliedVehicleProject()))
.map(OtaManageApplyEO::getAppliedVehicleProject).distinct().collect(Collectors.toList()); .map(OtaManageApplyEO::getAppliedVehicleProject).distinct().collect(Collectors.toList());
//过滤掉特殊的适用车型 //过滤掉特殊的适用车型
List<String> otaNameList = OtaCarEnum.getOtaNameList(); List<String> otaNameList = OtaCarEnum.getOtaNameList();
for (String appliedVehicleProject : appliedVehicleProjectList) { for (String appliedVehicleProject : appliedVehicleProjectList) {
for (String s : appliedVehicleProject.split(",")) { for (String s : appliedVehicleProject.split(",")) {
String[] split = s.split(" "); String[] split = s.split(" ");
if (split.length == 2) { if (split.length == 2) {
if(!otaNameList.contains(s)){ if (!otaNameList.contains(s)) {
result.add(s); result.add(s);
} }
} else if (split.length == 3) { } else if (split.length == 3) {
@@ -1105,14 +1105,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
} else { } else {
msgList.add("VDR:" + oma.getVdr() + " Must first select the Project Version"); msgList.add("VDR:" + oma.getVdr() + " Must first select the Project Version");
} }
} else if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey()) } else if (StringUtils.isNotEmpty(oma.getMatchStatus())
&& (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())
|| oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey()) || oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())
|| oma.getMatchStatus().equals(OtaStatusEnum.NA.getKey())) { || oma.getMatchStatus().equals(OtaStatusEnum.NA.getKey()))) {
//状态不对 //状态不对
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
msgList.add("VDR:" + oma.getVdr() + " 状态必须为" + OtaStatusEnum.TO_BE_APPROVED.getNameCN() + ""); msgList.add("VDR:" + oma.getVdr() + " 状态必须为" + OtaStatusEnum.TO_BE_MATCHED.getNameCN() + "" + OtaStatusEnum.REJECTED.getNameCN() + "");
} else { } else {
msgList.add("VDR:" + oma.getVdr() + " The state must be" + OtaStatusEnum.TO_BE_APPROVED.getNameEN() + ""); msgList.add("VDR:" + oma.getVdr() + " The state must be" + OtaStatusEnum.TO_BE_MATCHED.getNameEN() + " or" + OtaStatusEnum.REJECTED.getNameEN() + "");
} }
} else { } else {
oma.setMatchStatus(OtaStatusEnum.TO_BE_APPROVED.getKey()); oma.setMatchStatus(OtaStatusEnum.TO_BE_APPROVED.getKey());
@@ -1140,7 +1141,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
conOtaCn.append(user.getUsername() + " 批量编辑了 VDR: ").append(oma.getVdr()); conOtaCn.append(user.getUsername() + " 批量编辑了 VDR: ").append(oma.getVdr());
conOtaEn.append(user.getUsername() + " edited VDR: ").append(oma.getVdr()); conOtaEn.append(user.getUsername() + " edited VDR: ").append(oma.getVdr());
boolean isChanged = false; boolean isChanged = false;
if (isStudio() && oma.getStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey())) { if (isStudio() && (StringUtils.isEmpty(oma.getMatchStatus()) || oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_MATCHED.getKey()))) {
if (StringUtils.isNotEmpty(projectVersion)) { if (StringUtils.isNotEmpty(projectVersion)) {
isChanged = true; isChanged = true;
oma.setProjectVersion(projectVersion); oma.setProjectVersion(projectVersion);
@@ -1185,7 +1186,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
List<OtaManageApplyEO> omaList = this.getListByIds(idList); List<OtaManageApplyEO> omaList = this.getListByIds(idList);
for (OtaManageApplyEO oma : omaList) { for (OtaManageApplyEO oma : omaList) {
if (oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) { if (StringUtils.isNotEmpty(oma.getMatchStatus()) && oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) {
oma.setMatchStatus(OtaStatusEnum.TO_BE_APPROVED.getKey()); oma.setMatchStatus(OtaStatusEnum.TO_BE_APPROVED.getKey());
oma.setProjectVersion(projectVersion); oma.setProjectVersion(projectVersion);
@@ -1218,7 +1219,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
List<OtaManageApplyEO> omaList = this.getListByIds(idList); List<OtaManageApplyEO> omaList = this.getListByIds(idList);
for (OtaManageApplyEO oma : omaList) { for (OtaManageApplyEO oma : omaList) {
if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) { if (StringUtils.isNotEmpty(oma.getMatchStatus()) && oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) {
oma.setMatchStatus(OtaStatusEnum.LOCKED.getKey()); oma.setMatchStatus(OtaStatusEnum.LOCKED.getKey());
OtaManageHistory his = new OtaManageHistory(); OtaManageHistory his = new OtaManageHistory();
his.setApplyId(oma.getId()); his.setApplyId(oma.getId());
@@ -1249,13 +1250,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
List<OtaManageApplyEO> omaList = this.getListByIds(idList); List<OtaManageApplyEO> omaList = this.getListByIds(idList);
for (OtaManageApplyEO oma : omaList) { for (OtaManageApplyEO oma : omaList) {
if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) { if (StringUtils.isNotEmpty(oma.getMatchStatus()) && oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) {
oma.setMatchStatus(OtaStatusEnum.REJECTED.getKey()); oma.setMatchStatus(OtaStatusEnum.REJECTED.getKey());
OtaManageHistory his = new OtaManageHistory(); OtaManageHistory his = new OtaManageHistory();
his.setApplyId(oma.getId()); his.setApplyId(oma.getId());
his.setContentCn(user.getUsername() + " 退回了 VDR:" + oma.getVdr()+" 退回原因:" + rejectReason); his.setContentCn(user.getUsername() + " 退回了 VDR:" + oma.getVdr() + " 退回原因:" + rejectReason);
his.setContentEn(user.getUsername() + " returned VDR:"+ oma.getVdr()+ " Reason for return:" + rejectReason); his.setContentEn(user.getUsername() + " returned VDR:" + oma.getVdr() + " Reason for return:" + rejectReason);
hisList.add(his); hisList.add(his);
} else { } else {
//状态不对 //状态不对