瀏覽代碼

save 单位流程配置

tags/24080901
PoffyZhang 1 年之前
父節點
當前提交
2f92b792c1
共有 1 個文件被更改,包括 29 次插入3 次删除
  1. +29
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java

+ 29
- 3
pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/OrganizationProcdefController.java 查看文件

@@ -2,12 +2,15 @@ package com.ningdatech.pmapi.organization.controller;

import com.ningdatech.basic.model.PageVo;
import com.wflow.bean.dto.WflowOrgProcdefDto;
import com.wflow.bean.entity.WflowOrgModelHistorys;
import com.wflow.bean.vo.OrgProcdefVo;
import com.wflow.service.OrgProcdefService;
import com.wflow.workflow.service.OrgProcessModelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@@ -27,6 +30,8 @@ public class OrganizationProcdefController {

private final OrgProcdefService orgProcdefService;

private final OrgProcessModelService orgProcessModelService;

@ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表")
@GetMapping("/list")
public PageVo<OrgProcdefVo> list(@RequestParam String orgCode, @RequestParam(defaultValue = "1") Integer pageNum,
@@ -34,9 +39,30 @@ public class OrganizationProcdefController {
return orgProcdefService.getOrgProcessByOrgCode(orgCode,pageNum,pageSize);
}

@ApiOperation(value = "单位流程配置保存", notes = "单位流程列表")
@ApiOperation(value = "单位流程配置详情", notes = "单位流程配置详情")
@GetMapping("/detail/{procdefId}")
public OrgProcdefVo detail(@PathVariable String procdefId) {
WflowOrgModelHistorys lastVersionModel = orgProcessModelService.getLastVersionModel(procdefId);
OrgProcdefVo vo = new OrgProcdefVo();
BeanUtils.copyProperties(lastVersionModel,vo);
return vo;
}

@ApiOperation(value = "单位流程配置保存", notes = "单位流程配置保存")
@PostMapping("/save")
public Boolean save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) {
return orgProcdefService.save(wflowOrgProcdefDto);
public String save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) {
return orgProcessModelService.saveProcess(wflowOrgProcdefDto);
}

@ApiOperation(value = "单位流程配置保存", notes = "单位流程配置保存")
@PostMapping("/deploy/{processDefId}")
public String deploy(@Validated @PathVariable String processDefId) {
return orgProcessModelService.deployProcess(processDefId);
}

@ApiOperation(value = "单位流程配置删除", notes = "单位流程配置删除")
@PostMapping("/delete/{procdefId}")
public Boolean delete(@PathVariable String procdefId) {
return orgProcessModelService.delProcess(procdefId);
}
}

Loading…
取消
儲存