add:添加流程触发功能:todo:子流程数据通用
This commit is contained in:
@@ -37,19 +37,17 @@ public abstract class FlowNodeActivityBehavior<T> {
|
||||
public final void activity(ExecutionEntity<T> entity) {
|
||||
try {
|
||||
//当前节点
|
||||
if (StringUtils.isNotEmpty(entity.getProc_inst_id())){
|
||||
iActRuExecutionService.update(new UpdateWrapper<ActRuExecution>()
|
||||
.eq("proc_inst_id",entity.getProc_inst_id())
|
||||
.set("activity_id", entity.getActivityId())
|
||||
.set("activity_name", entity.getActivityName())
|
||||
.set("form_type", entity.getForm_type())
|
||||
.set("form_id", entity.getForm_id())
|
||||
.set("remark", "")
|
||||
.set("status", StatusEnum.FLOW_STATUS.code("执行中"))
|
||||
.set("form_data", JSONObject.toJSON(entity.getT()).toString())
|
||||
.set("update_time", DateUtil.now()));
|
||||
}
|
||||
this.execute(entity);
|
||||
iActRuExecutionService.update(new UpdateWrapper<ActRuExecution>()
|
||||
.eq("proc_inst_id",entity.getProc_inst_id())
|
||||
.set("activity_id", entity.getActivityId())
|
||||
.set("activity_name", entity.getActivityName())
|
||||
.set("form_type", entity.getForm_type())
|
||||
.set("form_id", entity.getForm_id())
|
||||
.set("remark", "")
|
||||
.set("status", StatusEnum.FLOW_STATUS.code("执行中"))
|
||||
.set("form_data", JSONObject.toJSON(entity.getT()).toString())
|
||||
.set("update_time", DateUtil.now()));
|
||||
this.leaveActivity(entity);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package org.nl.wms.flow_manage.flow.service.execution.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -17,7 +21,7 @@ import lombok.EqualsAndHashCode;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("act_ru_execution")
|
||||
@TableName(value = "act_ru_execution",autoResultMap = true)
|
||||
public class ActRuExecution implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -87,6 +91,11 @@ public class ActRuExecution implements Serializable {
|
||||
* 业务类型
|
||||
*/
|
||||
private String form_type;
|
||||
/**
|
||||
* 业务数据
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private JSONObject form_data;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user