mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-08-29 09:04:12 +00:00
Compare commits
2 Commits
0ed79627b6
...
b3e7bef603
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b3e7bef603 | ||
![]() |
943d8b0f6f |
@@ -88,4 +88,9 @@ public interface FlowConstant {
|
||||
*/
|
||||
String AUTO_PASS = "autoPass";
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
String BUSINESS_CODE = "businessCode";
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,59 @@
|
||||
package org.dromara.workflow.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展对象 flow_instance_biz_ext
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("flow_instance_biz_ext")
|
||||
public class FlowInstanceBizExt extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
private Long instanceId;
|
||||
|
||||
/**
|
||||
* 业务ID
|
||||
*/
|
||||
private String businessId;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
private String businessTitle;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
@@ -29,6 +29,11 @@ public class TestLeave extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 申请编号
|
||||
*/
|
||||
private String applyCode;
|
||||
|
||||
/**
|
||||
* 请假类型
|
||||
*/
|
||||
|
@@ -0,0 +1,46 @@
|
||||
package org.dromara.workflow.domain.bo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.workflow.domain.FlowInstanceBizExt;
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展业务对象 flow_instance_biz_ext
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = FlowInstanceBizExt.class, reverseConvertGenerate = false)
|
||||
public class FlowInstanceBizExtBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
private Long instanceId;
|
||||
|
||||
/**
|
||||
* 业务ID
|
||||
*/
|
||||
private String businessId;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
private String businessTitle;
|
||||
|
||||
|
||||
}
|
@@ -44,6 +44,11 @@ public class StartProcessBo implements Serializable {
|
||||
*/
|
||||
private Map<String, Object> variables;
|
||||
|
||||
/**
|
||||
* 流程业务扩展信息
|
||||
*/
|
||||
private FlowInstanceBizExtBo flowInstanceBizExtBo;
|
||||
|
||||
public Map<String, Object> getVariables() {
|
||||
if (variables == null) {
|
||||
return new HashMap<>(16);
|
||||
|
@@ -36,6 +36,11 @@ public class TestLeaveBo extends BaseEntity {
|
||||
*/
|
||||
private String flowCode;
|
||||
|
||||
/**
|
||||
* 申请编号
|
||||
*/
|
||||
private String applyCode;
|
||||
|
||||
/**
|
||||
* 请假类型
|
||||
*/
|
||||
|
@@ -203,6 +203,18 @@ public class FlowHisTaskVo implements Serializable {
|
||||
*/
|
||||
private String runDuration;
|
||||
|
||||
//业务扩展信息开始
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
private String businessTitle;
|
||||
//业务扩展信息结束
|
||||
|
||||
/**
|
||||
* 设置创建时间并计算任务运行时长
|
||||
*
|
||||
|
@@ -0,0 +1,58 @@
|
||||
package org.dromara.workflow.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.workflow.domain.FlowInstanceBizExt;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展视图对象 flow_instance_biz_ext
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = FlowInstanceBizExt.class)
|
||||
public class FlowInstanceBizExtVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
@ExcelProperty(value = "流程实例ID")
|
||||
private Long instanceId;
|
||||
|
||||
/**
|
||||
* 业务ID
|
||||
*/
|
||||
@ExcelProperty(value = "业务ID")
|
||||
private String businessId;
|
||||
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
@ExcelProperty(value = "业务编码")
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
@ExcelProperty(value = "业务标题")
|
||||
private String businessTitle;
|
||||
|
||||
|
||||
}
|
@@ -134,4 +134,16 @@ public class FlowInstanceVo {
|
||||
@Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
|
||||
private String categoryName;
|
||||
|
||||
//业务扩展信息开始
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
private String businessTitle;
|
||||
//业务扩展信息结束
|
||||
|
||||
}
|
||||
|
@@ -185,5 +185,17 @@ public class FlowTaskVo implements Serializable {
|
||||
*/
|
||||
private List<ButtonPermissionVo> buttonList;
|
||||
|
||||
//业务扩展信息开始
|
||||
/**
|
||||
* 业务编码
|
||||
*/
|
||||
private String businessCode;
|
||||
|
||||
/**
|
||||
* 业务标题
|
||||
*/
|
||||
private String businessTitle;
|
||||
//业务扩展信息结束
|
||||
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,6 @@ package org.dromara.workflow.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.workflow.domain.TestLeave;
|
||||
@@ -32,6 +31,12 @@ public class TestLeaveVo implements Serializable {
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 申请编号
|
||||
*/
|
||||
@ExcelProperty(value = "申请编号")
|
||||
private String applyCode;
|
||||
|
||||
/**
|
||||
* 请假类型
|
||||
*/
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.workflow.mapper;
|
||||
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.workflow.domain.FlowInstanceBizExt;
|
||||
import org.dromara.workflow.domain.vo.FlowInstanceBizExtVo;
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展Mapper接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
public interface FlwInstanceBizExtMapper extends BaseMapperPlus<FlowInstanceBizExt, FlowInstanceBizExtVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package org.dromara.workflow.service;
|
||||
|
||||
import org.dromara.workflow.domain.bo.FlowInstanceBizExtBo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展Service接口
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
public interface IFlwInstanceBizExtService {
|
||||
|
||||
/**
|
||||
* 新增/修改流程实例业务扩展
|
||||
*
|
||||
* @param bo 流程实例业务扩展
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean saveOrUpdate(FlowInstanceBizExtBo bo);
|
||||
|
||||
/**
|
||||
* 按照流程实例ID批量删除
|
||||
*
|
||||
* @param instanceIds 流程实例ID
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteByInstIds(List<Long> instanceIds);
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
package org.dromara.workflow.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.workflow.domain.FlowInstanceBizExt;
|
||||
import org.dromara.workflow.domain.bo.FlowInstanceBizExtBo;
|
||||
import org.dromara.workflow.mapper.FlwInstanceBizExtMapper;
|
||||
import org.dromara.workflow.service.IFlwInstanceBizExtService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程实例业务扩展Service业务层处理
|
||||
*
|
||||
* @author may
|
||||
* @date 2025-08-05
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class FlwInstanceBizExtServiceImpl implements IFlwInstanceBizExtService {
|
||||
|
||||
private final FlwInstanceBizExtMapper baseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新增/修改流程实例业务扩展
|
||||
*
|
||||
* @param bo 流程实例业务扩展
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean saveOrUpdate(FlowInstanceBizExtBo bo) {
|
||||
FlowInstanceBizExt convert = MapstructUtils.convert(bo, FlowInstanceBizExt.class);
|
||||
FlowInstanceBizExt flowInstanceBizExt = baseMapper.selectOne(new LambdaQueryWrapper<FlowInstanceBizExt>()
|
||||
.eq(FlowInstanceBizExt::getInstanceId, bo.getInstanceId()));
|
||||
if (flowInstanceBizExt != null) {
|
||||
flowInstanceBizExt.setBusinessTitle(convert.getBusinessTitle());
|
||||
return baseMapper.insertOrUpdate(convert);
|
||||
}
|
||||
return baseMapper.insertOrUpdate(convert);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照流程实例ID批量删除
|
||||
*
|
||||
* @param instanceIds 流程实例ID
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteByInstIds(List<Long> instanceIds) {
|
||||
return baseMapper.delete(new LambdaQueryWrapper<FlowInstanceBizExt>().in(FlowInstanceBizExt::getInstanceId, instanceIds)) > 0;
|
||||
}
|
||||
}
|
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
@@ -47,10 +48,7 @@ import org.dromara.workflow.domain.vo.FlowHisTaskVo;
|
||||
import org.dromara.workflow.domain.vo.FlowTaskVo;
|
||||
import org.dromara.workflow.mapper.FlwCategoryMapper;
|
||||
import org.dromara.workflow.mapper.FlwTaskMapper;
|
||||
import org.dromara.workflow.service.IFlwCommonService;
|
||||
import org.dromara.workflow.service.IFlwNodeExtService;
|
||||
import org.dromara.workflow.service.IFlwTaskAssigneeService;
|
||||
import org.dromara.workflow.service.IFlwTaskService;
|
||||
import org.dromara.workflow.service.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -85,6 +83,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
private final IFlwTaskAssigneeService flwTaskAssigneeService;
|
||||
private final IFlwCommonService flwCommonService;
|
||||
private final IFlwNodeExtService flwNodeExtService;
|
||||
private final IFlwInstanceBizExtService flowInstanceBizExtService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@@ -119,14 +118,30 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
RemoteStartProcessReturn dto = new RemoteStartProcessReturn();
|
||||
dto.setProcessInstanceId(taskList.get(0).getInstanceId());
|
||||
dto.setTaskId(taskList.get(0).getId());
|
||||
// 保存流程实例业务信息
|
||||
buildFlowInstanceBizExt(flowInstance, startProcessBo.getFlowInstanceBizExtBo());
|
||||
return dto;
|
||||
}
|
||||
FlowInstanceBizExtBo extBo = startProcessBo.getFlowInstanceBizExtBo();
|
||||
String businessCode;
|
||||
if (ObjectUtil.isEmpty(extBo)) {
|
||||
extBo = new FlowInstanceBizExtBo();
|
||||
startProcessBo.setFlowInstanceBizExtBo(extBo);
|
||||
}
|
||||
// 生成业务编号
|
||||
if (StringUtils.isBlank(extBo.getBusinessCode())) {
|
||||
//todo 按照自己业务自行修改
|
||||
businessCode = System.currentTimeMillis()+ StrUtil.EMPTY;
|
||||
extBo.setBusinessCode(businessCode);
|
||||
} else {
|
||||
businessCode = extBo.getBusinessCode();
|
||||
}
|
||||
// 将流程定义内的扩展参数设置到变量中
|
||||
Definition definition = FlowEngine.defService().getPublishByFlowCode(startProcessBo.getFlowCode());
|
||||
Dict dict = JsonUtils.parseMap(definition.getExt());
|
||||
boolean autoPass = !ObjectUtil.isNull(dict) && dict.getBool(FlowConstant.AUTO_PASS);
|
||||
variables.put(FlowConstant.AUTO_PASS, autoPass);
|
||||
|
||||
variables.put(FlowConstant.BUSINESS_CODE, businessCode);
|
||||
FlowParams flowParams = FlowParams.build()
|
||||
.handler(startProcessBo.getHandler())
|
||||
.flowCode(startProcessBo.getFlowCode())
|
||||
@@ -138,6 +153,8 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
// 保存流程实例业务信息
|
||||
buildFlowInstanceBizExt(instance, startProcessBo.getFlowInstanceBizExtBo());
|
||||
// 申请人执行流程
|
||||
List<Task> taskList = taskService.list(new FlowTask().setInstanceId(instance.getId()));
|
||||
if (taskList.size() > 1) {
|
||||
@@ -149,6 +166,19 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建流程实例业务信息
|
||||
*
|
||||
* @param instance 流程实例
|
||||
* @param flowInstanceBizExtBo 业务扩展信息
|
||||
*/
|
||||
private void buildFlowInstanceBizExt(Instance instance, FlowInstanceBizExtBo flowInstanceBizExtBo) {
|
||||
flowInstanceBizExtBo.setInstanceId(instance.getId());
|
||||
flowInstanceBizExtBo.setBusinessId(instance.getBusinessId());
|
||||
flowInstanceBizExtBo.setBusinessCode(flowInstanceBizExtBo.getBusinessCode());
|
||||
flowInstanceBizExtService.saveOrUpdate(flowInstanceBizExtBo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 办理任务
|
||||
*
|
||||
|
@@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -17,9 +18,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.workflow.api.domain.RemoteCompleteTask;
|
||||
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
||||
import org.dromara.workflow.api.domain.RemoteStartProcessReturn;
|
||||
import org.dromara.workflow.api.event.ProcessDeleteEvent;
|
||||
import org.dromara.workflow.api.event.ProcessEvent;
|
||||
import org.dromara.workflow.api.event.ProcessTaskEvent;
|
||||
@@ -112,6 +111,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
||||
TestLeave add = MapstructUtils.convert(bo, TestLeave.class);
|
||||
if (StringUtils.isBlank(add.getStatus())) {
|
||||
add.setStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||
add.setApplyCode(System.currentTimeMillis() + StrUtil.EMPTY);
|
||||
}
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.workflow.mapper.FlwInstanceBizExtMapper">
|
||||
|
||||
</mapper>
|
@@ -27,10 +27,13 @@
|
||||
fd.version,
|
||||
fd.form_custom,
|
||||
fd.form_path,
|
||||
fd.category
|
||||
fd.category,
|
||||
biz.business_code,
|
||||
biz.business_title
|
||||
from flow_instance fi
|
||||
left join flow_definition fd on fi.definition_id = fd.id
|
||||
${ew.getCustomSqlSegment}
|
||||
left join flow_instance_biz_ext biz on biz.instance_id = fi.id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@@ -30,11 +30,14 @@
|
||||
COALESCE(t.form_path, d.form_path) as form_path,
|
||||
d.version,
|
||||
uu.processed_by,
|
||||
uu.type
|
||||
uu.type,
|
||||
biz.business_code,
|
||||
biz.business_title
|
||||
from flow_task t
|
||||
left join flow_user uu on uu.associated = t.id
|
||||
left join flow_definition d on t.definition_id = d.id
|
||||
left join flow_instance i on t.instance_id = i.id
|
||||
left join flow_instance_biz_ext biz on biz.instance_id = i.id
|
||||
where t.node_type = 1
|
||||
and t.del_flag = '0'
|
||||
and uu.del_flag = '0'
|
||||
@@ -71,10 +74,13 @@
|
||||
c.flow_name,
|
||||
c.flow_code,
|
||||
c.category,
|
||||
c.version
|
||||
c.version,
|
||||
biz.business_code,
|
||||
biz.business_title
|
||||
from flow_his_task a
|
||||
left join flow_instance b on a.instance_id = b.id
|
||||
left join flow_definition c on a.definition_id = c.id
|
||||
left join flow_instance_biz_ext biz on biz.instance_id = b.id
|
||||
where a.del_flag ='0'
|
||||
and b.del_flag = '0'
|
||||
and c.del_flag = '0'
|
||||
@@ -100,11 +106,14 @@
|
||||
d.flow_name,
|
||||
d.flow_code,
|
||||
d.category,
|
||||
d.version
|
||||
d.version,
|
||||
biz.business_code,
|
||||
biz.business_title
|
||||
from flow_user a
|
||||
left join flow_his_task b on a.associated = b.task_id
|
||||
left join flow_instance c on b.instance_id = c.id
|
||||
left join flow_definition d on c.definition_id=d.id
|
||||
left join flow_definition d on c.definition_id = d.id
|
||||
left join flow_instance_biz_ext biz on biz.instance_id = c.id
|
||||
where a.type = '4'
|
||||
and a.del_flag = '0'
|
||||
and b.del_flag = '0'
|
||||
|
@@ -379,6 +379,40 @@ COMMENT ON COLUMN flow_spel.update_time IS '更新时间';
|
||||
INSERT INTO flow_spel VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, SYSDATE, 1, SYSDATE);
|
||||
INSERT INTO flow_spel VALUES (2, NULL, NULL, 'initiator', '${initiator}', '流程发起人', '0', '0', 103, 1, SYSDATE, 1, SYSDATE);
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
CREATE TABLE flow_instance_biz_ext (
|
||||
id NUMBER(20),
|
||||
tenant_id VARCHAR2(20) DEFAULT '000000',
|
||||
create_dept NUMBER(20),
|
||||
create_by NUMBER(20),
|
||||
create_time TIMESTAMP,
|
||||
update_by NUMBER(20),
|
||||
update_time TIMESTAMP,
|
||||
business_code VARCHAR2(255),
|
||||
business_title VARCHAR2(1000),
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
instance_id NUMBER(20),
|
||||
business_id VARCHAR2(255)
|
||||
);
|
||||
|
||||
alter table flow_instance_biz_ext add constraint pk_fi_biz_ext primary key (id);
|
||||
|
||||
COMMENT ON TABLE flow_instance_biz_ext IS '流程实例业务扩展表';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.id IS '主键id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.tenant_id IS '租户编号';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_by IS '创建者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_by IS '更新者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_code IS '业务编码';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_title IS '业务标题';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.del_flag IS '删除标志(0代表存在 1代表删除)';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.instance_id IS '流程实例Id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_id IS '业务Id';
|
||||
|
||||
-- ----------------------------
|
||||
-- 请假单信息
|
||||
-- ----------------------------
|
||||
|
@@ -325,7 +325,7 @@ INSERT INTO flow_category VALUES (109, '000000', 102, '0,100,102', '离职', 2,
|
||||
-- 流程spel表达式定义表
|
||||
-- ----------------------------
|
||||
CREATE TABLE flow_spel (
|
||||
id BIGINT NOT NULL,
|
||||
id int8 NOT NULL,
|
||||
component_name VARCHAR(255),
|
||||
method_name VARCHAR(255),
|
||||
method_params VARCHAR(255),
|
||||
@@ -333,10 +333,10 @@ CREATE TABLE flow_spel (
|
||||
remark VARCHAR(255),
|
||||
status CHAR(1) DEFAULT '0',
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
create_dept BIGINT,
|
||||
create_by BIGINT,
|
||||
create_dept int8,
|
||||
create_by int8,
|
||||
create_time TIMESTAMP,
|
||||
update_by BIGINT,
|
||||
update_by int8,
|
||||
update_time TIMESTAMP,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
@@ -359,6 +359,39 @@ COMMENT ON COLUMN flow_spel.update_time IS '更新时间';
|
||||
INSERT INTO flow_spel VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, now(), 1, now());
|
||||
INSERT INTO flow_spel VALUES (2, NULL, NULL, 'initiator', '${initiator}', '流程发起人', '0', '0', 103, 1, now(), 1, now());
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
CREATE TABLE flow_instance_biz_ext (
|
||||
id int8,
|
||||
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||
create_dept int8,
|
||||
create_by int8,
|
||||
create_time TIMESTAMP,
|
||||
update_by int8,
|
||||
update_time TIMESTAMP,
|
||||
business_code VARCHAR(255),
|
||||
business_title VARCHAR(1000),
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
instance_id int8,
|
||||
business_id VARCHAR(255),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE flow_instance_biz_ext IS '流程实例业务扩展表';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.id IS '主键id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.tenant_id IS '租户编号';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_by IS '创建者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_by IS '更新者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_code IS '业务编码';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_title IS '业务标题';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.del_flag IS '删除标志(0代表存在 1代表删除)';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.instance_id IS '流程实例Id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_id IS '业务Id';
|
||||
|
||||
-- ----------------------------
|
||||
-- 请假单信息
|
||||
-- ----------------------------
|
||||
|
@@ -207,9 +207,30 @@ CREATE TABLE flow_spel (
|
||||
INSERT INTO flow_spel VALUES (1, 'spelRuleComponent', 'selectDeptLeaderById', 'initiatorDeptId', '#{@spelRuleComponent.selectDeptLeaderById(#initiatorDeptId)}', '根据部门id获取部门负责人', '0', '0', 103, 1, sysdate(), 1, sysdate());
|
||||
INSERT INTO flow_spel VALUES (2, NULL, NULL, 'initiator', '${initiator}', '流程发起人', '0', '0', 103, 1, sysdate(), 1, sysdate());
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
|
||||
create table flow_instance_biz_ext (
|
||||
id bigint not null comment '主键id',
|
||||
tenant_id varchar(20) default '000000' null comment '租户编号',
|
||||
create_dept bigint null comment '创建部门',
|
||||
create_by bigint null comment '创建者',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by bigint null comment '更新者',
|
||||
update_time datetime null comment '更新时间',
|
||||
business_code varchar(255) null comment '业务编码',
|
||||
business_title varchar(1000) null comment '业务标题',
|
||||
del_flag char default '0' null comment '删除标志(0代表存在 1代表删除)',
|
||||
instance_id bigint null comment '流程实例Id',
|
||||
business_id varchar(255) null comment '业务Id',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB COMMENT '流程实例业务扩展表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 请假单信息
|
||||
-- ----------------------------
|
||||
|
||||
create table test_leave
|
||||
(
|
||||
id bigint(20) not null comment 'id',
|
||||
|
@@ -50,3 +50,37 @@ UPDATE flow_skip SET skip_condition = REPLACE(skip_condition, 'notNike', 'notLik
|
||||
|
||||
ALTER TABLE flow_his_task MODIFY (collaborator VARCHAR2(500) DEFAULT NULL NULL);
|
||||
COMMENT ON COLUMN flow_his_task.collaborator IS '协作人';
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
CREATE TABLE flow_instance_biz_ext (
|
||||
id NUMBER(20),
|
||||
tenant_id VARCHAR2(20) DEFAULT '000000',
|
||||
create_dept NUMBER(20),
|
||||
create_by NUMBER(20),
|
||||
create_time TIMESTAMP,
|
||||
update_by NUMBER(20),
|
||||
update_time TIMESTAMP,
|
||||
business_code VARCHAR2(255),
|
||||
business_title VARCHAR2(1000),
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
instance_id NUMBER(20),
|
||||
business_id VARCHAR2(255)
|
||||
);
|
||||
|
||||
alter table flow_instance_biz_ext add constraint pk_fi_biz_ext primary key (id);
|
||||
|
||||
COMMENT ON TABLE flow_instance_biz_ext IS '流程实例业务扩展表';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.id IS '主键id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.tenant_id IS '租户编号';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_by IS '创建者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_by IS '更新者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_code IS '业务编码';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_title IS '业务标题';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.del_flag IS '删除标志(0代表存在 1代表删除)';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.instance_id IS '流程实例Id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_id IS '业务Id';
|
||||
|
@@ -52,3 +52,36 @@ ALTER TABLE flow_his_task
|
||||
ALTER COLUMN collaborator SET DEFAULT NULL,
|
||||
ALTER COLUMN collaborator TYPE VARCHAR(500);
|
||||
COMMENT ON COLUMN flow_his_task.collaborator IS '协作人';
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
CREATE TABLE flow_instance_biz_ext (
|
||||
id int8,
|
||||
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||
create_dept int8,
|
||||
create_by int8,
|
||||
create_time TIMESTAMP,
|
||||
update_by int8,
|
||||
update_time TIMESTAMP,
|
||||
business_code VARCHAR(255),
|
||||
business_title VARCHAR(1000),
|
||||
del_flag CHAR(1) DEFAULT '0',
|
||||
instance_id int8,
|
||||
business_id VARCHAR(255),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE flow_instance_biz_ext IS '流程实例业务扩展表';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.id IS '主键id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.tenant_id IS '租户编号';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_dept IS '创建部门';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_by IS '创建者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_by IS '更新者';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_code IS '业务编码';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_title IS '业务标题';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.del_flag IS '删除标志(0代表存在 1代表删除)';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.instance_id IS '流程实例Id';
|
||||
COMMENT ON COLUMN flow_instance_biz_ext.business_id IS '业务Id';
|
||||
|
@@ -34,3 +34,23 @@ update flow_skip set skip_condition = REPLACE(skip_condition,'notNike','notLike'
|
||||
|
||||
ALTER TABLE `flow_his_task`
|
||||
MODIFY COLUMN `collaborator` varchar(500) NULL DEFAULT NULL COMMENT '协作人' AFTER `cooperate_type`;
|
||||
|
||||
-- ----------------------------
|
||||
-- 流程实例业务扩展表
|
||||
-- ----------------------------
|
||||
|
||||
create table flow_instance_biz_ext (
|
||||
id bigint not null comment '主键id',
|
||||
tenant_id varchar(20) default '000000' null comment '租户编号',
|
||||
create_dept bigint null comment '创建部门',
|
||||
create_by bigint null comment '创建者',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by bigint null comment '更新者',
|
||||
update_time datetime null comment '更新时间',
|
||||
business_code varchar(255) null comment '业务编码',
|
||||
business_title varchar(1000) null comment '业务标题',
|
||||
del_flag char default '0' null comment '删除标志(0代表存在 1代表删除)',
|
||||
instance_id bigint null comment '流程实例Id',
|
||||
business_id varchar(255) null comment '业务Id',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB COMMENT '流程实例业务扩展表';
|
||||
|
Reference in New Issue
Block a user