修改OTA历史记录
This commit is contained in:
+62
-50
@@ -673,7 +673,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
if (!list.isEmpty()) {
|
||||
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(),null);
|
||||
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null);
|
||||
//项目版本id
|
||||
List<String> projectVersionList = list.stream()
|
||||
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||
@@ -691,7 +691,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
manageApplyEO.setProjectVersion(null);
|
||||
manageApplyEO.setAttestationSchedule(null);
|
||||
manageApplyEO.setMatchStatus(null);
|
||||
manageApplyEO.setRemark(null);
|
||||
manageApplyEO.setRemark("--");
|
||||
}
|
||||
if (StringUtils.isNotBlank(manageApplyEO.getProjectVersion())) {
|
||||
List<ProjectTaskPlanning> taskPlanningList = projectTaskPlanningList.stream()
|
||||
@@ -732,7 +732,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
manageApplyEO.setDisabled(isDisabled);
|
||||
if (StringUtils.isBlank(manageApplyEO.getRemark())) {
|
||||
manageApplyEO.setRemark("-");
|
||||
manageApplyEO.setRemark("--");
|
||||
}
|
||||
if (OtaHomoImpactEnum.YES.getValue().equals(manageApplyEO.getHomologationImpact())
|
||||
|| OtaHomoImpactEnum.INTER_VALID.getValue().equals(manageApplyEO.getHomologationImpact())) {
|
||||
@@ -816,7 +816,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<String> getCarList(String cut,String plannedBpLaunchBatch) {
|
||||
public List<String> getCarList(String cut, String plannedBpLaunchBatch) {
|
||||
List<OtaManageApplyEO> otaManageApplyEOS = this.getBaseMapper().getOtaCarList(plannedBpLaunchBatch);
|
||||
List<String> result = new LinkedList<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
@@ -851,7 +851,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VersionVO> getProjectVersionList(String carMarket,String cut) {
|
||||
public List<VersionVO> getProjectVersionList(String carMarket, String cut) {
|
||||
|
||||
List<VersionVO> result = new LinkedList<>();
|
||||
if (StringUtils.isNotBlank(carMarket)) {
|
||||
@@ -894,9 +894,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
//ComplianceFlowStatusEnum
|
||||
VersionVO versionVO = new VersionVO();
|
||||
versionVO.setProjectId("busheji");
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
versionVO.setVersionName("不涉及");
|
||||
}else{
|
||||
} else {
|
||||
versionVO.setVersionName(ComplianceFlowStatusEnum.UNINVOLVED.getEnName());
|
||||
}
|
||||
result.add(versionVO);
|
||||
@@ -912,7 +912,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<VersionVO> getVersionInfo(String vdr,String car) {
|
||||
public List<VersionVO> getVersionInfo(String vdr, String car) {
|
||||
//认证进度数据字典 certification_progress
|
||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
||||
|
||||
@@ -947,7 +947,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
if(result.isEmpty()){
|
||||
if (result.isEmpty()) {
|
||||
VersionVO versionVO = new VersionVO();
|
||||
versionVO.setVersionName(car);
|
||||
result.add(versionVO);
|
||||
@@ -1086,6 +1086,14 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean paramsEquals(String str1, String str2) {
|
||||
if (null == str1 && null == str2) {
|
||||
return true;
|
||||
}
|
||||
return StringUtils.equals(str1, str2);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void temporarySave(List<OtaManageApplyEO> list, String cut) {
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
@@ -1107,55 +1115,59 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
saveList.add(oma);
|
||||
boolean flag = false;
|
||||
for (OtaManageApplyEO omaOld : omaOldList) {
|
||||
flag = true;
|
||||
if (StringUtils.equals(oma.getProjectVersionText(), omaOld.getProjectVersionText())
|
||||
|| StringUtils.equals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())
|
||||
|| StringUtils.equals(oma.getRemark(), omaOld.getRemark())) {
|
||||
OtaManageHistory his = new OtaManageHistory();
|
||||
his.setApplyId(oma.getId());
|
||||
StringBuilder conSb = new StringBuilder();
|
||||
StringBuilder conSbEn = new StringBuilder();
|
||||
conSb.append(user.getUsername()).append("编辑了 VDR:").append(oma.getVdr());
|
||||
conSbEn.append(user.getUsername()).append("edited VDR:").append(oma.getVdr());
|
||||
if (StringUtils.equals(oma.getProjectVersionText(), omaOld.getProjectVersionText())) {
|
||||
conSb.append(" 修改了 ").append("项目版本 由 ").append(omaOld.getProjectVersionText()).append(" 改为 ").append(oma.getProjectVersionText());
|
||||
conSbEn.append(" modified ").append("Project Version from ").append(omaOld.getProjectVersionText()).append(" to ").append(oma.getProjectVersionText());
|
||||
if (omaOld.getId().equals(oma.getId())) {
|
||||
flag = true;
|
||||
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())
|
||||
|| !paramsEquals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())
|
||||
|| !paramsEquals(oma.getRemark(), omaOld.getRemark())) {
|
||||
OtaManageHistory his = new OtaManageHistory();
|
||||
his.setApplyId(oma.getId());
|
||||
StringBuilder conSb = new StringBuilder();
|
||||
StringBuilder conSbEn = new StringBuilder();
|
||||
conSb.append(user.getUsername()).append(" : ");
|
||||
conSbEn.append(user.getUsername()).append(" : ");
|
||||
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())) {
|
||||
conSb.append("‘项目版本’ 由 ‘").append(omaOld.getProjectVersionText()).append("’ 改为 ‘").append(oma.getProjectVersionText()).append("‘.");
|
||||
conSbEn.append("‘Project Version‘ change from ‘").append(omaOld.getProjectVersionText()).append("‘ to ‘").append(oma.getProjectVersionText()).append("‘.");
|
||||
}
|
||||
if (!paramsEquals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())) {
|
||||
conSb.append("’认证进度’ 由 ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName())
|
||||
.append("’ 改为 ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||
conSbEn.append("’Homologation Progress’ change from ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue())
|
||||
.append("’ to ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue()).append("‘.");
|
||||
}
|
||||
if (!paramsEquals(oma.getRemark(), omaOld.getRemark()) && (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--"))) {
|
||||
conSb.append("’备注’ 由 ’").append(omaOld.getRemark()).append("’ 改为 ’").append(oma.getRemark()).append("‘.");
|
||||
conSbEn.append("’Remark’ change from ’").append(omaOld.getRemark()).append("’ to ’").append(oma.getRemark()).append("‘.");
|
||||
}
|
||||
his.setContentCn(conSb.toString());
|
||||
his.setContentEn(conSbEn.toString());
|
||||
hisList.add(his);
|
||||
}
|
||||
if (StringUtils.equals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())) {
|
||||
conSb.append(" 修改了 ").append("认证进度 由 ").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName()).append(" 改为 ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName());
|
||||
conSbEn.append(" modified ").append("Homologation Progress from ").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue()).append(" to ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue());
|
||||
}
|
||||
if (StringUtils.equals(oma.getRemark(), omaOld.getRemark())) {
|
||||
conSb.append(" 修改了 ").append("备注 由 ").append(omaOld.getRemark()).append(" 改为 ").append(oma.getRemark());
|
||||
conSbEn.append(" modified ").append("Remark from ").append(omaOld.getRemark()).append(" to ").append(oma.getRemark());
|
||||
}
|
||||
his.setContentCn(conSb.toString());
|
||||
his.setContentEn(conSbEn.toString());
|
||||
hisList.add(his);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!flag) {
|
||||
if (StringUtils.isNotEmpty(oma.getProjectVersionText())
|
||||
if (StringUtils.isNotEmpty(oma.getProjectVersion())
|
||||
|| StringUtils.isNotEmpty(oma.getAttestationSchedule())
|
||||
|| StringUtils.isNotEmpty(oma.getRemark())) {
|
||||
|| (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--"))) {
|
||||
OtaManageHistory his = new OtaManageHistory();
|
||||
his.setApplyId(oma.getId());
|
||||
StringBuilder conSb = new StringBuilder();
|
||||
StringBuilder conSbEn = new StringBuilder();
|
||||
conSb.append(user.getUsername()).append("编辑了 VDR:").append(oma.getVdr());
|
||||
conSbEn.append(user.getUsername()).append("edited VDR:").append(oma.getVdr());
|
||||
if (StringUtils.isNotEmpty(oma.getProjectVersionText())) {
|
||||
conSb.append(" 修改了 ").append("项目版本 由 空").append(" 改为 ").append(oma.getProjectVersionText());
|
||||
conSbEn.append(" modified ").append("Project Version from null").append(" to ").append(oma.getProjectVersionText());
|
||||
conSb.append(user.getUsername()).append(" : ");
|
||||
conSbEn.append(user.getUsername()).append(" : ");
|
||||
if (StringUtils.isNotEmpty(oma.getProjectVersion())) {
|
||||
conSb.append("‘项目版本‘ 由 ‘空‘").append(" 改为 ‘").append(oma.getProjectVersionText()).append("‘.");
|
||||
conSbEn.append("‘Project Version‘ change from ‘null‘").append(" to ‘").append(oma.getProjectVersionText()).append("‘.");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(oma.getAttestationSchedule())) {
|
||||
conSb.append(" 修改了 ").append("认证进度 由 空").append(" 改为 ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName());
|
||||
conSbEn.append(" modified ").append("Homologation Progress from null").append(" to ").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue());
|
||||
conSb.append("‘认证进度‘ 由 ‘空‘").append(" 改为 ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||
conSbEn.append("‘Homologation Progress‘ change from ‘null‘").append(" to ‘").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getValue()).append("‘.");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(oma.getRemark())) {
|
||||
conSb.append(" 修改了 ").append("备注 由 空").append(" 改为 ").append(oma.getRemark());
|
||||
conSbEn.append(" modified ").append("Remark from null").append(" to ").append(oma.getRemark());
|
||||
if (StringUtils.isNotEmpty(oma.getRemark()) && !oma.getRemark().equals("--")) {
|
||||
conSb.append("‘备注‘ 由 ‘空‘").append(" 改为 ‘").append(oma.getRemark()).append("‘.");
|
||||
conSbEn.append("‘Remark‘ change from ‘null‘").append(" to ‘").append(oma.getRemark()).append("‘.");
|
||||
}
|
||||
his.setContentCn(conSb.toString());
|
||||
his.setContentEn(conSbEn.toString());
|
||||
@@ -1164,7 +1176,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
if (saveList.size() > 0) {
|
||||
this.saveOrUpdateBatch(list);
|
||||
this.saveOrUpdateBatch(saveList);
|
||||
otaManageHistoryService.saveBatch(hisList);
|
||||
}
|
||||
}
|
||||
@@ -1372,8 +1384,8 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
@Override
|
||||
public List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut) {
|
||||
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
|
||||
List<Map<String,Object>> result = new ArrayList<>();
|
||||
if(!receiveList.isEmpty()){
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
if (!receiveList.isEmpty()) {
|
||||
List<String> plannedBpLaunchBatchList = receiveList.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch()))
|
||||
.map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList());
|
||||
@@ -1429,7 +1441,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
|
||||
Map<String, Object> statisticalMap = new HashMap<>();
|
||||
statisticalMap.put("plannedBpLaunchBatch",s);
|
||||
statisticalMap.put("plannedBpLaunchBatch", s);
|
||||
statisticalMap.put("allCount", total);
|
||||
List<Map<String, Object>> matchStatusMapList = new ArrayList<>();
|
||||
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched));
|
||||
|
||||
Reference in New Issue
Block a user