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()) {
|
for (Map.Entry<String, String> entry : suffixMap.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
if (!StrUtil.contains(prefix, key))
|
if (!StrUtil.contains(prefix, key)) continue;
|
||||||
continue;
|
|
||||||
prefix = StrUtil.replace(prefix, key, value);
|
prefix = StrUtil.replace(prefix, key, value);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!NumberUtil.isNumber(prefix))
|
if (!NumberUtil.isNumber(prefix))
|
||||||
return null;
|
return null;
|
||||||
|
@ -104,7 +104,7 @@ public class DetectorIdFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 探测器Id解析出台站Id
|
* 探测器Code解析出台站Id
|
||||||
*/
|
*/
|
||||||
public Integer codeToStationId(String detectorCode){
|
public Integer codeToStationId(String detectorCode){
|
||||||
if (!StrUtil.contains(detectorCode, StrUtil.UNDERLINE))
|
if (!StrUtil.contains(detectorCode, StrUtil.UNDERLINE))
|
||||||
|
@ -115,9 +115,9 @@ public class DetectorIdFormat {
|
||||||
for (Map.Entry<String, String> entry : suffixMap.entrySet()) {
|
for (Map.Entry<String, String> entry : suffixMap.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
if (!StrUtil.contains(stationCode, key))
|
if (!StrUtil.contains(stationCode, key)) continue;
|
||||||
continue;
|
|
||||||
stationCode = StrUtil.replace(stationCode, key, value);
|
stationCode = StrUtil.replace(stationCode, key, value);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!NumberUtil.isNumber(stationCode))
|
if (!NumberUtil.isNumber(stationCode))
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user