餐盘柜优化-绑定临时用户
This commit is contained in:
@@ -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?) {
|
||||
|
||||
Reference in New Issue
Block a user