|
@@ -2,12 +2,15 @@ package com.ningdatech.pmapi.organization.controller; |
|
|
|
|
|
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.wflow.bean.dto.WflowOrgProcdefDto; |
|
|
import com.wflow.bean.dto.WflowOrgProcdefDto; |
|
|
|
|
|
import com.wflow.bean.entity.WflowOrgModelHistorys; |
|
|
import com.wflow.bean.vo.OrgProcdefVo; |
|
|
import com.wflow.bean.vo.OrgProcdefVo; |
|
|
import com.wflow.service.OrgProcdefService; |
|
|
import com.wflow.service.OrgProcdefService; |
|
|
|
|
|
import com.wflow.workflow.service.OrgProcessModelService; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
@@ -27,6 +30,8 @@ public class OrganizationProcdefController { |
|
|
|
|
|
|
|
|
private final OrgProcdefService orgProcdefService; |
|
|
private final OrgProcdefService orgProcdefService; |
|
|
|
|
|
|
|
|
|
|
|
private final OrgProcessModelService orgProcessModelService; |
|
|
|
|
|
|
|
|
@ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表") |
|
|
@ApiOperation(value = "单位流程配置列表", notes = "单位流程配置列表") |
|
|
@GetMapping("/list") |
|
|
@GetMapping("/list") |
|
|
public PageVo<OrgProcdefVo> list(@RequestParam String orgCode, @RequestParam(defaultValue = "1") Integer pageNum, |
|
|
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); |
|
|
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") |
|
|
@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); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |