[m1]
[1.1.2] [到达站点后选择站点置空]
This commit is contained in:
@@ -337,17 +337,17 @@ object CharterPassengerModel {
|
||||
fun ordrLagic(orderData: OrderInfoResponse.OrderInfo) {
|
||||
// 有订单有线路后结束轮训
|
||||
orderData.let { order ->
|
||||
//设置车模
|
||||
if (this.orderInfo?.productType!=orderData.productType) {
|
||||
this.carTypeChageListener?.setCarChangeListener(orderData.productType)
|
||||
CallerLogger.d(M_BUS_P+TAG,"设置车模")
|
||||
}
|
||||
if (order.lineId == null || order.lineId == 0L || order.siteId == null || order.siteId == 0L) {
|
||||
// 去选线路和站点
|
||||
setOrderStatus(OrderStatusEnum.OrderNoLine)
|
||||
} else {
|
||||
// 有线路 有站点
|
||||
if (this.orderInfo?.lineId != orderData.lineId) {// 线路变更
|
||||
if (this.orderInfo?.productType!=orderData.productType) {
|
||||
this.carTypeChageListener?.setCarChangeListener(orderData.productType)
|
||||
}
|
||||
|
||||
this.orderInfo = orderData
|
||||
// 查询自动驾驶轨迹
|
||||
queryLocusByLineId(order.lineId)
|
||||
setOrderStatus(OrderStatusEnum.OrdersWithLine)
|
||||
@@ -368,6 +368,8 @@ object CharterPassengerModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 设置id
|
||||
this.orderInfo = orderData
|
||||
// 启动时间校准
|
||||
startCalibrationLoop()
|
||||
}
|
||||
@@ -376,6 +378,9 @@ 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.arriveStatus==OrderInfoResponse.ARRIVED){
|
||||
return null
|
||||
}
|
||||
val lineInfo = LineInfoResponse.LineInfo(it.lineName, it.lineId)
|
||||
val targetSizt = SiteInfoResponse.SiteInfo(
|
||||
lineId = it.lineId,
|
||||
@@ -487,12 +492,14 @@ object CharterPassengerModel {
|
||||
if(millisUntilFinished/1000==300L){
|
||||
VoiceManager.surplus5min()
|
||||
}
|
||||
CallerLogger.d(M_BUS_P+TAG,"倒计时${millisUntilFinished/1000}")
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
|
||||
}
|
||||
}
|
||||
countDownTimer?.start()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,7 +518,7 @@ object CharterPassengerModel {
|
||||
if (data?.data == null) return
|
||||
//设置全局轨迹信息
|
||||
locusInfo = data.data
|
||||
CallerLogger.d(TAG,"查询自动驾驶轨迹信息")
|
||||
CallerLogger.d(M_BUS_P+TAG,"查询自动驾驶轨迹信息")
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String) {
|
||||
|
||||
@@ -49,7 +49,7 @@ object BusPassengerServiceManager {
|
||||
return
|
||||
}
|
||||
mBusPassengerServiceApi.queryOrderInfo().transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "loginStatus"))
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "order"))
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@@ -98,7 +98,7 @@ object BusPassengerServiceManager {
|
||||
}
|
||||
val request = ArriveDestRequest(CallerTelematicManager.getServerToken(),lindId)
|
||||
mBusPassengerServiceApi.arriveDest(request = request).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "serviceEnd"))
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "arriveDest"))
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
@@ -44,14 +44,19 @@ class LineSiteView @JvmOverloads constructor(
|
||||
const val TAG = "LineSiteView"
|
||||
const val TAGLINELOOP = "LineSiteViewLineLoop"
|
||||
}
|
||||
|
||||
// 成功提交给后台得线路
|
||||
private var checkLine: LineInfoResponse.LineInfo? = null
|
||||
|
||||
// 成功提交给后台得终点站点
|
||||
private var checkSite: SiteInfoResponse.SiteInfo? = null
|
||||
|
||||
// 下一个站点
|
||||
private var currentSite: SiteInfoResponse.SiteInfo? = null
|
||||
|
||||
// 向司机端端提交的临时线路
|
||||
private var tempCheckLine: LineInfoResponse.LineInfo? = null
|
||||
|
||||
// 向司机端临时提交的终点站点
|
||||
private var tempCheckSite: SiteInfoResponse.SiteInfo? = null
|
||||
|
||||
@@ -98,8 +103,6 @@ class LineSiteView @JvmOverloads constructor(
|
||||
checkSite = hasSetLineAndSite.second
|
||||
lineList.clear()
|
||||
resetData()
|
||||
setEnableLineStatus(false)
|
||||
setEnableSiteStatus(false)
|
||||
} else {
|
||||
queryLineList()
|
||||
setEnableLineStatus(true)
|
||||
@@ -114,10 +117,18 @@ class LineSiteView @JvmOverloads constructor(
|
||||
* 重置数据
|
||||
*/
|
||||
private fun resetData() {
|
||||
checkLine?.let {
|
||||
lineList.add(it)
|
||||
if(checkLine==null){// 没有提交线路
|
||||
queryLineList()
|
||||
setEnableLineStatus(true)
|
||||
setEnableSiteStatus(false)
|
||||
}else{
|
||||
checkLine?.let {
|
||||
querySitesByLineId(it.lineId.toString())
|
||||
setEnableLineStatus(false)
|
||||
setEnableSiteStatus(false)
|
||||
lineAdapter.submitLine(it)
|
||||
checkLine?.let {
|
||||
querySitesByLineId(it.lineId.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,12 +141,8 @@ class LineSiteView @JvmOverloads constructor(
|
||||
g_line_submit_group.visibility = View.VISIBLE
|
||||
lineAdapter.setEnable(true)
|
||||
} else {
|
||||
if (checkLine != null) {
|
||||
g_line_submit_group.visibility = View.GONE
|
||||
lineAdapter.setEnable(false)
|
||||
} else {
|
||||
ToastUtils.showShort("请选择线路")
|
||||
}
|
||||
g_line_submit_group.visibility = View.GONE
|
||||
lineAdapter.setEnable(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,12 +154,8 @@ class LineSiteView @JvmOverloads constructor(
|
||||
g_side_cancle_submit_group.visibility = View.VISIBLE
|
||||
siteAdapter.setEnable(true)
|
||||
} else {
|
||||
if(checkSite!=null) {
|
||||
g_side_cancle_submit_group.visibility = View.GONE
|
||||
siteAdapter.setEnable(false)
|
||||
}else{
|
||||
ToastUtils.showShort("请确定站点")
|
||||
}
|
||||
g_side_cancle_submit_group.visibility = View.GONE
|
||||
siteAdapter.setEnable(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +176,9 @@ class LineSiteView @JvmOverloads constructor(
|
||||
}
|
||||
tv_line_cancle.onClick {
|
||||
resetData()
|
||||
setEnableLineStatus(false)
|
||||
}
|
||||
tv_site_cancle.onClick {
|
||||
resetData()
|
||||
}
|
||||
tv_line_submit.onClick {
|
||||
if (tempCheckLine == null) {
|
||||
@@ -206,10 +211,6 @@ class LineSiteView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
}
|
||||
tv_site_cancle.onClick {
|
||||
resetData()
|
||||
setEnableSiteStatus(false)
|
||||
}
|
||||
tv_site_submit.onClick {
|
||||
if (tempCheckSite == null) {
|
||||
ToastUtils.showLong("请选择站点")
|
||||
@@ -219,11 +220,11 @@ class LineSiteView @JvmOverloads constructor(
|
||||
ToastUtils.showLong("乘客屏无法连接司机屏请联系安全员")
|
||||
return@onClick
|
||||
}
|
||||
checkLine?.let { lineInfo ->
|
||||
tempCheckSite?.let { lineInfo ->
|
||||
tempCheckSite?.let { siteInfo ->
|
||||
val msg = ChangeDestMsg(
|
||||
lineInfo.lineId!!.toInt(),
|
||||
lineInfo.name!!,
|
||||
lineInfo.lineName!!,
|
||||
currentSite!!.siteId!!.toInt(),
|
||||
currentSite!!.siteName!!,
|
||||
siteInfo.siteId!!.toInt(),
|
||||
@@ -290,13 +291,13 @@ class LineSiteView @JvmOverloads constructor(
|
||||
} else {
|
||||
if (msg.isConfirmed) {
|
||||
ToastUtils.showShort("站点确定")
|
||||
g_side_cancle_submit_group.visibility = View.GONE
|
||||
g_line_submit_group.visibility = View.GONE
|
||||
setEnableLineStatus(false)
|
||||
setEnableSiteStatus(false)
|
||||
checkLine = tempCheckLine
|
||||
checkSite = tempCheckSite
|
||||
tempCheckLine?.let {
|
||||
tempCheckLine = null
|
||||
tempCheckSite = null
|
||||
checkLine?.let {
|
||||
lineAdapter.submitLine(it)
|
||||
}
|
||||
} else {
|
||||
@@ -376,7 +377,7 @@ class LineSiteView @JvmOverloads constructor(
|
||||
currentSite!!.isNear = calculateCurrentSite.second
|
||||
siteAdapter.setEnableIndex(index)
|
||||
data.data.forEach {
|
||||
if(it.siteId==checkSite?.siteId){
|
||||
if (it.siteId == checkSite?.siteId) {
|
||||
it.isCheck = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/mapBizView"
|
||||
app:resetDrawable="@drawable/bus_p_overmap_reset_size"
|
||||
app:carDrawable="@drawable/bug_p_overmap_car_model"
|
||||
app:startPointDrawable="@null"
|
||||
app:resetDrawableMarginRight="34dp"
|
||||
app:resetDrawableMarginBottom="54dp"
|
||||
app:isClearArrived="true"
|
||||
@@ -212,8 +213,8 @@
|
||||
android:src="@drawable/m1_order_end"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="@dimen/dp_95"/>
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
|
||||
<!--消息盒子选择入口-->
|
||||
|
||||
Reference in New Issue
Block a user