[包车] 本地暂存包车问题修复

This commit is contained in:
wangmingjun
2023-04-07 16:12:28 +08:00
parent 918352a0b4
commit c28112cd29
4 changed files with 33 additions and 15 deletions

View File

@@ -61,9 +61,6 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result){
requireActivity().runOnUiThread {
showOrHideOrderUI(true)
driverm1_line_name.text = orderStatus.lineName
driverm1StationName1Tv.text = orderStatus.startSiteName
driverm1StationName2Tv.text = orderStatus.siteName
passenger_phone.text = String.format(resources.getString(R.string.passenger_phone)
,orderStatus.passengerPhone)
@@ -71,6 +68,17 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
during_time.text = String.format(resources.getString(R.string.during_time_tv),
DateTimeUtil.formatLongToString(orderStatus.startTime,DateTimeUtil.HH_mm)
+""+DateTimeUtil.formatLongToString(orderStatus.endTime,DateTimeUtil.HH_mm))
if (orderStatus.lineName.isEmpty()){
driverm1_line_name.text = "暂无"
group_stations_panel1.visibility = VISIBLE
no_line_data_view.visibility = VISIBLE
no_order_data_tv.text = resources.getString(R.string.bus_task_wait_tip)
}else{
driverm1_line_name.text = orderStatus.lineName
driverm1StationName1Tv.text = orderStatus.startSiteName
driverm1StationName2Tv.text = orderStatus.siteName
}
}
}
@@ -154,6 +162,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
requireActivity().runOnUiThread {
group_stations_panel.visibility = GONE
no_line_data_view.visibility = VISIBLE
no_order_data_tv.text = resources.getString(R.string.bus_no_task_tip)
if (returnSuccess){
slidePanelView?.visibility = GONE
}else{

View File

@@ -517,6 +517,7 @@ class DriverM1Model {
DriverM1LooperManager.starCountDownLoop()
}else{
DriverM1LooperManager.stopCountDownLoop()
mOrderCallback?.updateOverCountDown(-CharterConst.LOOP_PERIOD_60S)
}
}
@@ -615,16 +616,17 @@ class DriverM1Model {
mCurrentOrder = data.data
mOrderCallback?.updateOrderUI(data.data)
// 包车时间倒计时校验开始
startOrStopCheckCountDown(true)
if (TextUtils.isEmpty(data.data.lineName)){
d(SceneConstant.M_CHARTER_D + TAG, "lineName = null")
return
}
mOrderCallback?.updateOrderUI(data.data)
//给工控机发轨迹
checkoutContrail()
// 包车时间倒计时校验开始
startOrStopCheckCountDown(true)
//鹰眼存参数
updateAutopilotControlParameters()
//给前后屏发数据

View File

@@ -159,7 +159,7 @@
<include layout="@layout/bus_no_line_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_60"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -167,32 +167,30 @@
android:id="@+id/line3"
android:layout_width="0dp"
android:layout_height="@dimen/dp_1"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:background="#33FFFFFF"
app:layout_constraintTop_toBottomOf="@+id/driverm1StationName2Tv"
app:layout_constraintLeft_toLeftOf="@+id/driverm1nextCircleIv"
app:layout_constraintRight_toRightOf="@+id/driverm1_order_count_down"/>
app:layout_constraintLeft_toLeftOf="@id/driverm1_line_name"
app:layout_constraintBottom_toTopOf="@+id/during_time"/>
<TextView
android:id="@+id/during_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_40"
android:textSize="@dimen/dp_30"
android:textColor="@color/station_title_color"
android:layout_marginBottom="@dimen/dp_10"
android:text="@string/during_time_tv"
app:layout_constraintLeft_toLeftOf="@+id/line3"
app:layout_constraintTop_toBottomOf="@+id/line3"/>
app:layout_constraintBottom_toTopOf="@+id/passenger_phone"/>
<TextView
android:id="@+id/passenger_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:textSize="@dimen/dp_30"
android:text="@string/passenger_phone"
android:textColor="@color/station_title_color"
app:layout_constraintLeft_toLeftOf="@+id/line3"
app:layout_constraintTop_toBottomOf="@+id/during_time"/>
app:layout_constraintBottom_toBottomOf="parent"/>
<androidx.constraintlayout.widget.Group
android:id="@+id/group_stations_panel"
@@ -204,5 +202,13 @@
driverm1StationName2Tv,driverm1nextCircleIv,driverm1CircleIvBg,driverm1ArrowBg
,line3,during_time,passenger_phone"/>
<androidx.constraintlayout.widget.Group
android:id="@+id/group_stations_panel1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="driverm1_line_name,driverm1_order_count_down
,line1,line2,line3,during_time,passenger_phone"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -41,6 +41,7 @@
<string name="bus_dialog_cancel">取消</string>
<string name="bus_no_task_tip">暂无服务订单</string>
<string name="bus_task_wait_tip">等待乘客选择</string>
<!-- region tts -->