设备联调,接口参数优化

This commit is contained in:
马增飞
2025-08-08 17:48:07 +08:00
parent 0b52dad0fe
commit 9e5ede4a8e
8 changed files with 32 additions and 18 deletions
@@ -103,6 +103,7 @@ class ShelfActivity : BaseActivity() {
}
val data = ShelfModel(
shelfName = shelfModel?.shelfName,
goodsId = list[clickIndex].goodsId?:"",
goodsName = list[clickIndex].goodsName,
weight = realWeight / 1000.0,
createTime = DateTimeUtil.formatDateTime(dateTime = Date())
@@ -124,6 +125,9 @@ class ShelfActivity : BaseActivity() {
val zeroClearingCmd = "${HomeActivity.HEADER}0401${hex}${HomeActivity.FOOTER}"
Log.d(TAG, "onCreate: zeroClearingCmd=$zeroClearingCmd")
SerialPortManager.send(zeroClearingCmd)
//清零
realWeight = 0
binding.tvFoodWeight.text = "${realWeight}"
}
KeyboardUtil.hideKeyboard(v.context, v)
}
@@ -163,6 +167,8 @@ class ShelfActivity : BaseActivity() {
it.finishRefresh(500)
} else if (binding.refreshLayout.state == RefreshState.Loading) {
it.finishLoadMore(500)
} else {
}
}