|
@@ -192,4 +192,34 @@ public class LeaveEvent extends BaseController {
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/greatThan3")
|
|
|
+ public String greatThan3(@ParamModel Map flowInstance, @ParamModel Map flowDirectionInstance, @ParamModel Map previousActivityInstance, @ParamModel Map previousGatewayInstance, @ParamModel Map nextActivityTemplate, @ParamModel Map nextGatewayInstance) {
|
|
|
+ try {
|
|
|
+ String flowInstanceId = flowInstance.get("id").toString();
|
|
|
+ LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
|
|
|
+ if(entity != null && entity.getLeaveHours() != null
|
|
|
+ && entity.getLeaveHours() > (7.5*3)){
|
|
|
+ return "true";
|
|
|
+ }
|
|
|
+ return "false";
|
|
|
+ } catch (Exception ex) {
|
|
|
+ return error(ex.getMessage(), ErrorCode.DEFAULT);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/greatThan7")
|
|
|
+ public String greatThan7(@ParamModel Map flowInstance, @ParamModel Map flowDirectionInstance, @ParamModel Map previousActivityInstance, @ParamModel Map previousGatewayInstance, @ParamModel Map nextActivityTemplate, @ParamModel Map nextGatewayInstance) {
|
|
|
+ try {
|
|
|
+ String flowInstanceId = flowInstance.get("id").toString();
|
|
|
+ LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
|
|
|
+ if(entity != null && entity.getLeaveHours() != null
|
|
|
+ && entity.getLeaveHours() > (7.5*7)){
|
|
|
+ return "true";
|
|
|
+ }
|
|
|
+ return "false";
|
|
|
+ } catch (Exception ex) {
|
|
|
+ return error(ex.getMessage(), ErrorCode.DEFAULT);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|