mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-17 08:46:39 +08:00
Compare commits
2 Commits
0f0a3a181e
...
ac56ca0e81
Author | SHA1 | Date | |
---|---|---|---|
|
ac56ca0e81 | ||
|
0fcf77e2ed |
@ -88,4 +88,8 @@ public interface FlowConstant {
|
|||||||
*/
|
*/
|
||||||
String AUTO_PASS = "autoPass";
|
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")
|
@TableId(value = "id")
|
||||||
private Long 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 Map<String, Object> variables;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程业务扩展信息
|
||||||
|
*/
|
||||||
|
private FlowInstanceBizExtBo flowInstanceBizExtBo;
|
||||||
|
|
||||||
public Map<String, Object> getVariables() {
|
public Map<String, Object> getVariables() {
|
||||||
if (variables == null) {
|
if (variables == null) {
|
||||||
return new HashMap<>(16);
|
return new HashMap<>(16);
|
||||||
|
@ -36,6 +36,11 @@ public class TestLeaveBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String flowCode;
|
private String flowCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请编号
|
||||||
|
*/
|
||||||
|
private String applyCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请假类型
|
* 请假类型
|
||||||
*/
|
*/
|
||||||
|
@ -203,6 +203,18 @@ public class FlowHisTaskVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String runDuration;
|
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")
|
@Translation(type = FlowConstant.CATEGORY_ID_TO_NAME, mapper = "category")
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
|
//业务扩展信息开始
|
||||||
|
/**
|
||||||
|
* 业务编码
|
||||||
|
*/
|
||||||
|
private String businessCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务标题
|
||||||
|
*/
|
||||||
|
private String businessTitle;
|
||||||
|
//业务扩展信息结束
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -185,4 +185,16 @@ public class FlowTaskVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<ButtonPermissionVo> buttonList;
|
private List<ButtonPermissionVo> buttonList;
|
||||||
|
|
||||||
|
//业务扩展信息开始
|
||||||
|
/**
|
||||||
|
* 业务编码
|
||||||
|
*/
|
||||||
|
private String businessCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务标题
|
||||||
|
*/
|
||||||
|
private String businessTitle;
|
||||||
|
//业务扩展信息结束
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,12 @@ public class TestLeaveVo implements Serializable {
|
|||||||
@ExcelProperty(value = "主键")
|
@ExcelProperty(value = "主键")
|
||||||
private Long id;
|
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.convert.Convert;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
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.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||||
@ -46,10 +47,7 @@ import org.dromara.workflow.domain.vo.FlowHisTaskVo;
|
|||||||
import org.dromara.workflow.domain.vo.FlowTaskVo;
|
import org.dromara.workflow.domain.vo.FlowTaskVo;
|
||||||
import org.dromara.workflow.mapper.FlwCategoryMapper;
|
import org.dromara.workflow.mapper.FlwCategoryMapper;
|
||||||
import org.dromara.workflow.mapper.FlwTaskMapper;
|
import org.dromara.workflow.mapper.FlwTaskMapper;
|
||||||
import org.dromara.workflow.service.IFlwCommonService;
|
import org.dromara.workflow.service.*;
|
||||||
import org.dromara.workflow.service.IFlwNodeExtService;
|
|
||||||
import org.dromara.workflow.service.IFlwTaskAssigneeService;
|
|
||||||
import org.dromara.workflow.service.IFlwTaskService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -86,6 +84,7 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
private final IFlwCommonService flwCommonService;
|
private final IFlwCommonService flwCommonService;
|
||||||
private final IFlwNodeExtService flwNodeExtService;
|
private final IFlwNodeExtService flwNodeExtService;
|
||||||
private final FlowDefinitionMapper flowDefinitionMapper;
|
private final FlowDefinitionMapper flowDefinitionMapper;
|
||||||
|
private final IFlwInstanceBizExtService flowInstanceBizExtService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动任务
|
* 启动任务
|
||||||
@ -117,14 +116,30 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
StartProcessReturnDTO dto = new StartProcessReturnDTO();
|
StartProcessReturnDTO dto = new StartProcessReturnDTO();
|
||||||
dto.setProcessInstanceId(taskList.get(0).getInstanceId());
|
dto.setProcessInstanceId(taskList.get(0).getInstanceId());
|
||||||
dto.setTaskId(taskList.get(0).getId());
|
dto.setTaskId(taskList.get(0).getId());
|
||||||
|
// 保存流程实例业务信息
|
||||||
|
buildFlowInstanceBizExt(flowInstance, startProcessBo.getFlowInstanceBizExtBo());
|
||||||
return dto;
|
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());
|
Definition definition = FlowEngine.defService().getPublishByFlowCode(startProcessBo.getFlowCode());
|
||||||
Dict dict = JsonUtils.parseMap(definition.getExt());
|
Dict dict = JsonUtils.parseMap(definition.getExt());
|
||||||
boolean autoPass = !ObjectUtil.isNull(dict) && dict.getBool(FlowConstant.AUTO_PASS);
|
boolean autoPass = !ObjectUtil.isNull(dict) && dict.getBool(FlowConstant.AUTO_PASS);
|
||||||
variables.put(FlowConstant.AUTO_PASS, autoPass);
|
variables.put(FlowConstant.AUTO_PASS, autoPass);
|
||||||
|
variables.put(FlowConstant.BUSINESS_CODE, businessCode);
|
||||||
FlowParams flowParams = FlowParams.build()
|
FlowParams flowParams = FlowParams.build()
|
||||||
.handler(startProcessBo.getHandler())
|
.handler(startProcessBo.getHandler())
|
||||||
.flowCode(startProcessBo.getFlowCode())
|
.flowCode(startProcessBo.getFlowCode())
|
||||||
@ -136,6 +151,8 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
// 保存流程实例业务信息
|
||||||
|
buildFlowInstanceBizExt(instance, startProcessBo.getFlowInstanceBizExtBo());
|
||||||
// 申请人执行流程
|
// 申请人执行流程
|
||||||
List<Task> taskList = taskService.list(new FlowTask().setInstanceId(instance.getId()));
|
List<Task> taskList = taskService.list(new FlowTask().setInstanceId(instance.getId()));
|
||||||
if (taskList.size() > 1) {
|
if (taskList.size() > 1) {
|
||||||
@ -147,6 +164,19 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
return dto;
|
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.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
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.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -109,6 +110,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
|||||||
TestLeave add = MapstructUtils.convert(bo, TestLeave.class);
|
TestLeave add = MapstructUtils.convert(bo, TestLeave.class);
|
||||||
if (StringUtils.isBlank(add.getStatus())) {
|
if (StringUtils.isBlank(add.getStatus())) {
|
||||||
add.setStatus(BusinessStatusEnum.DRAFT.getStatus());
|
add.setStatus(BusinessStatusEnum.DRAFT.getStatus());
|
||||||
|
add.setApplyCode(System.currentTimeMillis() + StrUtil.EMPTY);
|
||||||
}
|
}
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@ -188,6 +190,10 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
|||||||
String message = Convert.toStr(params.get("message"));
|
String message = Convert.toStr(params.get("message"));
|
||||||
}
|
}
|
||||||
if (processEvent.getSubmit()) {
|
if (processEvent.getSubmit()) {
|
||||||
|
if(StringUtils.isBlank(testLeave.getApplyCode())){
|
||||||
|
String businessCode = MapUtil.getStr(params, "businessCode",StrUtil.EMPTY);
|
||||||
|
testLeave.setApplyCode(businessCode);
|
||||||
|
}
|
||||||
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
|
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
|
||||||
}
|
}
|
||||||
baseMapper.updateById(testLeave);
|
baseMapper.updateById(testLeave);
|
||||||
|
@ -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,9 +27,12 @@
|
|||||||
fd.version,
|
fd.version,
|
||||||
fd.form_custom,
|
fd.form_custom,
|
||||||
fd.form_path,
|
fd.form_path,
|
||||||
fd.category
|
fd.category,
|
||||||
|
biz.business_code,
|
||||||
|
biz.business_title
|
||||||
from flow_instance fi
|
from flow_instance fi
|
||||||
left join flow_definition fd on fi.definition_id = fd.id
|
left join flow_definition fd on fi.definition_id = fd.id
|
||||||
|
left join flow_instance_biz_ext biz on biz.instance_id = fi.id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -30,11 +30,14 @@
|
|||||||
COALESCE(t.form_path, d.form_path) as form_path,
|
COALESCE(t.form_path, d.form_path) as form_path,
|
||||||
d.version,
|
d.version,
|
||||||
uu.processed_by,
|
uu.processed_by,
|
||||||
uu.type
|
uu.type,
|
||||||
|
biz.business_code,
|
||||||
|
biz.business_title
|
||||||
from flow_task t
|
from flow_task t
|
||||||
left join flow_user uu on uu.associated = t.id
|
left join flow_user uu on uu.associated = t.id
|
||||||
left join flow_definition d on t.definition_id = d.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 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
|
where t.node_type = 1
|
||||||
and t.del_flag = '0'
|
and t.del_flag = '0'
|
||||||
and uu.del_flag = '0'
|
and uu.del_flag = '0'
|
||||||
@ -71,10 +74,13 @@
|
|||||||
c.flow_name,
|
c.flow_name,
|
||||||
c.flow_code,
|
c.flow_code,
|
||||||
c.category,
|
c.category,
|
||||||
c.version
|
c.version,
|
||||||
|
biz.business_code,
|
||||||
|
biz.business_title
|
||||||
from flow_his_task a
|
from flow_his_task a
|
||||||
left join flow_instance b on a.instance_id = b.id
|
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_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'
|
where a.del_flag ='0'
|
||||||
and b.del_flag = '0'
|
and b.del_flag = '0'
|
||||||
and c.del_flag = '0'
|
and c.del_flag = '0'
|
||||||
@ -100,11 +106,14 @@
|
|||||||
d.flow_name,
|
d.flow_name,
|
||||||
d.flow_code,
|
d.flow_code,
|
||||||
d.category,
|
d.category,
|
||||||
d.version
|
d.version,
|
||||||
|
biz.business_code,
|
||||||
|
biz.business_title
|
||||||
from flow_user a
|
from flow_user a
|
||||||
left join flow_his_task b on a.associated = b.task_id
|
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_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'
|
where a.type = '4'
|
||||||
and a.del_flag = '0'
|
and a.del_flag = '0'
|
||||||
and b.del_flag = '0'
|
and b.del_flag = '0'
|
||||||
|
@ -379,6 +379,37 @@ 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 (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);
|
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(19) PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR2(20) DEFAULT '000000',
|
||||||
|
create_dept NUMBER(19),
|
||||||
|
create_by NUMBER(19),
|
||||||
|
create_time TIMESTAMP,
|
||||||
|
update_by NUMBER(19),
|
||||||
|
update_time TIMESTAMP,
|
||||||
|
business_code VARCHAR2(255),
|
||||||
|
business_title VARCHAR2(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id NUMBER(19),
|
||||||
|
business_id VARCHAR2(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
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';
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 请假单信息
|
-- 请假单信息
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -359,6 +359,38 @@ 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 (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());
|
INSERT INTO flow_spel VALUES (2, NULL, NULL, 'initiator', '${initiator}', '流程发起人', '0', '0', 103, 1, now(), 1, now());
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 流程实例业务扩展表
|
||||||
|
-- ----------------------------
|
||||||
|
CREATE TABLE flow_instance_biz_ext (
|
||||||
|
id BIGINT PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||||
|
create_dept BIGINT,
|
||||||
|
create_by BIGINT,
|
||||||
|
create_time TIMESTAMP,
|
||||||
|
update_by BIGINT,
|
||||||
|
update_time TIMESTAMP,
|
||||||
|
business_code VARCHAR(255),
|
||||||
|
business_title VARCHAR(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id BIGINT,
|
||||||
|
business_id VARCHAR(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
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,32 @@ 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 (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());
|
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'
|
||||||
|
primary key,
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
comment '流程实例业务扩展表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 请假单信息
|
-- 请假单信息
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
||||||
create table test_leave
|
create table test_leave
|
||||||
(
|
(
|
||||||
id bigint(20) not null comment 'id',
|
id bigint(20) not null comment 'id',
|
||||||
|
@ -1261,6 +1261,42 @@ GO
|
|||||||
INSERT flow_spel VALUES (2, NULL, NULL, N'initiator', N'${initiator}', N'流程发起人', N'0', N'0', 103, 1, GETDATE(), 1, GETDATE());
|
INSERT flow_spel VALUES (2, NULL, NULL, N'initiator', N'${initiator}', N'流程发起人', N'0', N'0', 103, 1, GETDATE(), 1, GETDATE());
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
CREATE TABLE flow_instance_biz_ext (
|
||||||
|
id BIGINT NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||||
|
create_dept BIGINT,
|
||||||
|
create_by BIGINT,
|
||||||
|
create_time DATETIME,
|
||||||
|
update_by BIGINT,
|
||||||
|
update_time DATETIME,
|
||||||
|
business_code VARCHAR(255),
|
||||||
|
business_title VARCHAR(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id BIGINT,
|
||||||
|
business_id VARCHAR(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
EXEC sp_addextendedproperty
|
||||||
|
@name = N'MS_Description',
|
||||||
|
@value = '流程实例业务扩展表',
|
||||||
|
@level0type = N'SCHEMA',
|
||||||
|
@level0name = 'dbo',
|
||||||
|
@level1type = N'TABLE',
|
||||||
|
@level1name = 'flow_instance_biz_ext';
|
||||||
|
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = 'ID', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '租户编号', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'tenant_id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建部门', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_dept';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建者', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_by';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建时间', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_time';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '更新者', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'update_by';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '更新时间', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'update_time';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务编码', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_code';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务标题', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_title';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '删除标志(0代表存在 1代表删除)', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'del_flag';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '流程实例Id', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'instance_id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务Id', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_id';
|
||||||
|
|
||||||
CREATE TABLE test_leave (
|
CREATE TABLE test_leave (
|
||||||
id bigint NOT NULL,
|
id bigint NOT NULL,
|
||||||
tenant_id nvarchar(20) DEFAULT('000000') NULL,
|
tenant_id nvarchar(20) DEFAULT('000000') NULL,
|
||||||
|
28
script/sql/update/oracle/update_5.5.0-5.5.1.sql
Normal file
28
script/sql/update/oracle/update_5.5.0-5.5.1.sql
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
CREATE TABLE flow_instance_biz_ext (
|
||||||
|
id NUMBER(19) PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR2(20) DEFAULT '000000',
|
||||||
|
create_dept NUMBER(19),
|
||||||
|
create_by NUMBER(19),
|
||||||
|
create_time TIMESTAMP,
|
||||||
|
update_by NUMBER(19),
|
||||||
|
update_time TIMESTAMP,
|
||||||
|
business_code VARCHAR2(255),
|
||||||
|
business_title VARCHAR2(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id NUMBER(19),
|
||||||
|
business_id VARCHAR2(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
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';
|
28
script/sql/update/postgres/update_5.5.0-5.5.1.sql
Normal file
28
script/sql/update/postgres/update_5.5.0-5.5.1.sql
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
CREATE TABLE flow_instance_biz_ext (
|
||||||
|
id BIGINT PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||||
|
create_dept BIGINT,
|
||||||
|
create_by BIGINT,
|
||||||
|
create_time TIMESTAMP,
|
||||||
|
update_by BIGINT,
|
||||||
|
update_time TIMESTAMP,
|
||||||
|
business_code VARCHAR(255),
|
||||||
|
business_title VARCHAR(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id BIGINT,
|
||||||
|
business_id VARCHAR(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
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';
|
35
script/sql/update/sqlserver/update_5.5.0-5.5.1.sql
Normal file
35
script/sql/update/sqlserver/update_5.5.0-5.5.1.sql
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
CREATE TABLE flow_instance_biz_ext (
|
||||||
|
id BIGINT NOT NULL PRIMARY KEY,
|
||||||
|
tenant_id VARCHAR(20) DEFAULT '000000',
|
||||||
|
create_dept BIGINT,
|
||||||
|
create_by BIGINT,
|
||||||
|
create_time DATETIME,
|
||||||
|
update_by BIGINT,
|
||||||
|
update_time DATETIME,
|
||||||
|
business_code VARCHAR(255),
|
||||||
|
business_title VARCHAR(1000),
|
||||||
|
del_flag CHAR(1) DEFAULT '0',
|
||||||
|
instance_id BIGINT,
|
||||||
|
business_id VARCHAR(255)
|
||||||
|
);
|
||||||
|
|
||||||
|
EXEC sp_addextendedproperty
|
||||||
|
@name = N'MS_Description',
|
||||||
|
@value = '流程实例业务扩展表',
|
||||||
|
@level0type = N'SCHEMA',
|
||||||
|
@level0name = 'dbo',
|
||||||
|
@level1type = N'TABLE',
|
||||||
|
@level1name = 'flow_instance_biz_ext';
|
||||||
|
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = 'ID', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '租户编号', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'tenant_id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建部门', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_dept';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建者', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_by';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '创建时间', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'create_time';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '更新者', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'update_by';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '更新时间', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'update_time';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务编码', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_code';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务标题', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_title';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '删除标志(0代表存在 1代表删除)', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'del_flag';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '流程实例Id', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'instance_id';
|
||||||
|
EXEC sp_addextendedproperty @name = N'MS_Description', @value = '业务Id', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'flow_instance_biz_ext', @level2type = N'COLUMN', @level2name = 'business_id';
|
17
script/sql/update/update_5.5.0-5.5.1.sql
Normal file
17
script/sql/update/update_5.5.0-5.5.1.sql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
create table flow_instance_biz_ext
|
||||||
|
(
|
||||||
|
id bigint not null comment 'ID'
|
||||||
|
primary key,
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
comment '流程实例业务扩展表';
|
Loading…
Reference in New Issue
Block a user