Browse Source

请假事件修改

chenjun 1 year ago
parent
commit
51485cb379

+ 6 - 2
zjugis-business/src/main/java/com/zjugis/business/flow/leave/event/LeaveEvent.java

@@ -244,7 +244,9 @@ public class LeaveEvent extends BaseController {
         try {
         try {
             String flowInstanceId = flowInstance.get("id").toString();
             String flowInstanceId = flowInstance.get("id").toString();
             LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
             LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
-            if (entity != null && entity.getLeaveHours() != null
+            List<PostRespDTO> postList = postApi.getPostByUser(entity.getUserId()).getCheckedData();
+            Set<String> postCodes = convertSet(postList, PostRespDTO::getCode);
+            if (!CollectionUtil.contains(postCodes, "bmjl") && entity != null && entity.getLeaveHours() != null
                     && entity.getLeaveHours() > (7.5 * 7)) {
                     && entity.getLeaveHours() > (7.5 * 7)) {
                 return "true";
                 return "true";
             }
             }
@@ -259,7 +261,9 @@ public class LeaveEvent extends BaseController {
         try {
         try {
             String flowInstanceId = flowInstance.get("id").toString();
             String flowInstanceId = flowInstance.get("id").toString();
             LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
             LeaveDO entity = leaveService.findByInstanceId(flowInstanceId);
-            if (entity != null && entity.getLeaveHours() != null
+            List<PostRespDTO> postList = postApi.getPostByUser(entity.getUserId()).getCheckedData();
+            Set<String> postCodes = convertSet(postList, PostRespDTO::getCode);
+            if (!CollectionUtil.contains(postCodes, "bmjl") && entity != null && entity.getLeaveHours() != null
                     && entity.getLeaveHours() <= (7.5 * 7)) {
                     && entity.getLeaveHours() <= (7.5 * 7)) {
                 return "true";
                 return "true";
             }
             }