From fe33646ee6e2d1e57f2b51812e94983a0e9efb04 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 14 十二月 2025 16:51:28 +0800
Subject: [PATCH] feat: 修复统计

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GpsCollectServiceImpl.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GpsCollectServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GpsCollectServiceImpl.java
index 42e8390..541ea56 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GpsCollectServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/GpsCollectServiceImpl.java
@@ -1,10 +1,12 @@
 package com.ruoyi.system.service.impl;
 
+import com.ruoyi.common.utils.PlateNumberExtractor;
 import com.ruoyi.common.utils.http.HttpUtils;
 import com.ruoyi.system.domain.*;
 import com.ruoyi.system.service.IGpsCollectService;
 import com.ruoyi.system.config.GpsServiceConfig;
 import com.ruoyi.common.utils.MD5Util;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.http.HttpEntity;
@@ -30,6 +32,7 @@
 /**
  * GPS閲囬泦鏈嶅姟瀹炵幇
  */
+@Slf4j
 @Service
 public class GpsCollectServiceImpl implements IGpsCollectService {
 
@@ -256,10 +259,21 @@
     private String extractPlateNumber(String deviceName, String remark) {
         // 杩欓噷鍙互鏍规嵁瀹為檯鎯呭喌瀹炵幇杞︾墝鍙锋彁鍙栭�昏緫
         // 渚嬪锛氫粠瀛楃涓蹭腑鍖归厤杞︾墝鍙锋牸寮�
+        //aaxx绮SX120
+        //鍦ㄨ繖閲屾彁鍙� 绮SX120
+
         if (StringUtils.isNotEmpty(deviceName)) {
+            String plateNo =PlateNumberExtractor.extractPlateNumber(deviceName);
+            if (plateNo != null) {
+                return plateNo;
+            }
             return deviceName;
         }
         if (StringUtils.isNotEmpty(remark)) {
+            String plateNo =PlateNumberExtractor.extractPlateNumber(remark);
+            if (plateNo != null) {
+                return plateNo;
+            }
             return remark;
         }
         return null;
@@ -430,7 +444,7 @@
                 // 瑙f瀽浣嶇疆璁板綍鍒楄〃
                 JSONArray recordsArray = jsonResult.getJSONArray("records");
                 List<GpsLastPosition> records = new ArrayList<>();
-                
+                log.info("recordsArray length:{}",recordsArray.size());
                 for (int i = 0; i < recordsArray.size(); i++) {
                     JSONObject recordJson = recordsArray.getJSONObject(i);
                     GpsLastPosition record = new GpsLastPosition();

--
Gitblit v1.9.1