|
|
@@ -5,7 +5,7 @@ import com.grkj.iscs.util.log.LogUtil
|
|
|
/**
|
|
|
* RS-485 设备信息 Bean
|
|
|
*
|
|
|
- * @param addr 设备地址
|
|
|
+ * @param addr 设备地址 0x01-0x16
|
|
|
* @param type 0x00:钥匙底座 0x01:锁具底座 0x02:电磁锁控制板
|
|
|
* @param keyList 钥匙列表,钥匙底座才有
|
|
|
* @param lockList 锁具列表,锁具底座才有
|
|
|
@@ -44,12 +44,22 @@ class DeviceBean(
|
|
|
keyBean.hasKey = leftHasKey
|
|
|
keyBean.isCharging = isLeftCharging
|
|
|
changeList.add(keyBean)
|
|
|
+ // 拿走钥匙,移除钥匙信息
|
|
|
+ if (!leftHasKey) {
|
|
|
+ keyBean.rfid = null
|
|
|
+ keyBean.mac = null
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if (rightHasKey != keyBean.hasKey) {
|
|
|
keyBean.hasKey = rightHasKey
|
|
|
keyBean.isCharging = isRightCharging
|
|
|
changeList.add(keyBean)
|
|
|
+ // 拿走钥匙,移除钥匙信息
|
|
|
+ if (!rightHasKey) {
|
|
|
+ keyBean.rfid = null
|
|
|
+ keyBean.mac = null
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -75,6 +85,10 @@ class DeviceBean(
|
|
|
if (lockList[i].hasLock != tempList[i]) {
|
|
|
lockList[i].hasLock = tempList[i]
|
|
|
changeList.add(lockList[i])
|
|
|
+ // 拿走锁具,移除锁具信息
|
|
|
+ if (!tempList[i]) {
|
|
|
+ lockList[i].rfid = null
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|