|
@@ -1,6 +1,8 @@
|
|
|
package com.aizuda.boot.modules.flw.controller;
|
|
|
|
|
|
+import com.aizuda.boot.modules.flw.FlowHelper;
|
|
|
import com.aizuda.boot.modules.flw.entity.dto.FlwProcessDTO;
|
|
|
+import com.aizuda.boot.modules.flw.entity.dto.ProcessStartDTO;
|
|
|
import com.aizuda.boot.modules.flw.entity.vo.FlwProcessCategoryVO;
|
|
|
import com.aizuda.boot.modules.flw.service.IFlwProcessService;
|
|
|
import com.aizuda.core.api.ApiController;
|
|
@@ -28,7 +30,7 @@ public class ProcessController extends ApiController {
|
|
|
private IFlwProcessService flwProcessService;
|
|
|
|
|
|
@Operation(summary = "获取所有分类流程定义列表")
|
|
|
- @Permission("flw:processCategory:listAll")
|
|
|
+ @Permission("flw:process:listCategory")
|
|
|
@Parameters({
|
|
|
@Parameter(name = "keyword", description = "关键词")
|
|
|
})
|
|
@@ -37,15 +39,32 @@ public class ProcessController extends ApiController {
|
|
|
return flwProcessService.listCategoryAll(keyword);
|
|
|
}
|
|
|
|
|
|
+ @Operation(summary = "获取发起分类流程定义列表")
|
|
|
+ @Permission("flw:process:listStart")
|
|
|
+ @Parameters({
|
|
|
+ @Parameter(name = "keyword", description = "关键词")
|
|
|
+ })
|
|
|
+ @PostMapping("/list-start")
|
|
|
+ public List<FlwProcessCategoryVO> listStart(@RequestParam(required = false) String keyword) {
|
|
|
+ return flwProcessService.listCategoryAll(keyword);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Operation(summary = "获取所有分类流程定义列表")
|
|
|
+ @Permission("flw:process:start")
|
|
|
+ @PostMapping("/start")
|
|
|
+ public boolean startProcess(@RequestBody ProcessStartDTO dto) {
|
|
|
+ return flwProcessService.startProcess(dto, FlowHelper.getFlowCreator());
|
|
|
+ }
|
|
|
+
|
|
|
@Operation(summary = "查询 id 信息")
|
|
|
- @Permission("sys:processCategory:get")
|
|
|
+ @Permission("sys:process:get")
|
|
|
@GetMapping("/get")
|
|
|
public FlwProcessDTO get(@RequestParam Long id) {
|
|
|
return flwProcessService.getDtoById(id);
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "查询 id 克隆流程定义信息")
|
|
|
- @Permission("sys:processCategory:clone")
|
|
|
+ @Permission("sys:process:clone")
|
|
|
@GetMapping("/clone")
|
|
|
public boolean clone(@RequestParam Long id) {
|
|
|
return flwProcessService.cloneById(id);
|