fix[project]: 利元亨同步EP待办的状态
This commit is contained in:
@@ -38,10 +38,7 @@ import com.sdm.outbridge.mode.LyricExceptionModel;
|
||||
import com.sdm.outbridge.mode.SimulationTaskSyncExBo;
|
||||
import com.sdm.outbridge.service.lyric.*;
|
||||
import com.sdm.outbridge.thirdDao.LyricVProjectStationExcepTionToDMMapper;
|
||||
import com.sdm.project.common.ApprovalStatusEnum;
|
||||
import com.sdm.project.common.DemandTypeEnum;
|
||||
import com.sdm.project.common.MemberTypeEnum;
|
||||
import com.sdm.project.common.NodeMemberTypeEnum;
|
||||
import com.sdm.project.common.*;
|
||||
import com.sdm.project.common.generator.UniqueFileNameGenerator;
|
||||
import com.sdm.project.dao.*;
|
||||
import com.sdm.project.model.bo.TaskNodeTag;
|
||||
@@ -248,6 +245,47 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
|
||||
private static final String SIMULATION_REPRESENTATIVE = "仿真代表";
|
||||
|
||||
// 利元亨关于待办状态的常量
|
||||
// 关闭
|
||||
private static final String LYRIC_TODO_CLOSE_STATUS = "close";
|
||||
private static final String LYRIC_TODO_CLOSED_STATUS = "closed";
|
||||
// 进行中
|
||||
private static final String LYRIC_TODO_DOIND_STATUS = "doind";
|
||||
private static final String LYRIC_TODO_DOING_STATUS = "doing";
|
||||
// 未开始
|
||||
private static final String LYRIC_TODO_NO_STATUS = "no";
|
||||
private static final String LYRIC_TODO_NOT_DO_STATUS = "notdo";
|
||||
// 已回退
|
||||
private static final String LYRIC_TODO_TURN_DOWN_STATUS = "turndown";
|
||||
// 已完成
|
||||
private static final String LYRIC_TODO_DONE_STATUS = "yes";
|
||||
|
||||
private static final Map<String, DemandStatusTypeEnum> STATUS_MAPPING;
|
||||
// 默认状态
|
||||
private static final DemandStatusTypeEnum DEFAULT_STATUS = DemandStatusTypeEnum.UNASSIGNED;
|
||||
static {
|
||||
STATUS_MAPPING = new HashMap<>();
|
||||
|
||||
// 已关闭
|
||||
STATUS_MAPPING.put(LYRIC_TODO_CLOSE_STATUS, DemandStatusTypeEnum.CLOSED);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_CLOSED_STATUS, DemandStatusTypeEnum.CLOSED);
|
||||
|
||||
// 进行中
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DOING_STATUS, DemandStatusTypeEnum.IN_PROGRESS);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DOIND_STATUS, DemandStatusTypeEnum.IN_PROGRESS); // 保留原拼写
|
||||
|
||||
// 未开始
|
||||
STATUS_MAPPING.put(LYRIC_TODO_NO_STATUS, DemandStatusTypeEnum.NOT_STARTED);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_NOT_DO_STATUS, DemandStatusTypeEnum.NOT_STARTED);
|
||||
|
||||
// 已驳回
|
||||
STATUS_MAPPING.put(LYRIC_TODO_TURN_DOWN_STATUS, DemandStatusTypeEnum.REJECTED);
|
||||
|
||||
// 已闭环
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DONE_STATUS, DemandStatusTypeEnum.CLOSED_LOOP);
|
||||
}
|
||||
|
||||
|
||||
@Resource
|
||||
private SimulationRunServiceImpl simulationRunService;
|
||||
|
||||
@@ -639,7 +677,8 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
req.setDemandCode(ObjectUtils.isNotEmpty(todo.getTodoId()) ? String.valueOf(todo.getTodoId()) : null);
|
||||
req.setDemandType(todo.getRelevanceTask());
|
||||
req.setSimType(todo.getEmulationType());
|
||||
req.setDemandStatus("0");
|
||||
DemandStatusTypeEnum finalStatus = STATUS_MAPPING.getOrDefault(StringUtils.trimToEmpty(todo.getStatus()), DEFAULT_STATUS);
|
||||
req.setDemandStatus(String.valueOf(finalStatus.getCode()));
|
||||
req.setAchieveStatus("0");
|
||||
req.setProgress(0);
|
||||
// 计划开始对应任务的计划开始时间
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.sdm.outbridge.service.lyric.*;
|
||||
import com.sdm.project.YA.req.SyncCidProjectReq;
|
||||
import com.sdm.project.YA.resp.BosimSaveProjectTaskRsp;
|
||||
import com.sdm.project.bo.ExportOperate;
|
||||
import com.sdm.project.common.DemandStatusTypeEnum;
|
||||
import com.sdm.project.common.MemberTypeEnum;
|
||||
import com.sdm.project.common.NodeMemberTypeEnum;
|
||||
import com.sdm.project.common.TaskExeStatusEnum;
|
||||
@@ -223,6 +224,46 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
@Autowired
|
||||
private LyricVAttachmentConfigService lyricVAttachmentConfigService;
|
||||
|
||||
// 利元亨关于待办状态的常量
|
||||
// 关闭
|
||||
private static final String LYRIC_TODO_CLOSE_STATUS = "close";
|
||||
private static final String LYRIC_TODO_CLOSED_STATUS = "closed";
|
||||
// 进行中
|
||||
private static final String LYRIC_TODO_DOIND_STATUS = "doind";
|
||||
private static final String LYRIC_TODO_DOING_STATUS = "doing";
|
||||
// 未开始
|
||||
private static final String LYRIC_TODO_NO_STATUS = "no";
|
||||
private static final String LYRIC_TODO_NOT_DO_STATUS = "notdo";
|
||||
// 已回退
|
||||
private static final String LYRIC_TODO_TURN_DOWN_STATUS = "turndown";
|
||||
// 已完成
|
||||
private static final String LYRIC_TODO_DONE_STATUS = "yes";
|
||||
|
||||
private static final Map<String, DemandStatusTypeEnum> STATUS_MAPPING;
|
||||
// 默认状态
|
||||
private static final DemandStatusTypeEnum DEFAULT_STATUS = DemandStatusTypeEnum.UNASSIGNED;
|
||||
static {
|
||||
STATUS_MAPPING = new HashMap<>();
|
||||
|
||||
// 已关闭
|
||||
STATUS_MAPPING.put(LYRIC_TODO_CLOSE_STATUS, DemandStatusTypeEnum.CLOSED);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_CLOSED_STATUS, DemandStatusTypeEnum.CLOSED);
|
||||
|
||||
// 进行中
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DOING_STATUS, DemandStatusTypeEnum.IN_PROGRESS);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DOIND_STATUS, DemandStatusTypeEnum.IN_PROGRESS); // 保留原拼写
|
||||
|
||||
// 未开始
|
||||
STATUS_MAPPING.put(LYRIC_TODO_NO_STATUS, DemandStatusTypeEnum.NOT_STARTED);
|
||||
STATUS_MAPPING.put(LYRIC_TODO_NOT_DO_STATUS, DemandStatusTypeEnum.NOT_STARTED);
|
||||
|
||||
// 已驳回
|
||||
STATUS_MAPPING.put(LYRIC_TODO_TURN_DOWN_STATUS, DemandStatusTypeEnum.REJECTED);
|
||||
|
||||
// 已闭环
|
||||
STATUS_MAPPING.put(LYRIC_TODO_DONE_STATUS, DemandStatusTypeEnum.CLOSED_LOOP);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
@@ -4406,17 +4447,23 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
demandAddReq.setDemandCode(ObjectUtils.isNotEmpty(todoItem.getTodoId()) ? String.valueOf(todoItem.getTodoId()) : null);
|
||||
demandAddReq.setDemandType(todoItem.getRelevanceTask());
|
||||
demandAddReq.setSimType(todoItem.getEmulationType());
|
||||
demandAddReq.setDemandStatus("0");
|
||||
DemandStatusTypeEnum finalStatus = STATUS_MAPPING.getOrDefault(StringUtils.trimToEmpty(todoItem.getStatus()), DEFAULT_STATUS);
|
||||
demandAddReq.setDemandStatus(String.valueOf(finalStatus.getCode()));
|
||||
demandAddReq.setAchieveStatus("0");
|
||||
demandAddReq.setProgress(0);
|
||||
// 计划开始对应任务的计划开始时间
|
||||
demandAddReq.setBeginTime(todoItem.getPlanStartTime());
|
||||
demandAddReq.setEndTime(todoItem.getClosedTime());
|
||||
// 需求时间对应任务的计划结束时间
|
||||
demandAddReq.setEndTime(todoItem.getRequiredTime());
|
||||
// 完成时间对应任务的完成时间
|
||||
demandAddReq.setFinishTime(todoItem.getFinishTime());
|
||||
// 这里取EP中的创建时间
|
||||
String createTime = todoItem.getCreateTime();
|
||||
if (StringUtils.isBlank(createTime)) {
|
||||
log.error("待办的创建时间为空,待办id为:{}", todoItem.getTodoId());
|
||||
}
|
||||
demandAddReq.setCreateTime(createTime.replace("T", " "));
|
||||
demandAddReq.setUpdateTime(DateUtils.getCurrentDateTime());
|
||||
demandAddReq.setDemandSource(SYNC_PROJECT_SOURCE);
|
||||
|
||||
// 节点信息
|
||||
@@ -4427,6 +4474,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
demandAddReq.setMachineId(workspaceNodeMap.get(demandAddReq.getWorkspaceId()));
|
||||
}
|
||||
demandAddReq.setCreator(usernameToUserIdMap.get(todoItem.getIntroduceBy()));
|
||||
demandAddReq.setDescription(todoItem.getDescribes());
|
||||
|
||||
List<String> reportFileUrlList = new ArrayList<>();
|
||||
String demandCode = demandAddReq.getDemandCode();
|
||||
|
||||
Reference in New Issue
Block a user