|
|
@@ -81,6 +81,7 @@ import com.sik.cronjob.managers.CronJobScanner
|
|
|
import com.sik.sikandroid.activity.ActivityTracker
|
|
|
import com.sik.sikcore.SIKCore
|
|
|
import com.sik.sikcore.date.TimeUtils
|
|
|
+import com.sik.sikcore.extension.toJson
|
|
|
import com.sik.sikcore.thread.ThreadUtils
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
import kotlinx.coroutines.async
|
|
|
@@ -824,11 +825,13 @@ object BusinessManager {
|
|
|
val slotTypeList = slotType.await()
|
|
|
val keyStatusList = keyStatus.await()
|
|
|
|
|
|
+ LogUtil.i("挂锁数据:${locksPage?.records?.toJson()}")
|
|
|
+ LogUtil.i("锁柜id:${SPUtils.getHardwareId()}")
|
|
|
// —— 在 Default 线程做计算密集操作 ——
|
|
|
val lockMap = withContext(Dispatchers.Default) {
|
|
|
ModBusController.getLocks(
|
|
|
needLockCount,
|
|
|
- locksPage?.records?.filter { it.hardwareId != null && it.hardwareId == SPUtils.getCabinetId() }
|
|
|
+ locksPage?.records?.filter { it.hardwareId != null && it.hardwareId == SPUtils.getHardwareId() }
|
|
|
?.mapNotNull { it.lockNfc } ?: mutableListOf(),
|
|
|
slotsPage?.records?.filter {
|
|
|
it.slotType == slotTypeList.find { d -> d.dictLabel == "锁" }?.dictValue && it.status == slotStatusList.find { d -> d.dictLabel == "异常" }?.dictValue
|