feat:探测器check
This commit is contained in:
parent
1bea5eb58b
commit
a7343f19c1
|
@ -63,9 +63,9 @@ public class DetectorIdFormat {
|
|||
for (Map.Entry<String, String> 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<String, String> 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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user