BPM:流程实例的 `status` 状态实现,使用 Flowable 的 `variables` 存储,移除 `bpm_process_instance_ext` 表
parent
a1defeb48a
commit
7967a2a195
@ -0,0 +1,28 @@
|
|||||||
|
package cn.iocoder.yudao.module.bpm.enums.task;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的状态
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum BpmProcessInstanceStatusOldEnum {
|
||||||
|
|
||||||
|
RUNNING(1, "进行中"),
|
||||||
|
FINISH(2, "已完成");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private final Integer status;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,34 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
||||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceMyPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInstanceExtDO> {
|
|
||||||
|
|
||||||
default PageResult<BpmProcessInstanceExtDO> selectPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) {
|
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
|
||||||
.eqIfPresent(BpmProcessInstanceExtDO::getStartUserId, userId)
|
|
||||||
.likeIfPresent(BpmProcessInstanceExtDO::getName, reqVO.getName())
|
|
||||||
.eqIfPresent(BpmProcessInstanceExtDO::getProcessDefinitionId, reqVO.getProcessDefinitionId())
|
|
||||||
.eqIfPresent(BpmProcessInstanceExtDO::getCategory, reqVO.getCategory())
|
|
||||||
.eqIfPresent(BpmProcessInstanceExtDO::getStatus, reqVO.getStatus())
|
|
||||||
.eqIfPresent(BpmProcessInstanceExtDO::getResult, reqVO.getResult())
|
|
||||||
.betweenIfPresent(BpmProcessInstanceExtDO::getCreateTime, reqVO.getCreateTime())
|
|
||||||
.orderByDesc(BpmProcessInstanceExtDO::getId));
|
|
||||||
}
|
|
||||||
|
|
||||||
default BpmProcessInstanceExtDO selectByProcessInstanceId(String processInstanceId) {
|
|
||||||
return selectOne(BpmProcessInstanceExtDO::getProcessInstanceId, processInstanceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
default void updateByProcessInstanceId(BpmProcessInstanceExtDO updateObj) {
|
|
||||||
update(updateObj, new LambdaQueryWrapperX<BpmProcessInstanceExtDO>()
|
|
||||||
.eq(BpmProcessInstanceExtDO::getProcessInstanceId, updateObj.getProcessInstanceId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package cn.iocoder.yudao.module.bpm.framework.flowable.core.enums;
|
||||||
|
|
||||||
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BPM 通用常量
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public class BpmConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的变量 - 状态
|
||||||
|
*
|
||||||
|
* @see ProcessInstance#getProcessVariables()
|
||||||
|
*/
|
||||||
|
public static final String PROCESS_INSTANCE_VARIABLE_STATUS = "PROCESS_STATUS";
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue