Browse Source

流程启用 停用

master
PoffyZhang 1 year ago
parent
commit
c1e2d790b8
2 changed files with 22 additions and 0 deletions
  1. +14
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java
  2. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java

+ 14
- 0
pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java View File

@@ -54,6 +54,20 @@ public class OrganizationProcdefController {
return orgProcessModelService.saveProcess(wflowOrgProcdefDto);
}

@ApiOperation(value = "单位流程配置启用", notes = "单位流程配置启用")
@PutMapping("/enable/{procdefId}")
public String enableProcess(@PathVariable String procdefId) {
orgProcessModelService.enableProcess(procdefId,Boolean.FALSE);
return "启用成功";
}

@ApiOperation(value = "单位流程配置禁用", notes = "单位流程配置禁用")
@PutMapping("/disable/{procdefId}")
public String disableProcess(@PathVariable String procdefId) {
orgProcessModelService.enableProcess(procdefId,Boolean.TRUE);
return "禁用成功";
}

@ApiOperation(value = "单位流程配置部署", notes = "单位流程配置部署")
@PostMapping("/deploy/{processDefId}")
public String deploy(@Validated @PathVariable String processDefId) {


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

@@ -4,6 +4,7 @@ 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.utils.R;
import com.wflow.workflow.service.ProcessModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -49,6 +50,13 @@ public class SysProcdefController {
return processModelService.saveProcess(modelHistory);
}

@PutMapping("/{formId}/active/{state}")
public Object enOrDisModel(@PathVariable String formId,
@PathVariable Boolean state) {
modelGroupService.enOrDisModel(formId, !state);
return R.ok(Boolean.TRUE.equals(state) ? "启用流程成功":"停用流程成功");
}

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


Loading…
Cancel
Save