From b4d462e10ba47b71c6bd4212e2da6831933e5433 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期日, 15 三月 2026 14:32:36 +0800
Subject: [PATCH] 运维修改
---
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java | 80 ++++++++++++++++++++--------------------
1 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
index 653c716..17a2c73 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
@@ -158,46 +158,46 @@
}
}
- if (!CollectionUtils.isEmpty(clockOutPlanListLast)){
- List<Long> fleetIds = clockOutPlanListLast.stream().map(XpSchedulingDetail::getFleetId).distinct().collect(Collectors.toList());
- // 查询所有车队的绑定人员
- List<XpFleetOperations> xpFleetOperations = xpFleetOperationsClient.getOperationsIdsByFleetIds(fleetIds).getData();
- // 查询班次
- List<Long> shiftIds = clockOutPlanListLast.stream().map(XpSchedulingDetail::getShiftId).collect(Collectors.toList());
- List<XpShift> xpShifts = xpShiftService.list(Wrappers.lambdaQuery(XpShift.class)
- .in(XpShift::getId, shiftIds));
- log.info("========== 查询到{}个车队 ==========", xpFleetOperations.size());
-
- // 处理下班卡缺卡情况
- // 过滤当前时间在班次下班打卡时间之后5小时的数据 今日已过下班打卡时间5小时后的班次
- List<XpShift> shiftListFive = xpShifts.stream().filter(xpShift ->
- DateUtils.stringToLocalDateTime(LocalDate.now().minusDays(1) + " " + xpShift.getEndTime() + ":00").plusHours(5).isBefore(LocalDateTime.now())).collect(Collectors.toList());
- List<Long> fiveIds = shiftListFive.stream().map(XpShift::getId).collect(Collectors.toList());
- if(!CollectionUtils.isEmpty(fiveIds)){
- log.info("========== 进入下班过期的班次 ==========");
- // 获取过期当前班次的排班明细 覆盖
- List<XpSchedulingDetail> fiveClockOutPlans = clockOutPlanListLast.stream().filter(xpSchedulingDetail -> fiveIds.contains(xpSchedulingDetail.getShiftId())).collect(Collectors.toList());
- List<Long> fiveFleetIdIn = fiveClockOutPlans.stream().map(XpSchedulingDetail::getFleetId).collect(Collectors.toList());
- // 查询所有车队的绑定人员
- if(!CollectionUtils.isEmpty(xpFleetOperations)){
- List<Long> operationsUserIdsFive = xpFleetOperations.stream().filter(x -> fiveFleetIdIn.contains(x.getFleetId()))
- .map(XpFleetOperations::getOperationsUserId).distinct().collect(Collectors.toList());
- // 批量查询人员打卡信息
- List<XpClockIn> clockInListFive = xpClockInService.list(Wrappers.lambdaQuery(XpClockIn.class)
- .in(XpClockIn::getAppUserId, operationsUserIdsFive)
- .isNull(XpClockIn::getClockOutTime));
- log.info("========== 获取到{}个人员没有下班打卡信息 ==========", clockInListFive.size());
- if(!CollectionUtils.isEmpty(clockInListFive)){
- for (XpClockIn xpClockIn : clockInListFive) {
- xpClockIn.setClockOutTime(LocalDateTime.now());
- xpClockIn.setClockOutResult(3);
- }
- xpClockInService.updateBatchById(clockInListFive);
- log.info("========== 修改为下班缺卡 ==========");
- }
- }
- }
- }
+// if (!CollectionUtils.isEmpty(clockOutPlanListLast)){
+// List<Long> fleetIds = clockOutPlanListLast.stream().map(XpSchedulingDetail::getFleetId).distinct().collect(Collectors.toList());
+// // 查询所有车队的绑定人员
+// List<XpFleetOperations> xpFleetOperations = xpFleetOperationsClient.getOperationsIdsByFleetIds(fleetIds).getData();
+// // 查询班次
+// List<Long> shiftIds = clockOutPlanListLast.stream().map(XpSchedulingDetail::getShiftId).collect(Collectors.toList());
+// List<XpShift> xpShifts = xpShiftService.list(Wrappers.lambdaQuery(XpShift.class)
+// .in(XpShift::getId, shiftIds));
+// log.info("========== 查询到{}个车队 ==========", xpFleetOperations.size());
+//
+// // 处理下班卡缺卡情况
+// // 过滤当前时间在班次下班打卡时间之后5小时的数据 今日已过下班打卡时间5小时后的班次
+// List<XpShift> shiftListFive = xpShifts.stream().filter(xpShift ->
+// DateUtils.stringToLocalDateTime(LocalDate.now().minusDays(1) + " " + xpShift.getEndTime() + ":00").plusHours(5).isBefore(LocalDateTime.now())).collect(Collectors.toList());
+// List<Long> fiveIds = shiftListFive.stream().map(XpShift::getId).collect(Collectors.toList());
+// if(!CollectionUtils.isEmpty(fiveIds)){
+// log.info("========== 进入下班过期的班次 ==========");
+// // 获取过期当前班次的排班明细 覆盖
+// List<XpSchedulingDetail> fiveClockOutPlans = clockOutPlanListLast.stream().filter(xpSchedulingDetail -> fiveIds.contains(xpSchedulingDetail.getShiftId())).collect(Collectors.toList());
+// List<Long> fiveFleetIdIn = fiveClockOutPlans.stream().map(XpSchedulingDetail::getFleetId).collect(Collectors.toList());
+// // 查询所有车队的绑定人员
+// if(!CollectionUtils.isEmpty(xpFleetOperations)){
+// List<Long> operationsUserIdsFive = xpFleetOperations.stream().filter(x -> fiveFleetIdIn.contains(x.getFleetId()))
+// .map(XpFleetOperations::getOperationsUserId).distinct().collect(Collectors.toList());
+// // 批量查询人员打卡信息
+// List<XpClockIn> clockInListFive = xpClockInService.list(Wrappers.lambdaQuery(XpClockIn.class)
+// .in(XpClockIn::getAppUserId, operationsUserIdsFive)
+// .isNull(XpClockIn::getClockOutTime));
+// log.info("========== 获取到{}个人员没有下班打卡信息 ==========", clockInListFive.size());
+// if(!CollectionUtils.isEmpty(clockInListFive)){
+// for (XpClockIn xpClockIn : clockInListFive) {
+// xpClockIn.setClockOutTime(LocalDateTime.now());
+// xpClockIn.setClockOutResult(3);
+// }
+// xpClockInService.updateBatchById(clockInListFive);
+// log.info("========== 修改为下班缺卡 ==========");
+// }
+// }
+// }
+// }
} catch (Exception e) {
log.error("执行打卡检查任务执行失败", e);
--
Gitblit v1.7.1