Compare commits
No commits in common. "30d88aa5e38dab5eeae3c9e655cce45b568cf30d" and "1ffb984286b1435799824d206c6a57ad1d0e22aa" have entirely different histories.
30d88aa5e3
...
1ffb984286
|
@ -69,9 +69,9 @@ public class DOSSpectrum extends AbstractSpectrumHandler{
|
|||
}
|
||||
|
||||
protected void checkAirSamplerFlowBlock(){
|
||||
if(super.mailContent.indexOf("#DoseRate") == -1){
|
||||
if(super.mailContent.indexOf("#DoseRare") == -1){
|
||||
ErrorLogManager.getInstance().write(new SpectrumErrorEvent(new Date(), ErrorType.AIR_SAMPLER_FLOW_ERROR,super.spectrumFile.getName(),super.getMsgId()));
|
||||
throw new AirSamplerFlowException("this is no DoseRate data");
|
||||
throw new AirSamplerFlowException("this is no DoseRare data");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ public class DOSSpectrum extends AbstractSpectrumHandler{
|
|||
throw new PHD_ReadException("THE PHDFile has some blocks can't be read:"+super.spectrumFile.getAbsolutePath());
|
||||
}
|
||||
if(sourceData.dr_record_count <= 0 || sourceData.dr_start_date.size() < 0 || sourceData.dr_start_time.size() < 0){
|
||||
throw new AirSamplerFlowException("DoseRate data error");
|
||||
throw new AirSamplerFlowException("DoseRare data error");
|
||||
}
|
||||
this.sourceData = sourceData;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
|
@ -27,7 +26,11 @@ public class StationTypeUtil {
|
|||
for (StationType stationType:stationTypeList) {
|
||||
if (StringUtils.isNotBlank(stationType.getMinId()) && StringUtils.isNotBlank(stationType.getMaxId())){
|
||||
if (stationId>Integer.valueOf(stationType.getMinId()) && stationId<=Integer.valueOf(stationType.getMaxId())){
|
||||
if (Objects.equals(category, stationType.getCategory())) {
|
||||
if (category == 3) {
|
||||
type = "Car";
|
||||
} else if (category == 4) {
|
||||
type = "Ship";
|
||||
} else {
|
||||
type = stationType.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ public class StationType implements Serializable {
|
|||
|
||||
private String maxId;
|
||||
|
||||
private Integer category;
|
||||
|
||||
private List<StationType> types = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
|
|
@ -60,9 +60,6 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
@Autowired
|
||||
private StationTypeUtil stationTypeUtil;
|
||||
|
||||
@Autowired
|
||||
private StationType stationType;
|
||||
|
||||
private final SpatialContext spatialContext = SpatialContext.GEO;
|
||||
|
||||
@Override
|
||||
|
@ -136,8 +133,8 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
@Override
|
||||
public Result findInfo(String stationId, String type) {
|
||||
Result result = new Result();
|
||||
List<String> stationTypes = stationType.getTypes().stream().map(StationType::getName).collect(Collectors.toList());
|
||||
if (stationTypes.contains(type)){
|
||||
if (type.equals("IMS STATION(P)") || type.equals("IMS STATION(G)") || type.equals("NRL")
|
||||
|| type.equals("Car")|| type.equals("Ship")){
|
||||
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
|
||||
GardsStations stations = stationInfoMap.get(stationId);
|
||||
if (Objects.nonNull(stations)){
|
||||
|
|
Loading…
Reference in New Issue
Block a user