diff --git a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java index 71e06fb8c9..6f1149f754 100644 --- a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java +++ b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java @@ -757,7 +757,28 @@ public class OrderModel { */ private void updateBusStatus(BusRoutesResult result) { if (result == null) return; - LineManager.INSTANCE.setContraiInfo(new ContraiInfo(result.getLineId(),result.csvFileUrl,result.csvFileMd5,result.txtFileUrl,result.txtFileMd5,result.contrailSaveTime,null,null,1)); + if(result.csvFileUrl==null){ + result.csvFileUrl = ""; + } + if(result.csvFileMd5==null){ + result.csvFileMd5 = ""; + } + if(result.txtFileUrl==null){ + result.txtFileUrl = ""; + } + if(result.txtFileMd5==null){ + result.txtFileMd5 = ""; + } + LineManager.INSTANCE.setContraiInfo(new ContraiInfo( + result.getLineId(), + result.csvFileUrl, + result.csvFileMd5, + result.txtFileUrl, + result.txtFileMd5, + result.contrailSaveTime, + null, + null, + 1)); busRoutesResult = result; stationList.clear(); stationList.addAll(result.getSites()); @@ -1119,16 +1140,18 @@ public class OrderModel { } public void setTrajectoryStation(BusStationBean startStation, BusStationBean endStation, Long lineId) { - LineManager.INSTANCE.setStartAndEndStation(startStation,endStation); - - MogoLocation startStationMogoLocation = new MogoLocation(); - startStationMogoLocation.setLongitude(startStation.getGcjLon()); - startStationMogoLocation.setLatitude(startStation.getGcjLat()); - MogoLocation endStationMogoLocation = new MogoLocation(); - endStationMogoLocation.setLongitude(endStation.getGcjLon()); - endStationMogoLocation.setLatitude(endStation.getGcjLat()); - TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStationMogoLocation, endStationMogoLocation, lineId); + if(startStation==null||endStation==null){ + TrajectoryAndDistanceManager.INSTANCE.setStationPoint(null, null, lineId); + }else { + MogoLocation startStationMogoLocation = new MogoLocation(); + startStationMogoLocation.setLongitude(startStation.getGcjLon()); + startStationMogoLocation.setLatitude(startStation.getGcjLat()); + MogoLocation endStationMogoLocation = new MogoLocation(); + endStationMogoLocation.setLongitude(endStation.getGcjLon()); + endStationMogoLocation.setLatitude(endStation.getGcjLat()); + TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStationMogoLocation, endStationMogoLocation, lineId); + } } }