[3.2.0] M1司机端站点更换增加writeVersion
This commit is contained in:
@@ -640,10 +640,11 @@ class DriverM1Model {
|
||||
/**
|
||||
* 司机端发送消息给乘客屏
|
||||
*/
|
||||
fun sendCommitMsgToClient(isConfirmed: Boolean) {
|
||||
if (currentChangeDestMsg !== null) {
|
||||
fun sendCommitMsgToClient(isConfirmed: Boolean,writeVersion: Long) {
|
||||
if (currentChangeDestMsg != null) {
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "confirmed station $isConfirmed" )
|
||||
currentChangeDestMsg?.isConfirmed = isConfirmed
|
||||
currentChangeDestMsg?.writeVersion = writeVersion
|
||||
sendMsgToClient(currentChangeDestMsg)
|
||||
}
|
||||
}
|
||||
@@ -804,16 +805,18 @@ class DriverM1Model {
|
||||
// sendCommitMsgToClient(true)
|
||||
// return
|
||||
// }
|
||||
val writeVersion = DateTimeUtil.getCurrentTimeStamp()
|
||||
DriverM1ServiceManager.changeDest(mContext,currentChangeDestMsg!!.lineId,
|
||||
currentChangeDestMsg!!.startSiteId,
|
||||
currentChangeDestMsg!!.destSiteId,
|
||||
writeVersion,
|
||||
object : OchCommonServiceCallback<BaseData>{
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (data != null && data.code == 0){
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "confirmed station .")
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
queryCurrentServiceStatus()
|
||||
sendCommitMsgToClient(true)
|
||||
sendCommitMsgToClient(true,writeVersion)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,12 +67,12 @@ object DriverM1ServiceManager {
|
||||
?.subscribe(OchCommonSubscribeImpl(context!!, callback, "checkOrderCountDown"))
|
||||
}
|
||||
|
||||
fun changeDest(context: Context?,lineId: Int,startSiteId: Int,siteId: Int,
|
||||
fun changeDest(context: Context?,lineId: Int,startSiteId: Int,siteId: Int,writeVersion: Long,
|
||||
callback: OchCommonServiceCallback<BaseData>?){
|
||||
mDriverM1ServiceApi.changeDest(MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
RequestChangeDest(MoGoAiCloudClientConfig.getInstance().sn,lineId,startSiteId,siteId,
|
||||
DateTimeUtil.getCurrentTimeStamp())
|
||||
writeVersion)
|
||||
)?.transformTry()
|
||||
?.subscribe(OchCommonSubscribeImpl(context!!, callback, "changeDest"))
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
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.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean
|
||||
import com.mogo.och.common.module.biz.callback.ILoginCallback
|
||||
@@ -118,7 +119,7 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
|
||||
}
|
||||
|
||||
fun sendCommitMsgToClient(isAffirm: Boolean){
|
||||
DriverM1Model.get().sendCommitMsgToClient(isAffirm)
|
||||
DriverM1Model.get().sendCommitMsgToClient(isAffirm,DateTimeUtils.getCurTimeInMillis())
|
||||
}
|
||||
|
||||
fun changeDest(){
|
||||
|
||||
Reference in New Issue
Block a user