feat: 草稿列表新增nodeId

(cherry picked from commit ef821ad709)
This commit is contained in:
2023-11-23 14:58:30 +08:00
parent 3e85e63b46
commit 9733eef32b
3 changed files with 14 additions and 1 deletions
@@ -80,6 +80,12 @@ public class ProcessDraft implements Serializable {
@ApiModelProperty(value = "项目id")
private String projectId;
/**
* 节点id
*/
@ApiModelProperty(value = "节点id")
private String nodeId;
/**任务id*/
@ApiModelProperty(value = "任务id")
private java.lang.String taskId;
@@ -162,7 +162,7 @@ public class ActFlowCommonService {
public String getNodeIdByTaskId(String taskId) {
ProcessApprovalRecord approvalRecord = processApprovalRecordService.getToDoByTaskId(taskId);
if (approvalRecord == null) {
throw new JeroBootException("找不到对应的审批记录");
return null;
} else {
return approvalRecord.getNodeId();
}
@@ -10,6 +10,7 @@ import com.jero.common.system.vo.LoginUser;
import com.jero.modules.activiti.entity.ProcessNode;
import com.jero.modules.activiti.mapper.ProcessNodeMapper;
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
import com.jero.modules.laws.common.util.CurrentUserUtil;
@@ -61,6 +62,9 @@ public class ProcessFbInfoController {
@Resource
private HistoryService historyService;
@Resource
private ActFlowCommonService actFlowCommonService;
@DictPoint
@GetMapping("/getNodeList")
@ApiImplicitParams({
@@ -85,6 +89,9 @@ public class ProcessFbInfoController {
queryWrapper.eq(!Objects.isNull(processDraft.getPrcType()), ProcessDraft::getPrcType, processDraft.getPrcType());
Page<ProcessDraft> page = new Page<>(pageNo, pageSize);
IPage<ProcessDraft> sentList = processDraftService.page(page, queryWrapper);
sentList.getRecords().forEach(item -> {
item.setNodeId(actFlowCommonService.getNodeIdByTaskId(item.getTaskId()));
});
return Result.OK(sentList);
}