feat: 草稿接口返回NodeName
This commit is contained in:
+3
@@ -99,6 +99,9 @@ public class ProcessDraft implements Serializable {
|
||||
/**用户id*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private java.lang.String userId;
|
||||
/**节点名称*/
|
||||
@ApiModelProperty(value = "节点名称")
|
||||
private java.lang.String nodeName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
+6
-9
@@ -159,13 +159,8 @@ public class ActFlowCommonService {
|
||||
processApprovalRecordService.updateById(approvalRecord);
|
||||
}
|
||||
|
||||
public String getNodeIdByTaskId(String taskId) {
|
||||
ProcessApprovalRecord approvalRecord = processApprovalRecordService.getToDoByTaskId(taskId);
|
||||
if (approvalRecord == null) {
|
||||
return null;
|
||||
} else {
|
||||
return approvalRecord.getNodeId();
|
||||
}
|
||||
public ProcessApprovalRecord getNodeIdByTaskId(String taskId) {
|
||||
return processApprovalRecordService.getToDoByTaskId(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -400,7 +395,8 @@ public class ActFlowCommonService {
|
||||
commonVO.setTaskId(taskId);
|
||||
commonVO.setProcessInstanceId(draft.getProcessInstanceId());
|
||||
if (StrUtil.isNotBlank(taskId)) {
|
||||
commonVO.setNodeId(this.getNodeIdByTaskId(taskId));
|
||||
ProcessApprovalRecord record = this.getNodeIdByTaskId(taskId);
|
||||
commonVO.setNodeId(record.getNodeId());
|
||||
}
|
||||
return commonVO;
|
||||
}
|
||||
@@ -418,7 +414,8 @@ public class ActFlowCommonService {
|
||||
commonVO.setProcessDefinitionId(processDefinitionId);
|
||||
commonVO.setProcessInstanceId(processInstanceId);
|
||||
// 获取节点ID
|
||||
commonVO.setNodeId(this.getNodeIdByTaskId(taskId));
|
||||
ProcessApprovalRecord record = this.getNodeIdByTaskId(taskId);
|
||||
commonVO.setNodeId(record.getNodeId());
|
||||
return commonVO;
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.activiti.process.fb.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -7,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.DictPoint;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||
import com.jero.modules.activiti.entity.ProcessNode;
|
||||
import com.jero.modules.activiti.mapper.ProcessNodeMapper;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
||||
@@ -90,7 +92,11 @@ public class ProcessFbInfoController {
|
||||
Page<ProcessDraft> page = new Page<>(pageNo, pageSize);
|
||||
IPage<ProcessDraft> sentList = processDraftService.page(page, queryWrapper);
|
||||
sentList.getRecords().forEach(item -> {
|
||||
item.setNodeId(actFlowCommonService.getNodeIdByTaskId(item.getTaskId()));
|
||||
ProcessApprovalRecord record = actFlowCommonService.getNodeIdByTaskId(item.getTaskId());
|
||||
if (record != null) {
|
||||
item.setNodeId(record.getNodeId());
|
||||
item.setNodeName(record.getTaskName());
|
||||
}
|
||||
});
|
||||
return Result.OK(sentList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user