Merge remote-tracking branch 'origin/dev2_aiSdk' into dev2_aiSdk

This commit is contained in:
wujifei
2021-04-28 11:21:05 +08:00
13 changed files with 278 additions and 26 deletions

View File

@@ -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;
}
}

View File

@@ -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();
}
}
}

View File

@@ -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;
}

View File

@@ -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
}
]
}
}

View File

@@ -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:

View File

@@ -0,0 +1,11 @@
{
"drivingRoutes": [
],
"endStation": "第二十一站",
"orderDispatchType": 1,
"orderNo": "CZ20210427000016",
"orderType": 9,
"startStation": "0409第一站",
"travelDistance": 0.3
}

View File

@@ -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"
}
}

View File

@@ -32,6 +32,7 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> 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<V extends IView, P extends Presenter<V>> 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);
});
}
}
/**

View File

@@ -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'
}

View File

@@ -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();