|
|
@@ -112,9 +112,19 @@ object BusinessManager {
|
|
|
ModBusController.readLockRfid(dockBean.addr.toInt() - 1, lockBean.idx) { res ->
|
|
|
val rfid = res.copyOfRange(3, 11).toHexStrings(false).removeLeadingZeros()
|
|
|
ModBusController.updateLockRfid(dockBean.addr.toInt(), lockBean.idx, rfid)
|
|
|
+ NetApi.getLockInfo(rfid) {
|
|
|
+ if (it != null) {
|
|
|
+ ModBusController.controlLockBuckle(false, dockBean.addr.toInt() - 1, lockBean.idx) { itRst ->
|
|
|
+ if (itRst.isNotEmpty()) {
|
|
|
+ // TODO 上报锁具信息
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ // TODO 上报锁具信息
|
|
|
}
|
|
|
- ModBusController.controlLockBuckle(false, dockBean.addr.toInt() - 1, lockBean.idx)
|
|
|
}
|
|
|
}
|
|
|
DOCK_TYPE_ELEC_LOCK_BOARD -> {
|