From 6e3d1ce59179cefe0744129f8195c861fd1988f3 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 29 四月 2026 20:14:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0' into 1.0

---
 xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpTestElectronicFenceServiceImpl.java |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpTestElectronicFenceServiceImpl.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpTestElectronicFenceServiceImpl.java
index f1aa69b..c1da5d4 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpTestElectronicFenceServiceImpl.java
+++ b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpTestElectronicFenceServiceImpl.java
@@ -12,6 +12,8 @@
 import com.xiaopeng.api.dto.operation.TestElectronicFenceUpdateDto;
 import com.xiaopeng.api.model.map.XpGeoFencingPolygon;
 import com.xiaopeng.api.model.map.XpGeoFencingProhibitedPolygon;
+import com.xiaopeng.api.model.map.XpTestGeoFencingPolygon;
+import com.xiaopeng.api.model.map.XpTestGeoFencingProhibitedPolygon;
 import com.xiaopeng.api.model.operation.*;
 import com.xiaopeng.api.query.operation.ElectronicPageListQuery;
 import com.xiaopeng.common.core.domain.R;
@@ -235,7 +237,7 @@
                             newArea.getFencePoints(),
                             existingArea.getFencePoints())) {
                         throw new ServiceException(
-                                "运营区域{}与现有运营区域{}发生重叠",
+                                "运营区域{}与现有测试区域{}发生重叠",
                                 I18nKeyConstant.AREA_OVERLAP_ERROR,
                                 new Object[]{existingArea.getAreaName(), existingArea.getAreaName()}
                         );
@@ -312,7 +314,7 @@
             for (XpTestElectronicFenceArea newElectronicFenceArea : newElectronicFenceAreas) {
                 if (newElectronicFenceArea.getAreaType() == 1
                         && newElectronicFenceArea.getAreaStatus() == 1) {
-                    XpGeoFencingPolygon xpGeoFencingPolygon = new XpGeoFencingPolygon();
+                    XpTestGeoFencingPolygon xpGeoFencingPolygon = new XpTestGeoFencingPolygon();
                     xpGeoFencingPolygon.setFenceId(String.valueOf(xpElectronicFence.getId()));
                     xpGeoFencingPolygon.setName(xpElectronicFence.getElectronicName());
                     xpGeoFencingPolygon.setAreaId(String.valueOf(newElectronicFenceArea.getId()));
@@ -325,7 +327,7 @@
                 }
                 if (newElectronicFenceArea.getAreaType() == 2
                         && newElectronicFenceArea.getAreaStatus() == 1) {
-                    XpGeoFencingProhibitedPolygon xpGeoFencingProhibitedPolygon = new XpGeoFencingProhibitedPolygon();
+                    XpTestGeoFencingProhibitedPolygon xpGeoFencingProhibitedPolygon = new XpTestGeoFencingProhibitedPolygon();
                     xpGeoFencingProhibitedPolygon.setFenceId(String.valueOf(xpElectronicFence.getId()));
                     xpGeoFencingProhibitedPolygon.setName(xpElectronicFence.getElectronicName());
                     xpGeoFencingProhibitedPolygon.setAreaId(String.valueOf(newElectronicFenceArea.getId()));
@@ -371,7 +373,7 @@
                         res.add(updatedArea.getAreaName());
                         res.add(existingArea.getAreaName());
                         throw new ServiceException(
-                                "运营区域{}与现有运营区域{}发生重叠,请编辑已有的运营区域",
+                                "运营区域{}与现有测试区域{}发生重叠,请编辑已有的运营区域",
                                 I18nKeyConstant.AREA_OVERLAP_ERROR,
                                 res.toArray()
                         );
@@ -442,10 +444,10 @@
             Query delMongoQuery = new Query();
             delMongoQuery.addCriteria(Criteria.where("fenceId").is(String.valueOf(dto.getId())));
             delMongoQuery.addCriteria(Criteria.where("areaId").in(toDeleteAreaIdStrings));
-            mongoTemplate.remove(delMongoQuery, XpGeoFencingProhibitedPolygon.class);
+            mongoTemplate.remove(delMongoQuery, XpTestGeoFencingProhibitedPolygon.class);
         }
         // 删除旧的区域数据,然后保存新的区域数据
-        mongoTemplate.remove(new Query(Criteria.where("fenceId").is(String.valueOf(dto.getId()))), XpGeoFencingPolygon.class);
+        mongoTemplate.remove(new Query(Criteria.where("fenceId").is(String.valueOf(dto.getId()))), XpTestGeoFencingPolygon.class);
         if (xpElectronicFence.getStatus() == 2) {
             // 设置电子围栏ID并保存区域数据
             for (XpTestElectronicFenceArea area : updatedElectronicFenceAreas) {
@@ -487,7 +489,7 @@
                     query.addCriteria(Criteria.where("areaId").is(String.valueOf(newElectronicFenceArea.getId())));
                     XpGeoFencingPolygon old = mongoTemplate.findOne(query, XpGeoFencingPolygon.class);
                     if (old == null) {
-                        XpGeoFencingPolygon xpGeoFencingPolygon = new XpGeoFencingPolygon();
+                        XpTestGeoFencingPolygon xpGeoFencingPolygon = new XpTestGeoFencingPolygon();
                         xpGeoFencingPolygon.setFenceId(String.valueOf(xpElectronicFence.getId()));
                         xpGeoFencingPolygon.setName(xpElectronicFence.getElectronicName());
                         xpGeoFencingPolygon.setCityCode(cityCode);
@@ -520,7 +522,7 @@
                     query.addCriteria(Criteria.where("areaId").is(String.valueOf(newElectronicFenceArea.getId())));
                     XpGeoFencingProhibitedPolygon old = mongoTemplate.findOne(query, XpGeoFencingProhibitedPolygon.class);
                     if (old == null) {
-                        XpGeoFencingProhibitedPolygon xpGeoFencingProhibitedPolygon = new XpGeoFencingProhibitedPolygon();
+                        XpTestGeoFencingProhibitedPolygon xpGeoFencingProhibitedPolygon = new XpTestGeoFencingProhibitedPolygon();
                         xpGeoFencingProhibitedPolygon.setFenceId(String.valueOf(xpElectronicFence.getId()));
                         xpGeoFencingProhibitedPolygon.setName(xpElectronicFence.getElectronicName());
                         xpGeoFencingProhibitedPolygon.setAreaId(String.valueOf(newElectronicFenceArea.getId()));
@@ -542,7 +544,7 @@
                     Query query = new Query();
                     query.addCriteria(Criteria.where("fenceId").is(String.valueOf(xpElectronicFence.getId())));
                     query.addCriteria(Criteria.where("areaId").is(String.valueOf(newElectronicFenceArea.getId())));
-                    mongoTemplate.remove(query, XpGeoFencingProhibitedPolygon.class);
+                    mongoTemplate.remove(query, XpTestGeoFencingProhibitedPolygon.class);
                 }
             }
         }
@@ -616,11 +618,11 @@
                             continue;
                         }
                         try {
-                            boolean inOperatingArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "operating_area");
+                            boolean inOperatingArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "test_operating_area");
                             if (!inOperatingArea) {
                                 continue;
                             }
-                            boolean inProhibitedArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "prohibited_area");
+                            boolean inProhibitedArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "test_prohibited_area");
                             if (inProhibitedArea) {
                                 continue;
                             }

--
Gitblit v1.7.1