[Taxi Passenger v1.1.0] 1、增加taxi司机端角色展示 2、切换至QA环境 3、资源文件同步

This commit is contained in:
wangmingjun
2022-03-21 11:56:09 +08:00
parent be4aa728a3
commit 7fe446aa73
68 changed files with 204 additions and 18 deletions

View File

@@ -9,8 +9,7 @@ class TaxiPassengerConst {
companion object {
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
// private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
private const val BASE_URL_OCH_QA = "http://tech-dev.zhidaohulian.com"
private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
private const val BASE_URL_OCH_RELEASE = "https://tech.zhidaohulian.com"
@JvmStatic

View File

@@ -13,6 +13,6 @@ public class DriverStatusQueryRespBean extends BaseData {
public static class Result {
public int serviceStatus; //0收车1出车
public String orderNo;
public int purpose; // 1 运营 2 测试 3演示
public int purpose; // 1 运营, 2 测试, 3演示
}
}

View File

@@ -6,7 +6,7 @@ package com.mogo.och.taxi.callback;
* Model->Presenter回调出车/收车状态变更
*/
public interface IOCHTaxiCarStatusCallback {
void onCarStatusChanged(boolean inOperation);
void onCarStatusChanged(boolean inOperation,String role);
void onServiceDataUpdate(long dailyTimeDuration, long dailyOrderNum);
}

View File

@@ -0,0 +1,11 @@
package com.mogo.och.taxi.constant
/**
* Created on 2021/12/7
* 1 运营, 2 测试, 3演示
*/
enum class DriverRoleEnum(val code: Int) {
OPERATION( 1),
TEST( 2),
DEMO( 3);
}

View File

@@ -9,8 +9,7 @@ class OCHTaxiConst {
companion object {
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
// private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
private const val BASE_URL_OCH_QA = "http://tech-dev.zhidaohulian.com"
private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
private const val BASE_URL_OCH_RELEASE = "https://tech.zhidaohulian.com"
@JvmStatic
@@ -42,8 +41,12 @@ class OCHTaxiConst {
const val SP_KEY_OCH_TAXI_ORDER = "SP_KEY_OCH_TAXI_ORDER"
//起点UUID
const val TAXI_START_MAP_MAKER = "taxi_start_map_maker";
const val TAXI_START_MAP_MAKER = "taxi_start_map_maker"
//终点UUID
const val TAXI_END_MAP_MAKER = "taxi_end_map_maker";
const val TAXI_END_MAP_MAKER = "taxi_end_map_maker"
//演示V 测试:内测
const val DEMO_USER = "V"
const val TEST_USER = "内测"
}
}

View File

@@ -45,6 +45,7 @@ import com.mogo.och.taxi.callback.IOCHTaxiADASStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiCarStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiControllerStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiOrderStatusCallback;
import com.mogo.och.taxi.constant.DriverRoleEnum;
import com.mogo.och.taxi.constant.OCHTaxiConst;
import com.mogo.och.taxi.constant.OrderStatusEnum;
import com.mogo.och.taxi.constant.OrderTypeEnum;
@@ -262,10 +263,18 @@ public class MogoOCHTaxiModelNew {
if (null != data && 0 == data.code) {
mOCHCarStatus = data.data.serviceStatus == 1 ? 1 : 0;
//更新view
CallerLogger.INSTANCE.d(M_TAXI + TAG, "changeCarStatus:" + mOCHCarStatus);
startOrStopOrderLoop(mOCHCarStatus == 1);
if (mCarStatusCallback != null) {
mCarStatusCallback.onCarStatusChanged(mOCHCarStatus == 1);
String role = "";
if (DriverRoleEnum.DEMO.getCode() == data.data.purpose){
role = OCHTaxiConst.DEMO_USER;
}else if (DriverRoleEnum.TEST.getCode() == data.data.purpose){
role = OCHTaxiConst.TEST_USER;
}
if (mCarStatusCallback != null) {
mCarStatusCallback.onCarStatusChanged(mOCHCarStatus == 1 , role);
}
}
}
@@ -295,11 +304,7 @@ public class MogoOCHTaxiModelNew {
public void onSuccess(BaseData data) {
if (null != data && 0 == data.code) {
mOCHCarStatus = status;
startOrStopOrderLoop(mOCHCarStatus == 1);
if (mCarStatusCallback != null) {
mCarStatusCallback.onCarStatusChanged(mOCHCarStatus == 1);
}
CallerLogger.INSTANCE.d(M_TAXI + TAG, "changeCarStatus:" + status);
queryCarStatus();
}
}

View File

@@ -163,8 +163,8 @@ public class OCHTaxiPresenter extends Presenter<OCHTaxiFragment> implements IOCH
}
@Override
public void onCarStatusChanged(boolean inOperation) {
mView.updateOperationStatus(inOperation);
public void onCarStatusChanged(boolean inOperation, String role) {
mView.updateOperationStatus(inOperation,role);
}
@Override

View File

@@ -62,6 +62,7 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
private static final String TAG = "BaseOchFragment";
private LinearLayout ctvAutopilotStatus;
protected TextView tvOperationStatus;
protected TextView mDriverRole;
public boolean isOperationStatus;//false-收车true-出车
protected FrameLayout flStationPanelContainer;
private FrameLayout flNaviPanelContainer;
@@ -112,7 +113,10 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
return true;
});
}
tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
mDriverRole = findViewById(R.id.taxi_driver_role_tv);
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_layout);
mMapswitchBtn.setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -5,6 +5,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAX
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
@@ -157,15 +158,22 @@ public class OCHTaxiFragment extends BaseOchTaxiTabFragment<OCHTaxiFragment, OCH
super.onDestroyView();
}
public void updateOperationStatus(boolean inOperation) {
public void updateOperationStatus(boolean inOperation,String role) {
CallerLogger.INSTANCE.e(M_TAXI + TAG, "onOperationChanged:" + inOperation);
isOperationStatus = inOperation;
if (inOperation) {
if (!TextUtils.isEmpty(role)){
mDriverRole.setVisibility(View.VISIBLE);
mDriverRole.setText(role);
}else {
mDriverRole.setVisibility(View.GONE);
}
tvOperationStatus.setText("收车");
mPersonalBtn.setVisibility(View.VISIBLE);
tvOperationStatus.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.taxi_back_btn), null, null, null);
showPanel();
} else {
mDriverRole.setVisibility(View.GONE);
// AIAssist.getInstance(getContext()).speakTTSVoice("已收车");
tvOperationStatus.setText("出车");
tvOperationStatus.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.taxi_out_btn), null, null, null);

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
<item android:drawable="@drawable/taxi_ic_autopilot_bg_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/taxi_ic_autopilot_bg"/>
</selector>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#2B6EFF" android:startColor="#2B6EFF" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#3B4577" android:startColor="#3B4577" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <item android:state_checked="true">-->
<!-- <shape android:shape="rectangle">-->
<!-- <corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />-->
<!-- <gradient android:angle="315" android:endColor="#2B6EFF" android:startColor="#2B6EFF" />-->
<!-- </shape>-->
<!-- </item>-->
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#1E2E87 " android:startColor="#7792F9" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
<item android:drawable="@drawable/taxi_ic_autopilot_bg_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/taxi_ic_autopilot_bg"/>
</selector>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#2B6EFF" android:startColor="#2B6EFF" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#3B4577" android:startColor="#3B4577" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <item android:state_checked="true">-->
<!-- <shape android:shape="rectangle">-->
<!-- <corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />-->
<!-- <gradient android:angle="315" android:endColor="#2B6EFF" android:startColor="#2B6EFF" />-->
<!-- </shape>-->
<!-- </item>-->
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="20px" android:bottomRightRadius="50px" android:topLeftRadius="50px" android:topRightRadius="20px" />
<gradient android:angle="315" android:endColor="#1E2E87 " android:startColor="#7792F9" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -103,6 +103,16 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<TextView
android:id="@+id/taxi_driver_role_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/taxi_diver_role_size"
android:textColor="@color/taxi_role_text_color"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_20"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<LinearLayout
android:id="@+id/module_och_taxi_personal_layout"
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"

