|
|
@@ -1284,7 +1284,12 @@ object BusinessManager {
|
|
|
1 -> {
|
|
|
mDeviceTakeList.find { it.deviceType == DEVICE_TYPE_LOCK && it.nfc == deviceTakeUpdateBO.nfc }?.let { info ->
|
|
|
NetApi.updateLockTake(mutableListOf(LockTakeUpdateReqVO(info.ticketId, info.nfc, MyApplication.instance?.serialNo()!!))) { isSuccess ->
|
|
|
- if (isSuccess == true) {
|
|
|
+ Executor.runOnMain {
|
|
|
+ if (isSuccess == false) {
|
|
|
+ LogUtil.e("Lock take report fail")
|
|
|
+ ToastUtils.tip(R.string.lock_take_report_fail)
|
|
|
+ return@runOnMain
|
|
|
+ }
|
|
|
// 检查是不是要发钥匙了
|
|
|
mDeviceTakeList.removeIf { it.deviceType == DEVICE_TYPE_LOCK && it.nfc == info.nfc }
|
|
|
// 检查当前工作票是否取完挂锁
|
|
|
@@ -1296,8 +1301,9 @@ object BusinessManager {
|
|
|
mDeviceTakeList.count { it.deviceType == DEVICE_TYPE_LOCK && it.ticketId == info.ticketId })
|
|
|
)
|
|
|
ToastUtils.tip(R.string.take_out_rest_locks)
|
|
|
- return@updateLockTake
|
|
|
+ return@runOnMain
|
|
|
} else {
|
|
|
+ LogUtil.i("All locks are taken")
|
|
|
sendLoadingEventMsg(null, false)
|
|
|
}
|
|
|
// 检查有无当前工作票的钥匙
|