diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java index cc23fa6fc..7dff26dc4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java @@ -2,12 +2,15 @@ package com.jero.modules.wkflow.controller; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.system.vo.LoginUser; import com.jero.modules.wkflow.entity.BusMes; +import com.jero.modules.wkflow.enums.FlowTypeEnum; import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import net.sf.json.JSONObject; +import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -34,8 +37,10 @@ public class workFlowController { @PostMapping("/startProcess") public Result startProcess(@RequestBody JSONObject jsonObject){ String type = jsonObject.getString("type"); + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if(type.equals("1")){ - jsonObject.put("id","flowId"); + jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id + jsonObject.put("loginUserId", currentUser.getId()); return this.activiti_define_start(jsonObject); }else{ return null; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java new file mode 100644 index 000000000..47cf4edc6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java @@ -0,0 +1,41 @@ +package com.jero.modules.wkflow.enums; + +/** + * 流程类型枚举类 + */ +public enum FlowTypeEnum { + + RWQRLC("1","任务确认流程","RWQRLC","任务确认流程","rwqrlc"), + ; + + private String value; + private String lable; + private String prcNum; + private String prcName; + private String processDefinitionKey; + + private FlowTypeEnum(String value, String lable, String prcNum, String prcName, String processDefinitionKey) { + this.value = value; + this.lable = lable; + this.prcNum = prcNum; + this.prcName = prcName; + this.processDefinitionKey = processDefinitionKey; + } + public String getValue() { + return value; + } + public String getLable() { + return lable; + } + + public String getPrcNum() { + return prcNum; + } + public String getPrcName() { + return prcName; + } + + public String getProcessDefinitionKey() { + return processDefinitionKey; + } +}