From 0fb723c04b67870a1fda57ec47a128c26b0d3963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 15:02:10 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=B0=E7=AB=99=E4=B9=98=E5=AE=A2bug=EF=BC=8C?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=A0=E9=94=99=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bean/QueryLeaveAwayPassengersRequest.java | 12 +- .../och/bus/presenter/OchBusPresenter.java | 8 +- .../src/main/res/raw/bus_away_passengers.json | 184 ++++++++++++++++++ .../{bug_order_1.json => bus_order_1.json} | 0 ...tion_list1.json => bus_station_list1.json} | 0 ...tion_list2.json => bus_station_list2.json} | 0 6 files changed, 194 insertions(+), 10 deletions(-) create mode 100644 OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json rename OCH/mogo-och-bus/src/main/res/raw/{bug_order_1.json => bus_order_1.json} (100%) rename OCH/mogo-och-bus/src/main/res/raw/{bug_station_list1.json => bus_station_list1.json} (100%) rename OCH/mogo-och-bus/src/main/res/raw/{bug_station_list2.json => bus_station_list2.json} (100%) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java index 787663df60..0ea411d4d7 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/bean/QueryLeaveAwayPassengersRequest.java @@ -9,11 +9,11 @@ import com.mogo.commons.network.Utils; */ public class QueryLeaveAwayPassengersRequest { private String sn; - private int siteId; + private int endSiteId; public QueryLeaveAwayPassengersRequest( int siteId ) { this.sn = Utils.getSn(); - this.siteId = siteId; + this.endSiteId = siteId; } public String getSn() { @@ -24,11 +24,11 @@ public class QueryLeaveAwayPassengersRequest { this.sn = sn; } - public int getSiteId() { - return siteId; + public int getEndSiteId() { + return endSiteId; } - public void setSiteId( int siteId ) { - this.siteId = siteId; + public void setEndSiteId(int endSiteId) { + this.endSiteId = endSiteId; } } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java index babf1a232d..ebd082bc6c 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java @@ -425,9 +425,9 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog /** * 播报下车乘客信息 * - * @param o + * @param awayPassengersResponse */ - private void playLeavePassengersMsg( QueryLeaveAwayPassengersResponse o ) { + private void playLeavePassengersMsg( QueryLeaveAwayPassengersResponse awayPassengersResponse ) { Logger.d( TAG, "播报下车乘客信息"); if ( currentStationIndex > stationList.size() - 1 ) { @@ -439,11 +439,11 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog if ( !station.endsWith( "站" ) ) { builder.append( "站" ); } - if ( o == null || o.result == null || o.result.info == null || o.result.info.isEmpty() ) { + if ( awayPassengersResponse == null || awayPassengersResponse.result == null || awayPassengersResponse.result.info == null || awayPassengersResponse.result.info.isEmpty() ) { // } else { builder.append( ",请尾号为" ); - for ( QueryLeaveAwayPassengersResponse.LeaveAwayPassenger leaveAwayPassenger : o.result.info ) { + for ( QueryLeaveAwayPassengersResponse.LeaveAwayPassenger leaveAwayPassenger : awayPassengersResponse.result.info ) { if ( leaveAwayPassenger == null ) { continue; } diff --git a/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json b/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json new file mode 100644 index 0000000000..e76436f2dc --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/raw/bus_away_passengers.json @@ -0,0 +1,184 @@ +{ + "code": 0, + "msg": "", + "detailMsg": "", + "result": { + "info": [ + { + "_id": "cee57b3ae07c4486b0357319368487d7", + "orderNo": "XB20210422000002", + "orderType": 10, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 1, + "startStation": "万集东门站", + "startStationCoordinate": [ + 116.7354579447, + 40.1974932972 + ], + "endStationId": 2, + "endStation": "顺密路口站", + "endStationCoordinate": [ + 116.721520973, + 40.1940181096 + ], + "orderDispatchType": 7, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "2021-04-22 16:31:58", + "orderEndTime": "2021-04-26 10:38:13", + "arrivedStartStationTime": null, + "arrivedEndStationTime": null, + "cityCode": "010", + "areaCode": "1001", + "createTime": "2021-04-22 16:31:58", + "updateTime": "2021-04-26 10:38:13", + "personNum": 1, + "travelDistance": 1.2, + "vehicleColour": null, + "lastBrandName": null, + "headImgUrl": null + }, + { + "_id": "ce69b1bcfb9840c6a4563bc6ef947caf", + "orderNo": "XB20210426000000", + "orderType": 10, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 1, + "startStation": "万集东门站", + "startStationCoordinate": [ + 116.7354579447, + 40.1974932972 + ], + "endStationId": 2, + "endStation": "顺密路口站", + "endStationCoordinate": [ + 116.721520973, + 40.1940181096 + ], + "orderDispatchType": 7, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "2021-04-26 10:38:48", + "orderEndTime": "2021-04-26 10:46:16", + "arrivedStartStationTime": null, + "arrivedEndStationTime": null, + "cityCode": "010", + "areaCode": "1001", + "createTime": "2021-04-26 10:38:48", + "updateTime": "2021-04-26 10:46:16", + "personNum": 1, + "travelDistance": 1.2, + "vehicleColour": null, + "lastBrandName": null, + "headImgUrl": null + }, + { + "_id": "cae07b56f41c4e0fa60ab3543ffc258e", + "orderNo": "XB20210426000001", + "orderType": 10, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 1, + "startStation": "万集东门站", + "startStationCoordinate": [ + 116.7354579447, + 40.1974932972 + ], + "endStationId": 2, + "endStation": "顺密路口站", + "endStationCoordinate": [ + 116.721520973, + 40.1940181096 + ], + "orderDispatchType": 7, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "2021-04-26 10:47:05", + "orderEndTime": "2021-04-26 10:48:07", + "arrivedStartStationTime": null, + "arrivedEndStationTime": null, + "cityCode": "010", + "areaCode": "1001", + "createTime": "2021-04-26 10:47:05", + "updateTime": "2021-04-26 10:48:07", + "personNum": 1, + "travelDistance": 1.2, + "vehicleColour": null, + "lastBrandName": null, + "headImgUrl": null + }, + { + "_id": "62bc84afbc434d01b644c74ee406e772", + "orderNo": "XB20210426000002", + "orderType": 10, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 1, + "startStation": "万集东门站", + "startStationCoordinate": [ + 116.7354579447, + 40.1974932972 + ], + "endStationId": 2, + "endStation": "顺密路口站", + "endStationCoordinate": [ + 116.721520973, + 40.1940181096 + ], + "orderDispatchType": 7, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "2021-04-26 10:48:22", + "orderEndTime": "2021-04-26 10:50:32", + "arrivedStartStationTime": null, + "arrivedEndStationTime": null, + "cityCode": "010", + "areaCode": "1001", + "createTime": "2021-04-26 10:48:22", + "updateTime": "2021-04-26 10:50:32", + "personNum": 1, + "travelDistance": 1.2, + "vehicleColour": null, + "lastBrandName": null, + "headImgUrl": null + }, + { + "_id": "fa3214c7a6ec411bb3d6edbc98907423", + "orderNo": "XB20210426000009", + "orderType": 10, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 1, + "startStation": "万集东门站", + "startStationCoordinate": [ + 116.7354579447, + 40.1974932972 + ], + "endStationId": 2, + "endStation": "顺密路口站", + "endStationCoordinate": [ + 116.721520973, + 40.1940181096 + ], + "orderDispatchType": 7, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "2021-04-26 19:26:05", + "orderEndTime": "2021-04-27 14:35:50", + "arrivedStartStationTime": null, + "arrivedEndStationTime": null, + "cityCode": "010", + "areaCode": "1001", + "createTime": "2021-04-26 19:26:05", + "updateTime": "2021-04-27 14:35:50", + "personNum": 1, + "travelDistance": 1.2, + "vehicleColour": null, + "lastBrandName": null, + "headImgUrl": null + } + ] + } +} \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_order_1.json b/OCH/mogo-och-bus/src/main/res/raw/bus_order_1.json similarity index 100% rename from OCH/mogo-och-bus/src/main/res/raw/bug_order_1.json rename to OCH/mogo-och-bus/src/main/res/raw/bus_order_1.json diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_station_list1.json b/OCH/mogo-och-bus/src/main/res/raw/bus_station_list1.json similarity index 100% rename from OCH/mogo-och-bus/src/main/res/raw/bug_station_list1.json rename to OCH/mogo-och-bus/src/main/res/raw/bus_station_list1.json diff --git a/OCH/mogo-och-bus/src/main/res/raw/bug_station_list2.json b/OCH/mogo-och-bus/src/main/res/raw/bus_station_list2.json similarity index 100% rename from OCH/mogo-och-bus/src/main/res/raw/bug_station_list2.json rename to OCH/mogo-och-bus/src/main/res/raw/bus_station_list2.json From 13fe6b28fd3e6b918bbcdda08380a8a1ba47dfe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 15:51:04 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/och/bus/fragment/OchBusFragment.java | 4 +++- .../main/java/com/mogo/och/bus/presenter/OchBusPresenter.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java index da0cf9ba6c..feda83c6f5 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java @@ -89,7 +89,9 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese /** * 根据站点列表信息刷新车站面板,滑块面板 * - * @param stationList 车站列表信息 + * @param stationList 车站列表信息 + * @param currentStation 当前站点 + * @param nextStation 下个站点 */ public void refreshBusStations( List< OchBusStation > stationList, int currentStation, int nextStation ) { if ( getActivity() == null ) { diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java index ebd082bc6c..4a3e94e9df 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/OchBusPresenter.java @@ -165,7 +165,7 @@ public class OchBusPresenter extends Presenter< OchBusFragment > implements IMog mView.hideSlidePanel(); } - // + // 当前站点信息 if ( s.getIsCurrentSite() == STATION_STATUS_LEAVING || s.getIsCurrentSite() == STATION_STATUS_STOPPED ) { currentStationIndex = i; From e7e9fa5bcffb9fcea16fb104b051b1a244a554d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 15:52:27 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=87=AA=E7=A0=94?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=201.0.0-vr-8.5.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/map-custom/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index 089d626865..834b14df4b 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.11' + implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.13' // implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4' } From 4ad01267793027cabad353fbab912010fc3322bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 16:24:23 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=87=AA=E7=A0=94?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=B7=E6=96=B0=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index 8b0023dcf1..ad9c5596c3 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -1066,6 +1066,7 @@ public class AMapViewWrapper implements IMogoMapView, try { mMapView.getMapAutoViewHelper().setZoomGesturesEnabled(zoomGestureEnable); mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR); + mMapView.getMapAutoViewHelper().setRenderFrequency(true,50); } catch (Exception e) { e.printStackTrace(); } From 41a9debcf97b5998a0a21ca4e1514644d0c5a340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 16:46:02 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=87=AA=E7=A0=94?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=B7=E6=96=B0=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index ad9c5596c3..adf09b7815 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -128,6 +128,7 @@ public class AMapViewWrapper implements IMogoMapView, if (mMapView == null) { return; } + this.mMapView.getMapAutoViewHelper().setRenderFrequency(true,50); MapAutoViewHelper options = mMapView.getMapAutoViewHelper(); if (options != null) { options.setZoomGesturesEnabled(true); @@ -1066,7 +1067,6 @@ public class AMapViewWrapper implements IMogoMapView, try { mMapView.getMapAutoViewHelper().setZoomGesturesEnabled(zoomGestureEnable); mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR); - mMapView.getMapAutoViewHelper().setRenderFrequency(true,50); } catch (Exception e) { e.printStackTrace(); } From 709a3061f02f3f77cb49d0213a9bfd26bdacaa2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 16:52:50 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=87=AA=E7=A0=94?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=B7=E6=96=B0=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index adf09b7815..8dc2358d21 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -128,7 +128,6 @@ public class AMapViewWrapper implements IMogoMapView, if (mMapView == null) { return; } - this.mMapView.getMapAutoViewHelper().setRenderFrequency(true,50); MapAutoViewHelper options = mMapView.getMapAutoViewHelper(); if (options != null) { options.setZoomGesturesEnabled(true); @@ -852,6 +851,7 @@ public class AMapViewWrapper implements IMogoMapView, @Override public void onMapLoaded() { Logger.i(TAG, "autoop--onMapLoaded: "); + mMapView.getMapAutoViewHelper().setRenderFrequency(true,50); MogoMapListenerHandler.getInstance().onMapLoaded(); mMapLoaded = true; CameraPosition cameraPosition = mMapView.getMapAutoViewHelper().getCameraPosition(); From 14495402be3e9e722eb6e081df31acdfb7e737fd Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Tue, 27 Apr 2021 17:53:27 +0800 Subject: [PATCH 07/11] opt --- .../mogo/map/impl/custom/AMapViewWrapper.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index 8dc2358d21..01f065c298 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -771,14 +771,19 @@ public class AMapViewWrapper implements IMogoMapView, } // } else { // WorkThreadHandler.getInstance().postDelayed(() -> { -// mSelfMarker.marker3DIcon(R.raw.people); + // }, 10000); - -// if (mAdasResult.type == 1) { //通过不同的方向类型来改变车模,目前暂定三种模型,还未定 -// Log.d("liyz", "-------1------>") -// mSelfMarker.marker3DIcon(R.raw.people); +// 通过不同的方向类型来改变车模,目前暂定三种模型,drawlevel 1 绿,2 黄,3 红,绿色的时候需要把相应的切换为默认模型 +// if (mAdasResult.type == 1) { +// Log.d("liyz", "-------1------>"); +// mSelfMarker.marker3DIcon(R.raw.car); +// } else if (mAdasResult.type == 2) { //不处理 +// +// } else if (mAdasResult.type == 3) { //切换前方模型 +// //继续判断相应的方位,目前是 前方 TODO +// +// mSelfMarker.marker3DIcon(R.raw.car); // } - } showSelfSpeed(location.getSpeed()); From 31553dbfaac3d69ac5e54cf55d4eee3c470fe636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 19:30:33 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=AF=B9?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E6=8C=89=E9=92=AE=E7=9A=84=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=9A=84=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/bus/fragment/OchBusFragment.java | 3 +++ .../src/main/java/com/mogo/och/BaseOchFragment.java | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java index feda83c6f5..3642a411c9 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java @@ -217,10 +217,13 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese * @param launch true-收车,false-出车 */ public void changeOperationStatus( boolean launch ) { + isOperationStatus = launch; if ( launch ) { tvOperationStatus.setText( "收车" ); + showSlidePanle("准备发车"); } else { tvOperationStatus.setText( "出车" ); + hideSlidePanel(); } } } diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java index 25fb40687e..0a109a18af 100644 --- a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java +++ b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java @@ -32,6 +32,7 @@ public abstract class BaseOchFragment> e protected SlidePanelView slidePanelView; private CheckedTextView ctvAutopilotStatus; protected TextView tvOperationStatus; + public boolean isOperationStatus;//false-收车,true-出车 private FrameLayout flStationPanelContainer; private Group groupTestPanel; @@ -131,8 +132,10 @@ public abstract class BaseOchFragment> e */ public void showSlidePanle(String text) { getActivity().runOnUiThread(() -> { - slidePanelView.setText(text); - slidePanelView.setVisibility(View.VISIBLE); + if (isOperationStatus) { + slidePanelView.setText(text); + slidePanelView.setVisibility(View.VISIBLE); + } }); } From e2b6f98bd00f2ee5bc0dc43f4357c62070595a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 19:46:23 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=BF=90?= =?UTF-8?q?=E8=90=A5=E7=8A=B6=E6=80=81=E7=9A=84=E5=88=A4=E6=96=AD=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/BaseOchFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java index 0a109a18af..dfb8b37169 100644 --- a/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java +++ b/OCH/mogo-och/src/main/java/com/mogo/och/BaseOchFragment.java @@ -131,12 +131,12 @@ public abstract class BaseOchFragment> e * @param text 指定的文字 */ public void showSlidePanle(String text) { - getActivity().runOnUiThread(() -> { - if (isOperationStatus) { + if (isOperationStatus) { + getActivity().runOnUiThread(() -> { slidePanelView.setText(text); slidePanelView.setVisibility(View.VISIBLE); - } - }); + }); + } } /** From b5eaa28e1c67f1065a63191cc022497c5d0f3079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 19:52:06 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=BA=86=E6=96=87?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/och/bus/fragment/OchBusFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java index 3642a411c9..1c62094d45 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java @@ -158,9 +158,9 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese if ( isArriveEndStation ) { showSlidePanle( "单程结束" ); } else if ( isArriveAtStartStation ) { - showSlidePanle( "准备出发" ); - } else if ( isArriveAtStation ) { showSlidePanle( "滑动出车" ); + } else if ( isArriveAtStation ) { + showSlidePanle( "准备出发" ); } mCurrentStationName.setText( currentStationName ); From 9485fd7cc8e20d10afa73d2b4fe4c22b9e5d5f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 27 Apr 2021 20:59:46 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=87=BA?= =?UTF-8?q?=E7=A7=9F=E8=BD=A6=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/taxi/MogoOCHTaxiModel.java | 6 ++- .../src/main/res/raw/taxi_order.json | 11 ++++++ .../src/main/res/raw/taxi_order_detail.json | 39 +++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json create mode 100644 OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java index 3b8a60b226..1f095f1887 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/MogoOCHTaxiModel.java @@ -430,7 +430,10 @@ class MogoOCHTaxiModel { @Override public void onMsgReceived( OCHTaxiOrderResponse obj ) { - Logger.d( TAG, "收到新订单" ); + if ( obj == null ) { + return; + } + Logger.d( TAG, "收到新订单" + GsonUtil.jsonFromObject(obj)); mCurrentOCHOrder = obj; cacheOrderInfo2Native( mCurrentOCHOrder ); Location location = MogoApisHandler.getInstance() @@ -497,6 +500,7 @@ class MogoOCHTaxiModel { if ( obj == null ) { return; } + Logger.d(TAG, "订单状态被改变:" + GsonUtil.jsonFromObject(obj)); OCHOrderStatus status = OCHOrderStatus.valueOf( obj.orderDispatchType ); switch ( status ) { case Cancel: diff --git a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json new file mode 100644 index 0000000000..d182881984 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order.json @@ -0,0 +1,11 @@ +{ + "drivingRoutes": [ + + ], + "endStation": "第二十一站", + "orderDispatchType": 1, + "orderNo": "CZ20210427000016", + "orderType": 9, + "startStation": "0409第一站", + "travelDistance": 0.3 +} \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json new file mode 100644 index 0000000000..7d62fcacb7 --- /dev/null +++ b/OCH/mogo-och-taxi/src/main/res/raw/taxi_order_detail.json @@ -0,0 +1,39 @@ +{ + "code": 0, + "msg": "", + "detailMsg": "", + "result": { + "_id": "5352c1d2c9d84ab3ab9ecf1e47e13bdd", + "orderNo": "CZ20210427000016", + "orderType": 9, + "userName": "董QAD", + "userPhone": "15631204018", + "startStationId": 10000, + "startStation": "0409第一站", + "startStationCoordinate": [ + 116.7389159039, + 40.1992312592 + ], + "endStationId": 21, + "endStation": "第二十一站", + "endStationCoordinate": [ + 116.737866, + 40.19646 + ], + "orderDispatchType": 1, + "carNum": "京NB010", + "sn": "F803EB2046PZD00149", + "orderStartTime": "Apr 27, 2021 8:55:44 PM", + "arrivedStartStationTime": "", + "arrivedEndStationTime": "", + "cityCode": "010", + "areaCode": "1001", + "createTime": "Apr 27, 2021 8:55:44 PM", + "updateTime": "Apr 27, 2021 8:55:56 PM", + "personNum": 1, + "travelDistance": 0.3, + "vehicleColour": "黑色", + "lastBrandName": "", + "headImgUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ep4YkeZqjiazTK87NQtYp6KMYvAdJcxNpxyJ2gibeNNheH1HFaJdX4hB15eIR3zZdGMWNanKzIn460w/132" + } +} \ No newline at end of file