Merge remote-tracking branch 'origin/dev_20230808_OTA' into dev_20230808_OTA

This commit is contained in:
zyx.net
2023-08-22 11:37:29 +08:00
4 changed files with 34 additions and 9 deletions
@@ -11,7 +11,7 @@ public enum OtaStatusEnum {
LOCKED("locked", "锁定","Locked"),
REJECTED("rejected", "退回","Rejected"),
TO_BE_REMATCHED("to_be_rematched", "待重新匹配","To be rematched"),
NA("-", "-","-");
NA("--", "--","--");
String key;
String nameCN;
@@ -19,12 +19,11 @@
select * from ota_manage_apply
JOIN ota_manage_receive ON ota_manage_apply.vdr = ota_manage_receive.id
<where>
ota_manage_apply =#{projectId}
ota_manage_apply.project_version =#{projectId}
<if test="plannedBpLaunchBatch != null and plannedBpLaunchBatch != ''">
and ota_manage_receive.planned_bp_launch_batch_ =#{plannedBpLaunchBatch}
</if>
</where>
order by create_time desc
</select>
<select id="getOtaList" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
@@ -950,7 +950,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
List<OtaManageApplyEO> omaList = this.getListByIds(idList);
for (OtaManageApplyEO oma : omaList) {
if (oma.getMatchStatus().equals(OtaStatusEnum.LOCKED.getKey())) {
oma.setMatchStatus(OtaStatusEnum.TO_BE_REMATCHED.getKey());
oma.setMatchStatus(OtaStatusEnum.TO_BE_APPROVED.getKey());
oma.setProjectVersion(projectVersion);
otaManageHistoryService.add(oma.getId(),user.getUsername() + " 重新匹配了数据!");
} else {
@@ -994,7 +994,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
for (OtaManageApplyEO oma : omaList) {
if (oma.getMatchStatus().equals(OtaStatusEnum.TO_BE_APPROVED.getKey())) {
oma.setMatchStatus(OtaStatusEnum.REJECTED.getKey());
otaManageHistoryService.add(oma.getId(),user.getUsername() + " 退回了数据!拒绝原因:"+rejectReason);
otaManageHistoryService.add(oma.getId(),user.getUsername() + " 退回了数据!退回原因:"+rejectReason);
} else {
//状态不对
msgList.add("VDR:" + oma.getVdr() + " 状态不对!");
@@ -1078,13 +1078,21 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
Map<String, Object> statisticalMap = new HashMap<>();
statisticalMap.put("allCount", total);
List<Map<String, Object>> matchStatusMapList = new ArrayList<>();
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched + toBeRematched));
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_MATCHED.getKey(), toBeMatched));
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_APPROVED.getKey(), toBeApproved));
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.LOCKED.getKey(), locked));
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.REJECTED.getKey(), rejected));
matchStatusMapList.add(wrapStatMap("matchStatus", "matchStatusCount", OtaStatusEnum.TO_BE_REMATCHED.getKey(), toBeRematched));
statisticalMap.put("matchStatusMapList", matchStatusMapList);
Map<String, Object> attestationScheduleMap = new HashMap<>();
Map<String, Object> matchStatusMap = new HashMap<>();
matchStatusMap.put(OtaStatusEnum.TO_BE_MATCHED.getKey(),toBeMatched);
matchStatusMap.put(OtaStatusEnum.TO_BE_APPROVED.getKey(),toBeApproved);
matchStatusMap.put(OtaStatusEnum.LOCKED.getKey(),locked);
matchStatusMap.put(OtaStatusEnum.REJECTED.getKey(),rejected);
matchStatusMap.put(OtaStatusEnum.TO_BE_REMATCHED.getKey(),toBeRematched);
statisticalMap.put("matchStatusMap", matchStatusMap);
List<Map<String, Object>> attestationScheduleMapList = new ArrayList<>();
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.NOT_START.getValue(), notStart));
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.IN_PROGRESS.getValue(), inProgress));
@@ -1095,6 +1103,16 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
attestationScheduleMapList.add(wrapStatMap("attestationSchedule", "attestationScheduleCount", CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue(), stored));
statisticalMap.put("attestationScheduleMapList", attestationScheduleMapList);
Map<String, Object> attestationScheduleMap = new HashMap<>();
attestationScheduleMap.put(CertificationProgressEnum.NOT_START.getValue().replace(" ","_"),notStart);
attestationScheduleMap.put(CertificationProgressEnum.IN_PROGRESS.getValue().replace(" ","_"),inProgress);
attestationScheduleMap.put(CertificationProgressEnum.TEST_PASSED.getValue().replace(" ","_"),testPassed);
attestationScheduleMap.put(CertificationProgressEnum.TEST_FAILED.getValue().replace(" ","_"),testFailed);
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue().replace(" ","_"),notSubmitted);
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue().replace(" ","_"),submitted);
attestationScheduleMap.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue().replace(" ","_"),stored);
statisticalMap.put("attestationScheduleMap", attestationScheduleMap);
return statisticalMap;
}
private Map<String,Object> wrapStatMap(String key,String val,String keyStr,Object valObj) {
@@ -4,12 +4,15 @@ package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.ota.entity.OtaManageApplyEO;
import com.jero.modules.ota.service.IOtaManageApplyEOService;
import com.jero.modules.project.entity.ProjectTaskPlanning;
import com.jero.modules.project.enums.PlanStatusEnum;
import com.jero.modules.project.enums.ProjectTaskPlanningNameEnum;
import com.jero.modules.project.mapper.ProjectTaskPlanningMapper;
import com.jero.modules.project.service.IProjectTaskPlanningService;
import com.jero.modules.project.vo.TimeNodeVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
@@ -31,6 +34,8 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
@Autowired
private ProjectTaskPlanningMapper projectTaskPlanningMapper;
@Autowired
private IOtaManageApplyEOService otaManageApplyEOService;
/**
* 保存
*
@@ -64,7 +69,10 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|| compareDate(oldPlanning.getAttestationEndTime(), projectTaskPlanning.getAttestationEndTime())
) {
//studio修改认证计划中认证开始、认证申报、认证批准时间是进行弹窗提示
matchVdr = true;
List<OtaManageApplyEO> vdrList = otaManageApplyEOService.getVdrListByProject(projectTaskPlanning.getProjectId(),"");
if(CollectionUtils.isNotEmpty(vdrList)){
matchVdr = true;
}
}
deleteById(projectTaskPlanning.getId());
add(projectTaskPlanning);
@@ -78,7 +86,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
return true;
}
} else {
if (newDate == null || (newDate != null && oldDate.equals(newDate))) {
if (newDate == null || (newDate != null && !oldDate.equals(newDate))) {
return true;
}
}