mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
优化的 bpm 任务的 todo、done 的 vo
This commit is contained in:
parent
0b4a4793d9
commit
f9b6eef4d2
@ -56,16 +56,13 @@ public class BpmTaskController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/task-steps")
|
||||
public CommonResult<TaskHandleVO> getTaskSteps(@RequestBody TaskQueryReqVO taskQuery) {
|
||||
@GetMapping("/list-by-process-instance-id")
|
||||
@ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的")
|
||||
public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId(
|
||||
@RequestParam("processInstanceId") String processInstanceId) {
|
||||
return success(taskService.getTaskSteps(taskQuery));
|
||||
}
|
||||
|
||||
@GetMapping("/process/history-steps")
|
||||
public CommonResult<List<TaskStepVO>> getHistorySteps(@RequestParam("id") String processInstanceId) {
|
||||
return success(taskService.getHistorySteps(processInstanceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回高亮的流转图SVG
|
||||
* @param processInstanceId 流程Id
|
||||
|
@ -57,10 +57,4 @@ public class BpmTaskDonePageItemRespVO {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 任务编号、流程名称、任务节点、流程发起人、接收时间、审批时间、耗时【名称、开始时间】「流程记录、撤回」
|
||||
// 任务编号、任务名称、所属流程、委托代办人、流程发起人、优先级、审批操作、审批意见、耗时、创建时间【名称、开始时间】「申请详情」
|
||||
|
||||
// 任务编号、任务名称、流程名称、流程发起人、接收时间、审批时间、耗时【名称、接收时间】「详情」TODO 撤回
|
||||
|
||||
}
|
||||
|
@ -1,19 +1,15 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("流程任务的 Response VO")
|
||||
@Data
|
||||
@ToString
|
||||
public class TaskHandleVO {
|
||||
|
||||
private Object formObject;
|
||||
public class BpmTaskRespVO extends Page{
|
||||
|
||||
|
||||
private List<TaskStepVO> historyTask;
|
||||
|
||||
|
||||
private String taskVariable;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.bpm.controller.task.vo.task;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class TaskQueryReqVO {
|
||||
|
||||
private String processKey;
|
||||
|
||||
private String taskId;
|
||||
|
||||
private String businessKey;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package cn.iocoder.yudao.adminserver.modules.bpm.controller.task.vo.task;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class TaskStepVO {
|
||||
|
||||
private String stepName;
|
||||
|
||||
private Date startTime;
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private String assignee;
|
||||
|
||||
private String comment;
|
||||
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -18,12 +18,20 @@ import java.util.Map;
|
||||
public interface BpmTaskService {
|
||||
|
||||
/**
|
||||
* 获得流程任务列表
|
||||
* 获得指定流程实例的 Running 进行中的流程任务列表
|
||||
*
|
||||
* @param processInstanceId 流程实例的编号
|
||||
* @return 流程任务列表
|
||||
*/
|
||||
List<Task> getTasksByProcessInstanceId(String processInstanceId);
|
||||
List<Task> getRunningTaskListByProcessInstanceId(String processInstanceId);
|
||||
|
||||
/**
|
||||
* 获得指令流程实例的流程任务列表,包括所有状态的
|
||||
*
|
||||
* @param processInstanceId 流程实例的编号
|
||||
* @return 流程任务列表
|
||||
*/
|
||||
List<BpmTaskRespVO> getTaskListByProcessInstanceId(String processInstanceId);
|
||||
|
||||
/**
|
||||
* 获得流程任务列表
|
||||
@ -84,20 +92,6 @@ public interface BpmTaskService {
|
||||
*/
|
||||
void rejectTask(@Valid BpmTaskRejectReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 根据任务id, 查询已经完成的用户任务,未完成的用户任务
|
||||
* @param taskQuery 查询参数 一般 taskId
|
||||
*/
|
||||
@Deprecated
|
||||
TaskHandleVO getTaskSteps(TaskQueryReqVO taskQuery);
|
||||
|
||||
/**
|
||||
* 根据流程实例id, 查询历史用户任务,包括已完成,未完成
|
||||
* @param processInstanceId 流程实例id
|
||||
*/
|
||||
@Deprecated
|
||||
List<TaskStepVO> getHistorySteps(String processInstanceId);
|
||||
|
||||
/**
|
||||
* 返回高亮的流转进程
|
||||
* @param processInstanceId 实例Id
|
||||
|
@ -82,10 +82,24 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
private BpmTaskExtMapper taskExtMapper;
|
||||
|
||||
@Override
|
||||
public List<Task> getTasksByProcessInstanceId(String processInstanceId) {
|
||||
public List<Task> getRunningTaskListByProcessInstanceId(String processInstanceId) {
|
||||
return taskService.createTaskQuery().processInstanceId(processInstanceId).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BpmTaskRespVO> getTaskListByProcessInstanceId(String processInstanceId) {
|
||||
// 获得任务列表
|
||||
List<HistoricTaskInstance> tasks = historyService.createHistoricTaskInstanceQuery()
|
||||
.processInstanceId(processInstanceId)
|
||||
.orderByTaskCreateTime().list();
|
||||
if (CollUtil.isEmpty(tasks)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
// 拼接数据
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Task> getTasksByProcessInstanceIds(List<String> processInstanceIds) {
|
||||
if (CollUtil.isEmpty(processInstanceIds)) {
|
||||
@ -218,16 +232,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
||||
// taskService.addComment(task.getId(), task.getProcessInstanceId(), reqVO.getComment());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskHandleVO getTaskSteps(TaskQueryReqVO taskQuery) {
|
||||
// TaskHandleVO handleVO = new TaskHandleVO();
|
||||
// final Task task = taskRuntime.task(taskQuery.getTaskId());
|
||||
// List<TaskStepVO> steps = getTaskSteps(task.getProcessInstanceId());
|
||||
// handleVO.setHistoryTask(steps);
|
||||
// return handleVO;
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<TaskStepVO> getTaskSteps(String processInstanceId) {
|
||||
// 获得已完成的活动
|
||||
List<HistoricActivityInstance> finished = historyService.createHistoricActivityInstanceQuery()
|
||||
|
Loading…
Reference in New Issue
Block a user