|
|
@@ -50,6 +50,7 @@ public class VaApplyCheckValidator extends AbstractValidator {
|
|
|
String endDateStr = WtcUtils.dateToStr(applyBill.getDate("enddate"), "yyyy-MM-dd");
|
|
|
String msg = String.format(i + "、【%s】-【%s】-【%s】-【%s】-【%s】-【%s】", billNo, empName, orgName, posName, startDateStr, endDateStr);
|
|
|
msgList.add(msg);
|
|
|
+ i++;
|
|
|
}
|
|
|
String titleMsg = "以下单据存在其他关键岗位人员正在休假:\n ";
|
|
|
String errorMsg = titleMsg + String.join("\n ", msgList);
|
|
|
@@ -85,23 +86,19 @@ public class VaApplyCheckValidator extends AbstractValidator {
|
|
|
allOrgIds.add(role.getLong("roleentry.org.id"));
|
|
|
}
|
|
|
}
|
|
|
+ // 获取组织范围内的关键岗位
|
|
|
+ positionIds.addAll(WTCHelper.getKeyPositionByOrg(allOrgIds));
|
|
|
}
|
|
|
// 根据直接上级判断
|
|
|
+ // 2025-12-12 查找当前用户的主职和兼职下的所有关键岗位
|
|
|
else if ("checkbypar".equals(operateKey)) {
|
|
|
// 获取当前用户对应的employeeId
|
|
|
Long employeeId = WTCHelper.queryEmployeeIdByUserId(userId);
|
|
|
- // 获取员工当前的行政组织
|
|
|
+ // 获取员工当前的主职/兼职岗位
|
|
|
DynamicObjectCollection empPosOrgRelDyns = WTCHelper.queryEmpPosOrgRelDyns(Arrays.asList(employeeId));
|
|
|
- List<Long> orgIds = new ArrayList<Long>();
|
|
|
- orgIds.addAll(empPosOrgRelDyns.stream().map(i -> i.getLong("adminorg.id")).collect(Collectors.toList()));
|
|
|
- List<Map<String, Object>> subOrgMap = HAOSServiceHelper.querySubOrgToList(orgIds, new Date(), null);
|
|
|
- allOrgIds.addAll(subOrgMap.stream().map(i -> Long.valueOf(i.get("orgId").toString())).collect(Collectors.toList()));
|
|
|
+ List<Long> empPositionIds = empPosOrgRelDyns.stream().map(i -> i.getLong("position.id")).collect(Collectors.toList());
|
|
|
+ // 添加下级岗级关键岗位
|
|
|
+ positionIds.addAll(WTCHelper.getSubKeyPositions(empPositionIds));
|
|
|
}
|
|
|
-
|
|
|
- // 获取组织范围内的关键岗位
|
|
|
- positionIds.addAll(WTCHelper.getKeyPositionByOrg(allOrgIds));
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|