Browse Source

增加 流程配置的保存和发布

master
PoffyZhang 1 year ago
parent
commit
460b2c5960
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java View File

@@ -1,8 +1,10 @@
package com.ningdatech.pmapi.sys.controller;

import com.ningdatech.basic.model.PageVo;
import com.wflow.bean.entity.WflowModelHistorys;
import com.wflow.bean.vo.WflowModelVo;
import com.wflow.service.ModelGroupService;
import com.wflow.workflow.service.ProcessModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@@ -26,6 +28,8 @@ public class SysProcdefController {

private final ModelGroupService modelGroupService;

private final ProcessModelService processModelService;

@ApiOperation(value = "系统流程配置列表", notes = "系统流程配置列表")
@GetMapping("/list")
public PageVo<WflowModelVo> list(@RequestParam String regionCode, @RequestParam(defaultValue = "1") Integer pageNum,
@@ -38,4 +42,16 @@ public class SysProcdefController {
public Object list(@PathVariable String formId) {
return modelGroupService.getModelById(formId);
}

@ApiOperation(value = "系统流程配置保存", notes = "系统流程配置保存")
@PostMapping("/save")
public String save(@Validated @RequestBody WflowModelHistorys modelHistory) {
return processModelService.saveProcess(modelHistory);
}

@ApiOperation(value = "系统流程配置发布", notes = "系统流程配置发布")
@PostMapping("/deploy/{formId}")
public String save(@Validated @PathVariable String formId) {
return processModelService.deployProcess(formId);
}
}

Loading…
Cancel
Save