Browse Source

流程撤回限制

caixiaofeng 10 months ago
parent
commit
e082721564

+ 3 - 0
flow-workflow/flow-workflow-biz/src/main/java/com/flow/service/impl/FlowInstanceServiceImpl.java

@@ -117,6 +117,9 @@ public class FlowInstanceServiceImpl extends BaseServiceImpl<FlowInstanceDao, Fl
                 throw new BaseException("流程已结束,不能撤回");
             }
             Integer cancelDays = instance.getCancelDays();
+            if (cancelDays <= 0) {
+                throw new BaseException("无法撤回流程");
+            }
             LocalDateTime startTime = instance.getStartTime();
             startTime.plusDays(cancelDays);
             if (LocalDateTime.now().isAfter(startTime)) {