puzhibing
2026-04-18 ac30fe67a235e0e269cf12f6fcc9f8583d4baa1f
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
@@ -92,7 +92,7 @@
                .eq(XpCruiseCheckInRecord::getDeleted, 0)
                .eq(XpCruiseCheckInRecord::getCruiseCheckInRuleId, ruleId)
                .eq(XpCruiseCheckInRecord::getOperationsUserId, uid)
                .last(" and DATE_FORMAT(check_in_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d"));
                .last(" and DATE(check_in_time) = DATE(NOW())"));
        //构建返回结果
        for (XpCruiseCheckInRuleLocation xpCruiseCheckInRuleLocation : list) {
            XpCruiseCheckInRecord xpCruiseCheckInRecord = list1.stream().filter(x -> x.getCheckLocationId().equals(xpCruiseCheckInRuleLocation.getCheckLocationId())).findFirst().orElse(null);
@@ -132,7 +132,7 @@
                .eq(XpCruiseCheckInRecord::getDeleted, 0)
                .eq(XpCruiseCheckInRecord::getCheckLocationId, checkLocationId)
                .eq(XpCruiseCheckInRecord::getOperationsUserId, dto.getOperationsUserId())
                .last(" and DATE_FORMAT(check_in_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')"));
                .last(" and DATE(check_in_time) = DATE(NOW())"));
        if(null != cruiseCheckInRecord){
            throw new ServiceException("不能重复打卡", I18nKeyConstant.CANNOT_REPEAT_CLOCKING_IN);
        }
@@ -169,7 +169,7 @@
                .eq(XpCruiseCheckInRecord::getCruiseCheckInRuleId, dto.getId())
                .eq(XpCruiseCheckInRecord::getDeleted, 0)
                .eq(XpCruiseCheckInRecord::getOperationsUserId, uid)
                .last(" and DATE_FORMAT(check_in_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') order by check_in_time desc limit 1"));
                .last(" and DATE(check_in_time) = DATE(NOW()) order by check_in_time desc limit 1"));
        XpCruiseCheckInRuleLocation cruiseCheckInRuleLocation = null;
        //没有打卡的情况,用第一个打卡点位
        if(null == cruiseCheckInRecord){
@@ -232,6 +232,6 @@
                .eq(XpCruiseCheckInRecord::getCheckLocationId, locationId)
                .eq(XpCruiseCheckInRecord::getDeleted, 0)
                .eq(XpCruiseCheckInRecord::getOperationsUserId, uid)
                .last(" and DATE_FORMAT(check_in_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')"));
                .last(" and DATE(check_in_time) = DATE(NOW())"));
    }
}