提交代码

dev_xd
姜玉琦 2024-08-24 11:53:56 +08:00
parent fe56d910ae
commit 8674561038
268 changed files with 16443 additions and 19369 deletions

16
pom.xml
View File

@ -34,8 +34,6 @@
<jjwt.version>0.9.1</jjwt.version>
<minio.version>8.2.2</minio.version>
<poi.version>4.1.2</poi.version>
<flowable.version>7.0.0</flowable.version>
<jakarta.version>2.1.2</jakarta.version>
<transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
</properties>
@ -145,20 +143,6 @@
<version>${transmittable-thread-local.version}</version>
</dependency>
<!-- MAIL -->
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>${jakarta.version}</version>
</dependency>
<!-- flowable -->
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>com.yanzhu</groupId>

View File

@ -1,8 +1,10 @@
package com.yanzhu.common.core.utils.bean;
import com.yanzhu.common.core.utils.StringUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -107,4 +109,55 @@ public class BeanUtils extends org.springframework.beans.BeanUtils
{
return m1.substring(BEAN_METHOD_PROP_INDEX).equals(m2.substring(BEAN_METHOD_PROP_INDEX));
}
/**
* Java Bean Map
* @param bean
* @return
* @throws IllegalAccessException
*/
public static Map<String, Object> beanToMap(Object bean) throws IllegalAccessException {
if (bean == null) {
return new HashMap<>();
}
Map<String, Object> map = new HashMap<>();
Class<?> beanClass = bean.getClass();
Field[] fields = beanClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true); // 允许访问私有字段
String fieldName = field.getName();
Object value = field.get(bean);
map.put(fieldName, value);
}
return map;
}
/**
* toUnderlineCase Hutool
* 线
* "myVariableName" "my_variable_name"
*
* @param str
* @return
*/
public static String toUnderlineCase(CharSequence str) {
if (StringUtils.isEmpty(str)) {
return null;
}
StringBuilder result = new StringBuilder();
char[] chars = str.toString().toCharArray();
for (char c : chars) {
if (Character.isUpperCase(c)) {
if (result.length() > 0) {
result.append('_');
}
result.append(Character.toLowerCase(c));
} else {
result.append(c);
}
}
return result.toString();
}
}

View File

@ -71,6 +71,15 @@ public class BaseController
return rspData;
}
protected TableDataInfo getDataTable(PageInfo<?> pageInfo) {
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setRows(pageInfo.getList());
rspData.setMsg("查询成功");
rspData.setTotal(pageInfo.getTotal());
return rspData;
}
/**
*
*/

View File

@ -1,83 +0,0 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* flowable_category
*
* @author ruoyi
* @date 2023-11-27
*/
public class FlowableCategory extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 流程分类id */
private Long id;
/** 流程分类名称 */
@Excel(name = "流程分类名称")
private String name;
/** 分类编码 */
@Excel(name = "分类编码")
private String code;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setCode(String code)
{
this.code = code;
}
public String getCode()
{
return code;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("code", getCode())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("delFlag", getDelFlag())
.toString();
}
}

View File

