发起任务确认,启动流程接口。
This commit is contained in:
+6
-1
@@ -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;
|
||||
|
||||
+41
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user