View File

@@ -1,5 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_mogo_och_margin_left">40px</dimen>
<dimen name="module_mogo_och_margin_right">40px</dimen>
<dimen name="module_mogo_och_margin_bottom">46px</dimen>
<dimen name="module_mogo_och_margin_top">24px</dimen>
<dimen name="module_mogo_och_station_panel_container_margin_top_no_call">530px</dimen>
<dimen name="module_mogo_och_station_panel_container_margin_top_with_call">492px</dimen>
<dimen name="module_mogo_och_slide_panel_block_start_x">20px</dimen>
<dimen name="module_mogo_och_slide_panel_block_start_y">20px</dimen>
<dimen name="module_mogo_och_slide_panel_normal_text_margin_left">70px</dimen>
<dimen name="module_mogo_och_slide_panel_normal_text_margin_right">130px</dimen>
<dimen name="module_mogo_och_slide_panel_short_text_margin_left">93px</dimen>
<dimen name="module_mogo_och_slide_panel_short_text_margin_right">150px</dimen>
<dimen name="module_mogo_och_slide_panel_textSize">70px</dimen>
<dimen name="module_mogo_och_autopilot_status_bg_corner">24px</dimen>
<dimen name="module_mogo_och_autopilot_status_bg_width">460px</dimen>
<dimen name="module_mogo_och_autopilot_status_bg_height">140px</dimen>
<dimen name="module_mogo_och_operation_status_bg_width">102px</dimen>
<dimen name="module_mogo_och_operation_status_bg_height">102px</dimen>
<dimen name="module_mogo_och_operation_status_padding">83px</dimen>
<dimen name="module_mogo_och_autopilot_order_m_t">40px</dimen>
<dimen name="module_mogo_och_autopilot_order_bg_width">466px</dimen>
<dimen name="module_mogo_och_autopilot_order_bg_height">414px</dimen>
<!-- <dimen name="module_mogo_och_autopilot_status_text_size">44px</dimen>-->
<dimen name="module_mogo_och_autopilot_status_text_size">46px</dimen>
<dimen name="module_mogo_och_autopilot_status_text_padding_top">13px</dimen>
<dimen name="module_mogo_och_autopilot_status_text_drawable_padding">12px</dimen>
<dimen name="module_mogo_och_autopilot_status_text_m_l">350px</dimen>
<dimen name="module_mogo_och_notice_text_max_width">460px</dimen>
<dimen name="module_mogo_och_notice_text_size">30px</dimen>
<dimen name="module_och_taxi_order_start_station_marginLeft">15px</dimen>
<dimen name="module_och_taxi_order_status_marginLeft">25px</dimen>
<dimen name="module_och_taxi_order_status_marginTop">25px</dimen>
<dimen name="module_och_taxi_order_status_textSize">32px</dimen>
<dimen name="module_och_taxi_order_status_divider_height">1px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginTop">20px</dimen>
<dimen name="module_och_taxi_order_status_divider_marginRight">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_height">140px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingLeft">20px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingTop">41px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingRight">17px</dimen>
<dimen name="module_och_taxi_order_status_stationInfo_paddingBottom">41px</dimen>
<dimen name="module_och_taxi_order_start_station_textSize">42px</dimen>
<dimen name="module_och_taxi_order_start_station_anchor_textSize">32px</dimen>
<dimen name="module_och_taxi_order_end_station_anchor_textSize">32px</dimen>
<dimen name="module_och_taxi_order_distance_container_height">84px</dimen>
<dimen name="module_och_taxi_order_distance_container_marginLeft">3px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_marginLeft">20px</dimen>
<dimen name="module_och_taxi_order_distance_anchor_textSize">32px</dimen>
<dimen name="module_och_taxi_order_distance_textSize">36px</dimen>
<dimen name="module_och_taxi_order_distance_marginRight">17px</dimen>
<dimen name="module_och_taxi_order_text_marginRight">31.5px</dimen>
<dimen name="module_och_taxi_panel_width">560px</dimen>
<dimen name="module_och_taxi_panel_height">910px</dimen>
<dimen name="taxi_operation_data_item_width">800px</dimen>
@@ -23,4 +86,6 @@
<dimen name="taxi_tab_speed_width_height">220px</dimen>
<dimen name="taxi_tab_autoaploit_width">420px</dimen>
<dimen name="taxi_tab_autoaploit_height">220px</dimen>
<dimen name="taxi_diver_role_size">16px</dimen>
</resources>

View File

@@ -87,4 +87,6 @@
<dimen name="taxi_tab_autoaploit_width">420px</dimen>
<dimen name="taxi_tab_autoaploit_height">220px</dimen>
<dimen name="taxi_diver_role_size">16px</dimen>
</resources>

View File

@@ -13,4 +13,6 @@
<color name="taxi_autopilot_text_color_normal">#FFFFFF</color>
<color name="taxi_autopilot_text_color_disable">#99FFFFFF</color>
<color name="taxi_autopilot_text_color_checked">#FF52BBFF</color>
<color name="taxi_role_text_color">#4DFFFFFF</color>
</resources>

View File

@@ -84,4 +84,7 @@
<dimen name="taxi_tab_autoaploit_height">220px</dimen>
<dimen name="module_mogo_och_margin_left">40px</dimen>
<dimen name="taxi_diver_role_size">16px</dimen>
</resources>