From a7343f19c11c2ea5d4d66ea76a46f13ce6b27825 Mon Sep 17 00:00:00 2001 From: nieziyan Date: Fri, 12 Jan 2024 11:41:56 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=8E=A2=E6=B5=8B=E5=99=A8check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/common/properties/DetectorIdFormat.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/DetectorIdFormat.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/DetectorIdFormat.java index 257c2d75..51f0b436 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/DetectorIdFormat.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/DetectorIdFormat.java @@ -63,9 +63,9 @@ public class DetectorIdFormat { for (Map.Entry entry : suffixMap.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); - if (!StrUtil.contains(prefix, key)) - continue; + if (!StrUtil.contains(prefix, key)) continue; prefix = StrUtil.replace(prefix, key, value); + break; } if (!NumberUtil.isNumber(prefix)) return null; @@ -104,7 +104,7 @@ public class DetectorIdFormat { } /** - * 探测器Id解析出台站Id + * 探测器Code解析出台站Id */ public Integer codeToStationId(String detectorCode){ if (!StrUtil.contains(detectorCode, StrUtil.UNDERLINE)) @@ -115,9 +115,9 @@ public class DetectorIdFormat { for (Map.Entry entry : suffixMap.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); - if (!StrUtil.contains(stationCode, key)) - continue; + if (!StrUtil.contains(stationCode, key)) continue; stationCode = StrUtil.replace(stationCode, key, value); + break; } if (!NumberUtil.isNumber(stationCode)) return null;