feat(监听器配置)

This commit is contained in:
LukaJames 2025-02-20 20:36:16 +08:00
parent 7a665940a1
commit 3952232bef
24 changed files with 97 additions and 40 deletions

View File

@ -1,6 +1,7 @@
package net.ferrum.web.controller.workflow;
import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import net.ferrum.common.annotation.Log;
import net.ferrum.common.core.controller.BaseController;
import net.ferrum.common.core.domain.PageQuery;
@ -14,7 +15,6 @@ import net.ferrum.workflow.domain.bo.WfFormBo;
import net.ferrum.workflow.domain.vo.WfFormVo;
import net.ferrum.workflow.service.IWfDeployFormService;
import net.ferrum.workflow.service.IWfFormService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

View File

@ -1,11 +1,11 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi-Flowable-Plus
name: Quotation-System-Backend
# 版本
version: ${ruoyi-flowable-plus.version}
version: ${quotation-system-backend.version}
# 版权年份
copyrightYear: 2022
copyrightYear: 2025
# 实例演示开关
demoEnabled: true
# 获取ip地址开关

View File

@ -0,0 +1,57 @@
package net.ferrum.workflow.listener;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.ferrum.flowable.utils.TaskUtils;
import net.ferrum.workflow.service.IWfProcessService;
import org.flowable.engine.TaskService;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.task.api.Task;
import org.flowable.task.api.TaskQuery;
import org.springframework.stereotype.Component;
import java.lang.reflect.Field;
import java.util.List;
/**
* 发布规格事件监听类
*
* @author 26554
* @version 1.0.0
* @since 2025/2/18
*/
@Slf4j
@Component("publishSpecificationListener")
@RequiredArgsConstructor
public class PublishSpecificationListener implements ExecutionListener {
private final IWfProcessService processService;
private final TaskService taskService;
@Override
public void notify(DelegateExecution delegateExecution) {
TaskQuery taskQuery = taskService.createTaskQuery()
.active()
.includeProcessVariables()
.taskCandidateOrAssigned(TaskUtils.getUserId())
.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
.processDefinitionId(delegateExecution.getProcessDefinitionId())
.orderByTaskCreateTime().desc();
List<Task> taskList = taskQuery.list();
taskList.forEach(task -> {
Field[] fields = task.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
log.info("属性[{}]值为:{}", field.getName(), field.get(task));
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
});
}
}

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysConfigMapper">
<mapper namespace="net.ferrum.system.mapper.SysConfigMapper">
<resultMap type="SysConfig" id="SysConfigResult">
<resultMap type="net.ferrum.system.domain.SysConfig" id="SysConfigResult">
<id property="configId" column="config_id"/>
<result property="configName" column="config_name"/>
<result property="configKey" column="config_key"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysDeptMapper">
<mapper namespace="net.ferrum.system.mapper.SysDeptMapper">
<resultMap type="SysDept" id="SysDeptResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysDept" id="SysDeptResult">
<id property="deptId" column="dept_id"/>
<result property="parentId" column="parent_id"/>
<result property="ancestors" column="ancestors"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysDictDataMapper">
<mapper namespace="net.ferrum.system.mapper.SysDictDataMapper">
<resultMap type="SysDictData" id="SysDictDataResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysDictData" id="SysDictDataResult">
<id property="dictCode" column="dict_code"/>
<result property="dictSort" column="dict_sort"/>
<result property="dictLabel" column="dict_label"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysDictTypeMapper">
<mapper namespace="net.ferrum.system.mapper.SysDictTypeMapper">
<resultMap type="SysDictType" id="SysDictTypeResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysDictType" id="SysDictTypeResult">
<id property="dictId" column="dict_id"/>
<result property="dictName" column="dict_name"/>
<result property="dictType" column="dict_type"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysLogininforMapper">
<mapper namespace="net.ferrum.system.mapper.SysLogininforMapper">
<resultMap type="SysLogininfor" id="SysLogininforResult">
<resultMap type="net.ferrum.system.domain.SysLogininfor" id="SysLogininforResult">
<id property="infoId" column="info_id"/>
<result property="userName" column="user_name"/>
<result property="status" column="status"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysMenuMapper">
<mapper namespace="net.ferrum.system.mapper.SysMenuMapper">
<resultMap type="SysMenu" id="SysMenuResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysMenu" id="SysMenuResult">
<id property="menuId" column="menu_id"/>
<result property="menuName" column="menu_name"/>
<result property="parentName" column="parent_name"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysNoticeMapper">
<mapper namespace="net.ferrum.system.mapper.SysNoticeMapper">
<resultMap type="SysNotice" id="SysNoticeResult">
<resultMap type="net.ferrum.system.domain.SysNotice" id="SysNoticeResult">
<result property="noticeId" column="notice_id"/>
<result property="noticeTitle" column="notice_title"/>
<result property="noticeType" column="notice_type"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysOperLogMapper">
<mapper namespace="net.ferrum.system.mapper.SysOperLogMapper">
<resultMap type="SysOperLog" id="SysOperLogResult">
<resultMap type="net.ferrum.system.domain.SysOperLog" id="SysOperLogResult">
<id property="operId" column="oper_id"/>
<result property="title" column="title"/>
<result property="businessType" column="business_type"/>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysOssConfigMapper">
<mapper namespace="net.ferrum.system.mapper.SysOssConfigMapper">
<resultMap type="net.ferrum.system.domain.SysOssConfig" id="SysOssConfigResult">
<result property="ossConfigId" column="oss_config_id"/>

