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;