Merge branch 'dev_robobus-d_241202_6.8.4' into dev_robotaxi-d_241210_6.9.0

This commit is contained in:
yangyakun
2024-12-24 17:29:44 +08:00
12 changed files with 262 additions and 155 deletions

View File

@@ -85,7 +85,10 @@ object LineManager : CallerBase<ILineCallback>() {
M_LISTENERS.forEach {
it.value.onAutopilotIdChange(oldValue,newValue)
}
if(!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&!AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
if(!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&
!AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)&&
!AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode)
){
val (start, end) = getStations()
if(start!=null&&end!=null){
val ochInfo = OchInfo(0, mutableListOf(start.toMogoLocation(), end.toMogoLocation()))

View File

@@ -0,0 +1,25 @@
package com.mogo.och.common.module.utils
import com.mogo.eagle.core.utilcode.util.RegexUtils
object OchPhoneUtil {
/**
* 获取脱敏手机号
*/
fun getPhoneWithoutMiddle(phone:String?): String {
if (!RegexUtils.isMobileExact(phone)) {
return phone?:""
}
var tempPhone = phone
tempPhone?.let {
if (it.length > 8) {
//截取电话号码前三位
val phoneNumPre = it.substring(0, 3)
//截取电话号码后四位
val phoneNumFix = it.substring(7)
tempPhone = "$phoneNumPre****$phoneNumFix"
}
}
return tempPhone?:""
}
}

View File

@@ -274,11 +274,11 @@ object OrderModel {
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<Boolean> {
override fun onSubscribe(d: Disposable) {
d(TAG, "onSubscribe")
d(TAG, "driveToNextStation onSubscribe")
}
override fun onError(e: Throwable) {
d(TAG, "onError${e.printStackTrace()}")
d(TAG, "driveToNextStation onError${e.printStackTrace()}")
if (e is DataException) {
e.printStackTrace()
}
@@ -298,6 +298,7 @@ object OrderModel {
}
override fun onNext(data: Boolean) {
d(TAG, "driveToNextStation onComplete")
if (data) {
LineModel.leaveStationSuccess()
isArrivedStation = false

View File

@@ -24,8 +24,7 @@ import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffDetialMsg
import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffResultMsg
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.weaknet.bean.response.WriteOffCountResponse
import com.mogo.och.common.module.utils.OchPhoneUtil
import com.mogo.och.weaknet.bean.WriteOffPassenger
import com.mogo.och.weaknet.repository.RepositoryManager
import com.mogo.och.weaknet.repository.exception.DataException
@@ -203,16 +202,16 @@ object TicketModel {
*/
private fun parseData(code:Int,msg:String,phone: String,orderNo: String){
when (code) {
1009 -> sendMessage2Driver("车票所选乘车日期非今日", phone,1009,orderNo)
1005 -> sendMessage2Driver("车辆未登录、或没有任务", phone,1005,orderNo)
1006 -> sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合", phone,1006,orderNo)
1008 -> sendMessage2Driver("车票剩余可用次数为0", phone,99,orderNo)
1009 -> sendMessage2Driver("乘车日期非今日", phone,1009,orderNo)
1005 -> sendMessage2Driver("当前无路线任务", phone,1005,orderNo)
1006 -> sendMessage2Driver("车票非当前路线", phone,1006,orderNo)
1008 -> sendMessage2Driver("车票剩余可用次数", phone,99,orderNo)
6001 -> sendMessage2Driver("二维码已过期", phone,6001,orderNo)
6002 -> sendMessage2Driver("同一订单核销间隔时间需大于2分钟", phone,6002,orderNo)
6003 -> sendMessage2Driver("车票站点信息与当前车辆执行任务的站点信息不符合", phone,6003,orderNo)
6003 -> sendMessage2Driver("车票非当前站点", phone,6003,orderNo)
6004 -> sendMessage2Driver("车辆未执行任务", phone,6004,orderNo)
6005 -> sendMessage2Driver("车票站点信息与当前车辆执行任务信息不符合", phone,6005,orderNo)
1012 -> sendMessage2Driver("当前用户下单路线非当前的车辆所属公司", phone,1012,orderNo)
6005 -> sendMessage2Driver("车票非当前班次", phone,6005,orderNo)
1012 -> sendMessage2Driver("车票与车辆所属租户不一致", phone,1012,orderNo)
else -> {
try {
val tempcode=msg.toInt()
@@ -233,19 +232,11 @@ object TicketModel {
private fun sendMessage2Driver(message:String,phone:String,code:Int,orderNo: String){
// 发送乘客屏 通过蓝牙告知小程序
LanSocketManager.sendMsgToClient(WriteOffResultMsg(code, phone,orderNo, System.currentTimeMillis(),LineManager.lineInfos?.lineId?:0,LineManager.getStations()?.first?.siteId?.toLong()?:0L))
val failedReason = "验票失败,${message}"
val failedReason = "核销失败,${message}"
// tts
ShuttleVoiceManager.writeOffFaile(failedReason)
var tempPhone = phone
tempPhone.let {
if (it.length > 8) {
//截取电话号码前三位
val phoneNumPre = it.substring(0, 3)
//截取电话号码后四位
val phoneNumFix = it.substring(7)
tempPhone = "$phoneNumPre****$phoneNumFix"
}
}
val reaseonAndPhone = if(tempPhone.isNullOrEmpty()) {
val tempPhone = OchPhoneUtil.getPhoneWithoutMiddle(phone)
val reaseonAndPhone = if(tempPhone.isEmpty()) {
failedReason
}else{
"${failedReason};乘客:${tempPhone}"

View File

@@ -136,6 +136,9 @@ class WriteOffCacheRepository : IWriteOffRepository {
throw DataException(1009,"车票所选乘车日期非今日")
}
// 6、校验线路
if(LineManager.lineInfos==null||LineManager.lineInfos?.lineId==null){
throw DataException(1005,"车辆未登录、或没有任务")
}
if(it.lineId==LineManager.lineInfos?.lineId){
lineId = it.lineId
}else{

View File

@@ -126,13 +126,15 @@ object TicketModel : StateChangeListener {
e.printStackTrace()
CallerLogger.d(M_BUS_P + TAG, "")
// 通知司机屏二维码错误
val writeOffDetail = WriteOffDetialMsg(code = 3001, msg = "参数错误:${payload}")
val writeOffDetail = WriteOffDetialMsg(code = 3001, msg = "出示错误二维码")
OchChainLogManager.writeChainLogWriteOff("核销失败","二维码错误+参数错误:${payload}")
CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(writeOffDetail))
LanSocketManager.sendMsgToServer(writeOffDetail)
}
}else{
// 通知司机屏二维码错误
val writeOffDetail = WriteOffDetialMsg(code = 3001, msg = "参数错误:${payload}")
val writeOffDetail = WriteOffDetialMsg(code = 3001, msg = "出示错误二维码")
OchChainLogManager.writeChainLogWriteOff("核销失败","二维码错误+参数错误:${payload}")
CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(writeOffDetail))
LanSocketManager.sendMsgToServer(writeOffDetail)
}

View File

@@ -9,6 +9,9 @@ import com.mogo.och.data.taxi.TaxiOrderStatusEnum
import com.mogo.och.unmanned.taxi.utils.order.OrderListener
import com.mogo.och.unmanned.taxi.utils.order.OrderModel
/**
* 自动探查
*/
class OchAutomaticExplorationView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
import com.mogo.eagle.core.function.hmi.ui.widget.ItinerarySummaryDialog
import com.mogo.eagle.core.network.utils.GsonUtil
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
import com.mogo.eagle.core.utilcode.util.ClickUtils
@@ -29,6 +30,7 @@ import com.mogo.och.common.module.map.ICommonNaviChangedCallback
import com.mogo.och.common.module.map.MapMakerManager
import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.FlowBus
import com.mogo.och.common.module.utils.OchPhoneUtil
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.common.module.wigets.CommonSlideView
@@ -50,28 +52,55 @@ import com.mogo.och.unmanned.taxi.ui.task.TaskWithOrderUIState
import com.mogo.och.unmanned.taxi.ui.task.TaxiTaskModel
import com.mogo.och.unmanned.taxi.ui.task.cancleorder.CancleOrderView
import com.mogo.och.unmanned.taxi.utils.TaskUtils
//演练单标识
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.aciv_task_type_exercise
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.aciv_task_type_order
// 距离目的地距离和剩余时间
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.actv_distance_end
// 完成服务
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.actv_end_order
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.actv_order_phone
// 跳过乘客端验证
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.actv_submit_task
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.cancelOrder
// 取消虚拟单
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.cancelTask
// 开始服务
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.commonSlideViewStartServer
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.gourp_order
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.group_itinerary_info
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.include_empty
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.naviToEnd
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.naviToStart
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.prepareTaskCountdownTv
// 前往出车点、前往送架、等待乘客、前往接驾
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.taskStatus
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.endStationName
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.startStationName
// 用户手机号
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.actv_order_phone
// 用户人数
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.orderPhoneAndNum
// 运营单标识
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.aciv_task_type_order
// 取消订单
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.cancelOrder
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.currentTaskStation
// 展示站点信息
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.group_itinerary_info
// 没有任务的情况下展示的
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.include_empty
// 导航到终点
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.naviToEnd
// 导航到起点
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.naviToStart
// 拉取任务倒计时
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.prepareTaskCountdownTv
// 终点名称
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.endStationName
// 起始站点名称
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.startStationName
// 途径点展示
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.pathwayPoint
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.trajectoryType
// 途径站点标识
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.v_bg_route_point_station_name
// 自主算路标识
import kotlinx.android.synthetic.main.unmanned_itinerary_current.view.trajectoryType
import kotlinx.coroutines.flow.map
class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineViewCallback,
@@ -117,9 +146,6 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
viewModel?.uiStateFlow?.map { it.taskWithOrderUIState }?.collect { taskAndOrderUiState ->
d(TAG, "uiStateFlow-initViewModelObserver: $taskAndOrderUiState")
when (taskAndOrderUiState) {
is TaskWithOrderUIState.Init -> {
}
// 开始接单后 需要将车开到最近的一个站点就位,然后才能开启 无人化 流程
is TaskWithOrderUIState.TaskDriveToNearestStationTask -> {
if (taskAndOrderUiState.driveToNearestStationTask != null) {
@@ -163,13 +189,100 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
}
// 1、无订单 无任务
// 2、标定单
// 3、虚拟单
// 4、运营单
// 5、倒计时获取虚拟任务
override fun onAttachedToWindow() {
super.onAttachedToWindow()
viewModel = findViewTreeViewModelStoreOwner()?.let {
ViewModelProvider(it).get(ItineraryCurrentModel::class.java)
}
viewModel?.setDistanceCallback(this)
initOnClickListener()
initTaskDebugViewListener()
initViewModelObserver()
showEmptyView()
}
private fun initOnClickListener() {
CallerLogger.d(TAG,"initOnClickListener")
naviToStart.setOnClickListener(this)
naviToEnd.setOnClickListener(this)
cancelTask.setOnClickListener(this)
cancelOrder.setOnClickListener(this)
taskStatus.setOnClickListener(this)
commonSlideViewStartServer.setSlideListener(object :CommonSlideView.SlideListener{
override fun slideEnd() {
d(TAG, taskStatus.text.toString())
startOrEndService()
}
})
actv_submit_task.onClick {
startOrEndService()
}
actv_end_order.onClick {
startOrEndService()
}
}
override fun onClick(v: View?) {
if (!ClickUtils.isFastClick()) {
i(TAG, "view点击过快")
return
}
when (v?.id) {
cancelOrder.id -> {
val currentWithOrder = TaxiTaskModel.getCurrentTaskWithOrder()
if (currentWithOrder?.order != null) {
context?.let {
CancleOrderView.showDialog(it)
}
}
}
naviToStart.id,
naviToEnd.id -> {
showNaviToEndStationFragment()
}
cancelTask.id -> {
val builder = CommonDialogStatus.Builder()
val closeLineConfirmDialog = builder
.title(ResourcesUtils.getString(R.string.common_dialog_title))
.tips(ResourcesUtils.getString(R.string.taxi_dialog_cancle_task))
.confirmStr(ResourcesUtils.getString(R.string.common_dialog_confirm))
.cancelStr(ResourcesUtils.getString(R.string.common_dialog_cancel))
.status(CommonDialogStatus.Status.ask)
.build(context)
closeLineConfirmDialog.setClickListener(object : CommonDialogStatus.ClickListener {
override fun confirm() {
viewModel?.cancleTask()
}
override fun cancel() {
closeLineConfirmDialog.dismiss()
}
})
closeLineConfirmDialog.show()
}
}
}
/**
* 更新拉取任务倒计时
*/
private fun updatePrepareTaskDelayUI(millisInFuture: Long, isStart: Boolean) {
CallerLogger.d(TAG,"updatePrepareTaskDelayUI")
DebugView.printInfoMsg("距离任务获取还有 ${DateTimeUtil.second2MMSS(millisInFuture / 1000)}")
if (!isStart) {
prepareTaskCountdownTv.visibility = View.GONE
currentTaskStation.visibility = View.GONE
mPrepareTasCountDownTimer?.cancel()
mPrepareTasCountDownTimer = null
return
@@ -177,31 +290,37 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
if (mPrepareTasCountDownTimer != null) {
prepareTaskCountdownTv.visibility = View.GONE
currentTaskStation.visibility = View.GONE
mPrepareTasCountDownTimer?.cancel()
mPrepareTasCountDownTimer = null
}
mPrepareTasCountDownTimer = object : CountDownTimer(millisInFuture, 1000L) {// 倒计时后开启自驾
override fun onTick(millisUntilFinished: Long) {
DebugView.printInfoMsg("距离任务获取还有 ${DateTimeUtil.second2MMSS(millisUntilFinished / 1000)}")
// 倒计时
UiThreadHandler.post {
prepareTaskCountdownTv.visibility = View.VISIBLE
prepareTaskCountdownTv.text =
"距离任务获取还有 ${DateTimeUtil.second2MMSS(millisUntilFinished / 1000)}"
override fun onTick(millisUntilFinished: Long) {
DebugView.printInfoMsg("距离任务获取还有 ${DateTimeUtil.second2MMSS(millisUntilFinished / 1000)}")
// 倒计时
UiThreadHandler.post {
prepareTaskCountdownTv.visibility = View.VISIBLE
prepareTaskCountdownTv.text = "距离任务获取还有 ${DateTimeUtil.second2MMSS(millisUntilFinished / 1000)}"
val taskWithOrder = TaxiTaskModel.getCurrentTaskWithOrder()
if(taskWithOrder?.currentStatus == TaskStatusEnum.CompleteTask.code){
currentTaskStation.visibility = View.VISIBLE
currentTaskStation.text = taskWithOrder.endSite?.siteName?:""
}
}
override fun onFinish() {
//倒计时结束了...
UiThreadHandler.post {
prepareTaskCountdownTv.visibility = View.INVISIBLE
}
mPrepareTasCountDownTimer?.cancel()
}
}
override fun onFinish() {
//倒计时结束了...
UiThreadHandler.post {
prepareTaskCountdownTv.visibility = View.INVISIBLE
currentTaskStation.visibility = View.INVISIBLE
}
mPrepareTasCountDownTimer?.cancel()
}
}
mPrepareTasCountDownTimer?.start()
}
@@ -209,6 +328,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
* 更新当前任务和订单信息
*/
private fun updateViewByCurrentTaskWithOrder(taskAndOrder: QueryCurrentTaskRespBean.Result?) {
CallerLogger.d(TAG,"updateViewByCurrentTaskWithOrder")
if (taskAndOrder == null) return
/**
* 根据任务类型判断任务显示,
@@ -263,6 +383,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
// 第一个特殊任务 也是虚拟任务
private fun updateViewByDriveToNearestStationTask(driveToNearestStationTask: StartServiceRespBean.Result?) {
CallerLogger.d(TAG,"updateViewByDriveToNearestStationTask 标定单")
if (driveToNearestStationTask == null) return
initContainerView(true)
// DriverToNearestStationTask 任务更新
@@ -292,11 +413,13 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun showEmptyView() {
CallerLogger.d(TAG,"showEmptyView")
gourp_order.visibility = GONE
aciv_task_type_exercise.visibility = GONE
group_itinerary_info.visibility = GONE
include_empty.visibility = VISIBLE
prepareTaskCountdownTv.visibility = GONE
currentTaskStation.visibility = View.GONE
cancelTask.visibility = View.GONE
actv_end_order.visibility = GONE
@@ -305,28 +428,8 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun initOnClickListener() {
naviToStart.setOnClickListener(this)
naviToEnd.setOnClickListener(this)
cancelTask.setOnClickListener(this)
cancelOrder.setOnClickListener(this)
taskStatus.setOnClickListener(this)
commonSlideViewStartServer.setSlideListener(object :CommonSlideView.SlideListener{
override fun slideEnd() {
d(TAG, taskStatus.text.toString())
startOrEndService()
}
})
actv_submit_task.onClick {
startOrEndService()
}
actv_end_order.onClick {
startOrEndService()
}
}
private fun initTaskDebugViewListener() {
CallerLogger.d(TAG,"initTaskDebugViewListener")
fragment?.let { fr->
aciv_task_type_exercise.setOnLongClickListener {
FlowBus.with<Boolean>(TaxiDriverEventConst.TaxiFragmentEvent.EVENT_TYPE_SHOW_DEBUG_VIEW)
@@ -342,6 +445,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun startOrEndService() {
CallerLogger.d(TAG,"startOrEndService")
val currentTaskWithOrder = TaxiTaskModel.getCurrentTaskWithOrder()
if (currentTaskWithOrder?.order == null) return
val order = currentTaskWithOrder.order
@@ -364,6 +468,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun closeOrderDialog() {
CallerLogger.d(TAG,"closeOrderDialog")
val builder = CommonDialogStatus.Builder()
val closeOrderDialog = builder
.title(ResourcesUtils.getString(R.string.dialog_order_close_title))
@@ -384,67 +489,13 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
viewModel = findViewTreeViewModelStoreOwner()?.let {
ViewModelProvider(it).get(ItineraryCurrentModel::class.java)
}
viewModel?.setDistanceCallback(this)
initOnClickListener()
showEmptyView()
initTaskDebugViewListener()
initViewModelObserver()
}
override fun onClick(v: View?) {
if (!ClickUtils.isFastClick()) {
i(TAG, "view点击过快")
return
}
when (v?.id) {
cancelOrder.id -> {
val currentWithOrder = TaxiTaskModel.getCurrentTaskWithOrder()
if (currentWithOrder?.order != null) {
context?.let {
CancleOrderView.showDialog(it)
}
}
}
naviToStart.id,
naviToEnd.id -> {
showNaviToEndStationFragment()
}
cancelTask.id -> {
val builder = CommonDialogStatus.Builder()
val closeLineConfirmDialog = builder
.title(ResourcesUtils.getString(R.string.common_dialog_title))
.tips(ResourcesUtils.getString(R.string.taxi_dialog_cancle_task))
.confirmStr(ResourcesUtils.getString(R.string.common_dialog_confirm))
.cancelStr(ResourcesUtils.getString(R.string.common_dialog_cancel))
.status(CommonDialogStatus.Status.ask)
.build(context)
closeLineConfirmDialog.setClickListener(object : CommonDialogStatus.ClickListener {
override fun confirm() {
viewModel?.cancleTask()
}
override fun cancel() {
closeLineConfirmDialog.dismiss()
}
})
closeLineConfirmDialog.show()
}
}
}
/**
* 显示/隐藏 前往任务目的地的导航
*
* @param isShow
*/
private fun showNaviToEndStationFragment() {
CallerLogger.d(TAG,"showNaviToEndStationFragment")
fragment?.let {
TaxiTaskModel.startNaviToEndStation(true);
}
@@ -456,6 +507,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
* @param hasCurrentTask
*/
private fun initContainerView(hasCurrentTask: Boolean) {
CallerLogger.d(TAG,"initContainerView")
d(
TAG,
"hasCurrentTask = $hasCurrentTask"
@@ -463,11 +515,13 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
if (hasCurrentTask) {
include_empty.visibility = View.GONE
prepareTaskCountdownTv.visibility = View.GONE
currentTaskStation.visibility = View.GONE
} else {
// 空页面
include_empty.visibility = View.VISIBLE
// 倒计时
prepareTaskCountdownTv.visibility = View.GONE
currentTaskStation.visibility = View.GONE
// 行程信息
group_itinerary_info.visibility = View.GONE
// 订单信息
@@ -489,10 +543,12 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun removeAllMapMarker() {
CallerLogger.d(TAG,"removeAllMapMarker")
MapMakerManager.removeAllMapMarkerByOwner(TYPE_MARKER_TAXI_ORDER)
}
private fun updateNextTaskFragment(result: QueryCurrentTaskRespBean.Result?) {
CallerLogger.d(TAG,"updateNextTaskFragment")
fragment?.let {
FlowBus.with<QueryCurrentTaskRespBean.Result?>(TaxiDriverEventConst.TabFragmentEvent.EVENT_TYPE_TASK_WITH_ORDER_CHANGED)
.post(it.lifecycleScope, result)
@@ -514,6 +570,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun updateOrderUI(order: OrderDetail) {
CallerLogger.d(TAG,"updateOrderUI")
gourp_order.visibility = View.VISIBLE
cancelOrder.visibility = if (order.orderStatus == TaxiOrderStatusEnum.ArriveAtEnd.code
) View.GONE else View.VISIBLE
@@ -538,17 +595,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
order.passengerSize
)
var tempPhone = order.bookingUserPhone
tempPhone.let {
if (it.length > 8) {
//截取电话号码前三位
val phoneNumPre = it.substring(0, 3)
//截取电话号码后四位
val phoneNumFix = it.substring(7)
tempPhone = "$phoneNumPre****$phoneNumFix"
}
}
actv_order_phone.text = tempPhone
actv_order_phone.text = OchPhoneUtil.getPhoneWithoutMiddle(order.bookingUserPhone)
orderPhoneAndNum.text = "${ order.passengerSize}"
@@ -629,7 +676,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
//展示虚拟订单
private fun updateVirtualTaskUI(taskAndOrder: QueryCurrentTaskRespBean.Result?) {
CallerLogger.d(TAG,"updateVirtualTaskUI")
if (taskAndOrder == null) return
val startSite = taskAndOrder.startSite // 起点
@@ -642,6 +689,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
include_empty.visibility = View.GONE
// 倒计时
prepareTaskCountdownTv.visibility = View.GONE
currentTaskStation.visibility = View.GONE
// 行程信息
group_itinerary_info.visibility = View.VISIBLE
// 订单信息
@@ -676,6 +724,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun updatePathwayPoint(taskType: Int, endSiteName: String?) {
CallerLogger.d(TAG,"updatePathwayPoint")
if (TextUtils.isEmpty(endSiteName)) return
pathwayPoint.visibility = if (taskType == TaskTypeEnum.ToOrderStartTask.code)
View.VISIBLE else View.GONE
@@ -683,6 +732,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun updateMapMarkers(taskAndOrder: QueryCurrentTaskRespBean.Result?) {
CallerLogger.d(TAG,"updateMapMarkers")
if (taskAndOrder?.startSite != null
&& taskAndOrder.endSite != null
) {
@@ -755,6 +805,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
isAdd: Boolean, uuid: String,
lat: Double, lon: Double, resourceId: Int
) {
CallerLogger.d(TAG,"setOrRemoveMapMaker")
if (isAdd) {
MapMakerManager.addMapMaker(TYPE_MARKER_TAXI_ORDER, uuid, lat, lon, resourceId)
} else {
@@ -766,6 +817,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
* 根据任务状态计算剩余历程和时间
*/
private fun updateRemainDistanceAndTime(isVoicePlay: Boolean) {
CallerLogger.d(TAG,"updateRemainDistanceAndTime")
val currentTaskWithOrder = TaxiTaskModel.getCurrentTaskWithOrder() ?: return
d(TAG, "updateRemainDistanceAndTime ${currentTaskWithOrder.currentStatus}")
if (currentTaskWithOrder.currentStatus == TaskStatusEnum.StartTask.code) {
@@ -786,6 +838,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun startNaviToStation(isVoicePlay: Boolean, stationLat: Double, stationLng: Double) {
CallerLogger.d(TAG,"startNaviToStation")
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
val gcJ02Location = OchLocationManager.getGCJ02Location()
val mCurLatitude = gcJ02Location.latitude
@@ -799,6 +852,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun showDialog(){
CallerLogger.d(TAG,"showDialog")
if(dialog==null&&context!=null){
}
@@ -816,6 +870,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun dismissDialog(){
CallerLogger.d(TAG,"dismissDialog")
dialog?.let {
if(it.isShowing){
it.dismiss()
@@ -825,6 +880,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
private fun hideNaviBtns() {
CallerLogger.d(TAG,"hideNaviBtns")
naviToStart.visibility = View.GONE
naviToEnd.visibility = View.GONE
AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi()
@@ -838,10 +894,12 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
override fun onCurrentNaviDistAndTimeChanged(meters: Int, timeInSecond: Long) {
CallerLogger.d(TAG,"onCurrentNaviDistAndTimeChanged")
actv_distance_end.text = TaskUtils.getCurrentTaskDistance(meters.toLong())+" "+TaskUtils.getCurrentTaskTime(timeInSecond)
}
override fun reInitNaviAmap(isPlay: Boolean, isRestart: Boolean) {
CallerLogger.d(TAG,"reInitNaviAmap")
d(TAG, "isPlay = $isPlay, isRestart=$isRestart")
if (!isRestart) {
fragment?.let {
@@ -875,6 +933,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
fun onNaviToEndStationByAMap(isShow: Boolean) {
CallerLogger.d(TAG,"onNaviToEndStationByAMap")
val currentTaskWithOrder = TaxiTaskModel.getCurrentTaskWithOrder() ?: return
fragment?.let {
if (currentTaskWithOrder.currentStatus == TaskStatusEnum.StartTask.code)
@@ -894,6 +953,7 @@ class ItineraryCurrentView: ConstraintLayout, ItineraryCurrentModel.SwtichLineVi
}
override fun onStartTaskFail() {
CallerLogger.d(TAG,"onStartTaskFail")
commonSlideViewStartServer.reset()
}

View File

@@ -25,8 +25,8 @@
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="@dimen/dp_53"
android:src="@drawable/taxi_task_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_width="@dimen/dp_46"
android:layout_height="@dimen/dp_46"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_order_phone"
@@ -315,9 +315,25 @@
android:layout_height="wrap_content"
android:textColor="@color/common_B3FFFFFF"
android:textSize="@dimen/dp_30"
android:layout_marginTop="50dp"
android:layout_marginTop="@dimen/dp_50"
android:text="距离任务获取还有 12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/include_empty" />
<TextView
android:id="@+id/currentTaskStation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/common_cccccc"
android:textSize="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_20"
tools:text="当前站点"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/prepareTaskCountdownTv" />
</merge>

View File

@@ -1861,6 +1861,9 @@ class TravelRealityView @JvmOverloads constructor(
clearSmallSites()
} else {
UiThreadHandler.post {
smallSiteMarkerList?.forEach {
it.destroy()
}
smallSiteMarkerList = mAMap?.addMarkers(markerOptionsList, false)
}
}

View File

@@ -593,7 +593,7 @@ enum class EventTypeEnumNew(
//核销异常
TYPE_ABNORMAL_VERIFICATION(
"ABNORMAL_VERIFICATION",
"验票失败",
"核销失败",
"%s",
R.drawable.icon_warning_take_over,
"%s",

View File

@@ -64,21 +64,21 @@ bytex.ASM_API=ASM7
LOGLIB_VERSION=1.10.18
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.7.58
MOGO_NETWORK_VERSION=1.4.7.59
# 鉴权
MOGO_PASSPORT_VERSION=1.4.7.58
MOGO_PASSPORT_VERSION=1.4.7.59
# 长链接
MOGO_SOCKET_VERSION=1.4.7.58
MOGO_SOCKET_VERSION=1.4.7.59
# 数据采集
MOGO_REALTIME_VERSION=1.4.7.58
MOGO_REALTIME_VERSION=1.4.7.59
# 直播推流
MOGO_LIVE_VERSION=1.4.7.58
MOGO_LIVE_VERSION=1.4.7.59
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.4.7.58
MOGO_TRAFFICLIVE_VERSION=1.4.7.59
# 定位服务
MOGO_LOCATION_VERSION=1.4.7.58
MOGO_LOCATION_VERSION=1.4.7.59
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.4.7.58
MOGO_TELEMATIC_VERSION=1.4.7.59
# 动态换肤SDK
MOGO_SKIN_VERSION=1.4.7.49.19
######## MogoAiCloudSDK Version ########