Merge branch 'dev_minibus-d_230926_6.1.0' into min_6.1.0_2_master

This commit is contained in:
yangyakun
2023-10-17 15:18:03 +08:00
542 changed files with 2394 additions and 2630 deletions

View File

@@ -23,6 +23,8 @@ android {
}
}
resourcePrefix "charter"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
@@ -43,14 +45,6 @@ android {
}
}
flavorDimensions "vehicle"
productFlavors {
// 车型金旅m1 司机端
driverm1 {
dimension "vehicle"
buildConfigField 'int', 'NEW_TEST', '1'
}
}
}
dependencies {
@@ -69,6 +63,8 @@ dependencies {
implementation project(":OCH:mogo-och-common-module")
compileOnly project(":libraries:mogo-map")
testImplementation 'junit:junit:4.12'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.magic.mogo.och.charter">
</manifest>

View File

@@ -1,184 +0,0 @@
{
"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

@@ -1,28 +0,0 @@
{
"_id": "62bc84afbc434d01b644c74ee406e772",
"areaCode": "1001",
"carNum": "京NB010",
"cityCode": "010",
"createTime": "Apr 26, 2021 10:48:22 AM",
"endStation": "顺密路口站",
"endStationCoordinate": [
116.721520973,
40.1940181096
],
"endStationId": 2,
"orderDispatchType": 1,
"orderNo": "XB20210426000002",
"orderStartTime": "Apr 26, 2021 10:48:22 AM",
"orderType": 10,
"sn": "F803EB2046PZD00149",
"startStation": "万集东门站",
"startStationCoordinate": [
116.7354579447,
40.1974932972
],
"startStationId": 1,
"travelDistance": 1.2,
"updateTime": "Apr 26, 2021 10:48:23 AM",
"userName": "董QAD",
"userPhone": "15631204018"
}

View File

@@ -1,69 +0,0 @@
{
"code": 0,
"msg": "",
"detailMsg": "",
"result": {
"site": [
{
"lineId": 1.0,
"siteId": 1.0,
"siteName": "万集东门站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.7354579447,
40.1974932972
],
"lon": 116.7354579447,
"lat": 40.1974932972,
"siteDesc": "万集东门站",
"siteState": 1.0,
"isCurrentSite": 1.0,
"siteColor": 1.0,
"peoples": "0",
"ifStop": 1.0
},
{
"lineId": 1.0,
"siteId": 2.0,
"siteName": "市政府前街18号",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.729134342,
40.1953113732
],
"lon": 116.729134342,
"lat": 40.1953113732,
"siteDesc": "市政府前街18号",
"siteState": 1.0,
"isCurrentSite": 3.0,
"siteColor": 2.0,
"peoples": "0",
"ifStop": 0.0
},
{
"lineId": 1.0,
"siteId": 3.0,
"siteName": "顺密路口站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.721520973,
40.1940181096
],
"lon": 116.721520973,
"lat": 40.1940181096,
"siteDesc": "顺密路口站",
"siteState": 1.0,
"isCurrentSite": 0.0,
"siteColor": 0.0,
"peoples": "0",
"ifStop": 1.0
}
]
}
}

View File

