[6.6.0]
[fea] [事件 上报添加driverId]
This commit is contained in:
@@ -19,6 +19,7 @@ public class LoginInfo {
|
||||
private String carModel;//E70 型号
|
||||
private String photos;//车身照片:
|
||||
private long tenantId;//租户id:
|
||||
private long driverId;
|
||||
|
||||
public int getDriverStatus() {
|
||||
return driverStatus;
|
||||
@@ -148,6 +149,14 @@ public class LoginInfo {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public long getDriverId() {
|
||||
return driverId;
|
||||
}
|
||||
|
||||
public void setDriverId(long driverId) {
|
||||
this.driverId = driverId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoginInfo{" +
|
||||
@@ -167,6 +176,7 @@ public class LoginInfo {
|
||||
", carModel='" + carModel + '\'' +
|
||||
", photos='" + photos + '\'' +
|
||||
", tenantId='" + tenantId + '\'' +
|
||||
", driverId='" + driverId + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
@@ -182,6 +192,7 @@ public class LoginInfo {
|
||||
if (businessType != loginInfo.businessType) return false;
|
||||
if (purpose != loginInfo.purpose) return false;
|
||||
if (tenantId != loginInfo.tenantId) return false;
|
||||
if (driverId != loginInfo.driverId) return false;
|
||||
if (!Objects.equals(orderNo, loginInfo.orderNo))
|
||||
return false;
|
||||
if (!Objects.equals(sn, loginInfo.sn)) return false;
|
||||
@@ -207,6 +218,7 @@ public class LoginInfo {
|
||||
result = 31 * result + servingStatus;
|
||||
result = 31 * result + businessType;
|
||||
result = 31 * result + (int)tenantId;
|
||||
result = 31 * result + (int)driverId;
|
||||
result = 31 * result + (orderNo != null ? orderNo.hashCode() : 0);
|
||||
result = 31 * result + purpose;
|
||||
result = 31 * result + (sn != null ? sn.hashCode() : 0);
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.mogo.och.weaknet.database.bean.EventDataBean
|
||||
*
|
||||
* 根据车机行驶线路站点信息
|
||||
*/
|
||||
data class ShuttleEventRequest(val requestId: String, val sn: String, val businessType: Int,val eventList:MutableList<Event>){
|
||||
data class ShuttleEventRequest(val requestId: String, val sn: String, val businessType: Int,val eventList:MutableList<Event>,var driverId:Long=0){
|
||||
companion object{
|
||||
val businessTypeShuttle = 11
|
||||
fun transformDb2Net(waitUpdateEvent: List<EventDataBean>): ShuttleEventRequest {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.och.weaknet.model
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
@@ -60,6 +61,11 @@ object EventModel : EventRepository.EventCallback {
|
||||
}
|
||||
OchChainLogManager.writeChainLogDb("上报event","开始上报:${Thread.currentThread().name}")
|
||||
val transformDb2Net = ShuttleEventRequest.transformDb2Net(waitUpdateEvent)
|
||||
LoginStatusManager.getLoginInfo()?.let {
|
||||
if(it.driverId>0){
|
||||
transformDb2Net.driverId = it.driverId
|
||||
}
|
||||
}
|
||||
OrderServiceManager.reportCabinEvent(AbsMogoApplication.getApp()!!,transformDb2Net,object :OchCommonServiceCallback<BaseData>{
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
waitUpdateEvent.forEach {
|
||||
|
||||
Reference in New Issue
Block a user