Merge remote-tracking branch 'origin/dev_robotaxi-d_230612_3.3.0' into dev_robotaxi-d_230612_3.3.0
This commit is contained in:
@@ -17,11 +17,11 @@ public class BusUpdateSiteStatusRequest {
|
||||
public int siteId;//站点id
|
||||
public long writeVersion; //更新时间戳
|
||||
|
||||
public BusUpdateSiteStatusRequest(int taskId,int siteId,int seq) {
|
||||
public BusUpdateSiteStatusRequest(int taskId,int siteId,int seq, long writeVersion) {
|
||||
this.sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
this.seq = seq;
|
||||
this.siteId = siteId;
|
||||
this.taskId = taskId;
|
||||
this.writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
this.writeVersion = writeVersion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,8 @@ public class OrderModel {
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation,
|
||||
String nextStation,String nextStationKr) {
|
||||
String nextStation,String nextStationKr,
|
||||
long writeVersion) {
|
||||
|
||||
onStartAutopilot(leaveIndex);
|
||||
|
||||
@@ -670,12 +671,13 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
|
||||
reBuildCacheRouteData(leaveIndex,BusConst.STATION_STATUS_STOPPED,true);
|
||||
reBuildCacheRouteData(leaveIndex,BusConst.STATION_STATUS_STOPPED,true,writeVersion);
|
||||
}
|
||||
|
||||
private void reBuildCacheRouteData(int currentIndex, int currentDrivingStatus, boolean isLeaving) {
|
||||
private void reBuildCacheRouteData(int currentIndex, int currentDrivingStatus, boolean isLeaving
|
||||
, long writeVersion) {
|
||||
if (busRoutesResult != null){
|
||||
busRoutesResult.setWriteVersion(DateTimeUtil.getCurrentTimeStamp());
|
||||
busRoutesResult.setWriteVersion(writeVersion);
|
||||
List<BusStationBean> sites = busRoutesResult.getSites();
|
||||
BusStationBean bean = sites.get(currentIndex);
|
||||
bean.setDrivingStatus(currentDrivingStatus);
|
||||
@@ -757,13 +759,15 @@ public class OrderModel {
|
||||
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
|
||||
long writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr);
|
||||
arriveStation,arriveStationKr,writeVersion);
|
||||
|
||||
OrderServiceManager.arriveSiteStation(mContext,
|
||||
stationList.get(arrivedStationIndex).getSeq(),
|
||||
stationList.get(arrivedStationIndex).getSiteId(),
|
||||
currentTaskId,
|
||||
currentTaskId,writeVersion,
|
||||
new OchCommonServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
@@ -803,7 +807,8 @@ public class OrderModel {
|
||||
}
|
||||
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName,
|
||||
String arriveStation,String arriveStationKr) {
|
||||
String arriveStation,String arriveStationKr,
|
||||
long writeVersion) {
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
if (arrivedStationIndex == busRoutesResult.getSites().size() - 1) {
|
||||
@@ -821,7 +826,7 @@ public class OrderModel {
|
||||
|
||||
sendArrivedStationToClient(arriveStation);
|
||||
|
||||
reBuildCacheRouteData(arrivedStationIndex, BusConst.STATION_STATUS_STOPPED,false);
|
||||
reBuildCacheRouteData(arrivedStationIndex, BusConst.STATION_STATUS_STOPPED,false,writeVersion);
|
||||
}
|
||||
|
||||
private void sendTaskDetailsToClients() {
|
||||
@@ -891,13 +896,15 @@ public class OrderModel {
|
||||
|
||||
isArrivedStation = false;
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-离站成功开往下一站====");
|
||||
|
||||
long writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr);
|
||||
finalNextStationName,finalNextStationNameKr,writeVersion);
|
||||
|
||||
OrderServiceManager.leaveStation(mContext,
|
||||
stationList.get(backgroundCurrentStationIndex).getSeq(),
|
||||
stationList.get(backgroundCurrentStationIndex).getSiteId(),
|
||||
currentTaskId,
|
||||
currentTaskId,writeVersion,
|
||||
new OchCommonServiceCallback<BaseData>() {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
|
||||
@@ -106,12 +106,13 @@ object OrderServiceManager {
|
||||
seq: Int,
|
||||
siteId: Int,
|
||||
taskId: Int,
|
||||
writeVersion: Long,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mService.leaveStation(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusUpdateSiteStatusRequest(taskId, siteId, seq)
|
||||
BusUpdateSiteStatusRequest(taskId, siteId, seq,writeVersion)
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "leaveStation"))
|
||||
@@ -126,13 +127,13 @@ object OrderServiceManager {
|
||||
*/
|
||||
@JvmStatic
|
||||
fun arriveSiteStation(
|
||||
context: Context, seq: Int, siteId: Int, taskId: Int,
|
||||
context: Context, seq: Int, siteId: Int, taskId: Int, writeVersion: Long,
|
||||
callback: OchCommonServiceCallback<BaseData>?
|
||||
) {
|
||||
mService.arriveSiteStation(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusUpdateSiteStatusRequest(taskId, siteId, seq)
|
||||
BusUpdateSiteStatusRequest(taskId, siteId, seq, writeVersion)
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "arriveSiteStation"))
|
||||
|
||||
Reference in New Issue
Block a user