diff --git a/pom.xml b/pom.xml index d0a9039afb527cea6d0aef91ff38274c8e9970e6..742dd9305d35126499153e12f38740769ebb4caa 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 5.7.12 5.3.39 - 1.8.3 + 1.8.4-m3 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/VoteSignService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/VoteSignService.java new file mode 100644 index 0000000000000000000000000000000000000000..2365554718cee8827c360a1876219d1de73d2ea8 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/VoteSignService.java @@ -0,0 +1,51 @@ +package com.ruoyi.system.service; + +import org.dromara.warm.flow.core.entity.HisTask; +import org.dromara.warm.flow.core.entity.User; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 票签spel表达式计算 + * + * @author warm + * @since 2025/11/7 + */ +@Component("voteSignService") +public class VoteSignService { + + private static final Logger log = LoggerFactory.getLogger(VoteSignService.class); + + /** + * 票签通过率计算 + * + * @param skipType 跳转类型 + * @param passNum 审批通过人数 + * @param rejectNum 审批驳回人数 + * @param todoNum 待处理人数 + * @param allNum 总人数 + * @param passList List 通过历史任务列表,HisTask中approver字段是审批人的唯一标识 + * @param rejectList List 拒绝历史任务列表,HisTask中approver字段是审批人的唯一标识 + * @param todoList 待处理用户列表 + * @return boolean + */ + public boolean eval(String skipType, Integer passNum, Integer rejectNum, Integer todoNum, Integer allNum + , List passList, List rejectList, List todoList ) { + + log.info("跳过类型: {}", skipType); + log.info("通过数量: {}", passNum); + log.info("拒绝数量: {}", rejectNum); + log.info("待处理数量: {}", todoNum); + log.info("总人数: {}", allNum); + log.info("通过历史任务列表: {}", passList); + log.info("拒绝历史任务列表: {}", rejectList); + log.info("待处理用户列表: {}", todoList); + log.info("开始票签通过率计算......"); + + return true; + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TestLeaveServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TestLeaveServiceImpl.java index c91ddad4fb1dee565111d47a230a8859b05b241e..733bfd511d6132327d83df210f38332e3dcb36a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TestLeaveServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/TestLeaveServiceImpl.java @@ -107,7 +107,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService variable.put("businessData", testLeave); variable.put("businessType", "testLeave"); // 条件表达式替换,判断是否满足某个任务的跳转条件 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); // 办理人表达式替换 【按需传】 variable.put("handler1", Arrays.asList(4, "5", 100L)); variable.put("handler2", 12L); @@ -212,7 +212,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 更新请假表 @@ -254,7 +254,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 自定义流程状态扩展 【按需传】 if (StringUtils.isNotEmpty(flowStatus)) { @@ -298,7 +298,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 自定义流程状态扩展 【按需传】 if (StringUtils.isNotEmpty(flowStatus)) { @@ -342,7 +342,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 自定义流程状态扩展 【按需传】 if (StringUtils.isNotEmpty(flowStatus)) { @@ -377,7 +377,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 请假信息存入flowParams,方便查看历史审批数据 【按需传】 flowParams.hisTaskExt(JSON.toJSONString(testLeave)); @@ -408,7 +408,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService // 流程变量传递业务数据,按实际业务需求传递 【按需传】 variable.put("businessType", "testLeave"); // 办理人表达式替换 【按需传】 - variable.put("flag", String.valueOf(testLeave.getDay())); + variable.put("flag", testLeave.getDay()); flowParams.variable(variable); // 请假信息存入flowParams,方便查看历史审批数据 【按需传】 flowParams.hisTaskExt(JSON.toJSONString(testLeave)); diff --git a/ruoyi-ui/src/views/flow/definition/index.vue b/ruoyi-ui/src/views/flow/definition/index.vue index 1221e9d3acbd6e783b805171df168ab9e8075ac4..c89ccfa9ab23fd04f8e395b3c2e3183601269ebe 100644 --- a/ruoyi-ui/src/views/flow/definition/index.vue +++ b/ruoyi-ui/src/views/flow/definition/index.vue @@ -127,6 +127,18 @@ @click="handleDesign(scope.row.id, true)" v-hasPermi="['flow:definition:queryDesign']" >流程设计② + 查看流程图① + 查看流程图②