[6.8.2]
[taxi] [fix]
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
package com.mogo.och.common.module.manager.logchainanalytic
|
||||
|
||||
import android.text.TextUtils
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.commons.utils.MogoAnalyticUtils
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.DateTimeUtils
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
|
||||
@@ -68,6 +62,8 @@ object OchChainLogManager {
|
||||
|
||||
const val EVENT_KEY_INFO_CALL_EYE = "analytics_event_call_eye_och"
|
||||
|
||||
const val EVENT_KEY_INFO_ERROR = "analytics_event_och_error"
|
||||
|
||||
|
||||
fun writeChainLogEye(title: String, info: String) {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFO_CALL_EYE)
|
||||
@@ -80,12 +76,17 @@ object OchChainLogManager {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFO_TIME)
|
||||
}
|
||||
|
||||
|
||||
// 轨迹方面的日志
|
||||
fun writeChainLogTrajectory(title: String, info: String) {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFE_WITH_TRAJECTORY)
|
||||
}
|
||||
|
||||
// 错误日志
|
||||
fun writeChainLogError(title: String, info: String) {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFO_ERROR)
|
||||
}
|
||||
|
||||
|
||||
fun writeChainLogMap(title: String, info: String) {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFO_MAP)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mogo.och.unmanned.passenger.bean;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.data.taxi.BaseOrderBean;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -80,6 +82,18 @@ public class TaxiPassengerOrdersInServiceQueryRespBean extends BaseData {
|
||||
public int hashCode() {
|
||||
return Objects.hash(siteId, siteName, gcjLon, gcjLat, wgs84Lon, wgs84Lat);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public SiteBean copy() {
|
||||
SiteBean temp = new SiteBean();
|
||||
temp.siteId = siteId;
|
||||
temp.siteName = siteName;
|
||||
temp.gcjLon = gcjLon;
|
||||
temp.gcjLat = gcjLat;
|
||||
temp.wgs84Lat = wgs84Lat;
|
||||
temp.wgs84Lon = wgs84Lon;
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
|
||||
public static class OrderBean extends BaseOrderBean {
|
||||
|
||||
@@ -282,6 +282,7 @@ object TaxiPassengerModel {
|
||||
currentTrajectoryInfo = null
|
||||
currentTaskStatus = -1
|
||||
} else {
|
||||
OchChainLogManager.writeChainLogError("queryOrderById","订单状态异常 old:${currentOCHOrder}__new:${data.data}")
|
||||
currentOCHOrder = data.data
|
||||
orderStatusChange()
|
||||
}
|
||||
@@ -379,7 +380,7 @@ object TaxiPassengerModel {
|
||||
orderStatusChangeInner()
|
||||
d(M_TAXI_P + TAG, "最新的状态-->${curOrderStatus}")
|
||||
OchChainLogManager.writeChainLog(currentOCHOrder.toString(),"最新的状态-->${curOrderStatus}")
|
||||
com.mogo.och.unmanned.taxi.utils.order.OrderModel.invokeListener(currentOCHOrder)
|
||||
OrderModel.invokeListener(currentOCHOrder)
|
||||
}
|
||||
|
||||
private fun orderStatusChangeInner() {
|
||||
@@ -449,27 +450,24 @@ object TaxiPassengerModel {
|
||||
}
|
||||
|
||||
private fun setStation() {
|
||||
try {
|
||||
if (currentOCHOrder != null && currentLineId != null) {
|
||||
val startStation = MogoLocation()
|
||||
startStation.longitude = currentOCHOrder!!.orderStartSite.gcjLon
|
||||
startStation.latitude = currentOCHOrder!!.orderStartSite.gcjLat
|
||||
val endStation = MogoLocation()
|
||||
endStation.longitude = currentOCHOrder!!.orderEndSite.gcjLon
|
||||
endStation.latitude = currentOCHOrder!!.orderEndSite.gcjLat
|
||||
TrajectoryAndDistanceManager.setStationPoint(
|
||||
startStation,
|
||||
endStation,
|
||||
currentLineId
|
||||
)
|
||||
}
|
||||
}catch (e:Exception){
|
||||
RxUtils.createSubscribeOnOwnThread(10_000) {
|
||||
if(currentOCHOrder!=null&¤tOCHOrder!!.orderEndSite!=null) {
|
||||
setStation()
|
||||
}
|
||||
}
|
||||
OchChainLogManager.writeChainLog("exception",e.toString())
|
||||
var tempStartPoint: TaxiPassengerOrdersInServiceQueryRespBean.SiteBean?=null
|
||||
var tempEndPoint: TaxiPassengerOrdersInServiceQueryRespBean.SiteBean?=null
|
||||
if(currentOCHOrder!=null){
|
||||
tempStartPoint = currentOCHOrder?.orderStartSite?.copy()
|
||||
tempEndPoint = currentOCHOrder?.orderEndSite?.copy()
|
||||
}
|
||||
if (tempStartPoint!=null && tempEndPoint!=null && currentLineId != null) {
|
||||
val startStation = MogoLocation()
|
||||
startStation.longitude = tempStartPoint.gcjLon
|
||||
startStation.latitude = tempStartPoint.gcjLat
|
||||
val endStation = MogoLocation()
|
||||
endStation.longitude = currentOCHOrder!!.orderEndSite.gcjLon
|
||||
endStation.latitude = currentOCHOrder!!.orderEndSite.gcjLat
|
||||
TrajectoryAndDistanceManager.setStationPoint(
|
||||
startStation,
|
||||
endStation,
|
||||
currentLineId
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user