fix(training): 修复培训申请流程查询中的审批时间获取问题

dev
zhaokai 2026-03-10 17:46:30 +08:00
parent e3c3c02730
commit ffaea5a15c
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package com.zcloud.edu.command.query.training;
import cn.hutool.core.util.StrUtil;
import com.zcloud.edu.command.convertor.training.TrainingApplyProcessCoConvertor;
import com.zcloud.edu.domain.enums.ApplyTypeEnum;
import com.zcloud.edu.domain.enums.ApprovalStatusEnum;
import com.zcloud.edu.domain.model.training.TrainingApplyProcessNodeE;
import com.zcloud.edu.dto.clientobject.training.FlowCO;
import com.zcloud.edu.dto.clientobject.training.TrainingApplyProcessFlowVO;
@ -60,13 +61,17 @@ public class TrainingApplyProcessQueryExe {
FlowCO item = new FlowCO();
item.setType(e.getApplyType());
item.setStatus(e.getApprovalStatus());
//1 进行中2已完成
// item.setStatus(e.getApprovalStatus());
String nodeName = e.getNodeName() == null ? "" : e.getNodeName();
String username = e.getUsername() == null ? "" : e.getUsername();
String time =null;
if(e.getApplyType()!=null && e.getApprovalTime()!=null){
time = e.getApprovalTime().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
item.setStatus(ApprovalStatusEnum.APPROVED.getCode().intValue());
}else{
item.setStatus(ApprovalStatusEnum.APPROVING.getCode().intValue());
}
String secondLine = StrUtil.isNotBlank(time) ? (username + " " + time) : username;
item.setFlowList(Arrays.asList(nodeName, secondLine));