From 5b3ac8ecff195501db9ae57eeb42f7ccde10fb45 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期六, 25 四月 2026 01:08:40 +0800
Subject: [PATCH] Merge branch '1.0' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi into 1.0

---
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
index f28590d..563da7f 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpCruiseCheckInRuleServiceImpl.java
@@ -144,8 +144,15 @@
     @Override
     public Long saveCruiseCheckInRecord(XpCruiseCheckInRecord dto) {
         Long checkLocationId = dto.getCheckLocationId();
+        List<XpCruiseCheckInRule> list = this.list(new LambdaQueryWrapper<XpCruiseCheckInRule>().eq(XpCruiseCheckInRule::getDeleted, 0)
+                .eq(XpCruiseCheckInRule::getOperationsUserId, dto.getOperationsUserId()).last(" and (now() BETWEEN start_time and end_time or cyclic_mode = 1)"));
+        if(list.isEmpty()){
+            return null;
+        }
+        XpCruiseCheckInRule xpCruiseCheckInRule = list.get(0);
+        dto.setCruiseCheckInRuleId(xpCruiseCheckInRule.getId());
         XpCruiseCheckInRuleLocation one = xpCruiseCheckInRuleLocationService.getOne(new LambdaQueryWrapper<XpCruiseCheckInRuleLocation>()
-                .eq(XpCruiseCheckInRuleLocation::getCheckLocationId, checkLocationId));
+                .eq(XpCruiseCheckInRuleLocation::getCheckLocationId, checkLocationId).eq(XpCruiseCheckInRuleLocation::getCruiseCheckInRuleId, dto.getCruiseCheckInRuleId()));
         if(null == one){
             throw new ServiceException("打卡点位不存在", I18nKeyConstant.CHECK_IN_LOCATION_DOES_NOT_EXIST);
         }
@@ -225,12 +232,14 @@
         Map<String, Double> distance = GeodesyUtil.getDistance(xpCheckLocation.getLocationLon() + "," + xpCheckLocation.getLocationLat(), dto.getLongitude() + "," + dto.getLatitude());
         if(xpCheckLocation.getLocationRange().compareTo(new BigDecimal(distance.get("WGS84"))) >= 0){
             vo.setIsInRange(true);
-            Boolean read = redisService.getCacheObject("CHECK_IN_SCOPE:" + xpCheckLocation.getId());
-            if(null == read || !read){
-                vo.setMessageType(2);
-                vo.setCheckLocationId(cruiseCheckInRuleLocation.getCheckLocationId());
-                redisService.setCacheObject("CHECK_IN_SCOPE:" + xpCheckLocation.getId(), true, 1L, TimeUnit.HOURS);
-            }
+            vo.setMessageType(2);
+            vo.setCheckLocationId(cruiseCheckInRuleLocation.getCheckLocationId());
+//            Boolean read = redisService.getCacheObject("CHECK_IN_SCOPE:" + xpCheckLocation.getId());
+//            if(null == read || !read){
+//                vo.setMessageType(2);
+//                vo.setCheckLocationId(cruiseCheckInRuleLocation.getCheckLocationId());
+//                redisService.setCacheObject("CHECK_IN_SCOPE:" + xpCheckLocation.getId(), true, 1L, TimeUnit.HOURS);
+//            }
             return vo;
         }
         //判断时间小于10分钟首次触发和小于3分钟再次触发

--
Gitblit v1.7.1