[6.1.0]
[ochchainlog]
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.och.charter.passenger.bean.response
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -65,6 +66,20 @@ data class OrderInfoResponse(val data: OrderInfo?) : BaseData() {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "OrderInfo(orderNo=$orderNo, sn=$sn, productType=${getProductTypeName()}, lineId=$lineId, lineName=$lineName, startSiteId=$startSiteId, startSiteName=$startSiteName, startSiteNameKr=$startSiteNameKr, siteId=$siteId, siteName=$siteName, siteNameKr=$siteNameKr, wgs84Lat=$wgs84Lat, wgs84Lon=$wgs84Lon, startTime=${DateTimeUtil.formatLongToString(startTime?:System.currentTimeMillis(), DateTimeUtil.MM_dd_HH_mm)}, endTime=${DateTimeUtil.formatLongToString(endTime?:System.currentTimeMillis(), DateTimeUtil.MM_dd_HH_mm)}, passengerPhone=$passengerPhone, arriveStatus=$arriveStatus)"
|
||||
}
|
||||
|
||||
fun getProductTypeName(): String {
|
||||
return when (productType) {
|
||||
M1_LOVE -> "爱情号"
|
||||
M1_FAMILY -> "家庭号"
|
||||
M1_FRIENDLY -> "朋友号"
|
||||
else -> "未知"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
companion object{
|
||||
val ARRIVING = 1
|
||||
|
||||
@@ -42,6 +42,7 @@ import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.LEAVE_STATION
|
||||
import com.mogo.och.common.module.manager.autopilotmanager.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.orderlogmanager.OchChainLogManager
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.PinYinUtil
|
||||
@@ -393,6 +394,7 @@ object CharterPassengerModel {
|
||||
this.orderInfo = orderData
|
||||
setOrderStatus(OrderStatusEnum.OrdersWithLine)
|
||||
updateAutopilotControlParameters()
|
||||
OchChainLogManager.writeChainLog(this.orderInfo.toString(),"更改线路成功:${orderData.siteName}")
|
||||
} else {
|
||||
this.orderInfo = orderData
|
||||
}
|
||||
@@ -727,6 +729,7 @@ object CharterPassengerModel {
|
||||
private fun setOrderStatus(orderStatus: OrderStatusEnum) {
|
||||
if (this.orderStatus != orderStatus) {
|
||||
d(M_BUS_P + TAG, "${this.orderInfo?.orderNo}新的状态:$orderStatus")
|
||||
OchChainLogManager.writeChainLog(this.orderInfo.toString(),"新的状态:$orderStatus")
|
||||
this.orderStatus = orderStatus
|
||||
for (callback in orderStatusChangeListeners.values) {
|
||||
callback.onStatusChange(this.orderStatus)
|
||||
@@ -737,6 +740,7 @@ object CharterPassengerModel {
|
||||
fun setEndOrderStatus() {
|
||||
UiThreadHandler.postDelayed({
|
||||
setOrderStatus(OrderStatusEnum.NoOrderUse)
|
||||
OchChainLogManager.writeChainLog(this.orderInfo.toString(),"手动结束订单:$orderStatus")
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
@@ -933,6 +937,7 @@ object CharterPassengerModel {
|
||||
}
|
||||
|
||||
if (order != null && lineId != null && siteId != null) {
|
||||
OchChainLogManager.writeChainLog(this.orderInfo.toString(),"到站成功:${order.siteName}")
|
||||
VoiceManager.arrivedStation(
|
||||
order.siteName!!,
|
||||
order.siteNameKr ?: "",
|
||||
|
||||
@@ -549,13 +549,13 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_OCH,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_OCH,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE,
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
fun writeLog(carLocationInfo: String, location: String) {
|
||||
// @ChainLog(
|
||||
// linkChainLog = ChainConstant.CHAIN_TYPE_OCH,
|
||||
// linkCode = ChainConstant.CHAIN_SOURCE_OCH,
|
||||
// nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE,
|
||||
// paramIndexes = [0,1]
|
||||
// )
|
||||
private fun writeLog(carLocationInfo: String, location: String) {
|
||||
d(M_OCHCOMMON+ TAG,carLocationInfo)
|
||||
d(M_OCHCOMMON+ TAG,location)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mogo.och.common.module.manager.orderlogmanager
|
||||
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
|
||||
object OchChainLogManager {
|
||||
|
||||
private val TAG = OchChainLogManager::class.java.simpleName
|
||||
|
||||
/**
|
||||
* @param orderInfo 订单详细信息
|
||||
* @param changeInfo 变化信息
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_OCH,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_OCH,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE,
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
fun writeChainLog(orderInfo: String, changeInfo: String) {
|
||||
d(SceneConstant.M_OCHCOMMON + TAG, orderInfo)
|
||||
d(SceneConstant.M_OCHCOMMON + TAG, changeInfo)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,8 +40,8 @@ import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.cl_car_ty
|
||||
* ①:不能启动自驾
|
||||
* ②:可以启动自驾
|
||||
* ③:启动自驾中
|
||||
* ④:启动自驾失败
|
||||
* ⑤:初始状态
|
||||
* ④:启动自驾超时
|
||||
* ⑤:启动自驾失败
|
||||
*/
|
||||
class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAutopilotCallback {
|
||||
|
||||
@@ -190,7 +190,9 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxiPXiaozhiBelt?.start()
|
||||
}
|
||||
|
||||
// ①:不能启动自驾
|
||||
/**
|
||||
* ①:不能启动自驾
|
||||
*/
|
||||
private fun unableStartAutopilot() {
|
||||
taxiPStartAutopilot?.stop()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
@@ -201,7 +203,9 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
// ②:可以启动自驾
|
||||
/**
|
||||
* ②:可以启动自驾
|
||||
*/
|
||||
private fun ableStartAutopilot() {
|
||||
taxiPStartAutopilot?.reStart()
|
||||
taxiPStartAutopilotCar?.stop()
|
||||
@@ -210,7 +214,9 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxi_p_start_autopilot.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
// ③:启动自驾中
|
||||
/**
|
||||
* ③:启动自驾中
|
||||
*/
|
||||
fun startAutopiloting() {
|
||||
taxiPStartAutopilot?.reStart()
|
||||
taxiPStartAutopilotCar?.reStart()
|
||||
@@ -221,12 +227,16 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
)
|
||||
}
|
||||
|
||||
// ④:启动自驾超时
|
||||
/**
|
||||
* ④:启动自驾超时
|
||||
*/
|
||||
override fun startAutopilotingTimeout() {
|
||||
ableStartAutopilot()
|
||||
}
|
||||
|
||||
// ⑤:启动自驾失败
|
||||
/**
|
||||
* ⑤:启动自驾失败
|
||||
*/
|
||||
override fun startAutopilotingFail() {
|
||||
ableStartAutopilot()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user