Merge branch 'dev_robobus-d_241202_6.8.4' into dev_robotaxi-d_241210_6.9.0
This commit is contained in:
@@ -274,11 +274,11 @@ object OrderModel {
|
||||
?.observeOn(AndroidSchedulers.mainThread())
|
||||
?.subscribe(object : Observer<Boolean> {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
d(TAG, "onSubscribe")
|
||||
d(TAG, "driveToNextStation onSubscribe")
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
d(TAG, "onError${e.printStackTrace()}")
|
||||
d(TAG, "driveToNextStation onError${e.printStackTrace()}")
|
||||
if (e is DataException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
@@ -298,6 +298,7 @@ object OrderModel {
|
||||
}
|
||||
|
||||
override fun onNext(data: Boolean) {
|
||||
d(TAG, "driveToNextStation onComplete")
|
||||
if (data) {
|
||||
LineModel.leaveStationSuccess()
|
||||
isArrivedStation = false
|
||||
|
||||
@@ -24,8 +24,7 @@ import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffDetialMsg
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffResultMsg
|
||||
import com.mogo.och.common.module.network.OchCommonServiceCallback
|
||||
import com.mogo.och.weaknet.bean.response.WriteOffCountResponse
|
||||
import com.mogo.och.common.module.utils.OchPhoneUtil
|
||||
import com.mogo.och.weaknet.bean.WriteOffPassenger
|
||||
import com.mogo.och.weaknet.repository.RepositoryManager
|
||||
import com.mogo.och.weaknet.repository.exception.DataException
|
||||
@@ -203,16 +202,16 @@ object TicketModel {
|
||||
*/
|
||||
private fun parseData(code:Int,msg:String,phone: String,orderNo: String){
|
||||
when (code) {
|
||||
1009 -> sendMessage2Driver("车票所选乘车日期非今日", phone,1009,orderNo)
|
||||
1005 -> sendMessage2Driver("车辆未登录、或没有任务", phone,1005,orderNo)
|
||||
1006 -> sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合", phone,1006,orderNo)
|
||||
1008 -> sendMessage2Driver("车票剩余可用次数为0", phone,99,orderNo)
|
||||
1009 -> sendMessage2Driver("乘车日期非今日", phone,1009,orderNo)
|
||||
1005 -> sendMessage2Driver("当前无路线任务", phone,1005,orderNo)
|
||||
1006 -> sendMessage2Driver("车票非当前路线", phone,1006,orderNo)
|
||||
1008 -> sendMessage2Driver("车票无剩余可用次数", phone,99,orderNo)
|
||||
6001 -> sendMessage2Driver("二维码已过期", phone,6001,orderNo)
|
||||
6002 -> sendMessage2Driver("同一订单核销间隔时间需大于2分钟", phone,6002,orderNo)
|
||||
6003 -> sendMessage2Driver("车票站点信息与当前车辆执行任务的站点信息不符合", phone,6003,orderNo)
|
||||
6003 -> sendMessage2Driver("车票非当前站点", phone,6003,orderNo)
|
||||
6004 -> sendMessage2Driver("车辆未执行任务", phone,6004,orderNo)
|
||||
6005 -> sendMessage2Driver("车票站点信息与当前车辆执行任务信息不符合", phone,6005,orderNo)
|
||||
1012 -> sendMessage2Driver("当前用户下单路线非当前的车辆所属公司", phone,1012,orderNo)
|
||||
6005 -> sendMessage2Driver("车票非当前班次", phone,6005,orderNo)
|
||||
1012 -> sendMessage2Driver("车票与车辆所属租户不一致", phone,1012,orderNo)
|
||||
else -> {
|
||||
try {
|
||||
val tempcode=msg.toInt()
|
||||
@@ -233,19 +232,11 @@ object TicketModel {
|
||||
private fun sendMessage2Driver(message:String,phone:String,code:Int,orderNo: String){
|
||||
// 发送乘客屏 通过蓝牙告知小程序
|
||||
LanSocketManager.sendMsgToClient(WriteOffResultMsg(code, phone,orderNo, System.currentTimeMillis(),LineManager.lineInfos?.lineId?:0,LineManager.getStations()?.first?.siteId?.toLong()?:0L))
|
||||
val failedReason = "验票失败,${message}"
|
||||
val failedReason = "核销失败,${message}"
|
||||
// tts
|
||||
ShuttleVoiceManager.writeOffFaile(failedReason)
|
||||
var tempPhone = phone
|
||||
tempPhone.let {
|
||||
if (it.length > 8) {
|
||||
//截取电话号码前三位
|
||||
val phoneNumPre = it.substring(0, 3)
|
||||
//截取电话号码后四位
|
||||
val phoneNumFix = it.substring(7)
|
||||
tempPhone = "$phoneNumPre****$phoneNumFix"
|
||||
}
|
||||
}
|
||||
val reaseonAndPhone = if(tempPhone.isNullOrEmpty()) {
|
||||
val tempPhone = OchPhoneUtil.getPhoneWithoutMiddle(phone)
|
||||
val reaseonAndPhone = if(tempPhone.isEmpty()) {
|
||||
failedReason
|
||||
}else{
|
||||
"${failedReason};乘客:${tempPhone}"
|
||||
|
||||
@@ -136,6 +136,9 @@ class WriteOffCacheRepository : IWriteOffRepository {
|
||||
throw DataException(1009,"车票所选乘车日期非今日")
|
||||
}
|
||||
// 6、校验线路
|
||||
if(LineManager.lineInfos==null||LineManager.lineInfos?.lineId==null){
|
||||
throw DataException(1005,"车辆未登录、或没有任务")
|
||||
}
|
||||
if(it.lineId==LineManager.lineInfos?.lineId){
|
||||
lineId = it.lineId
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user