feat(flow): 添加流程实例撤销功能
- 在控制器中新增撤销申请接口 /revoke/{instId}
- 实现服务层撤销逻辑,检查实例和任务状态
- 验证只有运行中的实例且所有任务都为待办状态时才允许撤销
- 更新实例和相关任务的状态为已撤销
- 添加事务管理确保数据一致性
- 完善接口文档注释说明撤销条件和返回值
This commit is contained in:
@@ -73,4 +73,10 @@ public class HrmFlowInstanceController extends BaseController {
|
||||
public R<List<HrmFlowInstanceVo>> all(HrmFlowInstanceBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
|
||||
@Log(title = "撤销申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/revoke/{instId}")
|
||||
public R<Void> revoke(@PathVariable @NotNull Long instId) {
|
||||
return toAjax(service.revokeInstance(instId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user