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/fragment/OchBusFragment.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/OchBusFragment.java index da0cf9ba6c..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 @@ -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 ) { @@ -156,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 ); @@ -215,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-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..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; @@ -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 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 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..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 @@ -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; @@ -130,10 +131,12 @@ public abstract class BaseOchFragment> e * @param text 指定的文字 */ public void showSlidePanle(String text) { - getActivity().runOnUiThread(() -> { - slidePanelView.setText(text); - slidePanelView.setVisibility(View.VISIBLE); - }); + if (isOperationStatus) { + getActivity().runOnUiThread(() -> { + slidePanelView.setText(text); + slidePanelView.setVisibility(View.VISIBLE); + }); + } } /** 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' } 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..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()); @@ -851,6 +856,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();