[6.0.0] 启动动画效果
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.mogo.och.common.module.wigets;
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.CountDownTimer
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -27,6 +29,8 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
private const val TAG = "V2XWarningView"
|
||||
}
|
||||
|
||||
private var startTimer: CountDownTimer? = null
|
||||
|
||||
private val closeWarningTask: Runnable = Runnable {
|
||||
showWarning(DirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
@@ -47,6 +51,12 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
|
||||
fun dismiss(direction: DirectionEnum) {
|
||||
dismissWarning(direction)
|
||||
cancelCountdown()
|
||||
}
|
||||
|
||||
fun cancelCountdown(){ //防止内存泄漏
|
||||
startTimer?.cancel()
|
||||
startTimer = null
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,7 +66,8 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
*/
|
||||
private fun showWarning(direction: DirectionEnum, time: Long = ALL_CLOSE_TIMER) {
|
||||
|
||||
startAutopilotTip.text = direction.desc
|
||||
//开始倒计时
|
||||
countDownTimer()
|
||||
|
||||
// 如果传入的不是关闭显示,则设置倒计时,定时关闭红框警示
|
||||
if (oldDirection.get() == direction) {
|
||||
@@ -72,6 +83,7 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
post {
|
||||
if (direction == DirectionEnum.ALERT_WARNING_TOP){
|
||||
startAutopilotTipImg.visibility = View.VISIBLE
|
||||
startAutopilotTip.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if (direction == DirectionEnum.ALERT_WARNING_NON) {
|
||||
@@ -96,6 +108,7 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
when (direction) {
|
||||
DirectionEnum.ALERT_WARNING_TOP -> {
|
||||
startAutopilotTipImg.visibility = View.GONE
|
||||
startAutopilotTip.visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
CallerLogger.d("$M_HMI$TAG", "Not Support Direction")
|
||||
@@ -112,15 +125,29 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
|
||||
|
||||
enum class DirectionEnum(
|
||||
var direction: Int,
|
||||
var desc: String,
|
||||
) {
|
||||
ALERT_WARNING_NON(
|
||||
0,
|
||||
"关闭红色边框预警"
|
||||
),
|
||||
0),
|
||||
ALERT_WARNING_TOP(
|
||||
1,
|
||||
"正上方"
|
||||
),
|
||||
1)
|
||||
}
|
||||
|
||||
fun countDownTimer() {
|
||||
|
||||
startTimer = object : CountDownTimer(ALL_CLOSE_TIMER, 1000L) {// 5倒计时后开启自驾
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
// 倒计时
|
||||
startAutopilotTip.text = "${(millisUntilFinished/1000).toInt()} 车辆即将自动开启自动驾驶"
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
//倒计时结束了...
|
||||
startAutopilotTip.text = "车辆正在自动开启自动驾驶"
|
||||
}
|
||||
}
|
||||
|
||||
startTimer?.start()
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="开始自驾"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/dp_34"
|
||||
android:textColor="@android:color/white"/>
|
||||
<ImageView
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.och.taxi.base
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.SystemClock
|
||||
@@ -36,8 +37,10 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.och.common.module.utils.AnimatorDrawableUtil
|
||||
import com.mogo.och.common.module.wigets.StartAutopilotAnimationView
|
||||
import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.START_AUTOPILOT_ANIMATION_INTERVAL
|
||||
import com.mogo.och.taxi.ui.TaxiAmapNaviFragment
|
||||
import com.mogo.och.taxi.ui.TaxiRottingNaviFragment
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.anim_flow_iv
|
||||
@@ -54,6 +57,7 @@ import kotlinx.android.synthetic.main.taxi_base_fragment.module_och_taxi_badcase
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.module_och_taxi_setting_layout
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.module_och_taxi_swich_map_layout
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.smallMapView
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.startAutopilotAnimationView
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.taxi_close_navi_icon
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.taxi_switch_icon
|
||||
import kotlinx.android.synthetic.main.taxi_base_fragment.viewDriverMsgBoxBubble
|
||||
@@ -301,6 +305,7 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
|
||||
override fun onDestroyView() {
|
||||
mapBizView.onDestroy()
|
||||
startAutopilotAnimationView.cancelCountdown()
|
||||
super.onDestroyView()
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
}
|
||||
@@ -616,4 +621,17 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
}
|
||||
|
||||
abstract fun startNaviToEndStation(isShow: Boolean)
|
||||
|
||||
fun showStartAutopilotBlinkAnimation(){
|
||||
startAutopilotAnimationView.show(
|
||||
StartAutopilotAnimationView.DirectionEnum.ALERT_WARNING_TOP,START_AUTOPILOT_ANIMATION_INTERVAL)
|
||||
|
||||
UiThreadHandler.postDelayed({
|
||||
stopStartAutopilotBlinkAnimation()
|
||||
},START_AUTOPILOT_ANIMATION_INTERVAL)
|
||||
}
|
||||
|
||||
private fun stopStartAutopilotBlinkAnimation(){
|
||||
startAutopilotAnimationView.dismiss(StartAutopilotAnimationView.DirectionEnum.ALERT_WARNING_TOP)
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ data class PrepareTaskRespBean(
|
||||
: BaseData()
|
||||
|
||||
data class JumpPassengerCheckReqBean(var sn: String, var orderNo: String)
|
||||
data class CancelOrderReqBean(var sn: String, var orderNo: String)
|
||||
data class CancelOrderReqBean(var sn: String, var orderNo: String, var cancelType: Int)
|
||||
data class OrderCompletedReqBean(var sn: String, var orderNo: String)
|
||||
data class ContrailListReqBean(var lineIds: Array<Long>)
|
||||
data class QueryCarOrderByNoReqBean(var sn: String, var orderNo: String)
|
||||
|
||||
@@ -14,4 +14,7 @@ public interface ITaxiControllerStatusCallback {
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
|
||||
//自动开启自动驾驶
|
||||
void startOpenAutopilotNonManual();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,11 @@ class TaxiUnmannedConst {
|
||||
|
||||
const val TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L
|
||||
|
||||
const val TIMER_PREPARE_TASK_INTERVAL = 30 * 1000L
|
||||
const val TIMER_PREPARE_TASK_INTERVAL = 30 * 1000L //30s再次获取任务
|
||||
|
||||
const val COUNTDOWN_INTERVAL = 5 * 1000L //30s再次获取任务
|
||||
|
||||
const val START_AUTOPILOT_ANIMATION_INTERVAL = 7 * 1000L //30s再次获取任务
|
||||
|
||||
}
|
||||
}
|
||||
@@ -61,14 +61,13 @@ import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceM
|
||||
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager.setStationPoint
|
||||
import com.mogo.och.common.module.map.AmapNaviToDestinationModel
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjLocations
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.taxi.bean.ContrailListRespBean
|
||||
import com.mogo.och.taxi.bean.OrderDetail
|
||||
import com.mogo.och.taxi.bean.PrepareTaskRespBean
|
||||
import com.mogo.och.taxi.bean.QueryCurrentTaskRespBean
|
||||
import com.mogo.och.taxi.bean.StartServiceRespBean
|
||||
import com.mogo.och.taxi.callback.IOCHTaxiAutopilotPlanningCallback
|
||||
import com.mogo.och.taxi.callback.ITaxiADASStatusCallback
|
||||
import com.mogo.och.taxi.callback.ITaxiCarOperationalCallback
|
||||
import com.mogo.och.taxi.callback.ITaxiControllerStatusCallback
|
||||
import com.mogo.och.taxi.callback.ITaxiOrderStatusCallback
|
||||
import com.mogo.och.taxi.constant.TaskStatusEnum
|
||||
@@ -76,10 +75,9 @@ import com.mogo.och.taxi.constant.TaxiOrderStatusEnum
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum.Companion.valueOf
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.BUSINESSTYPE
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.TIMER_PREPARE_TASK_INTERVAL
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.COUNTDOWN_INTERVAL
|
||||
import com.mogo.och.taxi.network.CarServiceManager
|
||||
import com.mogo.och.taxi.network.CarServiceManager.arriveSite
|
||||
import com.mogo.och.taxi.network.CarServiceManager.prepareTask
|
||||
import com.mogo.och.taxi.network.CarServiceManager.startTask
|
||||
import com.mogo.och.taxi.utils.TaxiAnalyticsManager
|
||||
import com.mogo.och.taxi.utils.TaxiTrajectoryManager
|
||||
@@ -120,8 +118,7 @@ object TaxiModel {
|
||||
|
||||
private var mADASStatusCallback //Model->Presenter:自动驾驶状态相关
|
||||
: ITaxiADASStatusCallback? = null
|
||||
private var mCarOperationalCallback //Model->Presenter:登录状态和司机今日接单状态
|
||||
: ITaxiCarOperationalCallback? = null
|
||||
|
||||
private var mControllerStatusCallback //Model->Presenter:VR mode等
|
||||
: ITaxiControllerStatusCallback? = null
|
||||
private var mOrderStatusCallback //Model->Presenter:订单变更
|
||||
@@ -143,10 +140,6 @@ object TaxiModel {
|
||||
mADASStatusCallback = callback
|
||||
}
|
||||
|
||||
fun setCarStatusCallback(callback: ITaxiCarOperationalCallback?) {
|
||||
mCarOperationalCallback = callback
|
||||
}
|
||||
|
||||
fun setControllerStatusCallback(callback: ITaxiControllerStatusCallback?) {
|
||||
mControllerStatusCallback = callback
|
||||
}
|
||||
@@ -409,7 +402,7 @@ object TaxiModel {
|
||||
}
|
||||
|
||||
//根据开关和后台是否发布轨迹启动自驾
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand && TextUtils.isEmpty(
|
||||
if (FunctionBuildConfig.isPassStartAutopilotCommand && mCurTaskContrail != null && TextUtils.isEmpty(
|
||||
mCurTaskContrail!!.csvFileUrl
|
||||
)
|
||||
&& TextUtils.isEmpty(mCurTaskContrail!!.csvFileUrlDPQP)
|
||||
@@ -1065,4 +1058,17 @@ object TaxiModel {
|
||||
fun updateOrderContrails(contrails: MutableList<ContrailListRespBean.Result>?) {
|
||||
mOrderContrails = contrails
|
||||
}
|
||||
|
||||
fun autoStartDriving(){
|
||||
//启动动画+文字
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback!!.startOpenAutopilotNonManual()
|
||||
}
|
||||
|
||||
UiThreadHandler.postDelayed({
|
||||
toStartTask() //状态流转
|
||||
startAutoPilot() //自驾开启
|
||||
VoiceNotice.showNotice("车辆正在自动开启自动驾驶")
|
||||
},COUNTDOWN_INTERVAL) // 5s后开启自驾, 状态流转
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
}
|
||||
|
||||
is UnmannedIntent.CancelOrder -> {// 取消订单, 暂未加取消类型和原因
|
||||
handleCancelOrder()
|
||||
handleCancelOrder(intent.type)
|
||||
}
|
||||
|
||||
is UnmannedIntent.StartTask -> {
|
||||
@@ -95,9 +95,9 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleCancelOrder() {
|
||||
private fun handleCancelOrder(cancelType: Int) {
|
||||
if (mCurrentTaskAndOrder != null && mCurrentTaskAndOrder!!.order != null){
|
||||
cancelOrder(mContext, mCurrentTaskAndOrder!!.order!!.orderNo,
|
||||
cancelOrder(mContext, mCurrentTaskAndOrder!!.order!!.orderNo,cancelType,
|
||||
object : OchCommonServiceCallback<BaseData>{
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
d(SceneConstant.M_TAXI + TAG, "handleCancelOrder() = onSuccess")
|
||||
@@ -130,7 +130,8 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
updateUntruthTask(null)
|
||||
|
||||
if (mCurrentTaskAndOrder != null && mCurrentTaskAndOrder!!.endSite != null
|
||||
&& mCurrentTaskAndOrder!!.startSite != null){
|
||||
&& mCurrentTaskAndOrder!!.startSite != null
|
||||
&& mCurrentTaskAndOrder!!.currentStatus < TaskStatusEnum.CompleteTask.code){
|
||||
VoiceNotice.showNotice("暂停接单啦!要完成当前订单哦")
|
||||
}else{
|
||||
VoiceNotice.showNotice("暂停接单啦")
|
||||
@@ -303,21 +304,23 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
}
|
||||
|
||||
mCurrentTaskAndOrder = result
|
||||
TaxiModel.updateCurrentTaskAndOrder(result)
|
||||
TaxiModel.updateStation()
|
||||
updateTaskAndOrderUi()
|
||||
|
||||
if (result.order != null && result.order!!.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.code){
|
||||
queryCurrentOrderStatusByNo(mCurrentTaskAndOrder!!.order!!.orderNo) //查询全程里程和用时
|
||||
queryCurrentOrderStatusByNo(mCurrentTaskAndOrder!!.order!!.orderNo) //查询全程里程和用时,更新
|
||||
}
|
||||
|
||||
//根据lineId集合去查轨迹集合
|
||||
if (result.order != null && result.taskType == TaskTypeEnum.ToOrderStartTask.code){
|
||||
//根据lineId集合去查轨迹集合, 返回的只是接驾任务的line集合,没有送驾任务
|
||||
if (result.order != null && result.order!!.orderStatus == TaxiOrderStatusEnum.OnTheWayToStart.code){
|
||||
queryOrderPickUpConertrail(result.order!!.planningLines)
|
||||
}
|
||||
|
||||
TaxiModel.updateCurrentTaskAndOrder(result)
|
||||
|
||||
TaxiModel.updateStation()
|
||||
|
||||
updateTaskAndOrderUi()
|
||||
if (result.taskType <= TaskTypeEnum.ToOrderStartTask.code
|
||||
&& result.currentStatus == TaskStatusEnum.GetTask.code){//自动去启动自驾
|
||||
TaxiModel.autoStartDriving()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +407,7 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
siteId,
|
||||
object : OchCommonServiceCallback<PrepareTaskRespBean> {
|
||||
override fun onSuccess(data: PrepareTaskRespBean?) {
|
||||
d(SceneConstant.M_TAXI + TAG, GsonUtil.jsonFromObject(data))
|
||||
d(SceneConstant.M_TAXI + TAG, "prepareTask = " + GsonUtil.jsonFromObject(data))
|
||||
if (data == null || data.code != 0) return
|
||||
//去下载轨迹, 下发给工控机下载
|
||||
queryOrderPickUpConertrail(Array(1) { data.lineId })
|
||||
@@ -412,6 +415,7 @@ class TaxiUnmannedViewModel : BaseViewModel<UnmannedState, UnmannedIntent>(){
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
d(SceneConstant.M_TAXI + TAG, "$code $msg")
|
||||
startPrepareTask(siteId) //失败后30s再次调用获取下一任务
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -150,11 +150,11 @@ object CarServiceManager {
|
||||
*/
|
||||
@JvmStatic
|
||||
fun cancelOrder(
|
||||
context: Context, orderNo: String,
|
||||
context: Context, orderNo: String, cancelType: Int,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mOCHTaxiServiceApi.cancelOrder(
|
||||
data = CancelOrderReqBean(MoGoAiCloudClientConfig.getInstance().sn, orderNo)
|
||||
data = CancelOrderReqBean(MoGoAiCloudClientConfig.getInstance().sn, orderNo,cancelType)
|
||||
).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "cancelOrder"))
|
||||
}
|
||||
|
||||
@@ -15,21 +15,11 @@ public class TaxiOperationalPresenter extends Presenter<TaxiPersonalDialogFragme
|
||||
implements ITaxiCarOperationalCallback {
|
||||
public TaxiOperationalPresenter(TaxiPersonalDialogFragment view) {
|
||||
super(view);
|
||||
initListener();
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
TaxiModel.INSTANCE.setCarStatusCallback(this);
|
||||
}
|
||||
|
||||
private void releaseListener(){
|
||||
TaxiModel.INSTANCE.setCarStatusCallback(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(@NonNull LifecycleOwner owner) {
|
||||
super.onDestroy(owner);
|
||||
releaseListener();
|
||||
}
|
||||
|
||||
// 获取全部订单列表
|
||||
|
||||
@@ -15,10 +15,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
import com.mogo.och.common.module.biz.callback.ILoginCallback;
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.taxi.callback.ITaxiADASStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiCarOperationalCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiControllerStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiOrderStatusCallback;
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst;
|
||||
@@ -35,7 +33,7 @@ import com.mogo.och.taxi.ui.TaxiFragment;
|
||||
* 描述
|
||||
*/
|
||||
public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASStatusCallback,
|
||||
ITaxiOrderStatusCallback, ITaxiControllerStatusCallback, ILoginCallback, ITaxiCarOperationalCallback {
|
||||
ITaxiOrderStatusCallback, ITaxiControllerStatusCallback, ILoginCallback {
|
||||
|
||||
private static final String TAG = TaxiPresenter.class.getSimpleName();
|
||||
|
||||
@@ -65,7 +63,6 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
private void initListeners() {
|
||||
TaxiModel.INSTANCE.setADASStatusCallback(this);
|
||||
TaxiModel.INSTANCE.setControllerStatusCallback(this);
|
||||
TaxiModel.INSTANCE.setCarStatusCallback(this);
|
||||
TaxiModel.INSTANCE.setOrderStatusCallback(this);
|
||||
}
|
||||
|
||||
@@ -185,6 +182,14 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startOpenAutopilotNonManual() {
|
||||
runOnUIThread(() -> {
|
||||
mView.startOrStopLoadingAnim(true);
|
||||
mView.showStartAutopilotBlinkAnimation();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginSuccess(DriverStatusQueryRespBean data) {
|
||||
//设置 接单状态
|
||||
@@ -211,9 +216,4 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
public void loginFail(boolean isLogin) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDataUpdate(long dailyTimeDuration, long dailyOrderNum) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
private fun updateUntruthTaskView() {
|
||||
taskStatus.visibility = View.VISIBLE
|
||||
taskTypeTv.visibility = View.GONE
|
||||
cancelOrder.visibility = View.GONE
|
||||
orderPhoneAndNum.visibility = View.GONE
|
||||
startStationName.visibility = View.VISIBLE
|
||||
endStationName.visibility = View.VISIBLE
|
||||
@@ -240,7 +241,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
}
|
||||
|
||||
if (taskAndOrder.currentStatus == TaskStatusEnum.CompleteTask.code
|
||||
&& taskAndOrder.order == null && taskAndOrder.endSite == null){
|
||||
&& taskAndOrder.order == null){
|
||||
isHaveBeingOrder(false)
|
||||
return
|
||||
}
|
||||
@@ -655,8 +656,8 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
} else if (v.id == cancelOrder.id) {
|
||||
if (mCurrentTaskAndOrder!!.order != null){
|
||||
TaxiOrderCancelDialog(mActivity,mCurrentTaskAndOrder!!.order!!.orderStatus
|
||||
) { type, reason ->
|
||||
mViewModel.sendUiIntent(UnmannedIntent.CancelOrder(type,reason))
|
||||
) {
|
||||
mViewModel.sendUiIntent(UnmannedIntent.CancelOrder(it))
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public class TaxiOrderCancelDialog extends AlertDialog implements View.OnClickLi
|
||||
if (!TextUtils.isEmpty(mCurrentReason) && TaxiOrderCancelReasons.getType(mCurrentReason) != 0) {
|
||||
//todo 取消正在执行的任务
|
||||
if (mCommitListener != null){
|
||||
mCommitListener.cancelCurOrder(TaxiOrderCancelReasons.getType(mCurrentReason),mCurrentReason);
|
||||
mCommitListener.cancelCurOrder(TaxiOrderCancelReasons.getType(mCurrentReason));
|
||||
}
|
||||
dismiss();
|
||||
}else {
|
||||
@@ -150,7 +150,7 @@ public class TaxiOrderCancelDialog extends AlertDialog implements View.OnClickLi
|
||||
}
|
||||
|
||||
interface CommitReasonListener{
|
||||
void cancelCurOrder(int type, String reason);
|
||||
void cancelCurOrder(int type);
|
||||
}
|
||||
|
||||
class ContentAdapter extends BaseAdapter{
|
||||
|
||||
@@ -14,7 +14,7 @@ sealed class UnmannedIntent: IUiIntent{
|
||||
object StartTaskOrOrderLooper : UnmannedIntent()
|
||||
|
||||
//取消订单
|
||||
class CancelOrder(type: Int, reason: String) : UnmannedIntent()
|
||||
class CancelOrder(val type: Int) : UnmannedIntent()
|
||||
|
||||
object StartTask: UnmannedIntent()
|
||||
|
||||
|
||||
@@ -91,8 +91,9 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--V2X预警红色边框-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||
<!--自动启动自驾闪烁上边框-->
|
||||
<com.mogo.och.common.module.wigets.StartAutopilotAnimationView
|
||||
android:id="@+id/startAutopilotAnimationView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user