Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0
This commit is contained in:
@@ -15,11 +15,11 @@ data class OrderInfoResponse(val data: OrderInfo?) : BaseData() {
|
||||
var startSiteId: Int?,
|
||||
var startSiteName: String?,
|
||||
var startSiteNameKr: String?,
|
||||
val siteId: Long?,//站点id
|
||||
var siteId: Long?,//站点id
|
||||
val siteName: String?,//站点名称
|
||||
val siteNameKr: String?,//站点名称
|
||||
val wgs84Lat: Double?,
|
||||
val wgs84Lon: Double?,
|
||||
var wgs84Lat: Double?,
|
||||
var wgs84Lon: Double?,
|
||||
var gcj02Lat: Double?,
|
||||
var gcj02Lon: Double?,
|
||||
val startTime: Long?,//开始时间
|
||||
|
||||
@@ -121,9 +121,6 @@ object CharterPassengerModel {
|
||||
private var subscribeCountDown: Disposable?=null
|
||||
var switchLine5minWait: Disposable?=null
|
||||
|
||||
@Volatile
|
||||
private var newCheckSite:SiteInfoResponse.SiteInfo? = null
|
||||
|
||||
fun init() {
|
||||
initListeners()
|
||||
queryLoginStatus()
|
||||
@@ -236,6 +233,7 @@ object CharterPassengerModel {
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
CallerAutoPilotControlManager.getGlobalPath()
|
||||
cleanRoutePoints()
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE -> {}
|
||||
@@ -275,6 +273,9 @@ object CharterPassengerModel {
|
||||
.coordinateConverterWgsToGcjLocations(mContext, routePoints)
|
||||
mRoutePoints.addAll(latLngModels)
|
||||
}
|
||||
fun cleanRoutePoints(){
|
||||
mRoutePoints.clear()
|
||||
}
|
||||
|
||||
fun setStatusChangeListener(tag:String,orderStatusChangeListener: IOrderStatusChangeListener?) {
|
||||
if (tag.isBlank()) return
|
||||
@@ -457,7 +458,7 @@ object CharterPassengerModel {
|
||||
|
||||
fun hasSetLineAndSite(): Pair<LineInfoResponse.LineInfo, SiteInfoResponse.SiteInfo>? {
|
||||
orderInfo?.let {
|
||||
if (it.lineId != null && it.lineId > 0 && it.siteId != null && it.siteId > 0) {
|
||||
if (it.lineId != null && it.lineId > 0 && it.siteId != null && it.siteId!! > 0) {
|
||||
if(it.arriveStatus==OrderInfoResponse.ARRIVED){
|
||||
return null
|
||||
}
|
||||
@@ -667,10 +668,11 @@ object CharterPassengerModel {
|
||||
//mLocation gcj坐标
|
||||
mLocationGCJ02?.let {
|
||||
orderInfo?.let { order ->
|
||||
newCheckSite?.let {
|
||||
if(it.siteId!=order.siteId){
|
||||
return
|
||||
}
|
||||
if(order.siteId==null||order.siteId==0L||
|
||||
order.wgs84Lat==null||order.wgs84Lat==0.0||
|
||||
order.wgs84Lon==null||order.wgs84Lon==0.0
|
||||
){
|
||||
return
|
||||
}
|
||||
// 启动轨迹计算
|
||||
var lastSumLength = 0f
|
||||
@@ -699,6 +701,9 @@ object CharterPassengerModel {
|
||||
if(lastSumLength>100) {
|
||||
if (mRoutePoints.size == 0){
|
||||
ToastCharterUtils.showLong("缺少轨迹数据")
|
||||
CallerLogger.d(M_BUS_P + "calculateDistance两点距离",
|
||||
"缺少轨迹数据"
|
||||
)
|
||||
return
|
||||
}
|
||||
// 计算距离
|
||||
@@ -989,12 +994,16 @@ object CharterPassengerModel {
|
||||
private fun isSuccess(requestSuccessSign: String) =
|
||||
broadcastList[requestSuccessSign] == null || broadcastList[requestSuccessSign] == false
|
||||
|
||||
fun cleanbroadcastListInfo(checkSite: SiteInfoResponse.SiteInfo?) {
|
||||
fun cleanbroadcastListInfo() {
|
||||
switchLine5minWait = RxUtils.createSubscribe(5 * 60 * 1000) {
|
||||
CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "5分钟倒计时可以选择线路了")
|
||||
}
|
||||
broadcastList.clear()
|
||||
newCheckSite = checkSite
|
||||
orderInfo?.let {
|
||||
it.siteId = 0
|
||||
it.wgs84Lon = 0.0
|
||||
it.wgs84Lat = 0.0
|
||||
}
|
||||
// 到站结束自驾
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
// 停止路距计算
|
||||
|
||||
@@ -222,7 +222,7 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) :
|
||||
}
|
||||
mView?.hideDataDriverAgree()
|
||||
CharterPassengerModel.queryOrder()
|
||||
CharterPassengerModel.cleanbroadcastListInfo(checkSite)
|
||||
CharterPassengerModel.cleanbroadcastListInfo()
|
||||
} else {
|
||||
ToastCharterUtils.showShort("司机端拒绝请重新选择")
|
||||
mView?.hideDataDriverRefuse()
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.mogo.eagle.core.network.*
|
||||
import com.mogo.eagle.core.network.utils.*
|
||||
import com.mogo.eagle.core.utilcode.download.Config
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
@@ -45,6 +44,10 @@ class UpgradeAppNetWorkManager private constructor() {
|
||||
@Volatile
|
||||
private var upgradeJob: Job? = null
|
||||
|
||||
// 标识静默升级是否已触发下载,如果为true, 直接返回,防止重复下载
|
||||
@Volatile
|
||||
private var mDownloadRequested = false
|
||||
|
||||
/**
|
||||
* 获取app升级信息
|
||||
*/
|
||||
@@ -136,6 +139,10 @@ class UpgradeAppNetWorkManager private constructor() {
|
||||
provider?.recordUpgradeRecord(info.result.versionName, null, 0)
|
||||
}
|
||||
if (ApkInstaller.isInstallAppStore(Utils.getApp())) {
|
||||
if (mDownloadRequested) {
|
||||
return
|
||||
}
|
||||
mDownloadRequested = true
|
||||
try {
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(Utils.getApp(), "检测到新版本[${info.result.versionName}]并且当前设备支持静默升级,开始下载新版本...", Toast.LENGTH_SHORT).show()
|
||||
|
||||
Reference in New Issue
Block a user