From d943874d94e69806cb53b649b378075794bdf683 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期日, 15 三月 2026 14:35:28 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi

---
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java
index c755098..54fdd82 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java
@@ -104,6 +104,12 @@
     public R<String> clockIn(ClockDTO dto) {
 
         XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId());
+        if (null == xpCheckLocation) {
+            return R.fail("打卡地址不存在");
+        }
+        if (xpCheckLocation.getStatus() == 0) {
+            return R.fail("打卡地址已禁用");
+        }
 
         Map<String, Double> distance = GeodesyUtil.getDistance(dto.getUserLon() + "," + dto.getUserLat(), xpCheckLocation.getLocationLon() + "," + xpCheckLocation.getLocationLat());
         if (null != distance) {
@@ -144,6 +150,12 @@
     public R<String> clockOut(ClockDTO dto) {
 
         XpCheckLocation xpCheckLocation = xpCheckLocationMapper.selectById(dto.getLocationId());
+        if (null == xpCheckLocation) {
+            return R.fail("打卡地址不存在");
+        }
+        if (xpCheckLocation.getStatus() == 0) {
+            return R.fail("打卡地址已禁用");
+        }
         Map<String, Double> distance = GeodesyUtil.getDistance(dto.getUserLon() + "," + dto.getUserLat(), xpCheckLocation.getLocationLon() + "," + xpCheckLocation.getLocationLat());
         if (null != distance) {
             Double distance1 = distance.get("WGS84");

--
Gitblit v1.7.1