@@ -1,109 +0,0 @@
{
"code": 0,
"msg": "",
"detailMsg": "",
"result": {
"site": [
{
"lineId": 1.0,
"siteId": 1.0,
"siteName": "万集东门站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.7354579447,
40.1974932972
],
"lon": 116.7354579447,
"lat": 40.1974932972,
"siteDesc": "万集东门站",
"siteState": 1.0,
"isCurrentSite": 0.0,
"siteColor": 0.0,
"peoples": "0",
"ifStop": 1.0
},
{
"lineId": 1.0,
"siteId": 1.0,
"siteName": "万集东门站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.7374429112,
40.2023987087
],
"lon": 116.7374429112,
"lat": 40.2023987087,
"siteDesc": "万集东门站",
"siteState": 1.0,
"isCurrentSite": 0.0,
"siteColor": 0.0,
"peoples": "0",
"ifStop": 1.0
},
{
"lineId": 1.0,
"siteId": 2.0,
"siteName": "顺密路口站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.721520973,
40.1940181096
],
"lon": 116.721520973,
"lat": 40.1940181096,
"siteDesc": "顺密路口站",
"siteState": 1.0,
"isCurrentSite": 1.0,
"siteColor": 1.0,
"peoples": "0",
"ifStop": 1.0
},
{
"lineId": 1.0,
"siteId": 2.0,
"siteName": "顺密路口站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.723146,
40.179637
],
"lon": 116.723146,
"lat": 40.179637,
"siteDesc": "顺密路口站",
"siteState": 1.0,
"isCurrentSite": 1.0,
"siteColor": 1.0,
"peoples": "0",
"ifStop": 1.0
},
{
"lineId": 2.0,
"siteId": 2.0,
"siteName": "顺密路口站",
"cityCode": "010",
"areaCode": "1001",
"areaName": "顺义区",
"currentLocation": [
116.738835502,
40.2023958306
],
"lon": 116.738835502,
"lat": 40.2023958306,
"siteDesc": "顺密路口站",
"siteState": 1.0,
"isCurrentSite": 1.0,
"siteColor": 1.0,
"peoples": "0",
"ifStop": 1.0
}
]
}
}

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="SlidePanelView">
<attr name="textSize" format="dimension" />
<attr name="NORMAL_TEXT_MARGIN_LEFT" format="dimension" />
<attr name="NORMAL_TEXT_MARGIN_RIGHT" format="dimension" />
<attr name="SHORT_TEXT_MARGIN_LEFT" format="dimension" />
<attr name="SHORT_TEXT_MARGIN_RIGHT" format="dimension" />
<attr name="BLOCK_START_X" format="dimension" />
<attr name="BLOCK_START_Y" format="dimension" />
</declare-styleable>
</resources>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="station_title_color">#CAD6FF</color>
</resources>

View File

@@ -1,7 +0,0 @@
<resources>
<string name="count_down_txt">剩余%1$s分钟</string>
<string name="during_time_tv">包车时间:%1$s</string>
<string name="passenger_phone">乘客信息:%1$s</string>
<string name="last_5_minutes">本次行程剩余5分钟请知晓并通知乘客合理安排游玩时间</string>
</resources>

View File

@@ -1,53 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<MotionScene
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:motionInterpolator="easeInOut"
motion:duration="300">
<KeyFrameSet>
</KeyFrameSet>
<OnClick motion:targetId="@+id/switch_line_item_select_iv" motion:clickAction="toggle" />
</Transition>
<ConstraintSet android:id="@+id/start">
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/switch_line_end_station"
android:layout_width="0dp"
android:layout_height="wrap_content"
motion:layout_constraintBottom_toTopOf="@id/v_line_task"
android:layout_marginBottom="@dimen/dp_40"
motion:layout_constraintTop_toBottomOf="@+id/switch_line_name"
motion:layout_constraintStart_toStartOf="@+id/switch_line_name"
android:layout_marginTop="@dimen/dp_20" />
<Constraint
android:id="@+id/v_line_task"
android:visibility="visible"
android:background="@android:color/white"
android:layout_marginStart="@dimen/dp_80"
android:layout_marginEnd="@dimen/dp_80"
android:layout_marginTop="@dimen/dp_40"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/switch_line_end_station"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<Constraint
android:id="@+id/rv_line_task_list"
android:visibility="visible"
android:layout_marginStart="@dimen/dp_80"
android:layout_marginEnd="@dimen/dp_80"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/v_line_task"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</ConstraintSet>
</MotionScene>

View File

