[6.0.0] 乘客到达上车点后再拉取送驾任务
This commit is contained in:
@@ -142,6 +142,16 @@ data class QueryCurrentTaskRespBean(var data: Result?) : BaseData() {
|
||||
return data.order!!.orderStatus == TaxiOrderStatusEnum.ArriveAtStart.code
|
||||
}
|
||||
|
||||
fun isUserArriveAtStart(data: QueryCurrentTaskRespBean.Result?): Boolean {
|
||||
if (data == null) {
|
||||
return false
|
||||
}
|
||||
if (data.order == null) {
|
||||
return false
|
||||
}
|
||||
return data.order!!.orderStatus == TaxiOrderStatusEnum.UserArriveAtStart.code
|
||||
}
|
||||
|
||||
/**
|
||||
* with task.currentStatus == StartTask
|
||||
*/
|
||||
|
||||
@@ -685,12 +685,16 @@ object TaxiTaskModel {
|
||||
return
|
||||
}
|
||||
|
||||
//当前任务完成且订单状态到达乘客上车点, 则立马去拉取任务 不再等30s,否则送驾任务要等30s后才能去执行
|
||||
if (result?.currentStatus == TaskStatusEnum.CompleteTask.code) {
|
||||
//当前任务完成且订单状态到达乘客上车点, 则立马去拉取任务 不再等120s,否则送驾任务要等120s后才能去执行(8.29废)
|
||||
//8.29更新: 当前任务完成且订单状态为乘客已上车, 则立马去拉取任务 不再等120s,否则送驾任务要等120s后才能去执行
|
||||
// 主要是解决A-B演练任务同时接到A-B订单状态流转的问题
|
||||
//注意: 需要去除到达乘客上车点的节点, 这个节点不拉取任务
|
||||
if (result?.currentStatus == TaskStatusEnum.CompleteTask.code
|
||||
&& !QueryCurrentTaskRespBean.isOrderArriveAtStart(result)) {
|
||||
mTaxiTaskWithOrderCallbackMap.forEach {
|
||||
val listener = it.value
|
||||
listener.onTaskCompleted(
|
||||
QueryCurrentTaskRespBean.isOrderArriveAtStart(
|
||||
QueryCurrentTaskRespBean.isUserArriveAtStart(
|
||||
result
|
||||
),
|
||||
result.endSite!!.siteId
|
||||
|
||||
Reference in New Issue
Block a user