View File

@ -1,6 +1,6 @@
<?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="net.ruoyi.system.mapper.SysOssMapper">
<mapper namespace="net.ferrum.system.mapper.SysOssMapper">
<resultMap type="net.ferrum.system.domain.SysOss" id="SysOssResult">
<result property="ossId" column="oss_id"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysPostMapper">
<mapper namespace="net.ferrum.system.mapper.SysPostMapper">
<resultMap type="SysPost" id="SysPostResult">
<resultMap type="net.ferrum.system.domain.SysPost" id="SysPostResult">
<id property="postId" column="post_id"/>
<result property="postCode" column="post_code"/>
<result property="postName" column="post_name"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysRoleDeptMapper">
<mapper namespace="net.ferrum.system.mapper.SysRoleDeptMapper">
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
<resultMap type="net.ferrum.system.domain.SysRoleDept" id="SysRoleDeptResult">
<result property="roleId" column="role_id"/>
<result property="deptId" column="dept_id"/>
</resultMap>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysRoleMapper">
<mapper namespace="net.ferrum.system.mapper.SysRoleMapper">
<resultMap type="SysRole" id="SysRoleResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysRole" id="SysRoleResult">
<id property="roleId" column="role_id"/>
<result property="roleName" column="role_name"/>
<result property="roleKey" column="role_key"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysRoleMenuMapper">
<mapper namespace="net.ferrum.system.mapper.SysRoleMenuMapper">
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
<resultMap type="net.ferrum.system.domain.SysRoleMenu" id="SysRoleMenuResult">
<result property="roleId" column="role_id"/>
<result property="menuId" column="menu_id"/>
</resultMap>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysUserMapper">
<mapper namespace="net.ferrum.system.mapper.SysUserMapper">
<resultMap type="SysUser" id="SysUserResult">
<resultMap type="net.ferrum.common.core.domain.entity.SysUser" id="SysUserResult">
<id property="userId" column="user_id"/>
<result property="deptId" column="dept_id"/>
<result property="userName" column="user_name"/>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysUserPostMapper">
<mapper namespace="net.ferrum.system.mapper.SysUserPostMapper">
<resultMap type="SysUserPost" id="SysUserPostResult">
<resultMap type="net.ferrum.system.domain.SysUserPost" id="SysUserPostResult">
<result property="userId" column="user_id"/>
<result property="postId" column="post_id"/>
</resultMap>

View File

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.system.mapper.SysUserRoleMapper">
<mapper namespace="net.ferrum.system.mapper.SysUserRoleMapper">
<resultMap type="SysUserRole" id="SysUserRoleResult">
<resultMap type="net.ferrum.system.domain.SysUserRole" id="SysUserRoleResult">
<result property="userId" column="user_id"/>
<result property="roleId" column="role_id"/>
</resultMap>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.workflow.mapper.WfCategoryMapper">
<mapper namespace="net.ferrum.workflow.mapper.WfCategoryMapper">
<resultMap type="net.ferrum.workflow.domain.WfCategory" id="FlowCategoryResult">
<result property="categoryId" column="category_id"/>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.workflow.mapper.WfCopyMapper">
<mapper namespace="net.ferrum.workflow.mapper.WfCopyMapper">
<resultMap type="net.ferrum.workflow.domain.WfCopy" id="WfCopyResult">
<result property="copyId" column="copy_id"/>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.workflow.mapper.WfDeployFormMapper">
<mapper namespace="net.ferrum.workflow.mapper.WfDeployFormMapper">
<resultMap type="net.ferrum.workflow.domain.WfDeployForm" id="WfDeployFormResult">
<result property="deployId" column="deploy_id"/>

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.ruoyi.workflow.mapper.WfFormMapper">
<mapper namespace="net.ferrum.workflow.mapper.WfFormMapper">
<resultMap type="net.ferrum.workflow.domain.WfForm" id="WfFormResult">
<result property="formId" column="form_id"/>