餐盘柜优化-绑定临时用户

This commit is contained in:
mazengfei
2026-01-16 16:14:38 +08:00
parent 8337b3fabb
commit cf2d2db42f
10 changed files with 267 additions and 176 deletions
@@ -11,7 +11,12 @@ import timber.log.Timber
object PlateUtils {
fun open(fragmentActivity: FragmentActivity, code: String?) {
fun open(
fragmentActivity: FragmentActivity,
code: String?,
isScanCode: Boolean,
isSetting: Boolean = false
) {
val activity = fragmentActivity as BaseActivity<*>
Timber.d("itemClick llOpen equipmentBoxCode = ${code}")
val equipmentBoxCode: Int = code?.toInt() ?: -1
@@ -23,14 +28,15 @@ object PlateUtils {
SerialApi.openPlate(equipmentBoxCode, object : SerialPortManager.SendCallback {
override fun onSuccess() {
activity.hideWaitingDialog()
MainActivity.start(
activity,
pageType = PageType.PLATE_TIP,
isAdmin = true,
block = {
}
)
if (isSetting.not()) {
MainActivity.start(
activity,
pageType = PageType.PLATE_TIP,
isScanCode = isScanCode
)
} else {
ToastUtils.showToast("柜门打开成功")
}
}
override fun onFail(e: Exception?) {