| | |
| | | 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; |
| | |
| | | private String extractPlateNumber(String deviceName, String remark) { |
| | | // 这里可以根据实际情况实现车牌号提取逻辑 |
| | | // 例如:从字符串中匹配车牌号格式 |
| | | //aaxx粤VSX120 |
| | | //在这里提取 粤VSX120 |
| | | |
| | | 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; |