|
@@ -244,7 +244,9 @@ public class LeaveEvent extends BaseController {
|
|
|
try {
|
|
|
String flowInstanceId = flowInstance.get("id").toString();
|
|
|
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)) {
|
|
|
return "true";
|
|
|
}
|
|
@@ -259,7 +261,9 @@ public class LeaveEvent extends BaseController {
|
|
|
try {
|
|
|
String flowInstanceId = flowInstance.get("id").toString();
|
|
|
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)) {
|
|
|
return "true";
|
|
|
}
|