|
@@ -24,24 +24,22 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
/**
|
|
|
* 流程定义Controller
|
|
|
- *
|
|
|
- * @author ruoyi
|
|
|
+ *
|
|
|
+ * @author hzh
|
|
|
* @date 2023-10-10
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/system/process")
|
|
|
-public class BpmProcessController extends BaseController
|
|
|
-{
|
|
|
+public class BpmProcessController extends BaseController {
|
|
|
@Autowired
|
|
|
private IBpmProcessService bpmProcessService;
|
|
|
|
|
|
/**
|
|
|
* 查询流程定义列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:list')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(BpmProcess bpmProcess)
|
|
|
- {
|
|
|
+ public TableDataInfo list(BpmProcess bpmProcess) {
|
|
|
startPage();
|
|
|
List<BpmProcess> list = bpmProcessService.selectBpmProcessList(bpmProcess);
|
|
|
return getDataTable(list);
|
|
@@ -50,11 +48,10 @@ public class BpmProcessController extends BaseController
|
|
|
/**
|
|
|
* 导出流程定义列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:export')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:export')")
|
|
|
@Log(title = "流程定义", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, BpmProcess bpmProcess)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, BpmProcess bpmProcess) {
|
|
|
List<BpmProcess> list = bpmProcessService.selectBpmProcessList(bpmProcess);
|
|
|
ExcelUtil<BpmProcess> util = new ExcelUtil<BpmProcess>(BpmProcess.class);
|
|
|
util.exportExcel(response, list, "流程定义数据");
|
|
@@ -63,43 +60,50 @@ public class BpmProcessController extends BaseController
|
|
|
/**
|
|
|
* 获取流程定义详细信息
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:query')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:query')")
|
|
|
@GetMapping(value = "/{processId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("processId") Long processId)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("processId") Long processId) {
|
|
|
return success(bpmProcessService.selectBpmProcessByProcessId(processId));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新增流程定义
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:add')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:add')")
|
|
|
@Log(title = "流程定义", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody BpmProcess bpmProcess)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody BpmProcess bpmProcess) {
|
|
|
return toAjax(bpmProcessService.insertBpmProcess(bpmProcess));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 修改流程定义
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:edit')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:edit')")
|
|
|
@Log(title = "流程定义", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody BpmProcess bpmProcess)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody BpmProcess bpmProcess) {
|
|
|
return toAjax(bpmProcessService.updateBpmProcess(bpmProcess));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除流程定义
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:process:remove')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:process:remove')")
|
|
|
@Log(title = "流程定义", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{processIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] processIds)
|
|
|
- {
|
|
|
+ @DeleteMapping("/{processIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] processIds) {
|
|
|
return toAjax(bpmProcessService.deleteBpmProcessByProcessIds(processIds));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 流程备份
|
|
|
+ */
|
|
|
+ @Log(title = "流程定义", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/bpmBackups")
|
|
|
+ public AjaxResult bpmBackups(BpmProcess bpmProcess) {
|
|
|
+ return toAjax(bpmProcessService.bpmBackups(bpmProcess));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|