@ -1,70 +0,0 @@
package com.yanzhu.flowable.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* flowable_deploy
*
* @author ruoyi
* @date 2023-12-18
*/
@Data
public class FlowableDeploy extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 流程定义ID */
@Excel(name = "流程定义ID")
private String definitionId;
/** 流程名称 */
@Excel(name = "流程名称")
private String processName;
/** 流程Key */
@Excel(name = "流程Key")
private String processKey;
/** 分类编码 */
@Excel(name = "分类编码")
private String category;
/** 版本 */
@Excel(name = "版本")
private Integer version;
/** 部署ID */
@Excel(name = "部署ID")
private String deploymentId;
/** 流程定义状态 */
@Excel(name = "流程定义状态")
private Boolean suspended;
/** 部署时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "部署时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deploymentTime;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("definitionId", getDefinitionId())
.append("processName", getProcessName())
.append("processKey", getProcessKey())
.append("category", getCategory())
.append("version", getVersion())
.append("deploymentId", getDeploymentId())
.append("suspended", getSuspended())
.append("deploymentTime", getDeploymentTime())
.toString();
}
}

View File

@ -1,126 +0,0 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* flowable_field_def
*
* @author ruoyi
* @date 2023-12-26
*/
public class FlowableFieldDef extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 数据库字段/表单字段 */
@Excel(name = "数据库字段/表单字段")
private String field;
/** 字段名/表单字段名 */
@Excel(name = "字段名/表单字段名")
private String label;
/** 字段宽度 */
@Excel(name = "字段宽度")
private Long width;
/** 字段组件类型 */
@Excel(name = "字段组件类型")
private String type;
/** 字段定义 */
@Excel(name = "字段定义")
private String scheme;
/** 字段范围 */
@Excel(name = "字段范围")
private String scope;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setField(String field)
{
this.field = field;
}
public String getField()
{
return field;
}
public void setLabel(String label)
{
this.label = label;
}
public String getLabel()
{
return label;
}
public void setWidth(Long width)
{
this.width = width;
}
public Long getWidth()
{
return width;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setScheme(String scheme)
{
this.scheme = scheme;
}
public String getScheme()
{
return scheme;
}
public void setScope(String scope)
{
this.scope = scope;
}
public String getScope()
{
return scope;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("field", getField())
.append("label", getLabel())
.append("remark", getRemark())
.append("width", getWidth())
.append("type", getType())
.append("scheme", getScheme())
.append("scope", getScope())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -1,97 +0,0 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* flowable_field_ref
*
* @author ruoyi
* @date 2023-12-26
*/
public class FlowableFieldRef extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 模块 */
@Excel(name = "模块")
private String module;
/** 模型标识 */
@Excel(name = "模型标识")
private String mkey;
/** 字段ID */
@Excel(name = "字段ID")
private String fieldId;
/** 版本号 */
@Excel(name = "版本号")
private Long version;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setModule(String module)
{
this.module = module;
}
public String getModule()
{
return module;
}
public void setMkey(String mkey)
{
this.mkey = mkey;
}
public String getMkey()
{
return mkey;
}
public void setFieldId(String fieldId)
{
this.fieldId = fieldId;
}
public String getFieldId()
{
return fieldId;
}
public void setVersion(Long version)
{
this.version = version;
}
public Long getVersion()
{
return version;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("module", getModule())
.append("mkey", getMkey())
.append("fieldId", getFieldId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("version", getVersion())
.toString();
}
}

View File

@ -1,13 +0,0 @@
package com.yanzhu.flowable.domain;
import lombok.Data;
/**
* 便
*/
@Data
public class FlowableFieldSearch extends FlowableFieldRef {
/** 字段范围 */
private String scope;
}

View File

@ -1,165 +0,0 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* flowable_model
*
* @author ruoyi
* @date 2023-11-28
*/
public class FlowableModel extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 模型ID */
@Excel(name = "模型ID")
private String modelId;
/** 模型名称 */
@Excel(name = "模型名称")
private String modelName;
/** 模型Key */
@Excel(name = "模型Key")
private String modelKey;
/** 分类编码 */
@Excel(name = "分类编码")
private String category;
/** 版本 */
@Excel(name = "版本")
private Integer version;
/** 表单类型 */
@Excel(name = "表单类型")
private Integer formType;
/** 表单ID */
@Excel(name = "表单ID")
private Long formId;
/** 模型描述 */
@Excel(name = "模型描述")
private String description;
/** 流程xm */
@Excel(name = "流程xm")
private String bpmnXml;
/** 表单内容 */
@Excel(name = "表单内容")
private String content;
public void setModelId(String modelId)
{
this.modelId = modelId;
}
public String getModelId()
{
return modelId;
}
public void setModelName(String modelName)
{
this.modelName = modelName;
}
public String getModelName()
{
return modelName;
}
public void setModelKey(String modelKey)
{
this.modelKey = modelKey;
}
public String getModelKey()
{
return modelKey;
}
public void setCategory(String category)
{
this.category = category;
}
public String getCategory()
{
return category;
}
public void setVersion(Integer version)
{
this.version = version;
}
public Integer getVersion()
{
return version;
}
public void setFormType(Integer formType)
{
this.formType = formType;
}
public Integer getFormType()
{
return formType;
}
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setBpmnXml(String bpmnXml)
{
this.bpmnXml = bpmnXml;
}
public String getBpmnXml()
{
return bpmnXml;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("modelId", getModelId())
.append("modelName", getModelName())
.append("modelKey", getModelKey())
.append("category", getCategory())
.append("version", getVersion())
.append("formType", getFormType())
.append("formId", getFormId())
.append("description", getDescription())
.append("createTime", getCreateTime())
.append("bpmnXml", getBpmnXml())
.append("content", getContent())
.toString();
}
}

View File

@ -1,97 +0,0 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* flowable_model_page
*
* @author ruoyi
* @date 2023-12-26
*/
public class FlowableModelPage extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 模块 */
@Excel(name = "模块")
private String module;
/** 模型标识 */
@Excel(name = "模型标识")
private String mkey;
/** 页面名称 */
@Excel(name = "页面名称")
private String name;
/** 页面定义 */
@Excel(name = "页面定义")
private String pageScheme;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setModule(String module)
{
this.module = module;
}
public String getModule()
{
return module;
}
public void setMkey(String mkey)
{
this.mkey = mkey;
}
public String getMkey()
{
return mkey;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setPageScheme(String pageScheme)
{
this.pageScheme = pageScheme;
}
public String getPageScheme()
{
return pageScheme;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("module", getModule())
.append("mkey", getMkey())
.append("name", getName())
.append("pageScheme", getPageScheme())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,64 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* sys_instance_form
*
* @author Tony
* @date 2021-03-30
*/
public class SysDeployForm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 表单主键 */
@Excel(name = "表单主键")
private Long formId;
/** 流程定义主键 */
@Excel(name = "流程定义主键")
private String deployId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public String getDeployId() {
return deployId;
}
public void setDeployId(String deployId) {
this.deployId = deployId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("formId", getFormId())
.append("deployId", getDeployId())
.toString();
}
}

View File

@ -0,0 +1,100 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* sys_expression
*
* @author ruoyi
* @date 2022-12-12
*/
public class SysExpression extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 表单主键 */
private Long id;
/** 表达式名称 */
@Excel(name = "表达式名称")
private String name;
/** 表达式内容 */
@Excel(name = "表达式内容")
private String expression;
/**
* exp_data_type
* fixed:
* dynamic:
*
* */
private String dataType;
/** 状态 */
private Integer status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setExpression(String expression)
{
this.expression = expression;
}
public String getExpression()
{
return expression;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("expression", getExpression())
.append("dataType", getDataType())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("status", getStatus())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,70 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* sys_task_form
*
* @author Tony
* @date 2021-03-30
*/
public class SysForm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 表单主键 */
private Long formId;
/** 表单名称 */
@Excel(name = "表单名称")
private String formName;
/** 表单内容 */
@Excel(name = "表单内容")
private String formContent;
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public void setFormName(String formName)
{
this.formName = formName;
}
public String getFormName()
{
return formName;
}
public void setFormContent(String formContent)
{
this.formContent = formContent;
}
public String getFormContent()
{
return formContent;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("formId", getFormId())
.append("formName", getFormName())
.append("formContent", getFormContent())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,126 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* sys_listener
*
* @author Tony
* @date 2022-12-25
*/
public class SysListener extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 表单主键 */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 监听类型 */
@Excel(name = "监听类型")
private String type;
/** 事件类型 */
@Excel(name = "事件类型")
private String eventType;
/** 值类型 */
@Excel(name = "值类型")
private String valueType;
/** 执行内容 */
@Excel(name = "执行内容")
private String value;
/** 状态 */
@Excel(name = "状态")
private Integer status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setEventType(String eventType)
{
this.eventType = eventType;
}
public String getEventType()
{
return eventType;
}
public void setValueType(String valueType)
{
this.valueType = valueType;
}
public String getValueType()
{
return valueType;
}
public void setValue(String value)
{
this.value = value;
}
public String getValue()
{
return value;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("eventType", getEventType())
.append("valueType", getValueType())
.append("value", getValue())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("status", getStatus())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,65 @@
package com.yanzhu.flowable.domain;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* sys_task_form
*
* @author Tony
* @date 2021-04-03
*/
public class SysTaskForm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 表单主键 */
@Excel(name = "表单主键")
private Long formId;
/** 所属任务 */
@Excel(name = "所属任务")
private String taskId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public void setTaskId(String taskId)
{
this.taskId = taskId;
}
public String getTaskId()
{
return taskId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("formId", getFormId())
.append("taskId", getTaskId())
.toString();
}
}

View File

@ -1,30 +0,0 @@
package com.yanzhu.flowable.domain.bo;
import lombok.Data;
/**
* @author ruoyi
* @createTime 2023/11/28
*/
@Data
public class FlowableMetaInfoBo {
/**
* username
*/
private String createUser;
/**
*
*/
private String description;
/**
*
*/
private Integer formType;
/**
*
*/
private Long formId;
}

View File

@ -1,49 +0,0 @@
package com.yanzhu.flowable.domain.bo;
import lombok.Data;
/**
* flowable
*
* @author ruoyi
* @createtime 2023/11/28
*/
@Data
public class FlowableModelBo {
/**
*
*/
private String modelId;
/**
*
*/
private String modelName;
/**
* Key
*/
private String modelKey;
/**
*
*/
private String category;
/**
*
*/
private String description;
/**
*
*/
private Integer formType;
/**
*
*/
private Long formId;
/**
* xml
*/
private String bpmnXml;
/**
*
*/
private Boolean newVersion;
}

View File

@ -0,0 +1,25 @@
package com.yanzhu.flowable.domain.dto;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
/**
* @author Tony
* @date 2021/3/28 15:50
*/
@Data
@Builder
public class FlowCommentDto implements Serializable {
/**
* 0 1 退 2
*/
private String type;
/**
*
*/
private String comment;
}

View File

@ -0,0 +1,15 @@
package com.yanzhu.flowable.domain.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @author Tony
* @date 2021/3/31 23:20
*/
@Data
public class FlowFromFieldDTO implements Serializable {
private Object fields;
}

View File

@ -0,0 +1,30 @@
package com.yanzhu.flowable.domain.dto;
import lombok.Data;
import java.io.Serializable;
/**
*
* @author Tony
* @date 2021/4/17 22:59
*/
@Data
public class FlowNextDto implements Serializable {
/**
*
*/
private String type;
/**
*
*/
private String dataType;
/**
*
*/
private String vars;
}

View File

@ -1,5 +1,4 @@
package com.yanzhu.flowable.domain.my;
package com.yanzhu.flowable.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -34,9 +33,6 @@ public class FlowProcDefDto implements Serializable {
@ApiModelProperty("流程分类")
private String category;
@ApiModelProperty("流程分类名称")
private String categoryName;
@ApiModelProperty("配置表单名称")
private String formName;
@ -67,5 +63,4 @@ public class FlowProcDefDto implements Serializable {
@ApiModelProperty("项目名称")
private String projectName;
}

View File

@ -0,0 +1,28 @@
package com.yanzhu.flowable.domain.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @author Tony
* @date 2021/3/28 19:48
*/
@Data
public class FlowSaveXmlVo implements Serializable {
/**
*
*/
private String name;
/**
*
*/
private String category;
/**
* xml
*/
private String xml;
}

View File

@ -0,0 +1,102 @@
package com.yanzhu.flowable.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Getter
@Setter
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskDto implements Serializable {
@ApiModelProperty("任务编号")
private String taskId;
@ApiModelProperty("任务执行编号")
private String executionId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("任务Key")
private String taskDefKey;
@ApiModelProperty("任务执行人Id")
private Long assigneeId;
@ApiModelProperty("部门名称")
private String deptName;
@ApiModelProperty("流程发起人部门名称")
private String startDeptName;
@ApiModelProperty("任务执行人名称")
private String assigneeName;
@ApiModelProperty("任务执行人部门")
private String assigneeDeptName;;
@ApiModelProperty("流程发起人Id")
private String startUserId;
@ApiModelProperty("流程发起人名称")
private String startUserName;
@ApiModelProperty("流程类型")
private String category;
@ApiModelProperty("流程变量信息")
private Object variables;
@ApiModelProperty("局部变量信息")
private Object taskLocalVars;
@ApiModelProperty("流程部署编号")
private String deployId;
@ApiModelProperty("流程ID")
private String procDefId;
@ApiModelProperty("流程key")
private String procDefKey;
@ApiModelProperty("流程定义名称")
private String procDefName;
@ApiModelProperty("流程定义内置使用版本")
private int procDefVersion;
@ApiModelProperty("流程实例ID")
private String procInsId;
@ApiModelProperty("历史流程实例ID")
private String hisProcInsId;
@ApiModelProperty("任务耗时")
private String duration;
@ApiModelProperty("任务意见")
private FlowCommentDto comment;
@ApiModelProperty("候选执行人")
private String candidate;
@ApiModelProperty("任务创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty("任务完成时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date finishTime;
}

View File

@ -0,0 +1,23 @@
package com.yanzhu.flowable.domain.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @author Tony
* @date 2021/4/21 20:55
*/
@Data
public class FlowViewerDto implements Serializable {
/**
* key
*/
private String key;
/**
* ()
*/
private boolean completed;
}

View File

@ -0,0 +1,33 @@
package com.yanzhu.flowable.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Data
@ApiModel("工作流任务相关--请求参数")
public class FlowQueryVo {
@ApiModelProperty("流程名称")
private String name;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty("当前页码")
private Integer pageNum;
@ApiModelProperty("每页条数")
private Integer pageSize;
}

View File

@ -0,0 +1,56 @@
package com.yanzhu.flowable.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Data
@ApiModel("工作流任务相关--请求参数")
public class FlowTaskVo {
@ApiModelProperty("任务Id")
private String taskId;
@ApiModelProperty("用户Id")
private String userId;
@ApiModelProperty("任务意见")
private String comment;
@ApiModelProperty("流程实例Id")
private String instanceId;
@ApiModelProperty("节点")
private String targetKey;
private String deploymentId;
@ApiModelProperty("流程环节定义ID")
private String defId;
@ApiModelProperty("子执行流ID")
private String currentChildExecutionId;
@ApiModelProperty("子执行流是否已执行")
private Boolean flag;
@ApiModelProperty("流程变量信息")
private Map<String, Object> variables;
@ApiModelProperty("审批人")
private String assignee;
@ApiModelProperty("候选人")
private List<String> candidateUsers;
@ApiModelProperty("审批组")
private List<String> candidateGroups;
}

View File

@ -0,0 +1,23 @@
package com.yanzhu.flowable.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>退<p>
*
* @author tony
* @date 2022-04-23 11:01:52
*/
@Data
@ApiModel("可退回节点")
public class ReturnTaskNodeVo {
@ApiModelProperty("任务Id")
private String id;
@ApiModelProperty("用户Id")
private String name;
}

View File

@ -0,0 +1,22 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.dto.FlowProcDefDto;
import java.util.List;
/**
*
*
* @author Tony
* @email
* @date 2022/1/29 5:44
**/
public interface FlowDeployMapper {
/**
*
* @param name
* @return
*/
List<FlowProcDefDto> selectDeployList(String name);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.flowable.mapper;
import java.util.List;
import com.yanzhu.flowable.domain.FlowableCategory;
/**
* Mapper
*
* @author ruoyi
* @date 2023-11-27
*/
public interface FlowableCategoryMapper
{
/**
*
*
* @param id
* @return
*/
public FlowableCategory selectFlowableCategoryById(Long id);
/**
*
*
* @param flowableCategory
* @return
*/
public List<FlowableCategory> selectFlowableCategoryList(FlowableCategory flowableCategory);
/**
*
*
* @param flowableCategory
* @return
*/
public int insertFlowableCategory(FlowableCategory flowableCategory);
/**
*
*
* @param flowableCategory
* @return
*/
public int updateFlowableCategory(FlowableCategory flowableCategory);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableCategoryById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableCategoryByIds(Long[] ids);
}

View File

@ -1,69 +0,0 @@
package com.yanzhu.flowable.mapper;
import java.util.List;
import com.yanzhu.flowable.domain.FlowableFieldDef;
import com.yanzhu.flowable.domain.FlowableFieldSearch;
/**
* Mapper
*
* @author ruoyi
* @date 2023-12-26
*/
public interface FlowableFieldDefMapper
{
/**
*
*
* @param id
* @return
*/
public FlowableFieldDef selectFlowableFieldDefById(String id);
/**
*
*
* @param flowableFieldDef
* @return
*/
public List<FlowableFieldDef> selectFlowableFieldDefList(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param flowableFieldDef
* @return
*/
public int insertFlowableFieldDef(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param flowableFieldDef
* @return
*/
public int updateFlowableFieldDef(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableFieldDefById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableFieldDefByIds(String[] ids);
/**
* (,)
* @param flowableFieldSearch
* @return
*/
public List<FlowableFieldDef> listCombination(FlowableFieldSearch flowableFieldSearch);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.flowable.mapper;
import java.util.List;
import com.yanzhu.flowable.domain.FlowableFieldRef;
/**
* Mapper
*
* @author ruoyi
* @date 2023-12-26
*/
public interface FlowableFieldRefMapper
{
/**
*
*
* @param id
* @return
*/
public FlowableFieldRef selectFlowableFieldRefById(String id);
/**
*
*
* @param flowableFieldRef
* @return
*/
public List<FlowableFieldRef> selectFlowableFieldRefList(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param flowableFieldRef
* @return
*/
public int insertFlowableFieldRef(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param flowableFieldRef
* @return
*/
public int updateFlowableFieldRef(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableFieldRefById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableFieldRefByIds(String[] ids);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.flowable.mapper;
import java.util.List;
import com.yanzhu.flowable.domain.FlowableModelPage;
/**
* Mapper
*
* @author ruoyi
* @date 2023-12-25
*/
public interface FlowableModelPageMapper
{
/**
*
*
* @param id
* @return
*/
public FlowableModelPage selectFlowableModelPageById(String id);
/**
*
*
* @param flowableModelPage
* @return
*/
public List<FlowableModelPage> selectFlowableModelPageList(FlowableModelPage flowableModelPage);
/**
*
*
* @param flowableModelPage
* @return
*/
public int insertFlowableModelPage(FlowableModelPage flowableModelPage);
/**
*
*
* @param flowableModelPage
* @return
*/
public int updateFlowableModelPage(FlowableModelPage flowableModelPage);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableModelPageById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableModelPageByIds(String[] ids);
}

View File

@ -0,0 +1,72 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.SysDeployForm;
import com.yanzhu.flowable.domain.SysForm;
import java.util.List;
/**
* Mapper
*
* @author Tony
* @date 2021-03-30
*/
public interface SysDeployFormMapper
{
/**
*
*
* @param id ID
* @return
*/
public SysDeployForm selectSysDeployFormById(Long id);
/**
*
*
* @param SysDeployForm
* @return
*/
public List<SysDeployForm> selectSysDeployFormList(SysDeployForm SysDeployForm);
/**
*
*
* @param SysDeployForm
* @return
*/
public int insertSysDeployForm(SysDeployForm SysDeployForm);
/**
*
*
* @param SysDeployForm
* @return
*/
public int updateSysDeployForm(SysDeployForm SysDeployForm);
/**
*
*
* @param id ID
* @return
*/
public int deleteSysDeployFormById(Long id);
/**
*
*
* @param ids ID
* @return
*/
public int deleteSysDeployFormByIds(Long[] ids);
/**
*
* @param deployId
* @return
*/
SysForm selectSysDeployFormByDeployId(String deployId);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.SysExpression;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2022-12-12
*/
public interface SysExpressionMapper
{
/**
*
*
* @param id
* @return
*/
public SysExpression selectSysExpressionById(Long id);
/**
*
*
* @param sysExpression
* @return
*/
public List<SysExpression> selectSysExpressionList(SysExpression sysExpression);
/**
*
*
* @param sysExpression
* @return
*/
public int insertSysExpression(SysExpression sysExpression);
/**
*
*
* @param sysExpression
* @return
*/
public int updateSysExpression(SysExpression sysExpression);
/**
*
*
* @param id
* @return
*/
public int deleteSysExpressionById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSysExpressionByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.SysForm;
import java.util.List;
/**
* Mapper
*
* @author Tony
* @date 2021-03-30
*/
public interface SysFormMapper
{
/**
*
*
* @param formId ID
* @return
*/
public SysForm selectSysFormById(Long formId);
/**
*
*
* @param sysForm
* @return
*/
public List<SysForm> selectSysFormList(SysForm sysForm);
/**
*
*
* @param sysForm
* @return
*/
public int insertSysForm(SysForm sysForm);
/**
*
*
* @param sysForm
* @return
*/
public int updateSysForm(SysForm sysForm);
/**
*
*
* @param formId ID
* @return
*/
public int deleteSysFormById(Long formId);
/**
*
*
* @param formIds ID
* @return
*/
public int deleteSysFormByIds(Long[] formIds);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.SysListener;
import java.util.List;
/**
* Mapper
*
* @author Tony
* @date 2022-12-25
*/
public interface SysListenerMapper
{
/**
*
*
* @param id
* @return
*/
public SysListener selectSysListenerById(Long id);
/**
*
*
* @param sysListener
* @return
*/
public List<SysListener> selectSysListenerList(SysListener sysListener);
/**
*
*
* @param sysListener
* @return
*/
public int insertSysListener(SysListener sysListener);
/**
*
*
* @param sysListener
* @return
*/
public int updateSysListener(SysListener sysListener);
/**
*
*
* @param id
* @return
*/
public int deleteSysListenerById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteSysListenerByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.SysTaskForm;
import java.util.List;
/**
* Mapper
*
* @author Tony
* @date 2021-04-03
*/
public interface SysTaskFormMapper
{
/**
*
*
* @param id ID
* @return
*/
public SysTaskForm selectSysTaskFormById(Long id);
/**
*
*
* @param sysTaskForm
* @return
*/
public List<SysTaskForm> selectSysTaskFormList(SysTaskForm sysTaskForm);
/**
*
*
* @param sysTaskForm
* @return
*/
public int insertSysTaskForm(SysTaskForm sysTaskForm);
/**
*
*
* @param sysTaskForm
* @return
*/
public int updateSysTaskForm(SysTaskForm sysTaskForm);
/**
*
*
* @param id ID
* @return
*/
public int deleteSysTaskFormById(Long id);
/**
*
*
* @param ids ID
* @return
*/
public int deleteSysTaskFormByIds(Long[] ids);
}

View File

@ -0,0 +1,31 @@
<?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="com.yanzhu.flowable.mapper.FlowDeployMapper">
<select id="selectDeployList" resultType="FlowProcDefDto">
SELECT
rp.id_ as id,
rp.deployment_id_ as deploymentId,
rd.name_ as name,
rd.category_ as category,
rp.key_ as flowKey,
rp.version_ as version,
rp.suspension_state_ as suspensionState,
rd.deploy_time_ as deploymentTime
FROM
act_re_procdef rp
LEFT JOIN act_re_deployment rd ON rp.deployment_id_ = rd.id_
<where>
<if test="name != null and name != ''">
and rd.name_ like concat('%', #{name}, '%')
</if>
</where>
order by rd.deploy_time_ desc
</select>
</mapper>

View File

@ -1,113 +0,0 @@
<?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="com.yanzhu.flowable.mapper.FlowableFieldDefMapper">
<resultMap type="FlowableFieldDef" id="FlowableFieldDefResult">
<result property="id" column="id" />
<result property="field" column="field" />
<result property="label" column="label" />
<result property="remark" column="remark" />
<result property="width" column="width" />
<result property="type" column="type" />
<result property="scheme" column="scheme" />
<result property="scope" column="scope" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectFlowableFieldDefVo">
select id, field, label, remark, width, type, scheme, scope, update_by, update_time, create_by, create_time from flowable_field_def
</sql>
<select id="selectFlowableFieldDefList" parameterType="FlowableFieldDef" resultMap="FlowableFieldDefResult">
<include refid="selectFlowableFieldDefVo"/>
<where>
<if test="field != null and field != ''"> and field = #{field}</if>
<if test="label != null and label != ''"> and label = #{label}</if>
<if test="width != null "> and width = #{width}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="scheme != null and scheme != ''"> and scheme = #{scheme}</if>
<if test="scope != null and scope != ''"> and scope = #{scope}</if>
</where>
</select>
<select id="selectFlowableFieldDefById" parameterType="String" resultMap="FlowableFieldDefResult">
<include refid="selectFlowableFieldDefVo"/>
where id = #{id}
</select>
<!--字段定义表和字段引用表关联查询 -->
<select id="listCombination" parameterType="FlowableFieldSearch" resultMap="FlowableFieldDefResult">
select def.* from flowable_field_def def,flowable_field_ref ref
<where>
<if test="scope != null and scope != ''"> and def.scope = #{scope}</if>
<if test="module != null and module != ''"> and ref.module = #{module}</if>
<if test="mkey != null and mkey != ''"> and ref.mkey = #{mkey}</if>
<if test="version != null and version != ''"> and ref.version = #{version}</if>
</where>
</select>
<insert id="insertFlowableFieldDef" parameterType="FlowableFieldDef">
insert into flowable_field_def
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="field != null and field != ''">field,</if>
<if test="label != null and label != ''">label,</if>
<if test="remark != null">remark,</if>
<if test="width != null">width,</if>
<if test="type != null and type != ''">type,</if>
<if test="scheme != null and scheme != ''">scheme,</if>
<if test="scope != null">scope,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="field != null and field != ''">#{field},</if>
<if test="label != null and label != ''">#{label},</if>
<if test="remark != null">#{remark},</if>
<if test="width != null">#{width},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="scheme != null and scheme != ''">#{scheme},</if>
<if test="scope != null">#{scope},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateFlowableFieldDef" parameterType="FlowableFieldDef">
update flowable_field_def
<trim prefix="SET" suffixOverrides=",">
<if test="field != null and field != ''">field = #{field},</if>
<if test="label != null and label != ''">label = #{label},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="width != null">width = #{width},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="scheme != null and scheme != ''">scheme = #{scheme},</if>
<if test="scope != null">scope = #{scope},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFlowableFieldDefById" parameterType="String">
delete from flowable_field_def where id = #{id}
</delete>
<delete id="deleteFlowableFieldDefByIds" parameterType="String">
delete from flowable_field_def where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -1,89 +0,0 @@
<?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="com.yanzhu.flowable.mapper.FlowableFieldRefMapper">
<resultMap type="FlowableFieldRef" id="FlowableFieldRefResult">
<result property="id" column="id" />
<result property="module" column="module" />
<result property="mkey" column="mkey" />
<result property="fieldId" column="field_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="version" column="version" />
</resultMap>
<sql id="selectFlowableFieldRefVo">
select id, module, mkey, field_id, create_by, create_time, update_by, update_time, version from flowable_field_ref
</sql>
<select id="selectFlowableFieldRefList" parameterType="FlowableFieldRef" resultMap="FlowableFieldRefResult">
<include refid="selectFlowableFieldRefVo"/>
<where>
<if test="module != null and module != ''"> and module = #{module}</if>
<if test="mkey != null and mkey != ''"> and mkey = #{mkey}</if>
<if test="fieldId != null and fieldId != ''"> and field_id = #{fieldId}</if>
<if test="version != null "> and version = #{version}</if>
</where>
</select>
<select id="selectFlowableFieldRefById" parameterType="String" resultMap="FlowableFieldRefResult">
<include refid="selectFlowableFieldRefVo"/>
where id = #{id}
</select>
<insert id="insertFlowableFieldRef" parameterType="FlowableFieldRef">
insert into flowable_field_ref
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="module != null and module != ''">module,</if>
<if test="mkey != null and mkey != ''">mkey,</if>
<if test="fieldId != null and fieldId != ''">field_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="version != null">version,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="module != null and module != ''">#{module},</if>
<if test="mkey != null and mkey != ''">#{mkey},</if>
<if test="fieldId != null and fieldId != ''">#{fieldId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="version != null">#{version},</if>
</trim>
</insert>
<update id="updateFlowableFieldRef" parameterType="FlowableFieldRef">
update flowable_field_ref
<trim prefix="SET" suffixOverrides=",">
<if test="module != null and module != ''">module = #{module},</if>
<if test="mkey != null and mkey != ''">mkey = #{mkey},</if>
<if test="fieldId != null and fieldId != ''">field_id = #{fieldId},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="version != null">version = #{version},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFlowableFieldRefById" parameterType="String">
delete from flowable_field_ref where id = #{id}
</delete>
<delete id="deleteFlowableFieldRefByIds" parameterType="String">
delete from flowable_field_ref where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -1,87 +0,0 @@
<?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="com.yanzhu.flowable.mapper.FlowableModelPageMapper">
<resultMap type="FlowableModelPage" id="FlowableModelPageResult">
<result property="id" column="id" />
<result property="module" column="module" />
<result property="mkey" column="mkey" />
<result property="name" column="name" />
<result property="pageScheme" column="page_scheme" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectFlowableModelPageVo">
select id, module, mkey, name, page_scheme, update_by, update_time, create_by, create_time from flowable_model_page
</sql>
<select id="selectFlowableModelPageList" parameterType="FlowableModelPage" resultMap="FlowableModelPageResult">
<include refid="selectFlowableModelPageVo"/>
<where>
<if test="module != null and module != ''"> and module = #{module}</if>
<if test="mkey != null and mkey != ''"> and mkey = #{mkey}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="pageScheme != null and pageScheme != ''"> and page_scheme = #{pageScheme}</if>
</where>
</select>
<select id="selectFlowableModelPageById" parameterType="String" resultMap="FlowableModelPageResult">
<include refid="selectFlowableModelPageVo"/>
where id = #{id}
</select>
<insert id="insertFlowableModelPage" parameterType="FlowableModelPage" useGeneratedKeys="true" keyProperty="id">
insert into flowable_model_page
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="module != null and module != ''">module,</if>
<if test="mkey != null and mkey != ''">mkey,</if>
<if test="name != null and name != ''">name,</if>
<if test="pageScheme != null and pageScheme != ''">page_scheme,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="module != null and module != ''">#{module},</if>
<if test="mkey != null and mkey != ''">#{mkey},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="pageScheme != null and pageScheme != ''">#{pageScheme},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateFlowableModelPage" parameterType="FlowableModelPage">
update flowable_model_page
<trim prefix="SET" suffixOverrides=",">
<if test="module != null and module != ''">module = #{module},</if>
<if test="mkey != null and mkey != ''">mkey = #{mkey},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="pageScheme != null and pageScheme != ''">page_scheme = #{pageScheme},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFlowableModelPageById" parameterType="String">
delete from flowable_model_page where id = #{id}
</delete>
<delete id="deleteFlowableModelPageByIds" parameterType="String">
delete from flowable_model_page where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,66 @@
<?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="com.yanzhu.flowable.mapper.SysDeployFormMapper">
<resultMap type="SysDeployForm" id="SysDeployFormResult">
<result property="id" column="id" />
<result property="formId" column="form_id" />
<result property="deployId" column="deploy_id" />
</resultMap>
<sql id="selectSysDeployFormVo">
select id, form_id, deploy_id from sys_deploy_form
</sql>
<select id="selectSysDeployFormList" parameterType="SysDeployForm" resultMap="SysDeployFormResult">
<include refid="selectSysDeployFormVo"/>
<where>
<if test="formId != null "> and form_id = #{formId}</if>
<if test="deployId != null and deployId != ''"> and deploy_id = #{deployId}</if>
</where>
</select>
<select id="selectSysDeployFormById" parameterType="Long" resultMap="SysDeployFormResult">
<include refid="selectSysDeployFormVo"/>
where id = #{id}
</select>
<select id="selectSysDeployFormByDeployId" resultType="SysForm">
select t1.form_content as formContent,t1.form_name as formName,t1.form_id as formId from sys_form t1 left join sys_deploy_form t2 on t1.form_id = t2.form_id
where t2.deploy_id = #{deployId} limit 1
</select>
<insert id="insertSysDeployForm" parameterType="SysDeployForm" useGeneratedKeys="true" keyProperty="id">
insert into sys_deploy_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formId != null">form_id,</if>
<if test="deployId != null">deploy_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formId != null">#{formId},</if>
<if test="deployId != null">#{deployId},</if>
</trim>
</insert>
<update id="updateSysDeployForm" parameterType="SysDeployForm">
update sys_deploy_form
<trim prefix="SET" suffixOverrides=",">
<if test="formId != null">form_id = #{formId},</if>
<if test="deployId != null">deploy_id = #{deployId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysDeployFormById" parameterType="Long">
delete from sys_deploy_form where id = #{id}
</delete>
<delete id="deleteSysDeployFormByIds" parameterType="String">
delete from sys_deploy_form where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -2,84 +2,89 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.flowable.mapper.FlowableCategoryMapper">
<resultMap type="FlowableCategory" id="FlowableCategoryResult">
<mapper namespace="com.yanzhu.flowable.mapper.SysExpressionMapper">
<resultMap type="SysExpression" id="SysExpressionResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="code" column="code" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="expression" column="expression" />
<result property="dataType" column="data_type" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="status" column="status" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectFlowableCategoryVo">
select id, name, code, remark, create_by, create_time, update_by, update_time, del_flag from flowable_category
<sql id="selectSysExpressionVo">
select id, name, expression,data_type, create_time, update_time, create_by, update_by, status, remark from sys_expression
</sql>
<select id="selectFlowableCategoryList" parameterType="FlowableCategory" resultMap="FlowableCategoryResult">
<include refid="selectFlowableCategoryVo"/>
<where>
<select id="selectSysExpressionList" parameterType="SysExpression" resultMap="SysExpressionResult">
<include refid="selectSysExpressionVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="expression != null and expression != ''"> and expression = #{expression}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectFlowableCategoryById" parameterType="Long" resultMap="FlowableCategoryResult">
<include refid="selectFlowableCategoryVo"/>
<select id="selectSysExpressionById" parameterType="Long" resultMap="SysExpressionResult">
<include refid="selectSysExpressionVo"/>
where id = #{id}
</select>
<insert id="insertFlowableCategory" parameterType="FlowableCategory" useGeneratedKeys="true" keyProperty="id">
insert into flowable_category
<insert id="insertSysExpression" parameterType="SysExpression" useGeneratedKeys="true" keyProperty="id">
insert into sys_expression
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="code != null">code,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="expression != null">expression,</if>
<if test="dataType != null">data_type,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="code != null">#{code},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="expression != null">#{expression},</if>
<if test="dataType != null">#{dataType},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateFlowableCategory" parameterType="FlowableCategory">
update flowable_category
<update id="updateSysExpression" parameterType="SysExpression">
update sys_expression
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="code != null">code = #{code},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="expression != null">expression = #{expression},</if>
<if test="dataType != null">data_type = #{dataType},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFlowableCategoryById" parameterType="Long">
delete from flowable_category where id = #{id}
<delete id="deleteSysExpressionById" parameterType="Long">
delete from sys_expression where id = #{id}
</delete>
<delete id="deleteFlowableCategoryByIds" parameterType="String">
delete from flowable_category where id in
<delete id="deleteSysExpressionByIds" parameterType="String">
delete from sys_expression where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -0,0 +1,82 @@
<?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="com.yanzhu.flowable.mapper.SysFormMapper">
<resultMap type="SysForm" id="SysFormResult">
<result property="formId" column="form_id" />
<result property="formName" column="form_name" />
<result property="formContent" column="form_content" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSysFormVo">
select form_id, form_name, form_content, create_time, update_time, create_by, update_by, remark from sys_form
</sql>
<select id="selectSysFormList" parameterType="SysForm" resultMap="SysFormResult">
<include refid="selectSysFormVo"/>
<where>
<if test="formName != null and formName != ''"> and form_name like concat('%', #{formName}, '%')</if>
<if test="formContent != null and formContent != ''"> and form_content = #{formContent}</if>
</where>
order by create_time desc
</select>
<select id="selectSysFormById" parameterType="Long" resultMap="SysFormResult">
<include refid="selectSysFormVo"/>
where form_id = #{formId}
</select>
<insert id="insertSysForm" parameterType="SysForm" useGeneratedKeys="true" keyProperty="formId">
insert into sys_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formName != null">form_name,</if>
<if test="formContent != null">form_content,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formName != null">#{formName},</if>
<if test="formContent != null">#{formContent},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysForm" parameterType="SysForm">
update sys_form
<trim prefix="SET" suffixOverrides=",">
<if test="formName != null">form_name = #{formName},</if>
<if test="formContent != null">form_content = #{formContent},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where form_id = #{formId}
</update>
<delete id="deleteSysFormById" parameterType="Long">
delete from sys_form where form_id = #{formId}
</delete>
<delete id="deleteSysFormByIds" parameterType="String">
delete from sys_form where form_id in
<foreach item="formId" collection="array" open="(" separator="," close=")">
#{formId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,115 @@
<?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="com.yanzhu.flowable.mapper.SysListenerMapper">
<resultMap type="SysListener" id="SysListenerResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="eventType" column="event_type"/>
<result property="valueType" column="value_type"/>
<result property="value" column="value"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="status" column="status"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSysListenerVo">
select id,
name,
type,
event_type,
value_type,
value,
create_time,
update_time,
create_by,
update_by,
status,
remark
from sys_listener
</sql>
<select id="selectSysListenerList" parameterType="SysListener" resultMap="SysListenerResult">
<include refid="selectSysListenerVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="eventType != null and eventType != ''">and event_type = #{eventType}</if>
<if test="valueType != null and valueType != ''">and value_type = #{valueType}</if>
<if test="value != null and value != ''">and value = #{value}</if>
<if test="status != null ">and status = #{status}</if>
</where>
</select>
<select id="selectSysListenerById" parameterType="Long" resultMap="SysListenerResult">
<include refid="selectSysListenerVo"/>
where id = #{id}
</select>
<insert id="insertSysListener" parameterType="SysListener" useGeneratedKeys="true" keyProperty="id">
insert into sys_listener
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="type != null">type,</if>
<if test="eventType != null">event_type,</if>
<if test="valueType != null">value_type,</if>
<if test="value != null">value,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="type != null">#{type},</if>
<if test="eventType != null">#{eventType},</if>
<if test="valueType != null">#{valueType},</if>
<if test="value != null">#{value},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysListener" parameterType="SysListener">
update sys_listener
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="valueType != null">value_type = #{valueType},</if>
<if test="value != null">value = #{value},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysListenerById" parameterType="Long">
delete
from sys_listener
where id = #{id}
</delete>
<delete id="deleteSysListenerByIds" parameterType="String">
delete from sys_listener where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,61 @@
<?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="com.yanzhu.flowable.mapper.SysTaskFormMapper">
<resultMap type="SysTaskForm" id="SysTaskFormResult">
<result property="id" column="id" />
<result property="formId" column="form_id" />
<result property="taskId" column="task_id" />
</resultMap>
<sql id="selectSysTaskFormVo">
select id, form_id, task_id from sys_task_form
</sql>
<select id="selectSysTaskFormList" parameterType="SysTaskForm" resultMap="SysTaskFormResult">
<include refid="selectSysTaskFormVo"/>
<where>
<if test="formId != null "> and form_id = #{formId}</if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
</where>
</select>
<select id="selectSysTaskFormById" parameterType="Long" resultMap="SysTaskFormResult">
<include refid="selectSysTaskFormVo"/>
where id = #{id}
</select>
<insert id="insertSysTaskForm" parameterType="SysTaskForm" useGeneratedKeys="true" keyProperty="id">
insert into sys_task_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formId != null">form_id,</if>
<if test="taskId != null">task_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formId != null">#{formId},</if>
<if test="taskId != null">#{taskId},</if>
</trim>
</insert>
<update id="updateSysTaskForm" parameterType="SysTaskForm">
update sys_task_form
<trim prefix="SET" suffixOverrides=",">
<if test="formId != null">form_id = #{formId},</if>
<if test="taskId != null">task_id = #{taskId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysTaskFormById" parameterType="Long">
delete from sys_task_form where id = #{id}
</delete>
<delete id="deleteSysTaskFormByIds" parameterType="String">
delete from sys_task_form where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -13,6 +13,7 @@
<artifactId>yanzhu-modules-flowable</artifactId>
<properties>
<flowable.version>6.7.2</flowable.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
@ -105,14 +106,16 @@
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
<exclusions>
<exclusion>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-security</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

View File

@ -8,8 +8,6 @@ package com.yanzhu.flowable.common.constant;
*/
public class ProcessConstants {
public static final String SUFFIX = ".bpmn";
/**
*
*/
@ -25,13 +23,11 @@ public class ProcessConstants {
*/
public static final String ASSIGNEE = "assignee";
/**
*
*/
public static final String CANDIDATE_USERS = "candidateUsers";
/**
*
*/
@ -72,11 +68,9 @@ public class ProcessConstants {
*/
public static final String PROCESS_INITIATOR = "INITIATOR";
/**
*
*/
public static final String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
}

View File

@ -1,29 +0,0 @@
package com.yanzhu.flowable.common.enums;
/**
* key
*/
public enum CacheType {
FLOWCATEGORY("flowcategory","流程分类");
public String getCode() {
return code;
}
public String getRemark() {
return remark;
}
/**
*
*/
private String code;
/**
*
*/
private String remark;
CacheType(String code,String remark){
this.code = code;
this.remark = remark;
}
}

View File

@ -16,8 +16,8 @@ public enum FlowComment {
REJECT("3", "驳回意见"),
DELEGATE("4", "委派意见"),
ASSIGN("5", "转办意见"),
STOP("6", "终止流程"),
REVOKE("7", "撤回流程");
STOP("6", "终止流程");
/**
*
*/

View File

@ -1,33 +0,0 @@
package com.yanzhu.flowable.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author ruoyi
* @createTime 2023/11/28
*/
@Getter
@AllArgsConstructor
public enum FormType {
/**
*
*/
PROCESS(0),
/**
*
*/
EXTERNAL(1),
/**
*
*/
INDEPENDENT(2);
/**
*
*/
private final Integer type;
}

View File

@ -0,0 +1,12 @@
package com.yanzhu.flowable.common.expand.el;
/**
*
*
* @author Tony
* @date 2023-03-04 09:10
*/
public interface BaseEl {
}

View File

@ -0,0 +1,26 @@
package com.yanzhu.flowable.common.expand.el;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
*
*
* @author Tony
* @date 2023-03-04 12:10
*/
@Component
@Slf4j
public class FlowEl implements BaseEl {
public String findDeptLeader(String name) {
log.info("开始查询表达式变量值,getName");
return name;
}
public String getName(String name) {
log.info("开始查询表达式变量值,getName");
return name;
}
}

View File

@ -0,0 +1,26 @@
package com.yanzhu.flowable.common.expand.function;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.variable.VariableContainer;
import org.flowable.common.engine.impl.el.function.AbstractFlowableVariableExpressionFunction;
/**
* java
*
* @author Tony
* @date 2023-03-04 09:10
*/
@Slf4j
public class ExpressionLanguageJavaFunction extends AbstractFlowableVariableExpressionFunction{
public ExpressionLanguageJavaFunction() {
super("test");
}
public static String test(VariableContainer variableContainer, String variableName) {
log.info("开始查询表达式变量值,test");
Object variableValue = getVariableValue(variableContainer, variableName);
return variableValue.toString();
}
}

View File

@ -1,32 +1,32 @@
//package com.yanzhu.flowable.config;
//
//import org.flowable.engine.impl.db.DbIdGenerator;
//import org.flowable.spring.SpringProcessEngineConfiguration;
//import org.flowable.spring.boot.EngineConfigurationConfigurer;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.task.AsyncListenableTaskExecutor;
//import org.springframework.core.task.SimpleAsyncTaskExecutor;
//
///**
// * 流程id生成处理
// * @author Tony
// * @date 2022-12-26 10:24
// */
////@Configuration
//public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
//
// @Bean
// public AsyncListenableTaskExecutor applicationTaskExecutor() {
// return new SimpleAsyncTaskExecutor();
// }
//
// @Override
// public void configure(SpringProcessEngineConfiguration engineConfiguration) {
// engineConfiguration.setActivityFontName("宋体");
// engineConfiguration.setLabelFontName("宋体");
// engineConfiguration.setAnnotationFontName("宋体");
// engineConfiguration.setIdGenerator(new DbIdGenerator());
// }
//
//}
package com.yanzhu.flowable.config;
import org.flowable.engine.impl.db.DbIdGenerator;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.AsyncListenableTaskExecutor;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
/**
* id
* @author Tony
* @date 2022-12-26 10:24
*/
@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
@Bean
public AsyncListenableTaskExecutor applicationTaskExecutor() {
return new SimpleAsyncTaskExecutor();
}
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
engineConfiguration.setActivityFontName("宋体");
engineConfiguration.setLabelFontName("宋体");
engineConfiguration.setAnnotationFontName("宋体");
engineConfiguration.setIdGenerator(new DbIdGenerator());
}
}

View File

@ -1,63 +0,0 @@
package com.yanzhu.flowable.config;
import lombok.Data;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
/**
* @author ruoyi
* @date 2023/11/28
*/
@Data
@Configuration
public class FlowableEngineConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
/**
* jdbc
*/
@Value("${spring.datasource.driver-class-name}")
private String jdbcDriver;
/**
* jdbc url
*/
@Value("${spring.datasource.url}")
private String jdbcUrl;
/**
* jdbc
*/
@Value("${spring.datasource.username}")
private String jdbcUsername;
/**
* jdbc
*/
@Value("${spring.datasource.password}")
private String jdbcPassword;
/**
*
* falseDB
* true
* create-drop
*/
@Value("${spring.datasource.databaseSchemaUpdate}")
private String databaseSchemaUpdate;
/**
* Flowable
*/
@Value("${spring.datasource.asyncExecutorActivate}")
private boolean asyncExecutorActivate;
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
engineConfiguration.setActivityFontName("宋体");
engineConfiguration.setLabelFontName("宋体");
engineConfiguration.setAnnotationFontName("宋体");
engineConfiguration.setJdbcDriver(this.jdbcDriver);
engineConfiguration.setJdbcUrl(this.jdbcUrl);
engineConfiguration.setJdbcUsername(this.jdbcUsername);
engineConfiguration.setJdbcPassword(this.jdbcPassword);
engineConfiguration.setDatabaseSchemaUpdate(this.databaseSchemaUpdate);
engineConfiguration.setAsyncExecutorActivate(this.asyncExecutorActivate);
}
}

View File

@ -1,41 +1,41 @@
//package com.yanzhu.flowable.config;
//
//import com.yanzhu.flowable.listener.GlobalEventListener;
//import lombok.RequiredArgsConstructor;
//import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
//import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
//import org.flowable.spring.SpringProcessEngineConfiguration;
//import org.springframework.context.ApplicationListener;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.event.ContextRefreshedEvent;
//
///**
// * Flowable添加全局监听器
// *
// * @author JiangYuQi
// */
////@Configuration
//@RequiredArgsConstructor
//public class FlowableGlobalListenerConfig implements ApplicationListener<ContextRefreshedEvent> {
//
// private final SpringProcessEngineConfiguration configuration;
//
// private final GlobalEventListener globalEventListener;
//
// @Override
// public void onApplicationEvent(ContextRefreshedEvent event) {
// FlowableEventDispatcher dispatcher = configuration.getEventDispatcher();
// /**
// * 任务创建全局监听-待办消息发送
// * PROCESS_CREATED 流程创建
// * TASK_CREATED 任务创建
// * TASK_COMPLETED 任务完成
// * PROCESS_COMPLETED 流程完成
// * 流程创建、任务创建、任务完成、流程完成
// */
// dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.TASK_CREATED);
// dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.PROCESS_COMPLETED);
// }
//
//}
//
package com.yanzhu.flowable.config;
import com.yanzhu.flowable.listener.GlobalEventListener;
import lombok.RequiredArgsConstructor;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;
/**
* Flowable
*
* @author JiangYuQi
*/
@Configuration
@RequiredArgsConstructor
public class FlowableGlobalListenerConfig implements ApplicationListener<ContextRefreshedEvent> {
private final SpringProcessEngineConfiguration configuration;
private final GlobalEventListener globalEventListener;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
FlowableEventDispatcher dispatcher = configuration.getEventDispatcher();
/**
* -
* PROCESS_CREATED
* TASK_CREATED
* TASK_COMPLETED
* PROCESS_COMPLETED
*
*/
dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.TASK_CREATED);
dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.PROCESS_COMPLETED);
}
}

View File

@ -0,0 +1,210 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.flowable.domain.SysExpression;
import com.yanzhu.flowable.domain.dto.FlowProcDefDto;
import com.yanzhu.flowable.domain.dto.FlowSaveXmlVo;
import com.yanzhu.flowable.rpc.RemoteSystemService;
import com.yanzhu.flowable.service.IFlowDefinitionService;
import com.yanzhu.flowable.service.ISysExpressionService;
import com.yanzhu.system.api.domain.SysRole;
import com.yanzhu.system.api.domain.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author Tony
* @date 2021-04-03
*/
@Slf4j
@Api(tags = "流程定义")
@RestController
@RequestMapping("/definition")
public class FlowDefinitionController extends BaseController {
@Autowired
private IFlowDefinitionService flowDefinitionService;
@Autowired
private RemoteSystemService remoteSystemService;
@Resource
private ISysExpressionService sysExpressionService;
@GetMapping(value = "/list")
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
public TableDataInfo list(@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
startPage();
List<FlowProcDefDto> list = flowDefinitionService.list(name);
return getDataTable(list);
}
@ApiOperation(value = "导入流程文件", notes = "上传bpmn20的xml文件")
@PostMapping("/import")
public AjaxResult importFile(@RequestParam(required = false) String name,
@RequestParam(required = false) String category,
MultipartFile file) {
InputStream in = null;
try {
in = file.getInputStream();
flowDefinitionService.importFile(name, category, in);
} catch (Exception e) {
log.error("导入失败:", e);
return AjaxResult.success(e.getMessage());
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
log.error("关闭输入流出错", e);
}
}
return AjaxResult.success("导入成功");
}
@ApiOperation(value = "读取xml文件")
@GetMapping("/readXml/{deployId}")
public AjaxResult readXml(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId) {
try {
return flowDefinitionService.readXml(deployId);
} catch (Exception e) {
return AjaxResult.error("加载xml文件异常");
}
}
@ApiOperation(value = "读取图片文件")
@GetMapping("/readImage/{deployId}")
public void readImage(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId, HttpServletResponse response) {
OutputStream os = null;
BufferedImage image = null;
try {
image = ImageIO.read(flowDefinitionService.readImage(deployId));
response.setContentType("image/png");
os = response.getOutputStream();
if (image != null) {
ImageIO.write(image, "png", os);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (os != null) {
os.flush();
os.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
@ApiOperation(value = "保存流程设计器内的xml文件")
@Log(title = "流程定义", businessType = BusinessType.INSERT)
@PostMapping("/save")
public AjaxResult save(@RequestBody FlowSaveXmlVo vo) {
InputStream in = null;
try {
String xml = vo.getXml();
//将xml数据进行base64解码
xml = StringUtils.utf8Str(xml);
//in = new ByteArrayInputStream(vo.getXml().getBytes(StandardCharsets.UTF_8));
in = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8));
flowDefinitionService.importFile(vo.getName(), vo.getCategory(), in);
} catch (Exception e) {
log.error("导入失败:", e);
return AjaxResult.error(e.getMessage());
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
log.error("关闭输入流出错", e);
}
}
return AjaxResult.success("导入成功");
}
@ApiOperation(value = "发起流程")
@Log(title = "发起流程", businessType = BusinessType.INSERT)
@PostMapping("/start/{procDefId}")
public AjaxResult start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
return flowDefinitionService.startProcessInstanceById(procDefId, variables);
}
@ApiOperation(value = "激活或挂起流程定义")
@Log(title = "激活/挂起流程", businessType = BusinessType.UPDATE)
@PutMapping(value = "/updateState")
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
@ApiParam(value = "流程部署ID", required = true) @RequestParam String deployId) {
flowDefinitionService.updateState(state, deployId);
return AjaxResult.success();
}
@ApiOperation(value = "删除流程")
@Log(title = "删除流程", businessType = BusinessType.DELETE)
@DeleteMapping(value = "/{deployIds}")
public AjaxResult delete(@PathVariable String[] deployIds) {
for (String deployId : deployIds) {
flowDefinitionService.delete(deployId);
}
return AjaxResult.success();
}
@ApiOperation(value = "指定流程办理人员列表")
@GetMapping("/userList")
public AjaxResult userList(SysUser user) {
List<SysUser> list = remoteSystemService.getUsers(user);
return AjaxResult.success(list);
}
@ApiOperation(value = "指定流程办理组列表")
@GetMapping("/roleList")
public AjaxResult roleList(SysRole role) {
List<SysRole> list = remoteSystemService.getRoles(role);
return AjaxResult.success(list);
}
@ApiOperation(value = "指定流程达式列表")
@GetMapping("/expList")
public AjaxResult expList(SysExpression sysExpression) {
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
return AjaxResult.success(list);
}
}

View File

@ -0,0 +1,66 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.flowable.domain.vo.FlowTaskVo;
import com.yanzhu.flowable.service.IFlowInstanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Slf4j
@Api(tags = "工作流流程实例管理")
@RestController
@RequestMapping("/instance")
public class FlowInstanceController extends BaseController {
@Autowired
private IFlowInstanceService flowInstanceService;
@ApiOperation(value = "根据流程定义id启动流程实例")
@PostMapping("/startBy/{procDefId}")
public AjaxResult startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
return flowInstanceService.startProcessInstanceById(procDefId, variables);
}
@ApiOperation(value = "激活或挂起流程实例")
@PostMapping(value = "/updateState")
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
flowInstanceService.updateState(state,instanceId);
return AjaxResult.success();
}
@ApiOperation("结束流程实例")
@PostMapping(value = "/stopProcessInstance")
public AjaxResult stopProcessInstance(@RequestBody FlowTaskVo flowTaskVo) {
flowInstanceService.stopProcessInstance(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "删除流程实例")
@Log(title = "删除任务", businessType = BusinessType.DELETE)
@DeleteMapping(value = "/delete/{instanceIds}")
public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds,
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
for (String instanceId : instanceIds) {
flowInstanceService.delete(instanceId,deleteReason);
}
return AjaxResult.success();
}
}

View File

@ -0,0 +1,281 @@
package com.yanzhu.flowable.controller;
import com.github.pagehelper.PageInfo;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.flowable.domain.dto.FlowTaskDto;
import com.yanzhu.flowable.domain.vo.FlowQueryVo;
import com.yanzhu.flowable.domain.vo.FlowTaskVo;
import com.yanzhu.flowable.service.IFlowTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Slf4j
@Api(tags = "工作流流程任务管理")
@RestController
@RequestMapping("/task")
public class FlowTaskController extends BaseController {
@Autowired
private IFlowTaskService flowTaskService;
@ApiOperation(value = "我发起的流程", response = FlowTaskDto.class)
@GetMapping(value = "/myProcess")
public TableDataInfo myProcess(FlowQueryVo queryVo) {
PageInfo<FlowTaskDto> list = flowTaskService.myProcess(queryVo);
return getDataTable(list);
}
@ApiOperation(value = "取消申请", response = FlowTaskDto.class)
@Log(title = "取消申请", businessType = BusinessType.UPDATE)
@PostMapping(value = "/stopProcess")
public AjaxResult stopProcess(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.stopProcess(flowTaskVo);
}
@ApiOperation(value = "撤回流程", response = FlowTaskDto.class)
@Log(title = "撤回流程", businessType = BusinessType.UPDATE)
@PostMapping(value = "/revokeProcess")
public AjaxResult revokeProcess(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.revokeProcess(flowTaskVo);
}
@ApiOperation(value = "获取待办列表", response = FlowTaskDto.class)
@GetMapping(value = "/todoList")
public TableDataInfo todoList(FlowQueryVo queryVo) {
PageInfo<FlowTaskDto> list = flowTaskService.todoList(queryVo);
return getDataTable(list);
}
@ApiOperation(value = "获取已办任务", response = FlowTaskDto.class)
@GetMapping(value = "/finishedList")
public TableDataInfo finishedList(FlowQueryVo queryVo) {
PageInfo<FlowTaskDto> list = flowTaskService.finishedList(queryVo);
return getDataTable(list);
}
@ApiOperation(value = "流程历史流转记录", response = FlowTaskDto.class)
@GetMapping(value = "/flowRecord")
public AjaxResult flowRecord(String procInsId, String deployId) {
return flowTaskService.flowRecord(procInsId, deployId);
}
@ApiOperation(value = "根据任务ID查询挂载的表单信息")
@GetMapping(value = "/getTaskForm")
public AjaxResult getTaskForm(String taskId) {
return flowTaskService.getTaskForm(taskId);
}
@ApiOperation(value = "流程初始化表单", response = FlowTaskDto.class)
@GetMapping(value = "/flowFormData")
public AjaxResult flowFormData(String deployId) {
return flowTaskService.flowFormData(deployId);
}
@ApiOperation(value = "获取流程变量", response = FlowTaskDto.class)
@GetMapping(value = "/processVariables/{taskId}")
public AjaxResult processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
return flowTaskService.processVariables(taskId);
}
@ApiOperation(value = "审批任务")
@Log(title = "审批任务", businessType = BusinessType.UPDATE)
@PostMapping(value = "/complete")
public AjaxResult complete(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.complete(flowTaskVo);
}
@ApiOperation(value = "驳回任务")
@Log(title = "驳回任务", businessType = BusinessType.UPDATE)
@PostMapping(value = "/reject")
public AjaxResult taskReject(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.taskReject(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "退回任务")
@Log(title = "退回任务", businessType = BusinessType.UPDATE)
@PostMapping(value = "/return")
public AjaxResult taskReturn(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.taskReturn(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "获取所有可回退的节点")
@PostMapping(value = "/returnList")
public AjaxResult findReturnTaskList(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.findReturnTaskList(flowTaskVo);
}
@ApiOperation(value = "删除任务")
@Log(title = "删除任务", businessType = BusinessType.DELETE)
@DeleteMapping(value = "/delete")
public AjaxResult delete(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.deleteTask(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "认领/签收任务")
@PostMapping(value = "/claim")
public AjaxResult claim(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.claim(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "取消认领/签收任务")
@PostMapping(value = "/unClaim")
public AjaxResult unClaim(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.unClaim(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "委派任务")
@PostMapping(value = "/delegateTask")
public AjaxResult delegate(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.delegateTask(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "任务归还")
@PostMapping(value = "/resolveTask")
public AjaxResult resolveTask(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.resolveTask(flowTaskVo);
return AjaxResult.success();
}
@ApiOperation(value = "转办任务")
@PostMapping(value = "/assignTask")
public AjaxResult assign(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.assignTask(flowTaskVo);
return AjaxResult.success();
}
@PostMapping(value = "/addMultiInstanceExecution")
@ApiOperation(value = "多实例加签")
public AjaxResult addMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.addMultiInstanceExecution(flowTaskVo);
return AjaxResult.success("加签成功");
}
@PostMapping(value = "/deleteMultiInstanceExecution")
@ApiOperation(value = "多实例减签")
public AjaxResult deleteMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.deleteMultiInstanceExecution(flowTaskVo);
return AjaxResult.success("减签成功");
}
@ApiOperation(value = "获取下一节点")
@PostMapping(value = "/nextFlowNode")
public AjaxResult getNextFlowNode(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.getNextFlowNode(flowTaskVo);
}
@ApiOperation(value = "流程发起时获取下一节点")
@PostMapping(value = "/nextFlowNodeByStart")
public AjaxResult getNextFlowNodeByStart(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.getNextFlowNodeByStart(flowTaskVo);
}
/**
*
*
* @param processId ID
*/
@GetMapping("/diagram/{processId}")
public void genProcessDiagram(HttpServletResponse response,
@PathVariable("processId") String processId) {
InputStream inputStream = flowTaskService.diagram(processId);
OutputStream os = null;
BufferedImage image = null;
try {
image = ImageIO.read(inputStream);
response.setContentType("image/png");
os = response.getOutputStream();
if (image != null) {
ImageIO.write(image, "png", os);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (os != null) {
os.flush();
os.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
*
*
* @param procInsId
* @param procInsId
*/
@GetMapping("/flowViewer/{procInsId}/{executionId}")
public AjaxResult getFlowViewer(@PathVariable("procInsId") String procInsId,
@PathVariable("executionId") String executionId) {
return flowTaskService.getFlowViewer(procInsId, executionId);
}
/**
*
*
* @param procInsId id
* @return
*/
@GetMapping("/flowXmlAndNode")
public AjaxResult flowXmlAndNode(@RequestParam(value = "procInsId", required = false) String procInsId,
@RequestParam(value = "deployId", required = false) String deployId) {
return flowTaskService.flowXmlAndNode(procInsId, deployId);
}
/**
*
*
* @param taskId
* @return
*/
@GetMapping("/flowTaskForm")
public AjaxResult flowTaskForm(@RequestParam(value = "taskId", required = false) String taskId) throws Exception {
return flowTaskService.flowTaskForm(taskId);
}
/**
*
*
* @param procInsId
* @param elementId
* @return
*/
@GetMapping("/flowTaskInfo")
public AjaxResult flowTaskInfo(@RequestParam(value = "procInsId") String procInsId,
@RequestParam(value = "elementId") String elementId) {
return flowTaskService.flowTaskInfo(procInsId, elementId);
}
}

View File

@ -1,98 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableCategory;
import com.yanzhu.flowable.service.IFlowableCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-11-27
*/
@RestController
@RequestMapping("/category")
public class FlowableCategoryController extends BaseController
{
@Autowired
private IFlowableCategoryService flowableCategoryService;
/**
*
*/
@RequiresPermissions("flow:flow_classify:list")
@GetMapping("/list")
public TableDataInfo list(FlowableCategory flowableCategory)
{
startPage();
List<FlowableCategory> list = flowableCategoryService.selectFlowableCategoryList(flowableCategory);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flow:flow_classify:export")
@Log(title = "流程分类", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FlowableCategory flowableCategory)
{
List<FlowableCategory> list = flowableCategoryService.selectFlowableCategoryList(flowableCategory);
ExcelUtil<FlowableCategory> util = new ExcelUtil<FlowableCategory>(FlowableCategory.class);
util.exportExcel(response, list, "流程分类数据");
}
/**
*
*/
@RequiresPermissions("flow:flow_classify:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(flowableCategoryService.selectFlowableCategoryById(id));
}
/**
*
*/
@RequiresPermissions("flow:flow_classify:add")
@Log(title = "流程分类", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FlowableCategory flowableCategory)
{
return toAjax(flowableCategoryService.insertFlowableCategory(flowableCategory));
}
/**
*
*/
@RequiresPermissions("flow:flow_classify:update")
@Log(title = "流程分类", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FlowableCategory flowableCategory)
{
return toAjax(flowableCategoryService.updateFlowableCategory(flowableCategory));
}
/**
*
*/
@RequiresPermissions("flow:flow_classify:delete")
@Log(title = "流程分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(flowableCategoryService.deleteFlowableCategoryByIds(ids));
}
}

View File

@ -1,97 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableDeploy;
import com.yanzhu.flowable.service.IFlowableDeployService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-12-18
*/
@RestController
@RequestMapping("/deploy")
public class FlowableDeployController extends BaseController
{
@Autowired
private IFlowableDeployService flowableDeployService;
/**
*
*/
@RequiresPermissions("flowable:deploy:list")
@GetMapping("/list")
public TableDataInfo list(FlowableDeploy flowableDeploy)
{
startPage();
List<FlowableDeploy> list = flowableDeployService.selectFlowableDeployList(flowableDeploy);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flowable:deploy:query")
@GetMapping(value = "/{definitionId}")
public AjaxResult getInfo(@PathVariable("definitionId") String definitionId)
{
return success(flowableDeployService.selectFlowableDeployByDefinitionId(definitionId));
}
/**
*
*/
@RequiresPermissions("flowable:deploy:remove")
@Log(title = "流程部署", businessType = BusinessType.DELETE)
@DeleteMapping("/{definitionIds}")
public AjaxResult remove(@PathVariable String[] definitionIds)
{
return toAjax(flowableDeployService.deleteFlowableDeployByDefinitionIds(definitionIds));
}
/**
*
*/
@RequiresPermissions("flowable:deploy:publishList")
@GetMapping("/publishList")
public TableDataInfo publishList(@RequestParam String processKey) {
startPage();
List<FlowableDeploy> list = flowableDeployService.queryPublishList(processKey);
return getDataTable(list);
}
/**
*
*
* @param state active: suspended:
* @param definitionId ID
*/
@RequiresPermissions("flowable:deploy:state")
@PutMapping(value = "/changeState")
public AjaxResult changeState(@RequestParam String state, @RequestParam String definitionId) {
flowableDeployService.updateState(definitionId,state);
return success();
}
/**
* xml
* @param definitionId ID
* @return
*/
@RequiresPermissions("flowable:deploy:bpmnXml")
@GetMapping("/bpmnXml/{definitionId}")
public AjaxResult getBpmnXml(@PathVariable(value = "definitionId") String definitionId) {
return AjaxResult.success("查询成功", flowableDeployService.queryBpmnXmlById(definitionId));
}
}

View File

@ -1,109 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableFieldDef;
import com.yanzhu.flowable.service.IFlowableFieldDefService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-12-26
*/
@RestController
@RequestMapping("/def")
public class FlowableFieldDefController extends BaseController
{
@Autowired
private IFlowableFieldDefService flowableFieldDefService;
/**
*
*/
@RequiresPermissions("flowable:def:list")
@GetMapping("/list")
public TableDataInfo list(FlowableFieldDef flowableFieldDef)
{
startPage();
List<FlowableFieldDef> list = flowableFieldDefService.selectFlowableFieldDefList(flowableFieldDef);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flowable:def:export")
@Log(title = "流程字段定义", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FlowableFieldDef flowableFieldDef)
{
List<FlowableFieldDef> list = flowableFieldDefService.selectFlowableFieldDefList(flowableFieldDef);
ExcelUtil<FlowableFieldDef> util = new ExcelUtil<FlowableFieldDef>(FlowableFieldDef.class);
util.exportExcel(response, list, "流程字段定义数据");
}
/**
*
*/
@RequiresPermissions("flowable:def:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(flowableFieldDefService.selectFlowableFieldDefById(id));
}
/**
*
*/
@RequiresPermissions("flowable:def:add")
@Log(title = "流程字段定义", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FlowableFieldDef flowableFieldDef)
{
return toAjax(flowableFieldDefService.insertFlowableFieldDef(flowableFieldDef));
}
/**
*
*/
@RequiresPermissions("flowable:def:edit")
@Log(title = "流程字段定义", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FlowableFieldDef flowableFieldDef)
{
return toAjax(flowableFieldDefService.updateFlowableFieldDef(flowableFieldDef));
}
/**
*
*/
@RequiresPermissions("flowable:def:remove")
@Log(title = "流程字段定义", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(flowableFieldDefService.deleteFlowableFieldDefByIds(ids));
}
/**
* ()
*/
@RequiresPermissions("flowable:def:listAll")
@GetMapping("/listAll")
public AjaxResult listAll(FlowableFieldDef flowableFieldDef)
{
List<FlowableFieldDef> list = flowableFieldDefService.selectFlowableFieldDefList(flowableFieldDef);
return success(list);
}
}

View File

@ -1,113 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableFieldDef;
import com.yanzhu.flowable.domain.FlowableFieldRef;
import com.yanzhu.flowable.domain.FlowableFieldSearch;
import com.yanzhu.flowable.service.IFlowableFieldDefService;
import com.yanzhu.flowable.service.IFlowableFieldRefService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-12-26
*/
@RestController
@RequestMapping("/ref")
public class FlowableFieldRefController extends BaseController
{
@Autowired
private IFlowableFieldRefService flowableFieldRefService;
@Autowired
private IFlowableFieldDefService flowableFieldDefService;
/**
*
*/
@RequiresPermissions("flowable:ref:list")
@GetMapping("/list")
public TableDataInfo list(FlowableFieldRef flowableFieldRef)
{
startPage();
List<FlowableFieldRef> list = flowableFieldRefService.selectFlowableFieldRefList(flowableFieldRef);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flowable:ref:export")
@Log(title = "流程字段引用关系", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FlowableFieldRef flowableFieldRef)
{
List<FlowableFieldRef> list = flowableFieldRefService.selectFlowableFieldRefList(flowableFieldRef);
ExcelUtil<FlowableFieldRef> util = new ExcelUtil<FlowableFieldRef>(FlowableFieldRef.class);
util.exportExcel(response, list, "流程字段引用关系数据");
}
/**
*
*/
@RequiresPermissions("flowable:ref:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(flowableFieldRefService.selectFlowableFieldRefById(id));
}
/**
*
*/
@RequiresPermissions("flowable:ref:add")
@Log(title = "流程字段引用关系", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FlowableFieldRef flowableFieldRef)
{
return toAjax(flowableFieldRefService.insertFlowableFieldRef(flowableFieldRef));
}
/**
*
*/
@RequiresPermissions("flowable:ref:edit")
@Log(title = "流程字段引用关系", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FlowableFieldRef flowableFieldRef)
{
return toAjax(flowableFieldRefService.updateFlowableFieldRef(flowableFieldRef));
}
/**
*
*/
@RequiresPermissions("flowable:ref:remove")
@Log(title = "流程字段引用关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(flowableFieldRefService.deleteFlowableFieldRefByIds(ids));
}
/**
* (,)
*/
@RequiresPermissions("flowable:ref:listCombination")
@GetMapping("/listCombination")
public AjaxResult listCombination(FlowableFieldSearch flowableFieldSearch)
{
List<FlowableFieldDef> list = flowableFieldDefService.listCombination(flowableFieldSearch);
return success(list);
}
}

View File

@ -1,172 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableModel;
import com.yanzhu.flowable.domain.bo.FlowableModelBo;
import com.yanzhu.flowable.service.IFlowableModelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
import java.io.UnsupportedEncodingException;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-11-28
*/
@RestController
@RequestMapping("/model")
@Slf4j
public class FlowableModelController extends BaseController
{
@Autowired
private IFlowableModelService flowableModelService;
/**
*
*/
@RequiresPermissions("flow:flow_model:list")
@GetMapping("/list")
public TableDataInfo list(FlowableModelBo flowableModelBo)
{
startPage();
List<FlowableModel> list = flowableModelService.selectFlowableModelList(flowableModelBo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flow:flow_model:export")
@Log(title = "流程模型", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FlowableModelBo flowableModel)
{
List<FlowableModel> list = flowableModelService.selectFlowableModelList(flowableModel);
ExcelUtil<FlowableModel> util = new ExcelUtil<FlowableModel>(FlowableModel.class);
util.exportExcel(response, list, "流程模型数据");
}
/**
*
*/
@RequiresPermissions("flow:flow_model:query")
@GetMapping(value = "/{modelId}")
public AjaxResult getInfo(@PathVariable("modelId") String modelId)
{
return success(flowableModelService.selectFlowableModelByModelId(modelId));
}
/**
*
*/
@RequiresPermissions("flow:flow_model:add")
@Log(title = "流程模型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FlowableModel flowableModel)
{
return toAjax(flowableModelService.insertFlowableModel(flowableModel));
}
/**
*
*/
@RequiresPermissions("flow:flow_model:update")
@Log(title = "流程模型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FlowableModel flowableModel)
{
return toAjax(flowableModelService.updateFlowableModel(flowableModel));
}
/**
*
*/
@RequiresPermissions("flow:flow_model:delete")
@Log(title = "流程模型", businessType = BusinessType.DELETE)
@DeleteMapping("/{modelIds}")
public AjaxResult remove(@PathVariable String[] modelIds)
{
return toAjax(flowableModelService.deleteFlowableModelByModelIds(modelIds));
}
/**
*
*
* @param modelId
*/
@RequiresPermissions("flow:flow_model:deploy")
@Log(title = "部署流程模型", businessType = BusinessType.OTHER)
@PostMapping("/deploy")
public AjaxResult deployModel(@RequestParam String modelId) {
try {
flowableModelService.deployModel(modelId);
} catch (UnsupportedEncodingException e) {
log.error("部署失败!",e);
}
return success();
}
/**
*
*
* @param modelId id
*/
@RequiresPermissions("flow:flow_model:queryXml")
@GetMapping(value = "/getBpmnXml/{modelId}")
public AjaxResult getBpmnXml(@NotNull(message = "主键不能为空") @PathVariable("modelId") String modelId) {
try {
return AjaxResult.success("查询成功",flowableModelService.queryBpmnXmlById(modelId));
} catch (UnsupportedEncodingException e) {
log.error("获取模型xml失败!模型id:"+modelId,e);
return AjaxResult.error("获取模型xml失败!");
}
}
/**
*
*
* @param modelBo
*/
@RequiresPermissions("flow:flow_model:historyList")
@GetMapping("/historyList")
public TableDataInfo historyList(FlowableModelBo modelBo) {
startPage();
List<FlowableModel> list = flowableModelService.historyList(modelBo);
return getDataTable(list);
}
/**
* ()
*/
@RequiresPermissions("flow:flow_model::save")
@PostMapping("/save")
public AjaxResult save(@RequestBody FlowableModelBo modelBo) {
flowableModelService.saveModel(modelBo);
return success();
}
/**
*
* @param modelId
* @return
*/
@RequiresPermissions("flow:flow_model:lastest")
@PostMapping("/latest/")
public AjaxResult latest(@RequestParam String modelId) {
try {
flowableModelService.latestModel(modelId);
return success();
} catch (UnsupportedEncodingException e) {
log.error("设置最新版本失败!",e);
return error("设置最新版本失败!");
}
}
}

View File

@ -1,152 +0,0 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.FlowableModelPage;
import com.yanzhu.flowable.service.IFlowableModelPageService;
import io.jsonwebtoken.lang.Collections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2023-12-25
*/
@RestController
@RequestMapping("/page")
public class FlowableModelPageController extends BaseController
{
@Autowired
private IFlowableModelPageService flowableModelPageService;
/**
*
*/
@RequiresPermissions("flowable:page:list")
@GetMapping("/list")
public TableDataInfo list(FlowableModelPage flowableModelPage)
{
startPage();
List<FlowableModelPage> list = flowableModelPageService.selectFlowableModelPageList(flowableModelPage);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("flowable:page:export")
@Log(title = "建模页面绑定", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FlowableModelPage flowableModelPage)
{
List<FlowableModelPage> list = flowableModelPageService.selectFlowableModelPageList(flowableModelPage);
ExcelUtil<FlowableModelPage> util = new ExcelUtil<FlowableModelPage>(FlowableModelPage.class);
util.exportExcel(response, list, "建模页面绑定数据");
}
/**
*
*/
@RequiresPermissions("flowable:page:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(flowableModelPageService.selectFlowableModelPageById(id));
}
/**
*
*/
@RequiresPermissions("flowable:page:add")
@Log(title = "建模页面绑定", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FlowableModelPage flowableModelPage)
{
return toAjax(flowableModelPageService.insertFlowableModelPage(flowableModelPage));
}
/**
*
*/
@RequiresPermissions("flowable:page:edit")
@Log(title = "建模页面绑定", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FlowableModelPage flowableModelPage)
{
return toAjax(flowableModelPageService.updateFlowableModelPage(flowableModelPage));
}
/**
*
*/
@RequiresPermissions("flowable:page:remove")
@Log(title = "建模页面绑定", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(flowableModelPageService.deleteFlowableModelPageByIds(ids));
}
/**
*
*/
@RequiresPermissions("flowable:page:bind")
@Log(title = "建模页面绑定", businessType = BusinessType.UPDATE)
@PutMapping(value="/bind")
public AjaxResult bind(@RequestBody FlowableModelPage flowableModelPage)
{
List<FlowableModelPage> list = flowableModelPageService.selectFlowableModelPageListByBind(flowableModelPage);
if(Collections.isEmpty(list)){
return toAjax(flowableModelPageService.insertFlowableModelPage(flowableModelPage));
}else {
flowableModelPage.setId(list.get(0).getId());
return toAjax(flowableModelPageService.updateFlowableModelPage(flowableModelPage));
}
}
/**
* )
*/
@RequiresPermissions("flowable:page:findPage")
@Log(title = "建模页面单页面查询", businessType = BusinessType.UPDATE)
@PostMapping(value="/findPage")
public AjaxResult findPage(@RequestBody FlowableModelPage flowableModelPage)
{
FlowableModelPage page = flowableModelPageService.selectFlowableModelPageSingle(flowableModelPage);
return success(page);
}
/**
* )
*/
@RequiresPermissions("flowable:page:findModulePage")
@Log(title = "建模页面模块页面查询", businessType = BusinessType.UPDATE)
@PostMapping(value="/findModulePage")
public AjaxResult findModulePage(@RequestBody FlowableModelPage flowableModelPage)
{
List<FlowableModelPage> list = flowableModelPageService.selectFlowableModelPage(flowableModelPage);
return success(list);
}
/**
*
*/
@RequiresPermissions("flowable:page:unbind")
@Log(title = "建模页面解绑", businessType = BusinessType.UPDATE)
@PutMapping(value="/unbind")
public AjaxResult unbind(@RequestBody FlowableModelPage flowableModelPage)
{
List<FlowableModelPage> list = flowableModelPageService.selectFlowableModelPageListByBind(flowableModelPage);
if(Collections.isEmpty(list)){
return error("页面没找到!");
}else {
return toAjax(flowableModelPageService.deleteFlowableModelPageById(list.get(0).getId()));
}
}
}

View File

@ -0,0 +1,92 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.SysExpression;
import com.yanzhu.flowable.service.ISysExpressionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author yanzhu
* @date 2022-12-12
*/
@RestController
@RequestMapping("/expression")
public class SysExpressionController extends BaseController {
@Autowired
private ISysExpressionService sysExpressionService;
private Long id;
/**
*
*/
@RequiresPermissions("system:expression:list")
@GetMapping("/list")
public TableDataInfo list(SysExpression sysExpression) {
startPage();
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:expression:export")
@Log(title = "流程达式", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysExpression sysExpression) {
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
ExcelUtil<SysExpression> util = new ExcelUtil<SysExpression>(SysExpression.class);
util.exportExcel(response, list, "流程达式数据");
}
/**
*
*/
@RequiresPermissions("system:expression:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(sysExpressionService.selectSysExpressionById(id));
}
/**
*
*/
@RequiresPermissions("system:expression:add")
@Log(title = "流程达式", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysExpression sysExpression) {
return toAjax(sysExpressionService.insertSysExpression(sysExpression));
}
/**
*
*/
@RequiresPermissions("system:expression:edit")
@Log(title = "流程达式", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysExpression sysExpression) {
return toAjax(sysExpressionService.updateSysExpression(sysExpression));
}
/**
*
*/
@RequiresPermissions("system:expression:remove")
@Log(title = "流程达式", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(sysExpressionService.deleteSysExpressionByIds(ids));
}
}

View File

@ -0,0 +1,112 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.SysDeployForm;
import com.yanzhu.flowable.domain.SysForm;
import com.yanzhu.flowable.service.ISysDeployFormService;
import com.yanzhu.flowable.service.ISysFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author Tony
* @date 2021-04-03
*/
@RestController
@RequestMapping("/form")
public class SysFormController extends BaseController {
@Autowired
private ISysFormService SysFormService;
@Autowired
private ISysDeployFormService sysDeployFormService;
/**
*
*/
@RequiresPermissions("flowable:form:list")
@GetMapping("/list")
public TableDataInfo list(SysForm sysForm) {
startPage();
List<SysForm> list = SysFormService.selectSysFormList(sysForm);
return getDataTable(list);
}
@GetMapping("/formList")
public AjaxResult formList(SysForm sysForm) {
List<SysForm> list = SysFormService.selectSysFormList(sysForm);
return AjaxResult.success(list);
}
/**
*
*/
@RequiresPermissions("flowable:form:export")
@Log(title = "流程表单", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public void export(HttpServletResponse response, SysForm sysForm) {
List<SysForm> list = SysFormService.selectSysFormList(sysForm);
ExcelUtil<SysForm> util = new ExcelUtil<>(SysForm.class);
util.exportExcel(response, list, "form");
}
/**
*
*/
@RequiresPermissions("flowable:form:query")
@GetMapping(value = "/{formId}")
public AjaxResult getInfo(@PathVariable("formId") Long formId) {
return AjaxResult.success(SysFormService.selectSysFormById(formId));
}
/**
*
*/
@RequiresPermissions("flowable:form:add")
@Log(title = "流程表单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysForm sysForm) {
return toAjax(SysFormService.insertSysForm(sysForm));
}
/**
*
*/
@RequiresPermissions("flowable:form:edit")
@Log(title = "流程表单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysForm sysForm) {
return toAjax(SysFormService.updateSysForm(sysForm));
}
/**
*
*/
@RequiresPermissions("flowable:form:remove")
@Log(title = "流程表单", businessType = BusinessType.DELETE)
@DeleteMapping("/{formIds}")
public AjaxResult remove(@PathVariable Long[] formIds) {
return toAjax(SysFormService.deleteSysFormByIds(formIds));
}
/**
*
*/
@Log(title = "流程表单", businessType = BusinessType.INSERT)
@PostMapping("/addDeployForm")
public AjaxResult addDeployForm(@RequestBody SysDeployForm sysDeployForm) {
return toAjax(sysDeployFormService.insertSysDeployForm(sysDeployForm));
}
}

View File

@ -0,0 +1,98 @@
package com.yanzhu.flowable.controller;
import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.core.web.page.TableDataInfo;
import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.flowable.domain.SysListener;
import com.yanzhu.flowable.service.ISysListenerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author Tony
* @date 2022-12-25
*/
@RestController
@RequestMapping("/listener")
public class SysListenerController extends BaseController
{
@Autowired
private ISysListenerService sysListenerService;
/**
*
*/
@RequiresPermissions("system:listener:list")
@GetMapping("/list")
public TableDataInfo list(SysListener sysListener)
{
startPage();
List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:listener:export")
@Log(title = "流程监听", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysListener sysListener)
{
List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
ExcelUtil<SysListener> util = new ExcelUtil<SysListener>(SysListener.class);
util.exportExcel(response, list, "流程监听数据");
}
/**
*
*/
@RequiresPermissions("system:listener:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sysListenerService.selectSysListenerById(id));
}
/**
*
*/
@RequiresPermissions("system:listener:add")
@Log(title = "流程监听", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysListener sysListener)
{
return toAjax(sysListenerService.insertSysListener(sysListener));
}
/**
*
*/
@RequiresPermissions("system:listener:edit")
@Log(title = "流程监听", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysListener sysListener)
{
return toAjax(sysListenerService.updateSysListener(sysListener));
}
/**
*
*/
@RequiresPermissions("system:listener:remove")
@Log(title = "流程监听", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysListenerService.deleteSysListenerByIds(ids));
}
}

View File

@ -135,6 +135,7 @@ public class CustomProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
SHELL_TASK_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/shellTask.png", this.customClassLoader));
DMN_TASK_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/dmnTask.png", this.customClassLoader));
CAMEL_TASK_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/camelTask.png", this.customClassLoader));
MULE_TASK_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/muleTask.png", this.customClassLoader));
HTTP_TASK_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/httpTask.png", this.customClassLoader));
TIMER_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/timer.png", this.customClassLoader));
COMPENSATE_THROW_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/compensate-throw.png", this.customClassLoader));

View File

@ -159,13 +159,13 @@ public class FindNextNodeUtil {
/**
*
*/
public static boolean checkSubProcess(String Id, Collection<FlowElement> flowElements, List<UserTask> nextUser) {
public static boolean checkSubProcess(String id, Collection<FlowElement> flowElements, List<UserTask> nextUser) {
for (FlowElement flowElement1 : flowElements) {
if (flowElement1 instanceof SubProcess && flowElement1.getId().equals(Id)) {
if (flowElement1 instanceof SubProcess && flowElement1.getId().equals(id)) {
SubProcess sp = (SubProcess) flowElement1;
if (sp.getLoopCharacteristics() != null) {
String inputDataItem = sp.getLoopCharacteristics().getInputDataItem();
// String inputDataItem = sp.getLoopCharacteristics().getInputDataItem();
UserTask userTask = new UserTask();
userTask.setId(sp.getId());
userTask.setLoopCharacteristics(sp.getLoopCharacteristics());
@ -251,7 +251,7 @@ public class FindNextNodeUtil {
*/
public static boolean expressionResult(Map<String, Object> map, String expression) {
Expression exp = AviatorEvaluator.compile(expression);
final Object execute = exp.execute(map);
return Boolean.parseBoolean(String.valueOf(execute));
return (Boolean)exp.execute(map);
// return true;
}
}

View File

@ -1,143 +0,0 @@
package com.yanzhu.flowable.flow;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
import org.flowable.common.engine.impl.util.io.StringStreamSource;
import java.util.ArrayList;
import java.util.Collection;
/**
* @author ruoyi
* @createTime 2023/11/29 19:04
*/
public class ModelHelper {
private static final BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
/**
* xmlbpmnModel
*
* @param xml xml
* @return bpmnModel
*/
public static BpmnModel getBpmnModel(String xml) {
return bpmnXMLConverter.convertToBpmnModel(new StringStreamSource(xml), false, false);
}
/**
* bpmnModelxml
*
* @param bpmnModel bpmnModel
* @return xml
*/
public static byte[] getBpmnXml(BpmnModel bpmnModel) {
return bpmnXMLConverter.convertToXML(bpmnModel);
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static StartEvent getStartEvent(BpmnModel model) {
Process process = model.getMainProcess();
FlowElement startElement = process.getInitialFlowElement();
if (startElement instanceof StartEvent) {
return (StartEvent) startElement;
}
return getStartEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static StartEvent getStartEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof StartEvent) {
return (StartEvent) flowElement;
}
}
return null;
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static EndEvent getEndEvent(BpmnModel model) {
Process process = model.getMainProcess();
return getEndEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static EndEvent getEndEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof EndEvent) {
return (EndEvent) flowElement;
}
}
return null;
}
public static UserTask getUserTaskByKey(BpmnModel model, String taskKey) {
Process process = model.getMainProcess();
FlowElement flowElement = process.getFlowElement(taskKey);
if (flowElement instanceof UserTask) {
return (UserTask) flowElement;
}
return null;
}
public static boolean isMultiInstance(BpmnModel model, String taskKey) {
UserTask userTask = getUserTaskByKey(model, taskKey);
if (userTask==null) {
return userTask.hasMultiInstanceLoopCharacteristics();
}
return false;
}
/**
*
*
* @param model bpmnModel
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(BpmnModel model) {
Process process = model.getMainProcess();
Collection<FlowElement> flowElements = process.getFlowElements();
return getAllUserTaskEvent(flowElements, null);
}
/**
*
* @param flowElements
* @param allElements
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(Collection<FlowElement> flowElements, Collection<UserTask> allElements) {
allElements = allElements == null ? new ArrayList<>() : allElements;
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof UserTask) {
allElements.add((UserTask) flowElement);
}
if (flowElement instanceof SubProcess) {
// 继续深入子流程,进一步获取子流程
allElements = getAllUserTaskEvent(((SubProcess) flowElement).getFlowElements(), allElements);
}
}
return allElements;
}
}

View File

@ -1,372 +0,0 @@
package com.yanzhu.flowable.flow;
import com.yanzhu.common.core.utils.StringUtils;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.*;
import org.flowable.bpmn.model.Process;
import org.flowable.common.engine.impl.util.io.StringStreamSource;
import java.util.*;
/**
* @author KonBAI
* @createTime 2022/3/26 19:04
*/
public class ModelUtils {
private static final BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
/**
* xmlbpmnModel
*
* @param xml xml
* @return bpmnModel
*/
public static BpmnModel getBpmnModel(String xml) {
return bpmnXMLConverter.convertToBpmnModel(new StringStreamSource(xml), false, false);
}
/**
* bpmnModelxml
*
* @deprecated bpmn 线
* @param bpmnModel bpmnModel
* @return xml
*/
@Deprecated
public static String getBpmnXmlStr(BpmnModel bpmnModel) {
return StringUtils.utf8Str(getBpmnXml(bpmnModel));
}
/**
* bpmnModelxml
*
* @deprecated bpmn 线
* @param bpmnModel bpmnModel
* @return xml
*/
@Deprecated
public static byte[] getBpmnXml(BpmnModel bpmnModel) {
return bpmnXMLConverter.convertToXML(bpmnModel);
}
/**
* 线
*
* @param source
* @return 线
*/
public static List<SequenceFlow> getElementIncomingFlows(FlowElement source) {
List<SequenceFlow> sequenceFlows = new ArrayList<>();
if (source instanceof FlowNode) {
sequenceFlows = ((FlowNode) source).getIncomingFlows();
}
return sequenceFlows;
}
/**
* 线
*
* @param source
* @return 线
*/
public static List<SequenceFlow> getElementOutgoingFlows(FlowElement source) {
List<SequenceFlow> sequenceFlows = new ArrayList<>();
if (source instanceof FlowNode) {
sequenceFlows = ((FlowNode) source).getOutgoingFlows();
}
return sequenceFlows;
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static StartEvent getStartEvent(BpmnModel model) {
Process process = model.getMainProcess();
FlowElement startElement = process.getInitialFlowElement();
if (startElement instanceof StartEvent) {
return (StartEvent) startElement;
}
return getStartEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static StartEvent getStartEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof StartEvent) {
return (StartEvent) flowElement;
}
}
return null;
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static EndEvent getEndEvent(BpmnModel model) {
Process process = model.getMainProcess();
return getEndEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static EndEvent getEndEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof EndEvent) {
return (EndEvent) flowElement;
}
}
return null;
}
public static UserTask getUserTaskByKey(BpmnModel model, String taskKey) {
Process process = model.getMainProcess();
FlowElement flowElement = process.getFlowElement(taskKey);
if (flowElement instanceof UserTask) {
return (UserTask) flowElement;
}
return null;
}
/**
*
*
* @param model bpmnModel
* @param flowElementId ID
* @return
*/
public static FlowElement getFlowElementById(BpmnModel model, String flowElementId) {
Process process = model.getMainProcess();
return process.getFlowElement(flowElementId);
}
/**
* Key
*
* @param flowElement
* @return Key
*/
public static String getFormKey(FlowElement flowElement) {
if (flowElement != null) {
if (flowElement instanceof StartEvent) {
return ((StartEvent) flowElement).getFormKey();
} else if (flowElement instanceof UserTask) {
return ((UserTask) flowElement).getFormKey();
}
}
return null;
}
/**
*
* @param model bpmnModel
* @param name
* @return
*/
public static String getStartEventAttributeValue(BpmnModel model, String name) {
StartEvent startEvent = getStartEvent(model);
return getElementAttributeValue(startEvent, name);
}
/**
*
* @param model bpmnModel
* @param name
* @return
*/
public static String getEndEventAttributeValue(BpmnModel model, String name) {
EndEvent endEvent = getEndEvent(model);
return getElementAttributeValue(endEvent, name);
}
/**
*
* @param model bpmnModel
* @param taskKey Key
* @param name
* @return
*/
public static String getUserTaskAttributeValue(BpmnModel model, String taskKey, String name) {
UserTask userTask = getUserTaskByKey(model, taskKey);
return getElementAttributeValue(userTask, name);
}
/**
*
* @param baseElement
* @param name
* @return
*/
public static String getElementAttributeValue(BaseElement baseElement, String name) {
if (baseElement != null) {
List<ExtensionAttribute> attributes = baseElement.getAttributes().get(name);
if (attributes != null && !attributes.isEmpty()) {
attributes.iterator().next().getValue();
Iterator<ExtensionAttribute> attrIterator = attributes.iterator();
if(attrIterator.hasNext()) {
ExtensionAttribute attribute = attrIterator.next();
return attribute.getValue();
}
}
}
return null;
}
public static boolean isMultiInstance(BpmnModel model, String taskKey) {
UserTask userTask = getUserTaskByKey(model, taskKey);
if (!Objects.isNull(userTask)) {
return userTask.hasMultiInstanceLoopCharacteristics();
}
return false;
}
/**
*
*
* @param model bpmnModel
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(BpmnModel model) {
Process process = model.getMainProcess();
Collection<FlowElement> flowElements = process.getFlowElements();
return getAllUserTaskEvent(flowElements, null);
}
/**
*
* @param flowElements
* @param allElements
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(Collection<FlowElement> flowElements, Collection<UserTask> allElements) {
allElements = allElements == null ? new ArrayList<>() : allElements;
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof UserTask) {
allElements.add((UserTask) flowElement);
}
if (flowElement instanceof SubProcess) {
// 继续深入子流程,进一步获取子流程
allElements = getAllUserTaskEvent(((SubProcess) flowElement).getFlowElements(), allElements);
}
}
return allElements;
}
/**
*
* @param source
* @return
*/
public static List<UserTask> findNextUserTasks(FlowElement source) {
return findNextUserTasks(source, null, null);
}
/**
*
* @param source
* @param hasSequenceFlow 线 ID线
* @param userTaskList
* @return
*/
public static List<UserTask> findNextUserTasks(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) {
hasSequenceFlow = Optional.ofNullable(hasSequenceFlow).orElse(new HashSet<>());
userTaskList = Optional.ofNullable(userTaskList).orElse(new ArrayList<>());
// 获取出口连线
List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source);
if (!sequenceFlows.isEmpty()) {
for (SequenceFlow sequenceFlow : sequenceFlows) {
// 如果发现连线重复,说明循环了,跳过这个循环
if (hasSequenceFlow.contains(sequenceFlow.getId())) {
continue;
}
// 添加已经走过的连线
hasSequenceFlow.add(sequenceFlow.getId());
FlowElement targetFlowElement = sequenceFlow.getTargetFlowElement();
if (targetFlowElement instanceof UserTask) {
// 若节点为用户任务,加入到结果列表中
userTaskList.add((UserTask) targetFlowElement);
} else {
// 若节点非用户任务,继续递归查找下一个节点
findNextUserTasks(targetFlowElement, hasSequenceFlow, userTaskList);
}
}
}
return userTaskList;
}
/**
*
* 退
* @param source
* @param target
* @param visitedElements 线 ID线
* @return
*/
public static boolean isSequentialReachable(FlowElement source, FlowElement target, Set<String> visitedElements) {
visitedElements = visitedElements == null ? new HashSet<>() : visitedElements;
if (source instanceof StartEvent && isInEventSubprocess(source)) {
return false;
}
// 根据类型,获取入口连线
List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source);
if (sequenceFlows != null && sequenceFlows.size() > 0) {
// 循环找到目标元素
for (SequenceFlow sequenceFlow: sequenceFlows) {
// 如果发现连线重复,说明循环了,跳过这个循环
if (visitedElements.contains(sequenceFlow.getId())) {
continue;
}
// 添加已经走过的连线
visitedElements.add(sequenceFlow.getId());
FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();
// 这条线路存在目标节点,这条线路完成,进入下个线路
if (target.getId().equals(sourceFlowElement.getId())) {
continue;
}
// 如果目标节点为并行网关,则不继续
if (sourceFlowElement instanceof ParallelGateway) {
return false;
}
// 否则就继续迭代
boolean isSequential = isSequentialReachable(sourceFlowElement, target, visitedElements);
if (!isSequential) {
return false;
}
}
}
return true;
}
protected static boolean isInEventSubprocess(FlowElement flowElement) {
FlowElementsContainer flowElementsContainer = flowElement.getParentContainer();
while (flowElementsContainer != null) {
if (flowElementsContainer instanceof EventSubProcess) {
return true;
}
if (flowElementsContainer instanceof FlowElement) {
flowElementsContainer = ((FlowElement) flowElementsContainer).getParentContainer();
} else {
flowElementsContainer = null;
}
}
return false;
}
}

View File

@ -0,0 +1,35 @@
package com.yanzhu.flowable.rpc;
import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.constant.ServiceNameConstants;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.system.api.domain.SysRole;
import com.yanzhu.system.api.domain.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
* system rpc
*/
@FeignClient(value = ServiceNameConstants.SYSTEM_SERVICE)
public interface IRemoteSystemService {
@GetMapping("/rpc/user/list")
R<List<SysUser>> getUsers(@RequestParam Map<String, Object> paraMap, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@GetMapping("/rpc/user/{userId}")
R<SysUser> getUserById(@PathVariable(value = "userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@GetMapping("/rpc/role/list")
R<List<SysRole>> getRoles(@RequestParam Map<String, Object> paraMap, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@GetMapping("/rpc/role/{roleId}")
R<SysRole> getRoleById(@PathVariable(value = "roleId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,72 @@
package com.yanzhu.flowable.rpc;
import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.utils.bean.BeanUtils;
import com.yanzhu.common.core.web.domain.BaseEntity;
import com.yanzhu.system.api.domain.SysRole;
import com.yanzhu.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class RemoteSystemService {
@Autowired
private IRemoteSystemService remoteSystemService;
private <T> List<T> resultToList(R<List<T>> dataResult) {
if (R.FAIL == dataResult.getCode()) {
throw new ServiceException(dataResult.getMsg());
}
return dataResult.getData();
}
private <T> T resultToBean(R<T> dataResult) {
if (R.FAIL == dataResult.getCode()) {
throw new ServiceException(dataResult.getMsg());
}
return dataResult.getData();
}
public List<SysUser> getUsers(SysUser sysUser) {
//远程调用system接口获取所有电站信息
R<List<SysUser>> dataResult = remoteSystemService.getUsers(beanToMap(sysUser), SecurityConstants.INNER);
return resultToList(dataResult);
}
public List<SysRole> getRoles(SysRole sysRole) {
//远程调用system接口获取所有电站信息
R<List<SysRole>> dataResult = remoteSystemService.getRoles(beanToMap(sysRole), SecurityConstants.INNER);
return resultToList(dataResult);
}
private Map<String, Object> beanToMap(Object obj) {
try {
Map<String, Object> paraMap = BeanUtils.beanToMap(obj);
if (obj instanceof BaseEntity) {
paraMap.remove("params");
}
return paraMap;
}catch (Exception e){
throw new ServiceException(e.getMessage());
}
}
public SysUser getUserById(Long userId) {
//远程调用system接口获取所有电站信息
R<SysUser> dataResult = remoteSystemService.getUserById(userId, SecurityConstants.INNER);
return resultToBean(dataResult);
}
public SysRole getRoleById(Long roleId) {
//远程调用system接口获取所有电站信息
R<SysRole> dataResult = remoteSystemService.getRoleById(roleId, SecurityConstants.INNER);
return resultToBean(dataResult);
}
}

View File

@ -0,0 +1,78 @@
package com.yanzhu.flowable.service;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.flowable.domain.dto.FlowProcDefDto;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/**
* @author Tony
* @date 2021-04-03 14:41
*/
public interface IFlowDefinitionService {
boolean exist(String processDefinitionKey);
/**
*
*
* @return
*/
List<FlowProcDefDto> list(String name);
/**
*
* key1使key
* key1key
* @param name
* @param category
* @param in
*/
void importFile(String name, String category, InputStream in);
/**
* xml
* @param deployId
* @return
*/
AjaxResult readXml(String deployId) throws IOException;
/**
* ID
*
* @param procDefId
* @param variables
* @return
*/
AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables);
/**
*
*
* @param state
* @param deployId ID
*/
void updateState(Integer state, String deployId);
/**
*
*
* @param deployId ID act_ge_bytearray deployment_id
*/
void delete(String deployId);
/**
*
* @param deployId
* @return
*/
InputStream readImage(String deployId);
}

View File

@ -0,0 +1,54 @@
package com.yanzhu.flowable.service;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.flowable.domain.vo.FlowTaskVo;
import org.flowable.engine.history.HistoricProcessInstance;
import java.util.Map;
/**
* @author Tony
* @date 2021-04-03 14:40
*/
public interface IFlowInstanceService {
/**
*
*
* @param vo
*/
void stopProcessInstance(FlowTaskVo vo);
/**
*
*
* @param state
* @param instanceId ID
*/
void updateState(Integer state, String instanceId);
/**
* ID
*
* @param instanceId ID
* @param deleteReason
*/
void delete(String instanceId, String deleteReason);
/**
* ID
*
* @param processInstanceId
* @return
*/
HistoricProcessInstance getHistoricProcessInstanceById(String processInstanceId);
/**
* ID
*
* @param procDefId Id
* @param variables
* @return
*/
AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables);
}

View File

@ -0,0 +1,217 @@
package com.yanzhu.flowable.service;
import com.github.pagehelper.PageInfo;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.flowable.domain.dto.FlowTaskDto;
import com.yanzhu.flowable.domain.vo.FlowQueryVo;
import com.yanzhu.flowable.domain.vo.FlowTaskVo;
import java.io.InputStream;
/**
* @author Tony
* @date 2021-04-03 14:42
*/
public interface IFlowTaskService {
/**
*
*
* @param task
*/
AjaxResult complete(FlowTaskVo task);
/**
*
*
* @param flowTaskVo
*/
void taskReject(FlowTaskVo flowTaskVo);
/**
* 退
*
* @param flowTaskVo
*/
void taskReturn(FlowTaskVo flowTaskVo);
/**
* 退
*
* @param flowTaskVo
* @return
*/
AjaxResult findReturnTaskList(FlowTaskVo flowTaskVo);
/**
*
*
* @param flowTaskVo
*/
void deleteTask(FlowTaskVo flowTaskVo);
/**
* /
*
* @param flowTaskVo
*/
void claim(FlowTaskVo flowTaskVo);
/**
* /
*
* @param flowTaskVo
*/
void unClaim(FlowTaskVo flowTaskVo);
/**
*
*
* @param flowTaskVo
*/
void delegateTask(FlowTaskVo flowTaskVo);
/**
*
*
* @param flowTaskVo
*/
void resolveTask(FlowTaskVo flowTaskVo);
/**
*
*
* @param flowTaskVo
*/
void assignTask(FlowTaskVo flowTaskVo);
/**
*
* @param flowTaskVo
*/
void addMultiInstanceExecution(FlowTaskVo flowTaskVo);
/**
*
* @param flowTaskVo
*/
void deleteMultiInstanceExecution(FlowTaskVo flowTaskVo);
/**
*
* @param queryVo
* @return
*/
PageInfo<FlowTaskDto> myProcess(FlowQueryVo queryVo);
/**
*
* :
* @param flowTaskVo
* @return
*/
AjaxResult stopProcess(FlowTaskVo flowTaskVo);
/**
*
* @param flowTaskVo
* @return
*/
AjaxResult revokeProcess(FlowTaskVo flowTaskVo);
/**
*
*
* @param queryVo
* @return
*/
PageInfo<FlowTaskDto> todoList(FlowQueryVo queryVo);
/**
*
*
* @param queryVo
* @return
*/
PageInfo<FlowTaskDto> finishedList(FlowQueryVo queryVo);
/**
*
*
* @param procInsId Id
* @return
*/
AjaxResult flowRecord(String procInsId,String deployId);
/**
* ID
*
* @param taskId Id
* @return
*/
AjaxResult getTaskForm(String taskId);
/**
*
* @param processId
* @return
*/
InputStream diagram(String processId);
/**
*
* @param procInsId
* @return
*/
AjaxResult getFlowViewer(String procInsId,String executionId);
/**
*
* @param taskId
* @return
*/
AjaxResult processVariables(String taskId);
/**
*
* @param flowTaskVo
* @return
*/
AjaxResult getNextFlowNode(FlowTaskVo flowTaskVo);
AjaxResult getNextFlowNodeByStart(FlowTaskVo flowTaskVo);
/**
*
* @param deployId
* @return
*/
AjaxResult flowFormData(String deployId);
/**
*
* @param procInsId
* @return
*/
AjaxResult flowXmlAndNode(String procInsId,String deployId);
/**
*
* @param taskId
* @return
*/
AjaxResult flowTaskForm(String taskId) throws Exception;
/**
*
* @param procInsId
* @param elementId
* @return
*/
AjaxResult flowTaskInfo(String procInsId, String elementId);
}

View File

@ -1,69 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableCategory;
import java.util.List;
import java.util.Map;
/**
* Service
*
* @author ruoyi
* @date 2023-11-27
*/
public interface IFlowableCategoryService
{
/**
*
*
* @param id
* @return
*/
public FlowableCategory selectFlowableCategoryById(Long id);
/**
*
*
* @param flowableCategory
* @return
*/
public List<FlowableCategory> selectFlowableCategoryList(FlowableCategory flowableCategory);
/**
*
*
* @param flowableCategory
* @return
*/
public int insertFlowableCategory(FlowableCategory flowableCategory);
/**
*
*
* @param flowableCategory
* @return
*/
public int updateFlowableCategory(FlowableCategory flowableCategory);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableCategoryByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableCategoryById(Long id);
/**
*
* @param flowableCategories
*/
public Map<String,String> updateRedis(List<FlowableCategory> flowableCategories);
}

View File

@ -1,68 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableDeploy;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-18
*/
public interface IFlowableDeployService
{
/**
*
*
* @param definitionId
* @return
*/
public FlowableDeploy selectFlowableDeployByDefinitionId(String definitionId);
/**
*
*
* @param flowableDeploy
* @return
*/
public List<FlowableDeploy> selectFlowableDeployList(FlowableDeploy flowableDeploy);
/**
*
*
* @param definitionIds
* @return
*/
public int deleteFlowableDeployByDefinitionIds(String[] definitionIds);
/**
*
*
* @param definitionId
* @return
*/
public int deleteFlowableDeployByDefinitionId(String definitionId);
/**
*
* @param processKey key
* @return
*/
public List<FlowableDeploy> queryPublishList(String processKey);
/**
*
* @param definitionId
* @param stateCode
*/
public void updateState(String definitionId, String stateCode);
/**
*
* @param definitionId
* @return
*/
public String queryBpmnXmlById(String definitionId);
}

View File

@ -1,70 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableFieldDef;
import com.yanzhu.flowable.domain.FlowableFieldSearch;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-26
*/
public interface IFlowableFieldDefService
{
/**
*
*
* @param id
* @return
*/
public FlowableFieldDef selectFlowableFieldDefById(String id);
/**
*
*
* @param flowableFieldDef
* @return
*/
public List<FlowableFieldDef> selectFlowableFieldDefList(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param flowableFieldDef
* @return
*/
public int insertFlowableFieldDef(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param flowableFieldDef
* @return
*/
public int updateFlowableFieldDef(FlowableFieldDef flowableFieldDef);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableFieldDefByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableFieldDefById(String id);
/**
* (,)
* @param flowableFieldSearch
* @return
*/
List<FlowableFieldDef> listCombination(FlowableFieldSearch flowableFieldSearch);
}

View File

@ -1,62 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableFieldRef;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-26
*/
public interface IFlowableFieldRefService
{
/**
*
*
* @param id
* @return
*/
public FlowableFieldRef selectFlowableFieldRefById(String id);
/**
*
*
* @param flowableFieldRef
* @return
*/
public List<FlowableFieldRef> selectFlowableFieldRefList(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param flowableFieldRef
* @return
*/
public int insertFlowableFieldRef(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param flowableFieldRef
* @return
*/
public int updateFlowableFieldRef(FlowableFieldRef flowableFieldRef);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableFieldRefByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableFieldRefById(String id);
}

View File

@ -1,83 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableModelPage;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-25
*/
public interface IFlowableModelPageService
{
/**
*
*
* @param id
* @return
*/
public FlowableModelPage selectFlowableModelPageById(String id);
/**
*
*
* @param flowableModelPage
* @return
*/
public List<FlowableModelPage> selectFlowableModelPageList(FlowableModelPage flowableModelPage);
/**
*
*
* @param flowableModelPage
* @return
*/
public int insertFlowableModelPage(FlowableModelPage flowableModelPage);
/**
*
*
* @param flowableModelPage
* @return
*/
public int updateFlowableModelPage(FlowableModelPage flowableModelPage);
/**
*
*
* @param ids
* @return
*/
public int deleteFlowableModelPageByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteFlowableModelPageById(String id);
/**
*
* @param flowableModelPage
* @return
*/
List<FlowableModelPage> selectFlowableModelPageListByBind(FlowableModelPage flowableModelPage);
/***
* )
* @param flowableModelPage
* @return
*/
FlowableModelPage selectFlowableModelPageSingle(FlowableModelPage flowableModelPage);
/**
* )
* @param flowableModelPage
* @return
*/
List<FlowableModelPage> selectFlowableModelPage(FlowableModelPage flowableModelPage);
}

View File

@ -1,96 +0,0 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.FlowableModel;
import com.yanzhu.flowable.domain.bo.FlowableModelBo;
import java.io.UnsupportedEncodingException;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-11-28
*/
public interface IFlowableModelService
{
/**
*
*
* @param modelId
* @return
*/
public FlowableModel selectFlowableModelByModelId(String modelId);
/**
*
*
* @param flowableModel
* @return
*/
public List<FlowableModel> selectFlowableModelList(FlowableModelBo flowableModel);
/**
*
*
* @param flowableModel
* @return
*/
public int insertFlowableModel(FlowableModel flowableModel);
/**
*
*
* @param flowableModel
* @return
*/
public int updateFlowableModel(FlowableModel flowableModel);
/**
*
*
* @param modelIds
* @return
*/
public int deleteFlowableModelByModelIds(String[] modelIds);
/**
*
*
* @param modelId
*/
public void deleteFlowableModelByModelId(String modelId);
/**
*
* @param modelId id
*/
public void deployModel(String modelId) throws UnsupportedEncodingException;
/**
* xml
* @param modelId
* @return
* @throws UnsupportedEncodingException
*/
public String queryBpmnXmlById(String modelId) throws UnsupportedEncodingException;
/**
*
* @param modelBo
* @return
*/
List<FlowableModel> historyList(FlowableModelBo modelBo);
/**
* xml
* @param modelBo
*/
void saveModel(FlowableModelBo modelBo);
/**
*
* @param modelId
*/
void latestModel(String modelId) throws UnsupportedEncodingException;
}

View File

@ -0,0 +1,70 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.SysDeployForm;
import com.yanzhu.flowable.domain.SysForm;
import java.util.List;
/**
* Service
*
* @author Tony
* @date 2021-04-03
*/
public interface ISysDeployFormService
{
/**
*
*
* @param id ID
* @return
*/
public SysDeployForm selectSysDeployFormById(Long id);
/**
*
*
* @param sysDeployForm
* @return
*/
public List<SysDeployForm> selectSysDeployFormList(SysDeployForm sysDeployForm);
/**
*
*
* @param sysDeployForm
* @return
*/
public int insertSysDeployForm(SysDeployForm sysDeployForm);
/**
*
*
* @param sysDeployForm
* @return
*/
public int updateSysDeployForm(SysDeployForm sysDeployForm);
/**
*
*
* @param ids ID
* @return
*/
public int deleteSysDeployFormByIds(Long[] ids);
/**
*
*
* @param id ID
* @return
*/
public int deleteSysDeployFormById(Long id);
/**
*
* @param deployId
* @return
*/
SysForm selectSysDeployFormByDeployId(String deployId);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.SysExpression;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2022-12-12
*/
public interface ISysExpressionService
{
/**
*
*
* @param id
* @return
*/
public SysExpression selectSysExpressionById(Long id);
/**
*
*
* @param sysExpression
* @return
*/
public List<SysExpression> selectSysExpressionList(SysExpression sysExpression);
/**
*
*
* @param sysExpression
* @return
*/
public int insertSysExpression(SysExpression sysExpression);
/**
*
*
* @param sysExpression
* @return
*/
public int updateSysExpression(SysExpression sysExpression);
/**
*
*
* @param ids
* @return
*/
public int deleteSysExpressionByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteSysExpressionById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.SysForm;
import java.util.List;
/**
*
* @author Tony
* @date 2021-04-03
*/
public interface ISysFormService
{
/**
*
*
* @param formId ID
* @return
*/
public SysForm selectSysFormById(Long formId);
/**
*
*
* @param sysForm
* @return
*/
public List<SysForm> selectSysFormList(SysForm sysForm);
/**
*
*
* @param sysForm
* @return
*/
public int insertSysForm(SysForm sysForm);
/**
*
*
* @param sysForm
* @return
*/
public int updateSysForm(SysForm sysForm);
/**
*
*
* @param formIds ID
* @return
*/
public int deleteSysFormByIds(Long[] formIds);
/**
*
*
* @param formId ID
* @return
*/
public int deleteSysFormById(Long formId);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.SysListener;
import java.util.List;
/**
* Service
*
* @author Tony
* @date 2022-12-25
*/
public interface ISysListenerService
{
/**
*
*
* @param id
* @return
*/
public SysListener selectSysListenerById(Long id);
/**
*
*
* @param sysListener
* @return
*/
public List<SysListener> selectSysListenerList(SysListener sysListener);
/**
*
*
* @param sysListener
* @return
*/
public int insertSysListener(SysListener sysListener);
/**
*
*
* @param sysListener
* @return
*/
public int updateSysListener(SysListener sysListener);
/**
*
*
* @param ids
* @return
*/
public int deleteSysListenerByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteSysListenerById(Long id);
}

View File

@ -0,0 +1,62 @@
package com.yanzhu.flowable.service;
import com.yanzhu.flowable.domain.SysTaskForm;
import java.util.List;
/**
* Service
*
* @author Tony
* @date 2021-04-03
*/
@Deprecated
public interface ISysTaskFormService {
/**
*
*
* @param id ID
* @return
*/
public SysTaskForm selectSysTaskFormById(Long id);
/**
*
*
* @param sysTaskForm
* @return
*/
public List<SysTaskForm> selectSysTaskFormList(SysTaskForm sysTaskForm);
/**
*
*
* @param sysTaskForm
* @return
*/
public int insertSysTaskForm(SysTaskForm sysTaskForm);
/**
*
*
* @param sysTaskForm
* @return
*/
public int updateSysTaskForm(SysTaskForm sysTaskForm);
/**
*
*
* @param ids ID
* @return
*/
public int deleteSysTaskFormByIds(Long[] ids);
/**
*
*
* @param id ID
* @return
*/
public int deleteSysTaskFormById(Long id);
}

View File

@ -0,0 +1,232 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.common.constant.ProcessConstants;
import com.yanzhu.flowable.domain.SysForm;
import com.yanzhu.flowable.domain.dto.FlowProcDefDto;
import com.yanzhu.flowable.factory.FlowServiceFactory;
import com.yanzhu.flowable.mapper.FlowDeployMapper;
import com.yanzhu.flowable.service.IFlowDefinitionService;
import com.yanzhu.flowable.service.ISysDeployFormService;
import com.yanzhu.system.api.domain.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.repository.ProcessDefinitionQuery;
import org.flowable.image.impl.DefaultProcessDiagramGenerator;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
*
*
* @author Tony
* @date 2021-04-03
*/
@Service
@Slf4j
public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFlowDefinitionService {
@Resource
private ISysDeployFormService sysDeployFormService;
@Resource
private FlowDeployMapper flowDeployMapper;
private static final String BPMN_FILE_SUFFIX = ".bpmn";
@Override
public boolean exist(String processDefinitionKey) {
ProcessDefinitionQuery processDefinitionQuery
= repositoryService.createProcessDefinitionQuery().processDefinitionKey(processDefinitionKey);
long count = processDefinitionQuery.count();
return count > 0 ? true : false;
}
/**
*
*
* @return
*/
@Override
public List<FlowProcDefDto> list(String name) {
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(name);
// 加载挂表单
for (FlowProcDefDto procDef : dataList) {
SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
if (Objects.nonNull(sysForm)) {
procDef.setFormName(sysForm.getFormName());
procDef.setFormId(sysForm.getFormId());
}
}
return dataList;
}
/**
*
* @param name
* @return
public Page<FlowProcDefDto> list(String name) {
Page<FlowProcDefDto> page = new Page<>();
PageHelper.startPage(pageNum, pageSize);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(name);
// 加载挂表单
for (FlowProcDefDto procDef : dataList) {
SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
if (Objects.nonNull(sysForm)) {
procDef.setFormName(sysForm.getFormName());
procDef.setFormId(sysForm.getFormId());
}
}
page.setTotal(new PageInfo(dataList).getTotal());
// todo page.setRecords(dataList);
return page;
}
*/
/**
*
*
* key1使key
* key1key
* @param name
* @param category
* @param in
*/
@Override
public void importFile(String name, String category, InputStream in) {
Deployment deploy = repositoryService.createDeployment().addInputStream(name + BPMN_FILE_SUFFIX, in).name(name).category(category).deploy();
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deploy.getId()).singleResult();
repositoryService.setProcessDefinitionCategory(definition.getId(), category);
}
/**
* xml
*
* @param deployId
* @return
*/
@Override
public AjaxResult readXml(String deployId) throws IOException {
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
InputStream inputStream = repositoryService.getResourceAsStream(definition.getDeploymentId(), definition.getResourceName());
String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8.name());
return AjaxResult.success("", result);
}
/**
* xml
*
* @param deployId
* @return
*/
@Override
public InputStream readImage(String deployId) {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
//获得图片流
DefaultProcessDiagramGenerator diagramGenerator = new DefaultProcessDiagramGenerator();
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinition.getId());
//输出为图片
return diagramGenerator.generateDiagram(
bpmnModel,
"png",
Collections.emptyList(),
Collections.emptyList(),
"宋体",
"宋体",
"宋体",
null,
1.0,
false);
}
/**
* ID
*
* @param procDefId ID
* @param variables
* @return
*/
@Override
public AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables) {
try {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId)
.latestVersion().singleResult();
if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) {
return AjaxResult.error("流程已被挂起,请先激活流程");
}
// 设置流程发起人Id到流程中
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
variables.put(ProcessConstants.PROCESS_INITIATOR, sysUser.getUserId());
runtimeService.startProcessInstanceById(procDefId, variables);
// 流程发起时 跳过发起人节点
// SysUser sysUser = SecurityUtils.getLoginUser().getUser();
// identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
// variables.put(ProcessConstants.PROCESS_INITIATOR, "");
// ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDefId, variables);
// // 给第一步申请人节点设置任务执行人和意见
// Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).singleResult();
// if (Objects.nonNull(task)) {
// taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.NORMAL.getType(), sysUser.getNickName() + "发起流程申请");
//// taskService.setAssignee(task.getId(), sysUser.getUserId().toString());
// taskService.complete(task.getId(), variables);
// }
return AjaxResult.success("流程启动成功");
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("流程启动错误");
}
}
/**
*
*
* @param state
* @param deployId ID
*/
@Override
public void updateState(Integer state, String deployId) {
ProcessDefinition procDef = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
// 激活
if (state == 1) {
repositoryService.activateProcessDefinitionById(procDef.getId(), true, null);
}
// 挂起
if (state == 2) {
repositoryService.suspendProcessDefinitionById(procDef.getId(), true, null);
}
}
/**
*
*
* @param deployId ID act_ge_bytearray deployment_id
*/
@Override
public void delete(String deployId) {
// true 允许级联删除 ,不设置会导致数据库外键关联异常
repositoryService.deleteDeployment(deployId, true);
}
}

View File

@ -0,0 +1,118 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.domain.vo.FlowTaskVo;
import com.yanzhu.flowable.factory.FlowServiceFactory;
import com.yanzhu.flowable.service.IFlowInstanceService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
import org.flowable.engine.history.HistoricProcessInstance;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map;
import java.util.Objects;
/**
* <p><p>
*
* @author Tony
* @date 2021-04-03
*/
@Service
@Slf4j
public class FlowInstanceServiceImpl extends FlowServiceFactory implements IFlowInstanceService {
/**
*
*
* @param vo
*/
@Override
public void stopProcessInstance(FlowTaskVo vo) {
String taskId = vo.getTaskId();
}
/**
*
*
* @param state
* @param instanceId ID
*/
@Override
public void updateState(Integer state, String instanceId) {
// 激活
if (state == 1) {
runtimeService.activateProcessInstanceById(instanceId);
}
// 挂起
if (state == 2) {
runtimeService.suspendProcessInstanceById(instanceId);
}
}
/**
* ID
*
* @param instanceId ID
* @param deleteReason
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String instanceId, String deleteReason) {
// 查询历史数据
HistoricProcessInstance historicProcessInstance = getHistoricProcessInstanceById(instanceId);
if (historicProcessInstance.getEndTime() != null) {
historyService.deleteHistoricProcessInstance(historicProcessInstance.getId());
return;
}
// 删除流程实例
runtimeService.deleteProcessInstance(instanceId, deleteReason);
// 删除历史流程实例
historyService.deleteHistoricProcessInstance(instanceId);
}
/**
* ID
*
* @param processInstanceId
* @return
*/
@Override
public HistoricProcessInstance getHistoricProcessInstanceById(String processInstanceId) {
HistoricProcessInstance historicProcessInstance =
historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (Objects.isNull(historicProcessInstance)) {
throw new FlowableObjectNotFoundException("流程实例不存在: " + processInstanceId);
}
return historicProcessInstance;
}
/**
* ID
*
* @param procDefId Id
* @param variables
* @return
*/
@Override
public AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables) {
try {
// 设置流程发起人Id到流程中
Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
// identityService.setAuthenticatedUserId(userId.toString());
variables.put("initiator",userId);
variables.put("_FLOWABLE_SKIP_EXPRESSION_ENABLED", true);
runtimeService.startProcessInstanceById(procDefId, variables);
return AjaxResult.success("流程启动成功");
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("流程启动错误");
}
}
}

View File

@ -1,126 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.redis.service.RedisService;
import com.yanzhu.flowable.common.enums.CacheType;
import com.yanzhu.flowable.domain.FlowableCategory;
import com.yanzhu.flowable.mapper.FlowableCategoryMapper;
import com.yanzhu.flowable.service.IFlowableCategoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Service
*
* @author ruoyi
* @date 2023-11-27
*/
@Service
public class FlowableCategoryServiceImpl implements IFlowableCategoryService {
private static final Logger log = LoggerFactory.getLogger(FlowableCategoryServiceImpl.class);
@Autowired
private RedisService redisService;
@Autowired
private FlowableCategoryMapper flowableCategoryMapper;
/**
*
*
* @param id
* @return
*/
@Override
public FlowableCategory selectFlowableCategoryById(Long id)
{
return flowableCategoryMapper.selectFlowableCategoryById(id);
}
/**
*
*
* @param flowableCategory
* @return
*/
@Override
public List<FlowableCategory> selectFlowableCategoryList(FlowableCategory flowableCategory)
{
log.debug("enter selectFlowableCategoryList!");
List<FlowableCategory> flowableCategories = flowableCategoryMapper.selectFlowableCategoryList(flowableCategory);
updateRedis(flowableCategories);
return flowableCategories;
}
/**
*
* @param flowableCategories
*/
@Override
public Map<String,String> updateRedis(List<FlowableCategory> flowableCategories) {
if(flowableCategories==null ){
flowableCategories = selectFlowableCategoryList(new FlowableCategory());
}
//更新缓存
Map<String, String> categoryMap = flowableCategories.stream().collect(Collectors.toMap(FlowableCategory::getCode, FlowableCategory::getName));
redisService.setCacheObject(CacheType.FLOWCATEGORY.getCode(), categoryMap);
return categoryMap;
}
/**
*
*
* @param flowableCategory
* @return
*/
@Override
public int insertFlowableCategory(FlowableCategory flowableCategory)
{
flowableCategory.setCreateTime(DateUtils.getNowDate());
return flowableCategoryMapper.insertFlowableCategory(flowableCategory);
}
/**
*
*
* @param flowableCategory
* @return
*/
@Override
public int updateFlowableCategory(FlowableCategory flowableCategory)
{
flowableCategory.setUpdateTime(DateUtils.getNowDate());
return flowableCategoryMapper.updateFlowableCategory(flowableCategory);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteFlowableCategoryByIds(Long[] ids)
{
return flowableCategoryMapper.deleteFlowableCategoryByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteFlowableCategoryById(Long id)
{
return flowableCategoryMapper.deleteFlowableCategoryById(id);
}
}

View File

@ -1,222 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.web.page.PageDomain;
import com.yanzhu.common.core.web.page.TableSupport;
import com.yanzhu.flowable.domain.FlowableDeploy;
import com.yanzhu.flowable.factory.FlowServiceFactory;
import com.yanzhu.flowable.service.IFlowableDeployService;
import org.flowable.common.engine.impl.db.SuspensionState;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.repository.ProcessDefinitionQuery;
import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* Service
*
* @author ruoyi
* @date 2023-12-18
*/
@Service
public class FlowableDeployServiceImpl extends FlowServiceFactory implements IFlowableDeployService
{
/**
*
*
* @param definitionId
* @return
*/
@Override
public FlowableDeploy selectFlowableDeployByDefinitionId(String definitionId)
{
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery()
.latestVersion()
.orderByProcessDefinitionKey()
.asc();
processDefinitionQuery.deploymentId(definitionId);
if(processDefinitionQuery.count()==0){
return new FlowableDeploy();
}
FlowableDeploy flowableDeploy = new FlowableDeploy();
ProcessDefinition result = processDefinitionQuery.singleResult();
flowableDeploy.setDefinitionId(result.getId());
flowableDeploy.setDeploymentId(result.getDeploymentId());
flowableDeploy.setVersion(result.getVersion());
Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(definitionId).singleResult();
flowableDeploy.setDeploymentTime(deployment.getDeploymentTime());
flowableDeploy.setSuspended(result.isSuspended());
flowableDeploy.setProcessKey(result.getKey());
flowableDeploy.setProcessName(result.getName());
flowableDeploy.setCategory(deployment.getCategory());
return flowableDeploy;
}
/**
*
*
* @param flowableDeploy
* @return
*/
@Override
public List<FlowableDeploy> selectFlowableDeployList(FlowableDeploy flowableDeploy)
{
List<FlowableDeploy> retList = null;
// 流程定义列表数据查询
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery()
.latestVersion()
.orderByProcessDefinitionKey()
.asc();
if (StringUtils.isNotBlank(flowableDeploy.getProcessKey())) {
processDefinitionQuery.processDefinitionKeyLike("%" + flowableDeploy.getProcessKey() + "%");
}
if (StringUtils.isNotBlank(flowableDeploy.getProcessName())) {
processDefinitionQuery.processDefinitionNameLike("%" + flowableDeploy.getProcessName() + "%");
}
if (StringUtils.isNotBlank(flowableDeploy.getCategory())) {
processDefinitionQuery.processDefinitionCategory(flowableDeploy.getCategory());
}
if (flowableDeploy.getSuspended()!=null) {
if(!flowableDeploy.getSuspended()){
processDefinitionQuery.active();
} else {
processDefinitionQuery.suspended();
}
}
long pageTotal = processDefinitionQuery.count();
if (pageTotal <= 0) {
return new ArrayList<>();
}
PageDomain pageDomain = TableSupport.getPageDomain();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
int offset = pageSize * (pageNum - 1);
List<ProcessDefinition> definitionList = processDefinitionQuery.listPage(offset, pageSize);
retList = new ArrayList<>(definitionList.size());
for (ProcessDefinition processDefinition : definitionList) {
String deploymentId = processDefinition.getDeploymentId();
Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
FlowableDeploy vo = new FlowableDeploy();
vo.setDefinitionId(processDefinition.getId());
vo.setProcessKey(processDefinition.getKey());
vo.setProcessName(processDefinition.getName());
vo.setVersion(processDefinition.getVersion());
vo.setCategory(processDefinition.getCategory());
vo.setDeploymentId(processDefinition.getDeploymentId());
vo.setSuspended(processDefinition.isSuspended());
// 流程部署信息
vo.setCategory(deployment.getCategory());
vo.setDeploymentTime(deployment.getDeploymentTime());
retList.add(vo);
}
return retList;
}
/**
*
*
* @param definitionIds
* @return
*/
@Override
public int deleteFlowableDeployByDefinitionIds(String[] definitionIds)
{
for (String deployId : definitionIds) {
repositoryService.deleteDeployment(deployId, true);
//deployFormMapper.delete(new LambdaQueryWrapper<WfDeployForm>().eq(WfDeployForm::getDeployId, deployId));
}
return definitionIds.length;
}
/**
*
*
* @param definitionId
* @return
*/
@Override
public int deleteFlowableDeployByDefinitionId(String definitionId)
{
repositoryService.deleteDeployment(definitionId, true);
return 1;
}
/**
*
* @param processKey
* @return
*/
@Override
public List<FlowableDeploy> queryPublishList(String processKey) {
// 创建查询条件
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processKey)
.orderByProcessDefinitionVersion()
.desc();
long pageTotal = processDefinitionQuery.count();
if (pageTotal <= 0) {
return new ArrayList<>();
}
// 根据查询条件,查询所有版本
PageDomain pageDomain = TableSupport.getPageDomain();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
int offset = pageSize * (pageNum - 1);
List<ProcessDefinition> processDefinitionList = processDefinitionQuery
.listPage(offset, pageSize);
List<FlowableDeploy> retList = processDefinitionList.stream().map(item -> {
FlowableDeploy vo = new FlowableDeploy();
vo.setDefinitionId(item.getId());
vo.setProcessKey(item.getKey());
vo.setProcessName(item.getName());
vo.setVersion(item.getVersion());
vo.setCategory(item.getCategory());
vo.setDeploymentId(item.getDeploymentId());
vo.setSuspended(item.isSuspended());
return vo;
}).collect(Collectors.toList());
return retList;
}
/**
*
*
* @param definitionId
* @param stateCode
*/
@Override
public void updateState(String definitionId, String stateCode) {
if (SuspensionState.ACTIVE.toString().equals(stateCode)) {
// 激活
repositoryService.activateProcessDefinitionById(definitionId, true, null);
} else if (SuspensionState.SUSPENDED.toString().equals(stateCode)) {
// 挂起
repositoryService.suspendProcessDefinitionById(definitionId, true, null);
}
}
/**
*
*
* @param definitionId
* @return
*/
@Override
public String queryBpmnXmlById(String definitionId) {
InputStream inputStream = repositoryService.getProcessModel(definitionId);
try {
return StringUtils.utf8Str(inputStream);
} catch (Exception exception) {
throw new RuntimeException("加载xml文件异常");
}
}
}

View File

@ -1,109 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.flowable.domain.FlowableFieldDef;
import com.yanzhu.flowable.domain.FlowableFieldSearch;
import com.yanzhu.flowable.mapper.FlowableFieldDefMapper;
import com.yanzhu.flowable.service.IFlowableFieldDefService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-26
*/
@Service
public class FlowableFieldDefServiceImpl implements IFlowableFieldDefService
{
@Autowired
private FlowableFieldDefMapper flowableFieldDefMapper;
/**
*
*
* @param id
* @return
*/
@Override
public FlowableFieldDef selectFlowableFieldDefById(String id)
{
return flowableFieldDefMapper.selectFlowableFieldDefById(id);
}
/**
*
*
* @param flowableFieldDef
* @return
*/
@Override
public List<FlowableFieldDef> selectFlowableFieldDefList(FlowableFieldDef flowableFieldDef)
{
return flowableFieldDefMapper.selectFlowableFieldDefList(flowableFieldDef);
}
/**
*
*
* @param flowableFieldDef
* @return
*/
@Override
public int insertFlowableFieldDef(FlowableFieldDef flowableFieldDef)
{
flowableFieldDef.setCreateTime(DateUtils.getNowDate());
return flowableFieldDefMapper.insertFlowableFieldDef(flowableFieldDef);
}
/**
*
*
* @param flowableFieldDef
* @return
*/
@Override
public int updateFlowableFieldDef(FlowableFieldDef flowableFieldDef)
{
flowableFieldDef.setUpdateTime(DateUtils.getNowDate());
return flowableFieldDefMapper.updateFlowableFieldDef(flowableFieldDef);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteFlowableFieldDefByIds(String[] ids)
{
return flowableFieldDefMapper.deleteFlowableFieldDefByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteFlowableFieldDefById(String id)
{
return flowableFieldDefMapper.deleteFlowableFieldDefById(id);
}
/**
* (,)
*
* @param flowableFieldSearch
* @return
*/
@Override
public List<FlowableFieldDef> listCombination(FlowableFieldSearch flowableFieldSearch) {
return flowableFieldDefMapper.listCombination(flowableFieldSearch);
}
}

View File

@ -1,97 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.flowable.domain.FlowableFieldRef;
import com.yanzhu.flowable.mapper.FlowableFieldRefMapper;
import com.yanzhu.flowable.service.IFlowableFieldRefService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-26
*/
@Service
public class FlowableFieldRefServiceImpl implements IFlowableFieldRefService
{
@Autowired
private FlowableFieldRefMapper flowableFieldRefMapper;
/**
*
*
* @param id
* @return
*/
@Override
public FlowableFieldRef selectFlowableFieldRefById(String id)
{
return flowableFieldRefMapper.selectFlowableFieldRefById(id);
}
/**
*
*
* @param flowableFieldRef
* @return
*/
@Override
public List<FlowableFieldRef> selectFlowableFieldRefList(FlowableFieldRef flowableFieldRef)
{
return flowableFieldRefMapper.selectFlowableFieldRefList(flowableFieldRef);
}
/**
*
*
* @param flowableFieldRef
* @return
*/
@Override
public int insertFlowableFieldRef(FlowableFieldRef flowableFieldRef)
{
flowableFieldRef.setCreateTime(DateUtils.getNowDate());
return flowableFieldRefMapper.insertFlowableFieldRef(flowableFieldRef);
}
/**
*
*
* @param flowableFieldRef
* @return
*/
@Override
public int updateFlowableFieldRef(FlowableFieldRef flowableFieldRef)
{
flowableFieldRef.setUpdateTime(DateUtils.getNowDate());
return flowableFieldRefMapper.updateFlowableFieldRef(flowableFieldRef);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteFlowableFieldRefByIds(String[] ids)
{
return flowableFieldRefMapper.deleteFlowableFieldRefByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteFlowableFieldRefById(String id)
{
return flowableFieldRefMapper.deleteFlowableFieldRefById(id);
}
}

View File

@ -1,183 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.domain.FlowableModelPage;
import com.yanzhu.flowable.mapper.FlowableModelPageMapper;
import com.yanzhu.flowable.service.IFlowableModelPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-12-25
*/
@Service
public class FlowableModelPageServiceImpl implements IFlowableModelPageService
{
@Autowired
private FlowableModelPageMapper flowableModelPageMapper;
/**
*
*
* @param id
* @return
*/
@Override
public FlowableModelPage selectFlowableModelPageById(String id)
{
return flowableModelPageMapper.selectFlowableModelPageById(id);
}
/**
*
*
* @param flowableModelPage
* @return
*/
@Override
public List<FlowableModelPage> selectFlowableModelPageList(FlowableModelPage flowableModelPage)
{
return flowableModelPageMapper.selectFlowableModelPageList(flowableModelPage);
}
/**
*
*
* @param flowableModelPage
* @return
*/
@Override
public int insertFlowableModelPage(FlowableModelPage flowableModelPage)
{
flowableModelPage.setCreateTime(DateUtils.getNowDate());
//设置创建用户id及用户名
flowableModelPage.setCreateBy(SecurityUtils.getUsername());
return flowableModelPageMapper.insertFlowableModelPage(flowableModelPage);
}
/**
*
*
* @param flowableModelPage
* @return
*/
@Override
public int updateFlowableModelPage(FlowableModelPage flowableModelPage)
{
flowableModelPage.setUpdateTime(DateUtils.getNowDate());
//设置更新用户用户名
flowableModelPage.setUpdateBy(SecurityUtils.getUsername());
return flowableModelPageMapper.updateFlowableModelPage(flowableModelPage);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteFlowableModelPageByIds(String[] ids)
{
return flowableModelPageMapper.deleteFlowableModelPageByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteFlowableModelPageById(String id)
{
return flowableModelPageMapper.deleteFlowableModelPageById(id);
}
/**
*
*
* @param flowableModelPage
* @return
*/
@Override
public List<FlowableModelPage> selectFlowableModelPageListByBind(FlowableModelPage flowableModelPage) {
FlowableModelPage searchModelPage = new FlowableModelPage();
//参数检查
//模块不能为空
if(StringUtils.isEmpty(flowableModelPage.getModule()))
throw new ServiceException("模块名称不能为空!");
//流程标识不能为空
if(StringUtils.isEmpty(flowableModelPage.getMkey()))
throw new ServiceException("流程标识不能空!");
//页面名称不能为空
if(StringUtils.isEmpty(flowableModelPage.getName()))
throw new ServiceException("页面名称不能为空!");
searchModelPage.setModule(flowableModelPage.getModule());
searchModelPage.setMkey(flowableModelPage.getMkey());
searchModelPage.setName(flowableModelPage.getName());
return flowableModelPageMapper.selectFlowableModelPageList(searchModelPage);
}
/***
* )
* @param flowableModelPage
* @return
*/
@Override
public FlowableModelPage selectFlowableModelPageSingle(FlowableModelPage flowableModelPage) {
FlowableModelPage searchModelPage = new FlowableModelPage();
//参数检查
//模块不能为空
if(StringUtils.isEmpty(flowableModelPage.getModule())) {
return null;
}
//流程标识不能为空
if(StringUtils.isEmpty(flowableModelPage.getMkey())){
return null;
}
//页面名称不能为空
if(StringUtils.isEmpty(flowableModelPage.getName())){
return null;
}
searchModelPage.setModule(flowableModelPage.getModule());
searchModelPage.setMkey(flowableModelPage.getMkey());
searchModelPage.setName(flowableModelPage.getName());
List<FlowableModelPage> list = flowableModelPageMapper.selectFlowableModelPageList(searchModelPage);
if(CollectionUtils.isEmpty(list)){
return null;
}else{
return list.get(0);
}
}
/**
* )
*
* @param flowableModelPage
* @return
*/
@Override
public List<FlowableModelPage> selectFlowableModelPage(FlowableModelPage flowableModelPage) {
FlowableModelPage searchModelPage = new FlowableModelPage();
//参数检查
//模块不能为空
if(StringUtils.isEmpty(flowableModelPage.getModule()))
throw new ServiceException("模块名称不能为空!");
//流程标识不能为空
if(StringUtils.isEmpty(flowableModelPage.getMkey()))
throw new ServiceException("流程标识不能空!");
searchModelPage.setModule(flowableModelPage.getModule());
searchModelPage.setMkey(flowableModelPage.getMkey());
return flowableModelPageMapper.selectFlowableModelPageList(searchModelPage);
}
}

View File

@ -1,423 +0,0 @@
package com.yanzhu.flowable.service.impl;
import com.alibaba.fastjson2.JSON;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.web.page.PageDomain;
import com.yanzhu.common.core.web.page.TableSupport;
import com.yanzhu.common.redis.service.RedisService;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.common.constant.ProcessConstants;
import com.yanzhu.flowable.common.enums.CacheType;
import com.yanzhu.flowable.common.enums.FormType;
import com.yanzhu.flowable.domain.FlowableModel;
import com.yanzhu.flowable.domain.bo.FlowableMetaInfoBo;
import com.yanzhu.flowable.domain.bo.FlowableModelBo;
import com.yanzhu.flowable.factory.FlowServiceFactory;
import com.yanzhu.flowable.flow.ModelHelper;
import com.yanzhu.flowable.service.IFlowableCategoryService;
import com.yanzhu.flowable.service.IFlowableModelService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.StartEvent;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.Model;
import org.flowable.engine.repository.ModelQuery;
import org.flowable.engine.repository.ProcessDefinition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Service
*
* @author ruoyi
* @createtime 2023-11-28
*/
@Service
@Slf4j
public class FlowableModelServiceImpl extends FlowServiceFactory implements IFlowableModelService
{
@Autowired
private RedisService redisService;
@Autowired
private IFlowableCategoryService flowableCategoryService;
/**
*
*
* @param modelId
* @return
*/
@Override
public FlowableModel selectFlowableModelByModelId(String modelId)
{
// 获取流程模型
Model model = repositoryService.getModel(modelId);
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
// 获取流程图
String bpmnXml ;
try {
bpmnXml = queryBpmnXmlById(modelId);
} catch (UnsupportedEncodingException e) {
//e.printStackTrace();
log.error("模型转换为字符串失败模型id:"+modelId,e);
throw new RuntimeException("模型转换为字符串失败!");
}
FlowableModel modelVo = new FlowableModel();
modelVo.setModelId(model.getId());
modelVo.setModelName(model.getName());
modelVo.setModelKey(model.getKey());
modelVo.setCategory(model.getCategory());
modelVo.setCreateTime(model.getCreateTime());
modelVo.setVersion(model.getVersion());
modelVo.setBpmnXml(bpmnXml);
FlowableMetaInfoBo metaInfo = JSON.parseObject(model.getMetaInfo(), FlowableMetaInfoBo.class);
if (metaInfo != null) {
modelVo.setDescription(metaInfo.getDescription());
modelVo.setFormType(metaInfo.getFormType());
modelVo.setFormId(metaInfo.getFormId());
if (FormType.PROCESS.getType().equals(metaInfo.getFormType())) {
//TODO
//WfFormVo wfFormVo = formService.queryById(metaInfo.getFormId());
//modelVo.setContent(wfFormVo.getContent());
}
}
return modelVo;
}
/**
*
*
* @param flowableModel
* @return
*/
@Override
public List<FlowableModel> selectFlowableModelList(FlowableModelBo flowableModel)
{
PageDomain pageDomain = TableSupport.getPageDomain();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
ModelQuery modelQuery = repositoryService.createModelQuery().latestVersion().orderByCreateTime().desc();
// 构建查询条件
if (StringUtils.isNotBlank(flowableModel.getModelKey())) {
modelQuery.modelKey(flowableModel.getModelKey());
}
if (StringUtils.isNotBlank(flowableModel.getModelName())) {
modelQuery.modelNameLike("%" + flowableModel.getModelName() + "%");
}
if (StringUtils.isNotBlank(flowableModel.getCategory())) {
modelQuery.modelCategory(flowableModel.getCategory());
}
// 执行查询
long pageTotal = modelQuery.count();
if (pageTotal <= 0) {
return new ArrayList<>();
}
//有bug 先注掉
//modelQuery = modelQuery.latestVersion();
int offset = pageSize * (pageNum - 1);
List<Model> modelList = modelQuery.listPage(offset, pageSize);
List<FlowableModel> flowableModelList = new ArrayList<>(modelList.size());
//获取流程分类缓存
Map<String,String> flowCategoryMap = redisService.getCacheObject(CacheType.FLOWCATEGORY.getCode());
if(flowCategoryMap==null){
flowCategoryMap = flowableCategoryService.updateRedis(null);
}
Map<String, String> finalFlowCategoryMap = flowCategoryMap;
modelList.forEach(model -> {
FlowableModel modelVo = new FlowableModel();
modelVo.setModelId(model.getId());
modelVo.setModelName(model.getName());
modelVo.setModelKey(model.getKey());
//翻译分类
modelVo.setCategory(finalFlowCategoryMap.get(model.getCategory()));
modelVo.setCreateTime(model.getCreateTime());
modelVo.setVersion(model.getVersion());
FlowableMetaInfoBo metaInfo = JSON.parseObject(model.getMetaInfo(), FlowableMetaInfoBo.class);
if (metaInfo != null) {
modelVo.setDescription(metaInfo.getDescription());
modelVo.setFormType(metaInfo.getFormType());
modelVo.setFormId(metaInfo.getFormId());
}
flowableModelList.add(modelVo);
});
return flowableModelList;
}
/**
*
*
* @param flowableModel
* @return
*/
@Override
public int insertFlowableModel(FlowableModel flowableModel)
{
flowableModel.setCreateTime(DateUtils.getNowDate());
Model model = repositoryService.newModel();
model.setName(flowableModel.getModelName());
model.setKey(flowableModel.getModelKey());
model.setCategory(flowableModel.getCategory());
String metaInfo = buildMetaInfo(new FlowableMetaInfoBo(), flowableModel.getDescription());
model.setMetaInfo(metaInfo);
// 保存流程模型
repositoryService.saveModel(model);
return 1;
}
/**
*
*
* @param flowableModel
* @return
*/
@Override
public int updateFlowableModel(FlowableModel flowableModel)
{
// 根据模型Key查询模型信息
Model model = repositoryService.getModel(flowableModel.getModelId());
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
model.setCategory(flowableModel.getCategory());
FlowableMetaInfoBo metaInfoDto = JSON.parseObject(model.getMetaInfo(), FlowableMetaInfoBo.class);
String metaInfo = buildMetaInfo(metaInfoDto, flowableModel.getDescription());
model.setMetaInfo(metaInfo);
// 保存流程模型
repositoryService.saveModel(model);
return 1;
}
/**
*
*
* @param modelIds
* @return
*/
@Override
public int deleteFlowableModelByModelIds(String[] modelIds)
{
for(String id:modelIds){
Model model = repositoryService.getModel(id);
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
repositoryService.deleteModel(id);
}
return modelIds.length;
}
/**
*
*
* @param modelId
*/
@Override
public void deleteFlowableModelByModelId(String modelId)
{
Model model = repositoryService.getModel(modelId);
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
repositoryService.deleteModel(modelId);
}
/**
*
*
* @param modelId id
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void deployModel(String modelId) throws UnsupportedEncodingException {
// 获取流程模型
Model model = repositoryService.getModel(modelId);
if (model== null) {
throw new RuntimeException("流程模型不存在!");
}
// 获取流程图
String bpmnXml = queryBpmnXmlById(modelId);
//BpmnModel bpmnModel = ModelHelper.getBpmnModel(bpmnXml);
String processName = model.getName() + ProcessConstants.SUFFIX;
Deployment deployment = repositoryService.createDeployment()
.key(model.getKey())
.name(model.getName())
.category(model.getCategory())
.addString(model.getKey() + ".bpmn20.xml", bpmnXml)
.deploy();
// 调整分类
ProcessDefinition precessDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult();
repositoryService.setProcessDefinitionCategory(precessDefinition.getId(),model.getCategory());
// TODO:保存部署表单
}
/**
*
* @return
*/
private String buildMetaInfo(FlowableMetaInfoBo metaInfo, String description) {
// 只有非空,才进行设置,避免更新时的覆盖
if (StringUtils.isNotEmpty(description)) {
metaInfo.setDescription(description);
}
if (StringUtils.isNotEmpty(metaInfo.getCreateUser())) {
metaInfo.setCreateUser(SecurityUtils.getUsername());
}
return JSON.toJSONString(metaInfo);
}
/**
*
* @param modelId id
* @return
*/
public String queryBpmnXmlById(String modelId) throws UnsupportedEncodingException {
byte[] bpmnBytes = repositoryService.getModelEditorSource(modelId);
if(bpmnBytes!=null) {
return new String(bpmnBytes, StandardCharsets.UTF_8);
}else{
return new String("");
}
}
/**
*
*
* @param modelBo
* @return
*/
@Override
public List<FlowableModel> historyList(FlowableModelBo modelBo) {
ModelQuery modelQuery = repositoryService.createModelQuery()
.modelKey(modelBo.getModelKey())
.orderByModelVersion()
.desc();
// 执行查询(不显示最新版,-1
long pageTotal = modelQuery.count() - 1;
if (pageTotal <= 0) {
return new ArrayList<>();
}
PageDomain pageDomain = TableSupport.getPageDomain();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
// offset+1去掉最新版
int offset = 1 + pageSize * (pageNum - 1);
List<Model> modelList = modelQuery.listPage(offset, pageSize);
List<FlowableModel> modelVoList = new ArrayList<>(modelList.size());
modelList.forEach(model -> {
FlowableModel modelVo = new FlowableModel();
modelVo.setModelId(model.getId());
modelVo.setModelName(model.getName());
modelVo.setModelKey(model.getKey());
modelVo.setCategory(model.getCategory());
modelVo.setCreateTime(model.getCreateTime());
modelVo.setVersion(model.getVersion());
FlowableMetaInfoBo metaInfo = JSON.parseObject(model.getMetaInfo(), FlowableMetaInfoBo.class);
if (metaInfo != null) {
modelVo.setDescription(metaInfo.getDescription());
modelVo.setFormType(metaInfo.getFormType());
modelVo.setFormId(metaInfo.getFormId());
}
modelVoList.add(modelVo);
});
return modelVoList;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void saveModel(FlowableModelBo modelBo) {
// 查询模型信息
Model model = repositoryService.getModel(modelBo.getModelId());
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
log.info("==========bpmnxml=========");
log.info(modelBo.getBpmnXml());
BpmnModel bpmnModel = ModelHelper.getBpmnModel(modelBo.getBpmnXml());
if (bpmnModel==null) {
throw new RuntimeException("获取模型设计失败!");
}
//String processName = bpmnModel.getMainProcess().getName();
// 获取开始节点
StartEvent startEvent = ModelHelper.getStartEvent(bpmnModel);
if (startEvent==null) {
throw new RuntimeException("开始节点不存在,请检查流程设计是否有误!");
}
// 获取开始节点配置的表单Key
// if (StringUtils.isBlank(startEvent.getFormKey())) {
// throw new RuntimeException("请配置流程表单");
// }
Model newModel;
if (Boolean.TRUE.equals(modelBo.getNewVersion())) {
newModel = repositoryService.newModel();
newModel.setName(model.getName());
newModel.setKey(model.getKey());
newModel.setCategory(model.getCategory());
newModel.setMetaInfo(model.getMetaInfo());
//获取最大版本号
ModelQuery modelQuery = repositoryService.createModelQuery()
.modelName(model.getName())
.modelCategory(model.getCategory())
.orderByModelVersion()
.desc();
int offset = 1 * (1 - 1);
List<Model> modelList = modelQuery.listPage(offset, 1);
newModel.setVersion(modelList.get(0).getVersion() + 1);
} else {
newModel = model;
// 设置流程名称
newModel.setName(model.getName());
}
// 保存流程模型
repositoryService.saveModel(newModel);
// 保存 BPMN XML
repositoryService.addModelEditorSource(newModel.getId(), ModelHelper.getBpmnXml(bpmnModel));
}
/**
*
*
* @param modelId
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void latestModel(String modelId) throws UnsupportedEncodingException {
// 获取流程模型
Model model = repositoryService.getModel(modelId);
if (model==null) {
throw new RuntimeException("流程模型不存在!");
}
String bpmnXml = queryBpmnXmlById(modelId);
Integer latestVersion = repositoryService.createModelQuery()
.modelKey(model.getKey())
.latestVersion()
.singleResult()
.getVersion();
if (model.getVersion().equals(latestVersion)) {
throw new RuntimeException("当前版本已是最新版!");
}
Model newModel = repositoryService.newModel();
newModel.setName(model.getName());
newModel.setKey(model.getKey());
newModel.setCategory(model.getCategory());
newModel.setMetaInfo(model.getMetaInfo());
newModel.setVersion(latestVersion + 1);
// 保存流程模型
repositoryService.saveModel(newModel);
// 保存 BPMN XML
repositoryService.addModelEditorSource(newModel.getId(), bpmnXml.getBytes(StandardCharsets.UTF_8));
}
}

View File

@ -0,0 +1,105 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.flowable.domain.SysDeployForm;
import com.yanzhu.flowable.domain.SysForm;
import com.yanzhu.flowable.mapper.SysDeployFormMapper;
import com.yanzhu.flowable.service.ISysDeployFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* Service
*
* @author Tony
* @date 2021-04-03
*/
@Service
public class SysDeployFormServiceImpl implements ISysDeployFormService {
@Autowired
private SysDeployFormMapper sysDeployFormMapper;
/**
*
*
* @param id ID
* @return
*/
@Override
public SysDeployForm selectSysDeployFormById(Long id) {
return sysDeployFormMapper.selectSysDeployFormById(id);
}
/**
*
*
* @param sysDeployForm
* @return
*/
@Override
public List<SysDeployForm> selectSysDeployFormList(SysDeployForm sysDeployForm) {
return sysDeployFormMapper.selectSysDeployFormList(sysDeployForm);
}
/**
*
*
* @param sysDeployForm
* @return
*/
@Override
public int insertSysDeployForm(SysDeployForm sysDeployForm) {
SysForm sysForm = sysDeployFormMapper.selectSysDeployFormByDeployId(sysDeployForm.getDeployId());
if (Objects.isNull(sysForm)) {
return sysDeployFormMapper.insertSysDeployForm(sysDeployForm);
} else {
return 1;
}
}
/**
*
*
* @param sysDeployForm
* @return
*/
@Override
public int updateSysDeployForm(SysDeployForm sysDeployForm) {
return sysDeployFormMapper.updateSysDeployForm(sysDeployForm);
}
/**
*
*
* @param ids ID
* @return
*/
@Override
public int deleteSysDeployFormByIds(Long[] ids) {
return sysDeployFormMapper.deleteSysDeployFormByIds(ids);
}
/**
*
*
* @param id ID
* @return
*/
@Override
public int deleteSysDeployFormById(Long id) {
return sysDeployFormMapper.deleteSysDeployFormById(id);
}
/**
*
*
* @param deployId
* @return
*/
@Override
public SysForm selectSysDeployFormByDeployId(String deployId) {
return sysDeployFormMapper.selectSysDeployFormByDeployId(deployId);
}
}

View File

@ -0,0 +1,97 @@
package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.flowable.domain.SysExpression;
import com.yanzhu.flowable.mapper.SysExpressionMapper;
import com.yanzhu.flowable.service.ISysExpressionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2022-12-12
*/
@Service
public class SysExpressionServiceImpl implements ISysExpressionService
{
@Autowired
private SysExpressionMapper sysExpressionMapper;
/**
*
*
* @param id
* @return
*/
@Override
public SysExpression selectSysExpressionById(Long id)
{
return sysExpressionMapper.selectSysExpressionById(id);
}
/**
*
*
* @param sysExpression
* @return
*/
@Override
public List<SysExpression> selectSysExpressionList(SysExpression sysExpression)
{
return sysExpressionMapper.selectSysExpressionList(sysExpression);
}
/**
*
*
* @param sysExpression
* @return
*/
@Override
public int insertSysExpression(SysExpression sysExpression)
{
sysExpression.setCreateTime(DateUtils.getNowDate());
return sysExpressionMapper.insertSysExpression(sysExpression);
}
/**
*
*
* @param sysExpression
* @return
*/
@Override
public int updateSysExpression(SysExpression sysExpression)
{
sysExpression.setUpdateTime(DateUtils.getNowDate());
return sysExpressionMapper.updateSysExpression(sysExpression);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteSysExpressionByIds(Long[] ids)
{
return sysExpressionMapper.deleteSysExpressionByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteSysExpressionById(Long id)
{
return sysExpressionMapper.deleteSysExpressionById(id);
}
}

Some files were not shown because too many files have changed in this diff Show More