@@ -6,6 +6,7 @@ import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.facade.annotation.Route
import com.magic.mogo.och.charter.constant.CharterConst
import com.magic.mogo.och.charter.fragment.DriverM1Fragment
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
@@ -14,14 +15,12 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
* @date: 2023/2/22
*/
@Route(path = CharterConst.PATH)
class CharterProvider: ICharterOCH{
class CharterProvider: IMoGoFunctionProvider{
private var mActivity: FragmentActivity? = null
private var mContainerId: Int? = 0
private var driverM1Fragment: Fragment? = null
override fun createCoverage(activity: FragmentActivity?, containerId: Int) {}
override fun createCoverage(fragmentActivity: FragmentActivity?, integer: Int?): Fragment? {
this.mContainerId = integer
this.mActivity = fragmentActivity

View File

@@ -1,23 +0,0 @@
package com.magic.mogo.och.charter;
import androidx.annotation.IdRes;
import androidx.fragment.app.FragmentActivity;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
/**
* @author congtaowang
* @since 2021/1/15
*
* 网约车抽象接口
*/
public interface ICharterOCH extends IMoGoFunctionProvider {
/**
* 初始化网约车容器
*
* @param activity
* @param containerId 容器ID
*/
void createCoverage(FragmentActivity activity, @IdRes int containerId);
}

View File

@@ -93,7 +93,7 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container)
slidePanelView = findViewById(R.id.charter_slide_panel)
slidePanelView?.setText(resources.getString(R.string.back_car))
slidePanelView?.setText(resources.getString(R.string.charter_back_car))
slidePanelView?.setOnSlidePanelMoveToEndListener(onSlideToEndListener)
mTrafficDataView = findViewById<View>(R.id.bus_arc) as TrafficDataView?
@@ -108,14 +108,14 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
if (ui.currentMapVisualAngle.isLongSight) {
ui.setLockMode(true)
ui.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_medium)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_medium)
} else if (ui.currentMapVisualAngle.isMediumSight) {
ui.setLockMode(false)
ui.changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null)
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_long)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_long)
} else {
ui.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_medium)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_medium)
}
}
}
@@ -248,9 +248,9 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
requireActivity().runOnUiThread {
module_mogo_och_arrived_tv.isEnabled = isClickable
if (isClickable) {
module_mogo_och_arrived_tv.setTextColor(resources.getColor(R.color.bus_white))
module_mogo_och_arrived_tv.setTextColor(resources.getColor(android.R.color.white))
} else {
module_mogo_och_arrived_tv.setTextColor(resources.getColor(R.color.bus_arrived_btn_un_clickable_color))
module_mogo_och_arrived_tv.setTextColor(resources.getColor(R.color.charter_arrived_btn_un_clickable_color))
}
}
}
@@ -266,11 +266,11 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
mapBizView?.let {
it.getUI()?.let { ui ->
if (ui.currentMapVisualAngle.isLongSight) {
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_long)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_long)
} else if (ui.currentMapVisualAngle.isMediumSight) {
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_medium)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_medium)
} else {
mSwitchMapModeImage!!.setImageResource(R.drawable.bus_switch_map_medium)
mSwitchMapModeImage!!.setImageResource(R.drawable.charter_switch_map_medium)
}
}
}
@@ -326,29 +326,29 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE
== autopilotStatus
) { //0不可用
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_disable))
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.charter_autopilot_text_color_disable))
ctvAutopilotStatusTv!!.text =
resources.getString(R.string.bus_loading_autopilot_runnig_tv)
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_disable_autopilot_icon)
resources.getString(R.string.charter_loading_autopilot_runnig_tv)
ctvAutopilotStatusIv!!.setImageResource(R.drawable.charter_disable_autopilot_icon)
// ctvAutopilotStatus!!.isSelected = false
ctvAutopilotStatus!!.isClickable = true
ctvAutopilotStatus!!.background = getDrawable(R.drawable.bus_autopilot_0_1_status_bg)
ctvAutopilotStatus!!.background = getDrawable(R.drawable.charter_autopilot_0_1_status_bg)
}else{
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_normal))
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_ic_autopilot)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.charter_autopilot_text_color_normal))
ctvAutopilotStatusIv!!.setImageResource(R.drawable.charter_ic_autopilot)
ctvAutopilotStatusTv!!.text =
resources.getString(R.string.bus_loading_autopilot_runnig_tv)
resources.getString(R.string.charter_loading_autopilot_runnig_tv)
ctvAutopilotStatus!!.isClickable = true
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) { //1可用
ctvAutopilotStatus!!.background = getDrawable(R.drawable.bus_autopilot_0_1_status_bg)
ctvAutopilotStatus!!.background = getDrawable(R.drawable.charter_autopilot_0_1_status_bg)
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == autopilotStatus) {
ctvAutopilotStatus!!.background = getDrawable(R.drawable.bus_autopilot_2_status_bg)
ctvAutopilotStatus!!.background = getDrawable(R.drawable.charter_autopilot_2_status_bg)
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
== autopilotStatus){
ctvAutopilotStatusTv!!.text =
resources.getString(R.string.bus_loading_autopilot_pingxing_tv)
resources.getString(R.string.charter_loading_autopilot_pingxing_tv)
ctvAutopilotStatus!!.isClickable = false
ctvAutopilotStatus!!.background = getDrawable(R.drawable.pingxingjiashi)
ctvAutopilotStatus!!.background = getDrawable(R.drawable.charter_pingxingjiashi)
}
}
}
@@ -357,17 +357,17 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING
== autopilotStatus
) { //2 running
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_right_autopilot_icon)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_normal))
ctvAutopilotStatusIv!!.setImageResource(R.drawable.charter_right_autopilot_icon)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.charter_autopilot_text_color_normal))
ctvAutopilotStatusTv!!.text =
resources.getString(R.string.bus_loading_autopilot_success_tv)
resources.getString(R.string.charter_loading_autopilot_success_tv)
// ctvAutopilotStatus!!.isSelected = false
ctvAutopilotStatus!!.isClickable = false
} else {
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_wrong_autopilot_icon)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_normal))
ctvAutopilotStatusIv!!.setImageResource(R.drawable.charter_wrong_autopilot_icon)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.charter_autopilot_text_color_normal))
ctvAutopilotStatusTv!!.text =
resources.getString(R.string.bus_loading_autopilot_failure_tv)
resources.getString(R.string.charter_loading_autopilot_failure_tv)
ctvAutopilotStatus!!.isClickable = false
// ctvAutopilotStatus!!.isSelected = false
}
@@ -427,11 +427,11 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
@SuppressLint("ObjectAnimatorBinding")
open fun startAutopilotAnimation() {
isAnimateRunning = true
ctvAutopilotStatusTv!!.text = resources.getString(R.string.bus_loading_autopilot_tv)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_normal))
ctvAutopilotStatusTv!!.text = resources.getString(R.string.charter_loading_autopilot_tv)
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.charter_autopilot_text_color_normal))
// ctvAutopilotStatus!!.isSelected = false
ctvAutopilotStatus!!.isClickable = true
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_loading_autopilot_icon)
ctvAutopilotStatusIv!!.setImageResource(R.drawable.charter_loading_autopilot_icon)
if (autopilotLoadingAnimator == null) {
autopilotLoadingAnimator =
ObjectAnimator.ofFloat(ctvAutopilotStatusIv, "rotation", 0f, 360f)

View File

@@ -9,7 +9,6 @@ import com.alibaba.android.arouter.launcher.ARouter
import com.magic.mogo.och.charter.R
import com.magic.mogo.och.charter.base.CharterBaseFragment
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVED
import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse.Result.Companion.ARRIVING
import com.magic.mogo.och.charter.constant.CharterConst.Companion.LOOP_PERIOD_60S
import com.magic.mogo.och.charter.net.login.LoginDriverM1Impl
@@ -26,8 +25,16 @@ import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.createQRCodeWithPicture
import com.mogo.och.common.module.wigets.BindQRCodeDialog
import com.mogo.och.common.module.wigets.OCHCommitDialog
import kotlinx.android.synthetic.driverm1.bus_no_line_view.*
import kotlinx.android.synthetic.driverm1.fragment_driver_m1.*
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.driverm1StationName1Tv
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.driverm1StationName2Tv
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.driverm1_line_name
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.driverm1_order_count_down
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.during_time
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.group_stations_panel
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.group_stations_panel2
import kotlinx.android.synthetic.main.charter_fragment_driver_m1.passenger_phone
import kotlinx.android.synthetic.main.charter_no_line_view.no_line_data_view
import kotlinx.android.synthetic.main.charter_no_line_view.no_order_data_tv
import me.jessyan.autosize.utils.AutoSizeUtils
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@@ -73,13 +80,13 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result){
requireActivity().runOnUiThread {
isReturn5MTip = false
isReturn15MTip = false
showOrHideOrderUI(true)
passenger_phone.text = String.format(resources.getString(R.string.passenger_phone)
passenger_phone.text = String.format(resources.getString(R.string.charter_passenger_phone)
,orderStatus.passengerPhone)
during_time.text = String.format(resources.getString(R.string.during_time_tv),
during_time.text = String.format(resources.getString(R.string.charter_during_time_tv),
DateTimeUtil.formatLongToString(orderStatus.startTime,DateTimeUtil.HH_mm)
+""+DateTimeUtil.formatLongToString(orderStatus.endTime,DateTimeUtil.HH_mm))
@@ -87,7 +94,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
driverm1_line_name.text = "暂无"
group_stations_panel2.visibility = GONE
no_line_data_view.visibility = VISIBLE
no_order_data_tv.text = resources.getString(R.string.bus_task_wait_tip)
no_order_data_tv.text = resources.getString(R.string.charter_bus_task_wait_tip)
}else{
driverm1_line_name.text = orderStatus.lineName
driverm1StationName1Tv.text = orderStatus.startSiteName
@@ -105,7 +112,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
if (minutes >= 0){
startCountDownTimer(minutes,LOOP_PERIOD_60S)
}else{
isReturn5MTip = false
isReturn15MTip = false
clearCountDownTimer()
}
}
@@ -158,7 +165,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
}
override fun getStationPanelViewId(): Int {
return R.layout.fragment_driver_m1
return R.layout.charter_fragment_driver_m1
}
override fun restartAutopilot() {
@@ -187,28 +194,28 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
}
var builder = OCHCommitDialog.Builder()
ochCommitDialog = builder.title(title).tips(content)
.confirmStr(getString(R.string.bus_dialog_confirm))
.cancelStr(getString(R.string.bus_dialog_cancel))
.confirmStr(getString(R.string.charter_dialog_confirm))
.cancelStr(getString(R.string.charter_dialog_cancel))
.countdownValue(120)
.build(requireContext())
ochCommitDialog?.setClickListener(object : OCHCommitDialog.ClickListener {
override fun confirm() { //同意
mPresenter?.changeDest()
}
ochCommitDialog?.setClickListener(object : OCHCommitDialog.ClickListener {
override fun confirm() { //同意
mPresenter?.changeDest()
}
override fun cancel() { //取消
mPresenter?.sendCommitMsgToClient(false)
}
})
override fun cancel() { //取消
mPresenter?.sendCommitMsgToClient(false)
}
})
ochCommitDialog?.show()
}
fun updateReturnCarStatus(returnSuccess: Boolean) {
requireActivity().runOnUiThread {
isReturn5MTip = false
isReturn15MTip = false
group_stations_panel.visibility = GONE
no_line_data_view.visibility = VISIBLE
no_order_data_tv.text = resources.getString(R.string.bus_no_task_tip)
no_order_data_tv.text = resources.getString(R.string.charter_bus_no_task_tip)
if (returnSuccess){
slidePanelView?.visibility = GONE
}else{
@@ -219,7 +226,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
}
private var isReturn5MTip: Boolean = false
private var isReturn15MTip: Boolean = false
private fun startCountDownTimer(total: Long, countDownInterval:Long){
clearCountDownTimer()
@@ -228,12 +235,12 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
val minute: Double = ceil(millisUntilFinished/1000/60.0)
driverm1_order_count_down.text = String.format(
resources.getString(R.string.count_down_txt)
resources.getString(R.string.charter_count_down_txt)
,minute.roundToInt())
if(minute.roundToInt() == 5 && !isReturn5MTip){//还车提示
if(minute.roundToInt() == 15 && !isReturn15MTip){//还车提示
mPresenter?.carReturnTip()
isReturn5MTip = true
isReturn15MTip = true
}
d(SceneConstant.M_CHARTER_D + TAG, "倒计时分钟 = ${minute.roundToInt()}" )
}

View File

@@ -87,7 +87,13 @@ object CharterTrajectoryManager {
// 5. 轨迹管理_轨迹下载超时
d(SceneConstant.M_CHARTER_D + TAG, "onAutopilotGuardian() 轨迹下载超时")
// ToastUtils.showShort("轨迹下载超时");
} else if ("EMAP_ATTITUDE_INIT_FAILED" == guardianInfo.getCode()) {
} else if ("EMAP_ATTITUDE_INIT_FAILED" == guardianInfo.getCode()) {
// 收到ssm的自动驾驶变为ready再次下发轨迹下载.解决域控重启或者102域控启动太早107节点初始化未完成导致的轨迹未进行下载。
d(SceneConstant.M_CHARTER_D + TAG, "onAutopilotGuardian() ssm ready再次发起下载")
get().getBusOrderResult()?.lineId?.let {
syncTrajectoryInfo(it,
get().getBusOrderResult()?.lineName!!)
}
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.OPERATION,
@@ -97,11 +103,6 @@ object CharterTrajectoryManager {
)
)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getTopActivity(), R.raw.startautopilot)
} else if ("EMAP_ATTITUDE_INIT_FAILED" == guardianInfo.getCode()) {
// 收到ssm的自动驾驶变为ready再次下发轨迹下载.解决域控重启或者102域控启动太早107节点初始化未完成导致的轨迹未进行下载。
d(SceneConstant.M_CHARTER_D + TAG, "onAutopilotGuardian() ssm ready再次发起下载")
syncTrajectoryInfo(get().getBusOrderResult()?.lineId!!,
get().getBusOrderResult()?.lineName!!)
}
}

View File

@@ -56,6 +56,9 @@ import com.mogo.och.common.module.manager.CharterSendTripInfoManager.ARRIVE_STAT
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.END_TRIP
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.START_TRIP
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
import com.mogo.och.common.module.manager.stopsidemanager.StopSideManager
import com.mogo.och.common.module.utils.*
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.data.bean.*
@@ -271,9 +274,12 @@ class DriverM1Model {
object : IMogoOnMessageListener<OperateDoorMsg> {
override fun onMsgReceived(obj: OperateDoorMsg) {
d(SceneConstant.M_CHARTER_D + TAG, "onMsgReceived = " + obj.message)
sendMsgToClient(DPOperateDoorMsg(true))
val doorStatus = LightAirconditionDoorStatusManager.doorStatus
if (doorStatus.isOpen) {
LightAirconditionDoorManager.go2OpenDoor(false)
} else {
LightAirconditionDoorManager.go2OpenDoor(true)
}
}
override fun target(): Class<OperateDoorMsg> {
@@ -500,7 +506,7 @@ class DriverM1Model {
*/
fun restartAutopilot() {
d(SceneConstant.M_CHARTER_D + TAG, "司机端-启动自动驾驶===")
CallerAutoPilotControlManager.sendPlanningCmd(2)
StopSideManager.resetStopSide()
//只去启动自动驾驶
startAutopilot()
}

View File

@@ -23,7 +23,9 @@ import com.mogo.och.common.module.biz.callback.ILoginCallback
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.OPERATION_ROAD_SIDE_TYPE
import com.mogo.och.common.module.biz.constant.LoginStatusManager.isLogin
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager
import com.mogo.och.common.module.manager.StopSideStatusManager
import com.mogo.och.common.module.manager.stopsidemanager.OCHPlanningActionsCallback
import com.mogo.och.common.module.manager.stopsidemanager.StopSideStatus
import com.mogo.och.common.module.manager.stopsidemanager.StopSideManager
import com.mogo.och.common.module.utils.DateTimeUtil
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -34,7 +36,7 @@ import mogo_msg.MogoReportMsg
*/
class DriverM1Presenter(view: DriverM1Fragment?) :
Presenter<DriverM1Fragment?>(view),ILoginCallback, DriverM1OrderCallback, ChangeDestCallback,
IMoGoAutopilotStatusListener, StopSideStatusManager.OCHPlanningActionsCallback,
IMoGoAutopilotStatusListener, OCHPlanningActionsCallback,
IDriverM1ControllerStatusCallback {
companion object{
@@ -50,14 +52,14 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
private fun registerListener() {
//2021.11.1 鹰眼架构整合由IMoGoAutopilotStatusListener逐步替代IMogoAdasOCHCallback接口
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
StopSideStatusManager.addListener(TAG,this)
StopSideManager.addListener(TAG,this)
DriverM1Model.get().setDriverM1OrderCallback(this)
DriverM1Model.get().setChangeDestCallback(this)
DriverM1Model.get().setControllerStatusCallback(this)
}
private fun releaseListener() {
StopSideStatusManager.removeListener(TAG)
StopSideManager.removeListener(TAG)
CallerAutoPilotStatusListenerManager.removeListener(TAG)
DriverM1Model.get().setDriverM1OrderCallback(null)
DriverM1Model.get().setChangeDestCallback(null)
@@ -129,9 +131,9 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
DriverM1Model.get().changeDest()
}
fun carReturnTip(){ //提前 5分钟 提醒
fun carReturnTip(){ //提前 15分钟 提醒
DriverM1Model.get().pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp()
,context.getString(R.string.last_5_minutes))
,context.getString(R.string.charter_last_15_minutes))
}
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
@@ -161,23 +163,30 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
}
override fun onStartAutopilotFailure(
actionStatus: StopSideStatusManager.Status,
actionStatus: StopSideStatus,
stopSideStatus: Boolean?,
errorInfo: String?
) {
when (actionStatus) {
StopSideStatusManager.Status.START -> { // 靠边停车 to 消息盒子
StopSideStatus.NOSTART -> {
DriverM1Model.get().pushOperationalToMsgBox(
DateTimeUtil.getCurrentTimeStamp(),
"靠边停车",
"靠边停车无响应,注意随时接管",
OPERATION_ROAD_SIDE_TYPE
)
}
StopSideStatusManager.Status.EndingFaile,
StopSideStatusManager.Status.NOSTART-> {
StopSideStatus.START -> { // 靠边停车 to 消息盒子
DriverM1Model.get().pushOperationalToMsgBox(
DateTimeUtil.getCurrentTimeStamp(),
"靠边停车失败",
"开始靠边停车",
OPERATION_ROAD_SIDE_TYPE
)
}
StopSideStatus.EndingFaile,
StopSideStatus.NOSTART-> {
DriverM1Model.get().pushOperationalToMsgBox(
DateTimeUtil.getCurrentTimeStamp(),
"靠边停车失败,注意随时接管",
OPERATION_ROAD_SIDE_TYPE
)
}

View File

@@ -1,12 +1,15 @@
package com.mogo.och.common.module.wigets
package com.magic.mogo.och.charter.view
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.magic.mogo.och.charter.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.och.common.module.R
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.manager.DriverMoFangFunctionManager
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.driver_mofang_function_view.view.*
/**
@@ -43,6 +46,14 @@ class DriverMoFangFunctionView @JvmOverloads constructor(
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendOperatorSetHornByDriver()
true
}
openDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(true)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
closeDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(false)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
}
}

View File

@@ -85,7 +85,7 @@ class SlidePanelView @JvmOverloads constructor(
val size = AutoSizeUtils.dp2px(context, 120f)
val opts = BitmapFactory.Options()
opts.inDensity = AutoSizeConfig.getInstance().initDensity.toInt()
bmBlock = BitmapFactory.decodeResource(resources, R.drawable.bus_base_slide_block, opts) as Bitmap
bmBlock = BitmapFactory.decodeResource(resources, R.drawable.charter_base_slide_block, opts) as Bitmap
bmBlock = Bitmap.createScaledBitmap(bmBlock!!, size, size, true) as Bitmap
blockWidth = bmBlock!!.width
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/bus_autopilot_text_color_normal"/>
<item android:color="@color/charter_autopilot_text_color_normal"/>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Some files were not shown because too many files have changed in this diff Show More