|
|
@@ -94,7 +94,7 @@ object BusinessManager {
|
|
|
}
|
|
|
|
|
|
// 设备归还列表(需要报给后台的列表,等实际取完再上报)
|
|
|
- val mDeviceTakeList = mutableListOf<DeviceTakeUpdateBO>()
|
|
|
+ private val mDeviceTakeList = mutableListOf<DeviceTakeUpdateBO>()
|
|
|
|
|
|
/**
|
|
|
* 初始化消息总线
|
|
|
@@ -746,7 +746,7 @@ object BusinessManager {
|
|
|
if (isNeedLoading) mEventBus.postValue(MsgEvent(MSG_EVENT_LOADING, LoadingMsg(true, "开始下发工作票...", null)))
|
|
|
BleCmdManager.sendWorkTicket(jsonStr, bleDevice = bleDevice, callback = object : CustomBleWriteCallback() {
|
|
|
override fun onWriteSuccess(current: Int, total: Int, justWrite: ByteArray?) {
|
|
|
- println("sendTicket success")
|
|
|
+ LogUtil.i("sendTicket success")
|
|
|
if (isNeedLoading) mEventBus.postValue(MsgEvent(MSG_EVENT_LOADING, LoadingMsg(true, "工作票下发中...", null)))
|
|
|
}
|
|
|
|
|
|
@@ -981,11 +981,13 @@ object BusinessManager {
|
|
|
* 添加待更新取出状态的设备
|
|
|
*/
|
|
|
fun addDeviceTake(deviceType: Int, ticketId: Long, nfc: String?) {
|
|
|
+ LogUtil.i("$deviceType - $ticketId - $nfc")
|
|
|
mDeviceTakeList.removeIf { it.deviceType == deviceType && it.nfc == nfc }
|
|
|
mDeviceTakeList.add(DeviceTakeUpdateBO(deviceType, ticketId, nfc))
|
|
|
}
|
|
|
|
|
|
private fun handleDeviceTake(deviceTakeUpdateBO: DeviceTakeUpdateMsg) {
|
|
|
+ LogUtil.i("$deviceTakeUpdateBO")
|
|
|
when (deviceTakeUpdateBO.deviceType) {
|
|
|
// 钥匙
|
|
|
0 -> {
|