|
@@ -506,15 +506,20 @@ object BusinessManager {
|
|
|
} else {
|
|
} else {
|
|
|
NetApi.getLockInfo(rfid) {
|
|
NetApi.getLockInfo(rfid) {
|
|
|
if (it != null) {
|
|
if (it != null) {
|
|
|
- // TODO 考虑快速拿取
|
|
|
|
|
- ModBusController.controlLockBuckle(
|
|
|
|
|
- false, dockBean.addr, lockBean.idx
|
|
|
|
|
- ) { itRst ->
|
|
|
|
|
- if (itRst.isNotEmpty()) {
|
|
|
|
|
- // 上报锁具信息
|
|
|
|
|
- NetApi.updateLockReturn(
|
|
|
|
|
- rfid, MyApplication.instance!!.serialNo()
|
|
|
|
|
- ) {}
|
|
|
|
|
|
|
+ NetApi.getLockStateByNfc(rfid) {
|
|
|
|
|
+ if (it != 1) {
|
|
|
|
|
+ ModBusController.controlLockBuckle(
|
|
|
|
|
+ false, dockBean.addr, lockBean.idx
|
|
|
|
|
+ ) { itRst ->
|
|
|
|
|
+ if (itRst.isNotEmpty()) {
|
|
|
|
|
+ // 上报锁具信息
|
|
|
|
|
+ NetApi.updateLockReturn(
|
|
|
|
|
+ rfid, MyApplication.instance!!.serialNo()
|
|
|
|
|
+ ) {}
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ToastUtils.tip(CommonUtils.getStr(R.string.ticket_not_finish_can_not_return_lock))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|