feat(flow): 添加流程实例撤销功能

- 在控制器中新增撤销申请接口 /revoke/{instId}
- 实现服务层撤销逻辑,检查实例和任务状态
- 验证只有运行中的实例且所有任务都为待办状态时才允许撤销
- 更新实例和相关任务的状态为已撤销
- 添加事务管理确保数据一致性
- 完善接口文档注释说明撤销条件和返回值
This commit is contained in:
2026-02-24 15:21:37 +08:00
parent 4447fb1cb1
commit 4855420c86
3 changed files with 49 additions and 0 deletions

View File

@@ -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));
}
}