|
@ -1,5 +1,8 @@ |
|
|
package org.dromara.workflow.controller; |
|
|
package org.dromara.workflow.controller; |
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.core.domain.R; |
|
|
import org.dromara.common.core.validate.AddGroup; |
|
|
import org.dromara.common.core.validate.AddGroup; |
|
@ -27,6 +30,7 @@ import java.util.List; |
|
|
* |
|
|
* |
|
|
* @author may |
|
|
* @author may |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Tag(name = "任务管理") |
|
|
@ConditionalOnEnable |
|
|
@ConditionalOnEnable |
|
|
@Validated |
|
|
@Validated |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
@ -41,7 +45,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param startProcessBo 启动流程参数 |
|
|
* @param startProcessBo 启动流程参数 |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.INSERT) |
|
|
@Operation(summary = "启动任务",description = "启动任务") |
|
|
@RepeatSubmit() |
|
|
@RepeatSubmit() |
|
|
@PostMapping("/startWorkFlow") |
|
|
@PostMapping("/startWorkFlow") |
|
|
public R<RemoteStartProcessReturn> startWorkFlow(@Validated(AddGroup.class) @RequestBody StartProcessBo startProcessBo) { |
|
|
public R<RemoteStartProcessReturn> startWorkFlow(@Validated(AddGroup.class) @RequestBody StartProcessBo startProcessBo) { |
|
@ -54,7 +58,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param completeTaskBo 办理任务参数 |
|
|
* @param completeTaskBo 办理任务参数 |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.INSERT) |
|
|
@Operation(summary = "办理任务",description = "办理任务") |
|
|
@RepeatSubmit() |
|
|
@RepeatSubmit() |
|
|
@PostMapping("/completeTask") |
|
|
@PostMapping("/completeTask") |
|
|
public R<Void> completeTask(@Validated(AddGroup.class) @RequestBody CompleteTaskBo completeTaskBo) { |
|
|
public R<Void> completeTask(@Validated(AddGroup.class) @RequestBody CompleteTaskBo completeTaskBo) { |
|
@ -67,6 +71,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param flowTaskBo 参数 |
|
|
* @param flowTaskBo 参数 |
|
|
* @param pageQuery 分页 |
|
|
* @param pageQuery 分页 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "查询当前用户的待办任务",description = "查询当前用户的待办任务") |
|
|
@GetMapping("/pageByTaskWait") |
|
|
@GetMapping("/pageByTaskWait") |
|
|
public TableDataInfo<FlowTaskVo> pageByTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
public TableDataInfo<FlowTaskVo> pageByTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
return flwTaskService.pageByTaskWait(flowTaskBo, pageQuery); |
|
|
return flwTaskService.pageByTaskWait(flowTaskBo, pageQuery); |
|
@ -78,7 +83,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param flowTaskBo 参数 |
|
|
* @param flowTaskBo 参数 |
|
|
* @param pageQuery 分页 |
|
|
* @param pageQuery 分页 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "查询当前用户的已办任务",description = "查询当前用户的已办任务") |
|
|
@GetMapping("/pageByTaskFinish") |
|
|
@GetMapping("/pageByTaskFinish") |
|
|
public TableDataInfo<FlowHisTaskVo> pageByTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
public TableDataInfo<FlowHisTaskVo> pageByTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
return flwTaskService.pageByTaskFinish(flowTaskBo, pageQuery); |
|
|
return flwTaskService.pageByTaskFinish(flowTaskBo, pageQuery); |
|
@ -90,6 +95,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param flowTaskBo 参数 |
|
|
* @param flowTaskBo 参数 |
|
|
* @param pageQuery 分页 |
|
|
* @param pageQuery 分页 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "查询待办任务",description = "查询待办任务") |
|
|
@GetMapping("/pageByAllTaskWait") |
|
|
@GetMapping("/pageByAllTaskWait") |
|
|
public TableDataInfo<FlowTaskVo> pageByAllTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
public TableDataInfo<FlowTaskVo> pageByAllTaskWait(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
return flwTaskService.pageByAllTaskWait(flowTaskBo, pageQuery); |
|
|
return flwTaskService.pageByAllTaskWait(flowTaskBo, pageQuery); |
|
@ -101,6 +107,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param flowTaskBo 参数 |
|
|
* @param flowTaskBo 参数 |
|
|
* @param pageQuery 分页 |
|
|
* @param pageQuery 分页 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "查询已办任务",description = "查询已办任务") |
|
|
@GetMapping("/pageByAllTaskFinish") |
|
|
@GetMapping("/pageByAllTaskFinish") |
|
|
public TableDataInfo<FlowHisTaskVo> pageByAllTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
public TableDataInfo<FlowHisTaskVo> pageByAllTaskFinish(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
return flwTaskService.pageByAllTaskFinish(flowTaskBo, pageQuery); |
|
|
return flwTaskService.pageByAllTaskFinish(flowTaskBo, pageQuery); |
|
@ -112,6 +119,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param flowTaskBo 参数 |
|
|
* @param flowTaskBo 参数 |
|
|
* @param pageQuery 分页 |
|
|
* @param pageQuery 分页 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "查询当前用户的抄送",description = "查询当前用户的抄送") |
|
|
@GetMapping("/pageByTaskCopy") |
|
|
@GetMapping("/pageByTaskCopy") |
|
|
public TableDataInfo<FlowTaskVo> pageByTaskCopy(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
public TableDataInfo<FlowTaskVo> pageByTaskCopy(FlowTaskBo flowTaskBo, PageQuery pageQuery) { |
|
|
return flwTaskService.pageByTaskCopy(flowTaskBo, pageQuery); |
|
|
return flwTaskService.pageByTaskCopy(flowTaskBo, pageQuery); |
|
@ -122,6 +130,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param taskId 任务id |
|
|
* @param taskId 任务id |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "根据taskId查询任务",description = "根据taskId查询任务") |
|
|
@GetMapping("/getTask/{taskId}") |
|
|
@GetMapping("/getTask/{taskId}") |
|
|
public R<FlowTaskVo> getTask(@PathVariable Long taskId) { |
|
|
public R<FlowTaskVo> getTask(@PathVariable Long taskId) { |
|
|
return R.ok(flwTaskService.selectById(taskId)); |
|
|
return R.ok(flwTaskService.selectById(taskId)); |
|
@ -132,7 +141,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param bo 参数 |
|
|
* @param bo 参数 |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.INSERT) |
|
|
@Operation(summary = "终止任务",description = "终止任务") |
|
|
@RepeatSubmit() |
|
|
@RepeatSubmit() |
|
|
@PostMapping("/terminationTask") |
|
|
@PostMapping("/terminationTask") |
|
|
public R<Boolean> terminationTask(@RequestBody FlowTerminationBo bo) { |
|
|
public R<Boolean> terminationTask(@RequestBody FlowTerminationBo bo) { |
|
@ -145,7 +154,9 @@ public class FlwTaskController extends BaseController { |
|
|
* @param bo 参数 |
|
|
* @param bo 参数 |
|
|
* @param taskOperation 操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature |
|
|
* @param taskOperation 操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.UPDATE) |
|
|
@Operation(summary = "任务操作",description = "任务操作",parameters = { |
|
|
|
|
|
@Parameter(name = "taskOperation", description = "操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature") |
|
|
|
|
|
}) |
|
|
@RepeatSubmit |
|
|
@RepeatSubmit |
|
|
@PostMapping("/taskOperation/{taskOperation}") |
|
|
@PostMapping("/taskOperation/{taskOperation}") |
|
|
public R<Void> taskOperation(@Validated @RequestBody TaskOperationBo bo, @PathVariable String taskOperation) { |
|
|
public R<Void> taskOperation(@Validated @RequestBody TaskOperationBo bo, @PathVariable String taskOperation) { |
|
@ -158,7 +169,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param taskIdList 任务id |
|
|
* @param taskIdList 任务id |
|
|
* @param userId 办理人id |
|
|
* @param userId 办理人id |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.UPDATE) |
|
|
@Operation(summary = "修改任务办理人",description = "修改任务办理人") |
|
|
@RepeatSubmit() |
|
|
@RepeatSubmit() |
|
|
@PutMapping("/updateAssignee/{userId}") |
|
|
@PutMapping("/updateAssignee/{userId}") |
|
|
public R<Void> updateAssignee(@RequestBody List<Long> taskIdList, @PathVariable String userId) { |
|
|
public R<Void> updateAssignee(@RequestBody List<Long> taskIdList, @PathVariable String userId) { |
|
@ -170,7 +181,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param bo 参数 |
|
|
* @param bo 参数 |
|
|
*/ |
|
|
*/ |
|
|
@Log(title = "任务管理", businessType = BusinessType.INSERT) |
|
|
@Operation(summary = "驳回审批",description = "驳回审批") |
|
|
@RepeatSubmit() |
|
|
@RepeatSubmit() |
|
|
@PostMapping("/backProcess") |
|
|
@PostMapping("/backProcess") |
|
|
public R<Void> backProcess(@Validated({AddGroup.class}) @RequestBody BackProcessBo bo) { |
|
|
public R<Void> backProcess(@Validated({AddGroup.class}) @RequestBody BackProcessBo bo) { |
|
@ -183,6 +194,7 @@ public class FlwTaskController extends BaseController { |
|
|
* @param definitionId 流程定义id |
|
|
* @param definitionId 流程定义id |
|
|
* @param nowNodeCode 当前节点 |
|
|
* @param nowNodeCode 当前节点 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "获取可驳回的前置节点",description = "获取可驳回的前置节点") |
|
|
@GetMapping("/getBackTaskNode/{definitionId}/{nowNodeCode}") |
|
|
@GetMapping("/getBackTaskNode/{definitionId}/{nowNodeCode}") |
|
|
public R<List<Node>> getBackTaskNode(@PathVariable Long definitionId, @PathVariable String nowNodeCode) { |
|
|
public R<List<Node>> getBackTaskNode(@PathVariable Long definitionId, @PathVariable String nowNodeCode) { |
|
|
return R.ok(flwTaskService.getBackTaskNode(definitionId, nowNodeCode)); |
|
|
return R.ok(flwTaskService.getBackTaskNode(definitionId, nowNodeCode)); |
|
@ -193,6 +205,7 @@ public class FlwTaskController extends BaseController { |
|
|
* |
|
|
* |
|
|
* @param taskId 任务id |
|
|
* @param taskId 任务id |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Operation(summary = "获取当前任务的所有办理人",description = "获取当前任务的所有办理人") |
|
|
@GetMapping("/currentTaskAllUser/{taskId}") |
|
|
@GetMapping("/currentTaskAllUser/{taskId}") |
|
|
public R<List<RemoteUserVo>> currentTaskAllUser(@PathVariable Long taskId) { |
|
|
public R<List<RemoteUserVo>> currentTaskAllUser(@PathVariable Long taskId) { |
|
|
return R.ok(flwTaskService.currentTaskAllUser(taskId)); |
|
|
return R.ok(flwTaskService.currentTaskAllUser(taskId)); |
|
|