|
@@ -796,21 +796,25 @@ public class GeoHazardMonitorTokenController {
|
|
|
//赋值--股道
|
|
|
List<BaseRouteMassage> baseRouteMassageList = baseRouteMassageService.list();
|
|
|
if (!ObjectUtils.isEmpty(baseRouteMassageList)) {
|
|
|
- if (heartbeatVo.getLineDir()==1) {
|
|
|
- if (baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(baseRouteMassageList.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(baseRouteMassageList.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
- }
|
|
|
- }else if (heartbeatVo.getLineDir()==2){
|
|
|
- if (baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 1500 && baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(baseRouteMassageList.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(baseRouteMassageList.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
+ for (BaseRouteMassage baseRouteMassage : baseRouteMassageList) {
|
|
|
+ if (heartbeatVo.getLineDir() == 1) {
|
|
|
+ if (baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 &&baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
+ } else if (heartbeatVo.getLineDir() == 2) {
|
|
|
+ if (heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() <= 1500 && heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
@@ -1072,21 +1076,25 @@ public class GeoHazardMonitorTokenController {
|
|
|
//赋值--股道
|
|
|
List<BaseRouteMassage> baseRouteMassageList = baseRouteMassageService.list();
|
|
|
if (!ObjectUtils.isEmpty(baseRouteMassageList)) {
|
|
|
- if (heartbeatVo.getLineDir()==1) {
|
|
|
- if (baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(baseRouteMassageList.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(baseRouteMassageList.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
- }
|
|
|
- }else if (heartbeatVo.getLineDir()==2){
|
|
|
- if (baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 1500 && baseRouteMassageList.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(baseRouteMassageList.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(baseRouteMassageList.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
+ for (BaseRouteMassage baseRouteMassage : baseRouteMassageList) {
|
|
|
+ if (heartbeatVo.getLineDir() == 1) {
|
|
|
+ if (baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
+ } else if (heartbeatVo.getLineDir() == 2) {
|
|
|
+ if (heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() <= 1500 && heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
@@ -1251,21 +1259,25 @@ public class GeoHazardMonitorTokenController {
|
|
|
//赋值--股道
|
|
|
List<BaseRouteMassage> list = baseRouteMassageService.list();
|
|
|
if (!ObjectUtils.isEmpty(list)) {
|
|
|
- if (heartbeatVo.getLineDir()==1) {
|
|
|
- if (list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(list.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(list.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
- }
|
|
|
- }else if (heartbeatVo.getLineDir()==2){
|
|
|
- if (list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 1500 && list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(list.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(list.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
+ for (BaseRouteMassage baseRouteMassage : list) {
|
|
|
+ if (heartbeatVo.getLineDir() == 1) {
|
|
|
+ if (baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
+ } else if (heartbeatVo.getLineDir() == 2) {
|
|
|
+ if (heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() <= 1500 && heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
@@ -1424,22 +1436,26 @@ public class GeoHazardMonitorTokenController {
|
|
|
//赋值--股道
|
|
|
List<BaseRouteMassage> list = baseRouteMassageService.list();
|
|
|
if (!ObjectUtils.isEmpty(list)) {
|
|
|
- if (heartbeatVo.getLineDir()==1) {
|
|
|
- if (list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(list.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(list.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
+ for (BaseRouteMassage baseRouteMassage : list) {
|
|
|
+ if (heartbeatVo.getLineDir() == 1) {
|
|
|
+ if (baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() <= 1500 && baseRouteMassage.getMileagePosition() - heartbeatVo.getCurrentMile() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
+ } else if (heartbeatVo.getLineDir() == 2) {
|
|
|
+ if (heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() <= 1500 && heartbeatVo.getCurrentMile() - baseRouteMassage.getMileagePosition() >= 0) {
|
|
|
+ respHeartbeatVo.setRouteTrack(baseRouteMassage.getRouteStationTrack().toString());
|
|
|
+ respHeartbeatVo.setStationCode(baseRouteMassage.getStationCode());
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ respHeartbeatVo.setRouteTrack("");
|
|
|
+ respHeartbeatVo.setStationCode("");
|
|
|
+ }
|
|
|
}
|
|
|
- }else if (heartbeatVo.getLineDir()==2){
|
|
|
- if (list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() >= 1500 && list.get(0).getMileagePosition() - heartbeatVo.getCurrentMile() <= 0) {
|
|
|
- respHeartbeatVo.setRouteTrack(list.get(0).getRouteStationTrack().toString());
|
|
|
- respHeartbeatVo.setStationCode(list.get(0).getStationCode());
|
|
|
- } else {
|
|
|
- respHeartbeatVo.setRouteTrack("");
|
|
|
- respHeartbeatVo.setStationCode("");
|
|
|
- }
|
|
|
}
|
|
|
}else {
|
|
|
respHeartbeatVo.setRouteTrack("");
|