[6.4.4] Bus 司机端弱网
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.bus.bean.response;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.data.bean.BusRoutesResult;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口请求响应结果
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
package com.mogo.och.bus.bean.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口返回接口数据封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusRoutesResult {
|
||||
private List<BusStationBean> sites;
|
||||
private int lineId;
|
||||
private String name;
|
||||
private int lineType; //线路类型,0:环形
|
||||
private String description;
|
||||
private int status;
|
||||
private long taskTime; //线路时间班次
|
||||
private int taskId;// 线路班次id
|
||||
|
||||
//线路轨迹相关字段
|
||||
public String csvFileUrl = ""; //轨迹文件下载的cos url,默认“”
|
||||
public String csvFileMd5 = ""; //轨迹文件md5,默认“”
|
||||
public String txtFileUrl = ""; //打点文件下载的cos url,默认“”
|
||||
public String txtFileMd5 = ""; //轨迹文件md5,默认“”
|
||||
public long contrailSaveTime; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
public String carModel = ""; //[optional] 车型号(如红旗H9),默认“”,暂不加入校验逻辑、用于人工排查问题
|
||||
public String csvFileUrlDPQP = ""; //轨迹文件下载的cos url,默认“”
|
||||
public String csvFileMd5DPQP = ""; //轨迹文件md5,默认“”
|
||||
public String txtFileUrlDPQP = ""; //打点文件下载的cos url,默认“”
|
||||
public String txtFileMd5DPQP = ""; //轨迹文件md5,默认“”
|
||||
public long contrailSaveTimeDPQP; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
|
||||
public int getLineId() {
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public int getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<BusStationBean> getSites() {
|
||||
return sites;
|
||||
}
|
||||
|
||||
public void setSites(List<BusStationBean> sites) {
|
||||
this.sites = sites;
|
||||
}
|
||||
|
||||
public long getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusRoutesResult{" +
|
||||
"sites=" + sites +
|
||||
", lineId=" + lineId +
|
||||
", name='" + name + '\'' +
|
||||
", taskTime='" + taskTime + '\'' +
|
||||
", lineType=" + lineType +
|
||||
", description='" + description + '\'' +
|
||||
", status=" + status +
|
||||
", csvFileUrl='" + csvFileUrl + '\'' +
|
||||
", csvFileMd5='" + csvFileMd5 + '\'' +
|
||||
", txtFileUrl='" + txtFileUrl + '\'' +
|
||||
", txtFileMd5='" + txtFileMd5 + '\'' +
|
||||
", contrailSaveTime=" + contrailSaveTime +
|
||||
", carModel='" + carModel + '\'' +
|
||||
", csvFileUrlDPQP='" + csvFileUrlDPQP + '\'' +
|
||||
", csvFileMd5DPQP='" + csvFileMd5DPQP + '\'' +
|
||||
", txtFileUrlDPQP='" + txtFileUrlDPQP + '\'' +
|
||||
", txtFileMd5DPQP='" + txtFileMd5DPQP + '\'' +
|
||||
", contrailSaveTimeDPQP=" + contrailSaveTimeDPQP +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
package com.mogo.och.bus.bean.response;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String nameKr;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private boolean leaving;
|
||||
private String description;
|
||||
private String cityCode;
|
||||
private int businessType; //站点类型,9:taxi,10:bus
|
||||
private int status;
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
|
||||
public String getNameKr() {
|
||||
return nameKr;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
public double getGcjLat() {
|
||||
return gcjLat;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public void setCityCode(String cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public void setBusinessType(int businessType) {
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setSiteId(int siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public void setDrivingStatus(int drivingStatus) {
|
||||
this.drivingStatus = drivingStatus;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
|
||||
public int getBusinessType() {
|
||||
return businessType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public int getDrivingStatus() {
|
||||
return drivingStatus;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setIfStop(int ifStop) {
|
||||
this.ifStop = ifStop;
|
||||
}
|
||||
|
||||
public int getIfStop() {
|
||||
return ifStop;
|
||||
}
|
||||
|
||||
public void setLeaving(boolean leaving) {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
public boolean isLeaving() {
|
||||
return leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusStationBean{" +
|
||||
"name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", cityCode='" + cityCode + '\'' +
|
||||
", lon=" + lon +
|
||||
", lat=" + lat +
|
||||
", businessType=" + businessType +
|
||||
", status=" + status +
|
||||
", siteId=" + siteId +
|
||||
", seq=" + seq +
|
||||
", drivingStatus=" + drivingStatus +
|
||||
", ifStop=" + ifStop +
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.bus.callback;
|
||||
|
||||
import com.mogo.och.bus.bean.response.BusStationBean;
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.mogo.map.MogoMap
|
||||
import com.mogo.map.overlay.core.Level
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import com.mogo.och.bus.R
|
||||
import com.mogo.och.bus.bean.response.BusStationBean
|
||||
import com.mogo.och.bus.constant.BusConst
|
||||
import com.mogo.och.bus.presenter.BusPresenter
|
||||
import com.mogo.och.bus.ui.BusSwitchLineActivity
|
||||
@@ -31,6 +30,7 @@ import com.mogo.och.common.module.utils.ResourcesUtils.getColor
|
||||
import com.mogo.och.common.module.utils.createQRCodeWithPicture
|
||||
import com.mogo.och.common.module.wigets.BindQRCodeDialog
|
||||
import com.mogo.och.common.module.wigets.OCHCommitDialog
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import kotlinx.android.synthetic.main.bug_fragment_och.bus_panel_first_station
|
||||
import kotlinx.android.synthetic.main.bug_fragment_och.bus_panel_second_station
|
||||
import kotlinx.android.synthetic.main.bug_fragment_och.bus_panel_third_station
|
||||
|
||||
@@ -26,14 +26,13 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.response.BusRoutesResponse;
|
||||
import com.mogo.och.bus.bean.response.BusRoutesResult;
|
||||
import com.mogo.och.bus.bean.response.BusStationBean;
|
||||
import com.mogo.och.bus.bean.WriteOffPassenger;
|
||||
import com.mogo.och.bus.callback.IBusADASStatusCallback;
|
||||
import com.mogo.och.bus.callback.IBusControllerStatusCallback;
|
||||
@@ -53,6 +52,9 @@ import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.data.OCHOperationalMessage;
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusCacheKey;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.LoginCacheStatus;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg;
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager;
|
||||
@@ -70,6 +72,10 @@ import com.mogo.och.common.module.utils.OCHThreadPoolManager;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch;
|
||||
import com.mogo.och.common.module.voice.VoiceNotice;
|
||||
import com.mogo.och.data.bean.BusRoutesResult;
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
import com.mogo.och.data.bean.BusTransferData;
|
||||
import com.mogo.och.data.manager.cache.CacheDataManager;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -186,6 +192,85 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
public void queryBusCacheRoutes(){
|
||||
|
||||
String loginStr = CacheDataManager.Companion.getInstance().getCacheData(
|
||||
mContext, BusCacheKey.BUS_LOGIN_STATUS_CACHE);
|
||||
if (!loginStr.isEmpty()){
|
||||
LoginCacheStatus status = GsonUtils.fromJson(loginStr,LoginCacheStatus.class);
|
||||
LoginStatusManager.setLoginStatus(status.getLoginStatus());
|
||||
if (status.getUpdateTime() > DateTimeUtil.getTodayStartTime() &&
|
||||
status.getLoginStatus() == 1){//登陆
|
||||
|
||||
String cacheData = CacheDataManager.Companion.getInstance().getCacheData(mContext,
|
||||
BusCacheKey.BUS_LINE_CACHE);
|
||||
|
||||
if (cacheData == null || cacheData.isEmpty()){
|
||||
queryBusRoutes();
|
||||
}else {
|
||||
BusTransferData data = GsonUtils.fromJson(cacheData,BusTransferData.class);
|
||||
getCacheRouteSuccess(data.getRoutesResult());
|
||||
}
|
||||
}else{ // 未登陆
|
||||
CacheDataManager.Companion.getInstance().clearCacheData(mContext,BusCacheKey.BUS_LOGIN_STATUS_CACHE);
|
||||
sendTaskDetailsToClients();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendTaskDetailsToClients() {
|
||||
|
||||
BusTransferData data = new BusTransferData(LoginStatusManager.isLogin() ? 1:0,busRoutesResult);
|
||||
TaskDetailsMsg msg = new TaskDetailsMsg(GsonUtils.toJson(data));
|
||||
CallerLogger.d(M_BUS + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg));
|
||||
LanSocketManager.sendMsgToClient(msg);
|
||||
}
|
||||
|
||||
|
||||
private void getCacheRouteSuccess(BusRoutesResult data){
|
||||
if (data == null || data.getSites() == null
|
||||
|| data.getSites().isEmpty()
|
||||
|| data.getWriteVersion() < DateTimeUtil.getTodayStartTime()) {
|
||||
//当为空时,显示无绑定路线图
|
||||
queryBusRoutes();
|
||||
CacheDataManager.Companion.getInstance().clearCacheData(mContext, BusCacheKey.BUS_LINE_CACHE);
|
||||
return;
|
||||
}
|
||||
CallerLogger.d(M_BUS + TAG, "获取到小巴路线数据: " + GsonUtils.toJson(data));
|
||||
updateBusStatus(data);
|
||||
}
|
||||
|
||||
private void reBuildCacheRouteData(int currentIndex, int currentDrivingStatus, boolean isLeaving
|
||||
, long writeVersion) {
|
||||
if (busRoutesResult != null){
|
||||
busRoutesResult.setWriteVersion(writeVersion);
|
||||
List<BusStationBean> sites = busRoutesResult.getSites();
|
||||
BusStationBean bean = sites.get(currentIndex);
|
||||
bean.setDrivingStatus(currentDrivingStatus);
|
||||
bean.setLeaving(isLeaving);
|
||||
sites.set(currentIndex,bean);
|
||||
if (currentDrivingStatus == STATION_STATUS_STOPPED && !isLeaving){
|
||||
BusStationBean beanPre = sites.get(currentIndex -1);
|
||||
beanPre.setDrivingStatus(BusConst.STATION_STATUS_LEAVING);
|
||||
beanPre.setLeaving(false);
|
||||
sites.set(currentIndex -1,beanPre);
|
||||
}
|
||||
//busRoutesResult.setSite(sites);
|
||||
|
||||
pushCacheTransferData(busRoutesResult);
|
||||
|
||||
updateBusStatus(busRoutesResult);
|
||||
}
|
||||
}
|
||||
|
||||
private void pushCacheTransferData(BusRoutesResult result) {
|
||||
BusTransferData data = new BusTransferData(LoginStatusManager.isLogin() ? 1:0,result);
|
||||
CallerLogger.d(M_BUS + TAG, "pushCacheTransferData = " + GsonUtils.toJson(data));
|
||||
CacheDataManager.Companion.getInstance().putCacheData(mContext,
|
||||
BusCacheKey.BUS_LINE_CACHE,
|
||||
GsonUtils.toJson(data));
|
||||
}
|
||||
|
||||
private final IMogoOnMessageListener<OCHOperationalMessage> mMogoOnMessageListener =
|
||||
new IMogoOnMessageListener<OCHOperationalMessage>() {
|
||||
@Override
|
||||
@@ -397,10 +482,16 @@ public class OrderModel {
|
||||
closeBeautificationMode();
|
||||
clearStartAutopilotTag();
|
||||
removeTipRunnables();
|
||||
|
||||
CacheDataManager.Companion.getInstance().clearCacheData(mContext, BusCacheKey.BUS_LINE_CACHE);
|
||||
return;
|
||||
}
|
||||
CallerLogger.d(M_BUS + TAG, "获取到小巴路线数据: " + data);
|
||||
updateBusStatus(data.getResult());
|
||||
|
||||
if (busRoutesResult == null || busRoutesResult.getWriteVersion() < data.getResult().getWriteVersion()){
|
||||
CallerLogger.d(M_BUS + TAG, "更新小巴路线数据: " + data);
|
||||
updateBusStatus(data.getResult());
|
||||
pushCacheTransferData(data.getResult());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -535,6 +626,9 @@ public class OrderModel {
|
||||
, ""
|
||||
, false);
|
||||
}
|
||||
|
||||
CacheDataManager.Companion.getInstance().clearCacheData(mContext, BusCacheKey.BUS_LINE_CACHE);
|
||||
busRoutesResult = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -543,7 +637,8 @@ public class OrderModel {
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation,
|
||||
String nextStation, String nextStationKr) {
|
||||
String nextStation, String nextStationKr,
|
||||
long writeVersion) {
|
||||
|
||||
onStartAutopilot(leaveIndex);
|
||||
|
||||
@@ -559,6 +654,8 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
|
||||
reBuildCacheRouteData(leaveIndex,BusConst.STATION_STATUS_STOPPED,true,writeVersion);
|
||||
|
||||
}
|
||||
|
||||
private void onStartAutopilot(int leaveIndex) {
|
||||
@@ -675,6 +772,12 @@ public class OrderModel {
|
||||
String departureStopName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
CallerLogger.d(M_BUS + TAG, "arriveSiteStation-currentStationIndex = " + arrivedStationIndex);
|
||||
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
long writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr,writeVersion);
|
||||
|
||||
String requestId = MultiRequestLimitChecker.Companion.generateRequestId(TAG + "-arriveSiteStation"
|
||||
, String.valueOf(stationList.get(arrivedStationIndex).getSiteId())
|
||||
, String.valueOf(currentTaskId));
|
||||
@@ -691,15 +794,6 @@ public class OrderModel {
|
||||
public void onSuccess(BaseData o) {
|
||||
CallerLogger.d(M_BUS + TAG, "行程日志-arriveSiteStation success");
|
||||
MultiRequestLimitChecker.Companion.getInstance().decreaseRequestCount(requestId);
|
||||
if (o != null && o.code == 0){
|
||||
queryBusRoutes();
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr);
|
||||
}
|
||||
//5s轮询核销乘客
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -728,7 +822,7 @@ 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 = arrivedStationIndex == busRoutesResult.getSites().size() - 1;
|
||||
//给bus外屏发送
|
||||
@@ -739,6 +833,9 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
BusVoiceManager.INSTANCE.arrivedStationBus(arriveStation,arriveStationKr);
|
||||
|
||||
reBuildCacheRouteData(arrivedStationIndex, BusConst.STATION_STATUS_STOPPED,false,writeVersion);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -763,6 +860,15 @@ public class OrderModel {
|
||||
MogoLocation currentStationPoint = new MogoLocation();
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
|
||||
isArrivedStation = false;
|
||||
CallerLogger.d(M_BUS + TAG, "行程日志-离站成功开往下一站====");
|
||||
|
||||
long writeVersion = DateTimeUtil.getCurrentTimeStamp();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr,writeVersion);
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) currentLineId);
|
||||
|
||||
String changeInfo = "taskId:" + currentTaskId + "--lineId:" + currentLineId +
|
||||
"--currentStationName:"+currentStationName+"--finalNextStationName:"+finalNextStationName;
|
||||
OchChainLogManager.writeChainLog("滑动出发", changeInfo,
|
||||
@@ -776,14 +882,6 @@ public class OrderModel {
|
||||
public void onSuccess(BaseData o) {
|
||||
OchChainLogManager.writeChainLog("滑动出发成功", changeInfo,
|
||||
true,OchChainLogManager.EVENT_KEY_INFE_WITH_BUS);
|
||||
isArrivedStation = false;
|
||||
CallerLogger.d(M_BUS + TAG, "行程日志-离站成功开往下一站====");
|
||||
//需要更改当前站和下一站的状态 然后渲染
|
||||
//startOrStopQueryPassengerWriteOff(false);
|
||||
queryBusRoutes();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr);
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) currentLineId);
|
||||
}
|
||||
|
||||
|
||||
@@ -882,7 +980,6 @@ public class OrderModel {
|
||||
if (busRoutesResult != null){
|
||||
beforeTaskTips();
|
||||
}
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
}else {
|
||||
removeTipRunnables();
|
||||
}
|
||||
@@ -916,6 +1013,8 @@ public class OrderModel {
|
||||
slidePanelHideCallback.hideSlidePanel();
|
||||
}
|
||||
|
||||
sendTaskDetailsToClients();
|
||||
|
||||
//更新bus路线面板
|
||||
updateBusTaskStatus(stationList);
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.bus.bean.response.BusStationBean;
|
||||
import com.mogo.och.bus.bean.WriteOffPassenger;
|
||||
import com.mogo.och.bus.callback.IBusADASStatusCallback;
|
||||
import com.mogo.och.bus.callback.IBusControllerStatusCallback;
|
||||
@@ -32,6 +31,7 @@ import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.ArrivedStation;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager;
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -63,6 +63,8 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
public void onCreate(@NonNull LifecycleOwner owner) {
|
||||
super.onCreate(owner);
|
||||
initModelListener();
|
||||
|
||||
OrderModel.getInstance().queryBusCacheRoutes();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -272,7 +274,7 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
CallerLogger.d(M_BUS + TAG, " loginStatus =" + LoginStatusManager.isLogin());
|
||||
if (LoginStatusManager.isLogin()) {
|
||||
OrderModel.getInstance().startOrStopOrderLoop(true);
|
||||
OrderModel.getInstance().queryBusRoutes();
|
||||
OrderModel.getInstance().queryBusCacheRoutes();
|
||||
} else {
|
||||
BusTrajectoryManager.getInstance().stopTrajReqLoop();
|
||||
OrderModel.getInstance().startOrStopOrderLoop(false);
|
||||
|
||||
@@ -6,11 +6,11 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.och.bus.bean.response.BusRoutesResult;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.model.OrderModel;
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager;
|
||||
import com.mogo.och.data.bean.BusRoutesResult;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user