修改OTAbug
This commit is contained in:
+54
-21
@@ -719,7 +719,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!havePro){
|
if (!havePro && !ComplianceFlowStatusEnum.UNINVOLVED.getValue().equals(manageApplyEO.getProjectVersion())) {
|
||||||
//找不到项目的话
|
//找不到项目的话
|
||||||
manageApplyEO.setProjectVersion(null);
|
manageApplyEO.setProjectVersion(null);
|
||||||
manageApplyEO.setStudio(null);
|
manageApplyEO.setStudio(null);
|
||||||
@@ -911,13 +911,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
dictModelList.addAll(dictModelListTemp);
|
dictModelList.addAll(dictModelListTemp);
|
||||||
}
|
}
|
||||||
String targetMarket = "";
|
String targetMarket = "";
|
||||||
if(dictModelList.size() != 0){
|
if (dictModelList.size() != 0) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (DictModel dictModel : dictModelList) {
|
for (DictModel dictModel : dictModelList) {
|
||||||
sb.append(dictModel.getTextEn()+",");
|
sb.append(dictModel.getTextEn() + ",");
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(sb)){
|
if (StringUtils.isNotBlank(sb)) {
|
||||||
targetMarket = sb.substring(0,sb.length()-1);
|
targetMarket = sb.substring(0, sb.length() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
versionVO.setVersionName(versionVO.getCar() + "-" + versionVO.getYearName() + "-" + targetMarket + "-" + versionVO.getVersionNumber());
|
versionVO.setVersionName(versionVO.getCar() + "-" + versionVO.getYearName() + "-" + targetMarket + "-" + versionVO.getVersionNumber());
|
||||||
@@ -925,9 +925,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
|
|
||||||
//ComplianceFlowStatusEnum
|
//ComplianceFlowStatusEnum
|
||||||
VersionVO versionVO = new VersionVO();
|
VersionVO versionVO = new VersionVO();
|
||||||
versionVO.setProjectId("busheji");
|
versionVO.setProjectId(ComplianceFlowStatusEnum.UNINVOLVED.getValue());
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
versionVO.setVersionName("不涉及");
|
versionVO.setVersionName(ComplianceFlowStatusEnum.UNINVOLVED.getCnName());
|
||||||
} else {
|
} else {
|
||||||
versionVO.setVersionName(ComplianceFlowStatusEnum.UNINVOLVED.getEnName());
|
versionVO.setVersionName(ComplianceFlowStatusEnum.UNINVOLVED.getEnName());
|
||||||
}
|
}
|
||||||
@@ -944,7 +944,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<VersionVO> getVersionInfo(String vdr, String car,String cut) {
|
public List<VersionVO> getVersionInfo(String vdr, String car, String cut) {
|
||||||
//认证进度数据字典 certification_progress
|
//认证进度数据字典 certification_progress
|
||||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
||||||
|
|
||||||
@@ -972,12 +972,12 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
List<String> list = new LinkedList<>();
|
List<String> list = new LinkedList<>();
|
||||||
for (String s : market.split(",")) {
|
for (String s : market.split(",")) {
|
||||||
List<DictModel> collect = regionList.stream().filter(e -> e.getValue().equals(s)).collect(Collectors.toList());
|
List<DictModel> collect = regionList.stream().filter(e -> e.getValue().equals(s)).collect(Collectors.toList());
|
||||||
if(!collect.isEmpty()){
|
if (!collect.isEmpty()) {
|
||||||
list.add(collect.get(0).getTextEn());
|
list.add(collect.get(0).getTextEn());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!list.isEmpty()){
|
if (!list.isEmpty()) {
|
||||||
market = StringUtils.join(list,",");
|
market = StringUtils.join(list, ",");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(versionVO.getProjectVersion())) {
|
if (StringUtils.isBlank(versionVO.getProjectVersion())) {
|
||||||
versionVO.setVersionName(versionVO.getCar() + "-" + market);
|
versionVO.setVersionName(versionVO.getCar() + "-" + market);
|
||||||
@@ -988,9 +988,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
if (StringUtils.isNotBlank(versionVO.getAttestationSchedule())) {
|
if (StringUtils.isNotBlank(versionVO.getAttestationSchedule())) {
|
||||||
List<SysDictItem> collect = regionDictList.stream()
|
List<SysDictItem> collect = regionDictList.stream()
|
||||||
.filter(e -> e.getItemValue().equals(versionVO.getAttestationSchedule())).collect(Collectors.toList());
|
.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());
|
versionVO.setAttestationSchedule(collect.get(0).getItemText());
|
||||||
}else{
|
} else {
|
||||||
versionVO.setAttestationSchedule(collect.get(0).getEnName());
|
versionVO.setAttestationSchedule(collect.get(0).getEnName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1142,20 +1142,48 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
return StringUtils.equals(str1, str2);
|
return StringUtils.equals(str1, str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> queryProjectName(List<OtaManageApplyEO> list) {
|
public OtaManageApplyEOServiceImpl() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> queryProjectName(List<OtaManageApplyEO> list, String cut) {
|
||||||
|
List<DictModel> regionList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
Map<String, String> res = new HashMap<>();
|
Map<String, String> res = new HashMap<>();
|
||||||
List<String> idList = list.stream()
|
List<String> idList = list.stream()
|
||||||
.filter(e -> StringUtils.isNotBlank(e.getProjectVersion()))
|
.filter(e -> StringUtils.isNotBlank(e.getProjectVersion()))
|
||||||
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
.map(OtaManageApplyEO::getProjectVersion).distinct().collect(Collectors.toList());
|
||||||
List<ProjectLibraryBase> proList = projectLibraryBaseService.getListByIds(idList);
|
List<ProjectLibraryBase> proList = projectLibraryBaseService.getListByIds(idList);
|
||||||
for (ProjectLibraryBase plb : proList) {
|
for (ProjectLibraryBase plb : proList) {
|
||||||
|
String market = plb.getTargetMarket();
|
||||||
|
List<String> strlist = new LinkedList<>();
|
||||||
|
for (String s : market.split(",")) {
|
||||||
|
List<DictModel> 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());
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void temporarySave(List<OtaManageApplyEO> list, String cut) {
|
public void temporarySave(List<OtaManageApplyEO> list, String cut) {
|
||||||
|
temporarySave(list, false, cut);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void temporarySave(List<OtaManageApplyEO> list, boolean isSubmit, String cut) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
List<String> idList = list.stream()
|
List<String> idList = list.stream()
|
||||||
@@ -1167,7 +1195,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
List<OtaManageApplyEO> queryProNameList = new ArrayList<>();
|
List<OtaManageApplyEO> queryProNameList = new ArrayList<>();
|
||||||
queryProNameList.addAll(omaOldList);
|
queryProNameList.addAll(omaOldList);
|
||||||
queryProNameList.addAll(list);
|
queryProNameList.addAll(list);
|
||||||
Map<String, String> proNameMap = queryProjectName(queryProNameList);
|
Map<String, String> proNameMap = queryProjectName(queryProNameList, cut);
|
||||||
//历史记录
|
//历史记录
|
||||||
List<OtaManageHistory> hisList = new ArrayList<>();
|
List<OtaManageHistory> hisList = new ArrayList<>();
|
||||||
List<OtaManageApplyEO> saveList = new ArrayList<>();
|
List<OtaManageApplyEO> saveList = new ArrayList<>();
|
||||||
@@ -1190,12 +1218,16 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
conSb.append(user.getUsername()).append(" : ");
|
conSb.append(user.getUsername()).append(" : ");
|
||||||
conSbEn.append(user.getUsername()).append(" : ");
|
conSbEn.append(user.getUsername()).append(" : ");
|
||||||
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())) {
|
if (!paramsEquals(oma.getProjectVersion(), omaOld.getProjectVersion())) {
|
||||||
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
if (!isSubmit && OtaStatusEnum.TO_BE_APPROVED.getKey().equals(oma.getMatchStatus())) {
|
||||||
|
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
||||||
|
}
|
||||||
conSb.append("‘项目版本’ 由 ‘").append(proNameMap.get(omaOld.getProjectVersion())).append("’ 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
conSb.append("‘项目版本’ 由 ‘").append(proNameMap.get(omaOld.getProjectVersion())).append("’ 改为 ‘").append(proNameMap.get(oma.getProjectVersion())).append("‘.");
|
||||||
conSbEn.append("‘Project Version‘ change from ‘").append(omaOld.getProjectVersionText()).append("‘ to ‘").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())) {
|
if (!paramsEquals(oma.getAttestationSchedule(), omaOld.getAttestationSchedule())) {
|
||||||
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
if (!isSubmit && OtaStatusEnum.TO_BE_APPROVED.getKey().equals(oma.getMatchStatus())) {
|
||||||
|
oma.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey());
|
||||||
|
}
|
||||||
conSb.append("’认证进度’ 由 ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName())
|
conSb.append("’认证进度’ 由 ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getName())
|
||||||
.append("’ 改为 ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
.append("’ 改为 ’").append(CertificationProgressEnum.getByValue(oma.getAttestationSchedule()).getName()).append("‘.");
|
||||||
conSbEn.append("’Homologation Progress’ change from ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue())
|
conSbEn.append("’Homologation Progress’ change from ’").append(CertificationProgressEnum.getByValue(omaOld.getAttestationSchedule()).getValue())
|
||||||
@@ -1284,7 +1316,8 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
hisList.add(his);
|
hisList.add(his);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.saveOrUpdateBatch(list);
|
this.temporarySave(list, true, cut);
|
||||||
|
otaManageHistoryService.saveBatch(hisList);
|
||||||
return msgList;
|
return msgList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1487,10 +1520,10 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut,List<ProjectLibraryBase> plbEoList) {
|
public List<Map<String, Object>> getStatisticalStatus(String projectId, String plannedBpLaunchBatch, String cut, List<ProjectLibraryBase> plbEoList) {
|
||||||
List<Map<String, Object>> result = new ArrayList<>();
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
||||||
if(!plbEoList.isEmpty()){
|
if (!plbEoList.isEmpty()) {
|
||||||
projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList());
|
projectLibraryBaseList = plbEoList.stream().filter(e -> e.getId().equals(projectId)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
|
List<OtaManageApplyEO> receiveList = this.getBaseMapper().getListByProjectId(projectId, plannedBpLaunchBatch);
|
||||||
@@ -1587,7 +1620,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
|||||||
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ", "_"), stored);
|
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ", "_"), stored);
|
||||||
statisticalMap.put("attestationScheduleMap", attestationScheduleMap);
|
statisticalMap.put("attestationScheduleMap", attestationScheduleMap);
|
||||||
|
|
||||||
if(!projectLibraryBaseList.isEmpty()){
|
if (!projectLibraryBaseList.isEmpty()) {
|
||||||
statisticalMap.put("showName", projectLibraryBaseList.get(0).getShowName());
|
statisticalMap.put("showName", projectLibraryBaseList.get(0).getShowName());
|
||||||
}
|
}
|
||||||
result.add(statisticalMap);
|
result.add(statisticalMap);
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ public enum CertificationProgressEnum {
|
|||||||
COMPONENT_REPORT_NOT_SUBMITTED("部件报告未提交","Component report not submitted","5"),
|
COMPONENT_REPORT_NOT_SUBMITTED("部件报告未提交","Component report not submitted","5"),
|
||||||
COMPONENT_REPORT_SUBMITTED("部件报告已提交","Component report submitted","6"),
|
COMPONENT_REPORT_SUBMITTED("部件报告已提交","Component report submitted","6"),
|
||||||
COMPONENT_REPORT_HAS_BEEN_STORED("部件报告已入库","Component report has been stored","7"),
|
COMPONENT_REPORT_HAS_BEEN_STORED("部件报告已入库","Component report has been stored","7"),
|
||||||
NA("空","null","8"),
|
NA("null","null","8"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user