浏览代码

修复撤回判断

caixiaofeng 6 月之前
父节点
当前提交
65610f6031

+ 1 - 2
flow-workflow/flow-workflow-biz/src/main/java/com/flow/service/impl/FlowInstanceServiceImpl.java

@@ -137,8 +137,7 @@ public class FlowInstanceServiceImpl extends BaseServiceImpl<FlowInstanceDao, Fl
                 throw new BaseException("无法撤回流程");
                 throw new BaseException("无法撤回流程");
             }
             }
             LocalDateTime startTime = instance.getStartTime();
             LocalDateTime startTime = instance.getStartTime();
-            startTime.plusDays(cancelDays);
-            if (LocalDateTime.now().isBefore(startTime)) {
+            if (LocalDateTime.now().isAfter(startTime.plusDays(cancelDays))) {
                 throw new BaseException("流程撤回时间已过");
                 throw new BaseException("流程撤回时间已过");
             }
             }
             taskService.createTaskQuery().processInstanceId(instanceId).list().forEach(task -> {
             taskService.createTaskQuery().processInstanceId(instanceId).list().forEach(task -> {