From 2953a1ba876581ca949ba8cda8aadd0e0f1bd564 Mon Sep 17 00:00:00 2001 From: weishengyou <2454197255@qq.com> Date: Fri, 3 Apr 2026 14:10:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(flowable):=20=E5=A4=84=E7=90=86=E8=AF=B7?= =?UTF-8?q?=E5=81=87=E5=A4=A9=E6=95=B0=E5=8F=98=E9=87=8F=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=20=E5=BD=93leaveDays=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=BB=8E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E6=9F=A5=E8=AF=A2=E5=B9=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E8=AF=B7=E5=81=87=E5=A4=A9=E6=95=B0?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../srs/flowable/listener/LeaveApproveListener.java | 10 ++++++++++ .../flowable/listener/LeaveStartApproveListener.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveApproveListener.java b/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveApproveListener.java index 7cfb105..3df16a9 100644 --- a/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveApproveListener.java +++ b/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveApproveListener.java @@ -37,6 +37,16 @@ public class LeaveApproveListener implements ExecutionListener { // 获取请假天数 BigDecimal leaveDays = (BigDecimal) delegateExecution.getVariable("leaveDays"); + if (leaveDays == null) { + String leaveAppId = delegateExecution.getVariable("leaveApplicationId").toString(); + if (leaveAppId != null) { + StuLeaveApplication stu = leaveMapper.selectRtStuLeaveApplicationByLeaveApplicationId(leaveAppId); + if (stu != null && stu.getLeaveDays() != null) { + leaveDays = new BigDecimal(stu.getLeaveDays().toString()); + delegateExecution.setVariable("leaveDays", leaveDays); + } + } + } // 请假单id // 报错信息 diff --git a/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveStartApproveListener.java b/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveStartApproveListener.java index bd41ead..2641869 100644 --- a/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveStartApproveListener.java +++ b/srs-flowable/src/main/java/com/srs/flowable/listener/LeaveStartApproveListener.java @@ -30,6 +30,16 @@ public class LeaveStartApproveListener implements ExecutionListener { // 获取请假天数 BigDecimal leaveDays = (BigDecimal) delegateExecution.getVariable("leaveDays"); + if (leaveDays == null) { + String leaveAppId = delegateExecution.getVariable("leaveApplicationId").toString(); + if (leaveAppId != null) { + StuLeaveApplication stu = leaveMapper.selectRtStuLeaveApplicationByLeaveApplicationId(leaveAppId); + if (stu != null && stu.getLeaveDays() != null) { + leaveDays = new BigDecimal(stu.getLeaveDays().toString()); + delegateExecution.setVariable("leaveDays", leaveDays); + } + } + } // 辅导员审批结果 String approval = delegateExecution.getVariable("approval").toString();