xuhy
2026-03-12 58956e673df5bdf0bfdf6857d47703466025e497
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java
@@ -290,10 +290,6 @@
                    clockInStatistic.setRoleName(roleName);
                }
            }
            Integer shouldClockInDays = clockInStatistic.getShouldClockInDays();
            Integer clockInDays = clockInStatistic.getClockInDays();
            Integer lateEarly = clockInStatistic.getLateEarly();
            clockInStatistic.setNotClockInDays(shouldClockInDays - clockInDays - lateEarly);
        }
        pageInfo.setRecords(clockInStatistics);
        return pageInfo;
@@ -362,10 +358,6 @@
                    clockInStatistic.setRoleName(roleName);
                }
            }
            Integer shouldClockInDays = clockInStatistic.getShouldClockInDays();
            Integer clockInDays = clockInStatistic.getClockInDays();
            Integer lateEarly = clockInStatistic.getLateEarly();
            clockInStatistic.setNotClockInDays(shouldClockInDays - clockInDays - lateEarly);
        }
        ExcelUtil<ClockInStatisticsDto> excel = new ExcelUtil<ClockInStatisticsDto>(ClockInStatisticsDto.class);
@@ -405,17 +397,11 @@
        dto.setList(pageInfo);
        XpOperationsUser xpOperationsUser = xpOperationUserClient.queryById(query.getAppUserId()).getData();
        List<Long> longList = fleetOperationsClient.getFleetIdsByUserId(xpOperationsUser.getId()).getData();
        List<XpSchedulingDetail> list = xpSchedulingDetailService.list(new QueryWrapper<XpSchedulingDetail>().eq("fleetId", longList.get(0)).between(StringUtils.isNotEmpty(startTime), "plan_time", startTime, endTime));
        QueryWrapper<XpClockIn> last1 = new QueryWrapper<XpClockIn>().eq("app_user_id", query.getAppUserId()).last(" and (clock_in_result = 1 or clock_out_result = 1)"
                + (StringUtils.isNotEmpty(startTime) ? " and (DATE_FORMAT(clock_in_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "' or DATE_FORMAT(clock_out_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "'))" : ""));
        QueryWrapper<XpClockIn> last2 = new QueryWrapper<XpClockIn>().eq("app_user_id", query.getAppUserId()).last(" and (clock_in_result = 2 or clock_out_result = 2)"
                + (StringUtils.isNotEmpty(startTime) ? " and (DATE_FORMAT(clock_in_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "' or DATE_FORMAT(clock_out_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "'))" : ""));
        QueryWrapper<XpClockIn> last3 = new QueryWrapper<XpClockIn>().eq("app_user_id", query.getAppUserId()).last(" and (clock_in_result = 3 or clock_out_result = 3)"
                + (StringUtils.isNotEmpty(startTime) ? " and (DATE_FORMAT(clock_in_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "' or DATE_FORMAT(clock_out_time, '%Y-%m-%d') between '" + startTime + "' and '" + endTime + "'))" : ""));
        List<XpSchedulingDetail> list = xpSchedulingDetailService.list(new QueryWrapper<XpSchedulingDetail>().eq("fleet_id", longList.get(0)).between(StringUtils.isNotEmpty(startTime), "plan_time", startTime, endTime));
        dto.setShouldClockInCount(list.size() * 2);
        dto.setNormalClockInCount(this.count(last1));
        dto.setLateClockInCount(this.count(last2));
        dto.setMissingClockInCount(this.count(last3));
        dto.setNormalClockInCount(this.baseMapper.getClockInStatisticsDetailsCount(1, query.getAppUserId(), startTime, endTime));
        dto.setLateClockInCount(this.baseMapper.getClockInStatisticsDetailsCount(2, query.getAppUserId(), startTime, endTime));
        dto.setMissingClockInCount(this.baseMapper.getClockInStatisticsDetailsCount(3, query.getAppUserId(), startTime, endTime));
        return dto;
    }