From 1aa2a5a7d7bf2cfb1cf3a9a62dbf3d067bb12d72 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Fri, 22 Apr 2022 18:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E4=BB=BB=E5=8A=A1=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=EF=BC=8C=E5=90=AF=E5=8A=A8=E6=B5=81=E7=A8=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wkflow/controller/workFlowController.java | 7 +++- .../modules/wkflow/enums/FlowTypeEnum.java | 41 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java 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; + } +}