Browse Source

063 电池阀处理

zhangshenjie 5 months ago
parent
commit
bfe047fec3

+ 2 - 2
BusinessAirFryer/src/main/assets/config_063.json

@@ -84,8 +84,8 @@
     {
       "type": "AUTO_CLEAN",
       "name": "auto_clean",
-      "bg": "cm_icon_auto_clean",
-      "icon": "cm_icon_auto_clean",
+      "bg": "ic_mode_auto_clean_063",
+      "icon": "ic_auto_clean_063",
       "devMode": "SOUP",
       "listShow": true
     },

+ 41 - 1
BusinessCommon/src/main/java/com/develop/common/dialog/SolenoidValveDialog.kt

@@ -1,14 +1,25 @@
 package com.develop.common.dialog
 
 import android.os.Bundle
+import android.os.CountDownTimer
+import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import android.widget.RelativeLayout
+import com.develop.base.ext.setGone
+import com.develop.base.ext.setVisible
 import com.develop.base.mvvm.FullScreenTransparentDialog
+import com.develop.common.R
 import com.develop.common.databinding.DialogSolenoidValveBinding
+import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.isActive
+import kotlinx.coroutines.launch
 
-class SolenoidValveDialog  : FullScreenTransparentDialog() {
+class SolenoidValveDialog : FullScreenTransparentDialog() {
 
     lateinit var binding: DialogSolenoidValveBinding
 
@@ -17,6 +28,7 @@ class SolenoidValveDialog  : FullScreenTransparentDialog() {
     var confirmStr = ""
     var showConfirm = true
     var showCancel = true
+    var countDownTimer : CountDownTimer? = null
     var onDialogClickListener: OnDialogClickListener? = null
     override fun onCreateView(
         inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
@@ -26,6 +38,9 @@ class SolenoidValveDialog  : FullScreenTransparentDialog() {
         )
         binding.tvConfirm.setOnClickListener {
             onDialogClickListener?.onConfirm()
+            countDownTimer?.let {
+                it.cancel()
+            }
             removeSelf()
         }
 
@@ -42,11 +57,36 @@ class SolenoidValveDialog  : FullScreenTransparentDialog() {
             }
         })
 
+        countdown()
+
 
 
         return binding.root
     }
 
+    fun countdown() {
+         countDownTimer = object : CountDownTimer(6000L, 1000L) {
+            override fun onTick(millisUntilFinished: Long) {
+                // 每秒调用,显示剩余时间
+                binding.tvCount.text  = (millisUntilFinished / 1000L).toString()
+
+
+            }
+
+            override fun onFinish() {
+                // 倒计时结束时调用
+                binding.tvCount.setGone()
+                binding.tvConfirm.setVisible()
+                binding.ivPotCover.background =
+                    resources.getDrawable(R.drawable.pot_clover_ele_unlock)
+                binding.tvMsg.text = getString(R.string.solenoil_valve_msg_true)
+                CofarSDK.cfgBeep(0, 3)
+            }
+        }
+        countDownTimer?.start()
+
+    }
+
     interface OnDialogClickListener {
         fun onConfirm()
         fun onCancel()

+ 58 - 9
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -30,6 +30,7 @@ import com.develop.common.data_repo.net.TokenInvalidateEvent
 import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.dialog.CancelConfirmImageDialog
 import com.develop.common.dialog.PlainDialogView
+import com.develop.common.dialog.SolenoidValveDialog
 import com.develop.common.food_sdk.FoodSdkUtils
 import com.develop.common.food_sdk.GlobalDevEvent
 import com.develop.common.router.Screens
@@ -70,13 +71,14 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
     private val screenSaverDialog by lazy {
         CancelConfirmDialog()
     }
+    var isShowSolenoidDilaog = false
 
     protected var isWidget = false
 
     private var timeDownUtil: TimeDownUtil? = null
     private var screenSaverTime = 3 //minute
-
-    public var isKeyLong = false
+    var isKeyLong = false
+    private var isRunning = false
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         is062 = isBrand062()
@@ -312,7 +314,7 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
          *  会走此回调,errCode=16 错误提示,但011客户不想errCode=16的提示,
          * 会导致 resetZero=1,errCode=16,估在再base做判断
          * */
-        if (CofarSDK.devInfo().errCode.toInt() == 16 &&CofarSDK.devInfo().mode.mode =="CITRUS_JUICER" && CofarSDK.devInfo().resetZero.toInt()==1 ) {
+        if (CofarSDK.devInfo().errCode.toInt() == 16 && CofarSDK.devInfo().mode.mode == "CITRUS_JUICER" && CofarSDK.devInfo().resetZero.toInt() == 1) {
             return
         }
 
@@ -326,16 +328,26 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
         if (CofarSDK.devInfo().errCode.toInt() == 15) {
             return
         }
+
         //所有模式程序运行结束时没有响三声蜂鸣声提示结果程序
         if (event.msg == "dev_end_of_run_tips") {
             onDevStop()
-            CofarSDK.cfgBeep(0, 3)
+            //因为063 不能一结束就提示蜂鸣,需要弹窗电磁阀后在提示
+            if (!baseSn.startsWith("063")) {
+                CofarSDK.cfgBeep(0, 3)
+            } else {
+                // 063 不用弹出结束弹窗
+                return
+            }
         }
+
+
         //当前errcode不是0,并且提示是程序完成的提示不需要显示
         if (CofarSDK.devInfo().errCode.toInt() != 0 && event.msg == "dev_end_of_run_tips") {
             return
         }
 
+
         //称重模式下,非电子称重异常的提示,都不用提示
         if (CofarSDK.devInfo().isWeightStatus && event.msg != "dian_zi_cheng_tong_xin_yi_chan" && event.msg != "weight_overload_tips") {
             return
@@ -487,6 +499,17 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
 
     }
 
+    @Subscribe
+    fun onBaseDevStateEvent(event: DevStatusEvent) {
+//        if (baseSn.startsWith("063") && event.devInfo.status == DevStatus.RUNNING.toInt()) {
+//            isRunning = true
+//        }
+
+//        Log.d("TAG Base DevStateEvent", "event:" + event.devInfo.toString())
+        if (baseSn.startsWith("063") && (event.devInfo.potCloverEleStatus.toInt() == 1 && event.devInfo.status == DevStatus.STOP.toInt()) && !isShowSolenoidDilaog) {
+            showSolenoidValveDialog()
+        }
+    }
 
     @Subscribe
     fun closeEvent(event: FullScreenTransparentDialog.CloseDialogEvent) {
@@ -496,15 +519,14 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
 
     override fun onDestroy() {
         super.onDestroy()
-
         GlobalDevEvent.dismissDialog()
         dismissPlainDialog()
         if (screenReceiver != null) unregisterReceiver(screenReceiver)
 
     }
 
-    fun  showToast(msg: String){
-        Toast.makeText(this,msg,Toast.LENGTH_SHORT).show()
+    fun showToast(msg: String) {
+        Toast.makeText(this, msg, Toast.LENGTH_SHORT).show()
     }
 
     @Subscribe
@@ -579,6 +601,33 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
 
     }
 
+    //弹出063电池阀dialog
+    fun showSolenoidValveDialog() {
+        isShowSolenoidDilaog = true
+        var solenoidValveDialog = SolenoidValveDialog()
+        solenoidValveDialog.showDialog(supportFragmentManager, "solenoidValveDialog")
+        solenoidValveDialog.onDialogClickListener =
+            object : SolenoidValveDialog.OnDialogClickListener {
+                override fun onConfirm() {
+                    isRunning = false
+                    isShowSolenoidDilaog = false
+                    solenoidValveDialog.removeSelf()
+
+                }
+
+                override fun onCancel() {
+                    isRunning = false
+                    isShowSolenoidDilaog = false
+                    solenoidValveDialog.removeSelf()
+                }
+
+                override fun onKey() {
+                }
+
+            }
+
+    }
+
     fun showMsgDialog(msg: String) {
         lastMsg = msg
         cancelConfirmDialog.showCancel = false
@@ -670,13 +719,13 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
 
     }
 
-//    override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean {
+    //    override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean {
 //        if (!isKeyLong){
 //            onKeyLongDialog()
 //        }
 //        return super.onKeyUp(keyCode, event)
 //    }
-    //处理长按
+//处理长按
     open fun onKeyLongDialog() {
         if (!isKeyLong && (cancelConfirmDialog.isShow || cancelConfirmDialog.isAdded)) {
             cancelConfirmDialog.removeSelf();

BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/ic_auto_clean_063.png


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/ic_mode_auto_clean_063.png


+ 66 - 64
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -359,10 +359,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             CofarSDK.startWeight()
         }
 
-        //2023.12.11 000A客户需要隐藏电磁阀
+        //2023.12.11 000A客户需要隐藏电磁阀  2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
         if (sn.startsWith("063") && viewModel.modeType != ModesType.WIGHT.name) {
-            binding.tvCount.setVisible()
-            binding.ivPotCover.setVisible()
+//            binding.tvCount.setVisible()
+//            binding.ivPotCover.setVisible()
         } else {
             binding.tvCount.setGone()
             binding.ivPotCover.setGone()
@@ -864,7 +864,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
     @Subscribe(threadMode = ThreadMode.MAIN)
     fun onDevStateEvent(event: DevStatusEvent) {
-        Log.e("TAG onDevStateEvent","Modes onDevStateEvent  Modes Modes ")
         if (!initModeData) {
             return
         }
@@ -876,7 +875,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             return
         }
 
-        Log.d("TAG DevStateEvent", "event:" + event.devInfo.toString())
+//        Log.d("TAG DevStateEvent", "event:" + event.devInfo.toString())
+
+
         //由于sdk没有判断E7到E16 需要判断运行和暂停过程中,设备发生故障弹出窗口告知故障
         //sdk 会把 E6-15的回调到 base DevPromptEvent方法里面,这里就不需要在做弹窗
 
@@ -994,48 +995,48 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             mRunningInstId = currDevInfo.runningInstId
             mSettingInstId = currDevInfo.settingInstId
 
-            //之前是000 需要做电磁阀,现在单独判断063
+            //之前是000 需要做电磁阀,现在单独判断063  2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
             //sn.startsWith("000")
-            if (sn.startsWith("063")) {
-                //之前的判断是判断是否称重,和点动,现在把点动去掉
-                //!CofarSDK.devInfo().isWeightStatus && currDevInfo.mode.mode != "TURBO"
-                if (!CofarSDK.devInfo().isWeightStatus) {
-                    //电磁阀在非称重/切碎下显示开锁和上锁
-                    if (currDevInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
-                        potCloverEleStatus = 0
-                        potCloverInterval?.cancel()
-                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
-                            binding.tvCount.setGone()
-                        } else {
-                            binding.tvCount.setVisible()
-                            potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
-                                .subscribe {
-                                    binding.tvCount.updateText(it.toString())
-                                }.finish {
-                                    binding.tvCount.setGone()
-                                    currentBgId =
-                                        com.develop.common.R.drawable.pot_clover_ele_unlock
-                                    binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
-                                }
-                                .start()
-                        }
-                    } else if (currDevInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
-                        potCloverEleStatus = 1
-                        potCloverInterval?.cancel()
-                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
-                            binding.tvCount.setGone()
-                        } else {
-                            binding.tvCount.setGone()
-                            currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
-                            binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
-                        }
-
-                    } else if (currDevInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
-                        potCloverEleStatus = 2
-                        binding.tvCount.setGone()
-                    }
-                }
-            }
+//            if (sn.startsWith("063")) {
+//                //之前的判断是判断是否称重,和点动,现在把点动去掉
+//                //!CofarSDK.devInfo().isWeightStatus && currDevInfo.mode.mode != "TURBO"
+//                if (!CofarSDK.devInfo().isWeightStatus) {
+//                    //电磁阀在非称重/切碎下显示开锁和上锁
+//                    if (currDevInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
+//                        potCloverEleStatus = 0
+//                        potCloverInterval?.cancel()
+//                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
+//                            binding.tvCount.setGone()
+//                        } else {
+//                            binding.tvCount.setVisible()
+//                            potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
+//                                .subscribe {
+//                                    binding.tvCount.updateText(it.toString())
+//                                }.finish {
+//                                    binding.tvCount.setGone()
+//                                    currentBgId =
+//                                        com.develop.common.R.drawable.pot_clover_ele_unlock
+//                                    binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
+//                                }
+//                                .start()
+//                        }
+//                    } else if (currDevInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
+//                        potCloverEleStatus = 1
+//                        potCloverInterval?.cancel()
+//                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
+//                            binding.tvCount.setGone()
+//                        } else {
+//                            binding.tvCount.setGone()
+//                            currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
+//                            binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
+//                        }
+//
+//                    } else if (currDevInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
+//                        potCloverEleStatus = 2
+//                        binding.tvCount.setGone()
+//                    }
+//                }
+//            }
             currDevInfo.mode.apply {
 
 
@@ -1173,7 +1174,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
     private fun initModeData(type: String, keep: Boolean? = false) {
 
-        Log.d("TAG initModeData", "viewModel.modeType:" + viewModel.modeType + "    keep:" + keep)
+//        Log.d("TAG initModeData", "viewModel.modeType:" + viewModel.modeType + "    keep:" + keep)
         viewModel.modeType.apply {
             baseMode = CofarSDK.devMode(this)
             setKneadMotorGear(false)
@@ -1212,7 +1213,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 this@ModesDetailActivity.isMotorDirectionGearChange =
                     baseMode.isMotorDirectionChange
                 if (CofarSDK.devInfo().status != DevStatus.PAUSE.toInt() && CofarSDK.devInfo().status != DevStatus.RUNNING.toInt()) {
-                    Log.d("TAG initModeData", "baseMode :" + baseMode.toString())
+//                    Log.d("TAG initModeData", "baseMode :" + baseMode.toString())
                     var targetTemp = baseMode.defaultTemp.toShort()
                     var motorDirection = baseMode.motorDirection.toByte()
                     var motorGear = baseMode.defaultMotorGear.toByte()
@@ -1596,13 +1597,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             }
 
         } else {
+            //2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
             if (sn.startsWith("063")) {
-                if (binding.tvCount.text == "0") {
-                    binding.tvCount.setGone()
-                } else {
-                    binding.tvCount.setVisible()
-                }
-                binding.ivPotCover.setVisible()
+//                if (binding.tvCount.text == "0") {
+//                    binding.tvCount.setGone()
+//                } else {
+//                    binding.tvCount.setVisible()
+//                }
+//                binding.ivPotCover.setVisible()
             } else {
                 binding.tvCount.setGone()
                 binding.ivPotCover.setGone()
@@ -2020,10 +2022,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             var hours = 0
             var minute = 0
             var sec = 0
-            Log.d(
-                "TAG updateTimeUI",
-                "minTime:$minTime   maxTime:$maxTime  dev:${currDevInfo.remainTime.toLong()}    remainTime:$remainTime  targetTime:$targetTime  isTimeChange:$isTimeChange   focusUpdate$focusUpdate  type :$type"
-            )
+//            Log.d(
+//                "TAG updateTimeUI",
+//                "minTime:$minTime   maxTime:$maxTime  dev:${currDevInfo.remainTime.toLong()}    remainTime:$remainTime  targetTime:$targetTime  isTimeChange:$isTimeChange   focusUpdate$focusUpdate  type :$type"
+//            )
             /**
              * 由于速度大于7或等于7的时候 ,SDK会回调onDevCommonEvent方法,这个方法focusUpdate传入true,
              * 就会调用下面if方法,故下面clSetTime.setTimeInternal,由于之前的minute  sec 方法计算错误,现特殊处理minute  sec 计算
@@ -2232,7 +2234,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     }
 
     private fun updateBtn(status: Byte) {
-        Log.d("TAG updateBtn", "status:" + status)
+//        Log.d("TAG updateBtn", "status:" + status)
         when (status) {
             DevStatus.RUNNING -> {
                 binding.apply {
@@ -2410,7 +2412,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             } else {
                 userChanging = false
                 isClickType = 1
-                Log.e("TAG mode", "Start:" + currTime)
+//                Log.e("TAG mode", "Start:" + currTime)
                 CofarSDK.cancel()
                 CofarSDK.devInfo().runningRecipeId = null
                 var startConfig = HashMap<String, Any>()
@@ -2802,10 +2804,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         hours: Int, minute: Int, second: Int, time: String, setByUser: Boolean, type: String
     ) {
 
-        Log.e(
-            "TAG rollTimeEvent",
-            "currentMotorGer:$currentMotorGer     hours:$hours  minute:$minute    second:$second    time:$time    setByUser:$setByUser"
-        )
+//        Log.e(
+//            "TAG rollTimeEvent",
+//            "currentMotorGer:$currentMotorGer     hours:$hours  minute:$minute    second:$second    time:$time    setByUser:$setByUser"
+//        )
         if (setByUser) {
             var cifTime = second + (minute + hours * 60) * 60
             var times = time

+ 66 - 50
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt

@@ -91,6 +91,7 @@ class CookStepActivity : CookStepBaseActivity() {
     private var configJson: CfConfig? = null
     private var isSelectMode: String? = ""
     private var mResetPressedTime: Long = 0  //防止客户重复点击复位
+    private var isNight = false
     @JvmField
     @Autowired(name = "cook_step_detail")
     var cookStepDetail: String? = null
@@ -160,14 +161,14 @@ class CookStepActivity : CookStepBaseActivity() {
         //做食谱步骤判断  由于可能对应的 cofig 缺少程序,故用总文件来 config.json
         configJson = ConfigUtils.loadCookConfig()
         isModelNum = getModelNum()
-
+        isNight = isNightTheme()
         keep = intent.extras?.getBoolean("keep", false) ?: false
 
         if (baseSn.startsWith("011")) {
             binding.tvWeightTare.text = resources.getString(com.develop.common.R.string.tare_011)
         }
 
-        if (!isNightTheme()) {
+        if (!isNight) {
             if (is062) {
                 binding.viewChangeCrush.setBgColor(R.color.view_change_062)
                 binding.viewChangeWeight.setBgColor(R.color.view_change_062)
@@ -201,10 +202,10 @@ class CookStepActivity : CookStepBaseActivity() {
 //            binding.tvCount.setGone()
 //            binding.ivPotCover.setGone()
 //        }
-        //2023.12.11 000A客户需要隐藏电磁阀
+        //2023.12.11 000A客户需要隐藏电磁阀  2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
         if (baseSn.startsWith("063")) {
-            binding.tvCount.setVisible()
-            binding.ivPotCover.setVisible()
+//            binding.tvCount.setVisible()
+//            binding.ivPotCover.setVisible()
         } else {
             binding.tvCount.setGone()
             binding.ivPotCover.setGone()
@@ -399,15 +400,17 @@ class CookStepActivity : CookStepBaseActivity() {
                     FoodDataProvider.getResourcePath(photoPath),
                     R.drawable.bg_cook_session
                 )
-                if (!isNightTheme()) {
+                if (!isNight) {
+
                     binding.ivCookBg.setVisible()
                 } else {
+
                     binding.ivCookBg.setGone()
                 }
             } else {
-                //2023.12.11 000A客户需要隐藏电磁阀
+                //2023.12.11 000A客户需要隐藏电磁阀  2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
                 if (baseSn.startsWith("063")) {
-                    binding.ivPotCover.setVisible()
+//                    binding.ivPotCover.setVisible()
                 } else {
                     binding.ivPotCover.setGone()
                 }
@@ -514,7 +517,8 @@ class CookStepActivity : CookStepBaseActivity() {
                     FoodDataProvider.getResourcePath(photoPath),
                     R.drawable.bg_cook_session
                 )
-                if (!isNightTheme()) {
+                if (!isNight) {
+
                     binding.ivCookBg.setVisible()
                 } else {
                     binding.ivCookBg.setGone()
@@ -654,12 +658,13 @@ class CookStepActivity : CookStepBaseActivity() {
             if (viewModel.allSteps.isNotEmpty()) {
                 viewModel.allSteps.get(viewModel.stepIndex)?.let {
                     if (it.workMode == "Final Step") {
+
                         //享用美食页面
                         binding.ivCookBg.setVisible()
                         notifyAllCookStepComplete()
                         return
                     } else {
-                        if (isNightTheme()) {
+                        if (isNight) {
                             binding.ivCookBg.setGone()
                         }
                         binding.llStepFinish.setGone()
@@ -1027,46 +1032,51 @@ class CookStepActivity : CookStepBaseActivity() {
             }
 
             LogUtils.d("========${devInfo.motorGearBuffer}")
-            //之前是000 需要做电磁阀,现在单独判断063
+            //之前是000 需要做电磁阀,现在单独判断063  2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
             //sn.startsWith("000")
-            if (baseSn.startsWith("063")) {
-                if (!CofarSDK.devInfo().isWeightStatus && devInfo.mode.mode != "TURBO") {
-                    //电磁阀在非称重/切碎下显示开锁和上锁
-                    if (devInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
-                        potCloverEleStatus = 0
-                        potCloverInterval?.cancel()
-                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
-                            binding.tvCount.setGone()
-                        } else {
-                            binding.tvCount.setVisible()
-                            potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
-                                .subscribe {
-                                    binding.tvCount.updateText(it.toString())
-                                }.finish {
-                                    binding.tvCount.setGone()
-                                    currentBgId =
-                                        com.develop.common.R.drawable.pot_clover_ele_unlock
-                                    binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
-                                }
-                                .start()
-                        }
-                    } else if (devInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
-                        potCloverEleStatus = 1
-                        potCloverInterval?.cancel()
-                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
-                            binding.tvCount.setGone()
-                        } else {
-                            binding.tvCount.setGone()
-                            currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
-                            binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
-                        }
-
-                    } else if (devInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
-                        potCloverEleStatus = 2
-                        binding.tvCount.setGone()
-                    }
-                }
-            }
+//            if (baseSn.startsWith("063")) {
+//                if (!CofarSDK.devInfo().isWeightStatus && devInfo.mode.mode != "TURBO") {
+//                    //电磁阀在非称重/切碎下显示开锁和上锁
+//                    if (devInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
+//                        potCloverEleStatus = 0
+//                        potCloverInterval?.cancel()
+//                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
+//                            binding.tvCount.setGone()
+//                        } else {
+//                            binding.tvCount.setVisible()
+//                            potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
+//                                .subscribe {
+//                                    binding.tvCount.updateText(it.toString())
+//                                }.finish {
+//                                    binding.tvCount.setGone()
+//                                    currentBgId =
+//                                        com.develop.common.R.drawable.pot_clover_ele_unlock
+//                                    binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
+//                                }
+//                                .start()
+//                        }
+//                    } else if (devInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
+//                        potCloverEleStatus = 1
+//                        potCloverInterval?.cancel()
+//                        if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
+//                            binding.tvCount.setGone()
+//                        } else {
+//                            binding.tvCount.setGone()
+//                            currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
+//                            binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
+//                        }
+//
+//                    } else if (devInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
+//                        potCloverEleStatus = 2
+//                        binding.tvCount.setGone()
+//                    }
+//                }
+//            }
+
+//            //由于正常启动时间一到结束,没有调用base
+//            if (baseSn.startsWith("063")&&devInfo.potCloverEleStatus.toInt() == 1&&!isShowSolenoidDilaog) {
+//                showSolenoidValveDialog()
+//            }
 
             if (!it.hasStarted && devInfo.status == DevStatus.RUNNING.toInt()) {
                 // 标记这个步骤曾经开始过了
@@ -1079,7 +1089,12 @@ class CookStepActivity : CookStepBaseActivity() {
                     binding.ivCookBg.setVisible()
                     notifyAllCookStepComplete()
                 } else {
-                    binding.ivCookBg.setGone()
+                    if (isNight){
+                        binding.ivCookBg.setGone()
+                    }else{
+                        binding.ivCookBg.setVisible()
+
+                    }
                 }
             }
         }
@@ -1749,6 +1764,7 @@ class CookStepActivity : CookStepBaseActivity() {
 
             //2023年06月22日10:55:55 增加步骤程序自动完成的时候自动跳转下一步
             if ((CommonEventTypes.CONFIRM_STOP == event.type || CommonEventTypes.AUTO_STOP == event.type) && !isFromOverWrite) {
+
                 clickNextStep();
             }
 

+ 2 - 2
BusinessStep/src/main/res/layout/activity_cook_step_base.xml

@@ -91,7 +91,7 @@
                 app:layout_constraintTop_toTopOf="parent"
                 android:id="@+id/iv_cook_bg"
                 android:layout_width="match_parent"
-                android:layout_height="0dp"
+                android:layout_height="match_parent"
                 android:scaleType="centerCrop"
                 app:layout_constraintBottom_toBottomOf="parent" />
 
@@ -354,7 +354,7 @@
             <ImageView
                 app:layout_constraintEnd_toStartOf="@id/view_remark"
                 app:layout_constraintTop_toTopOf="parent"
-                android:visibility="visible"
+                android:visibility="gone"
                 android:id="@+id/iv_pot_cover"
                 android:layout_width="@dimen/convert_70px"
                 android:layout_height="@dimen/convert_70px"

+ 13 - 13
app/build.gradle

@@ -20,7 +20,7 @@ ext {
 
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
-    brandCode="053A"
+    brandCode="063B"
 //    brandCode = "054A"
 //    model = "5037"
     model = "1039"
@@ -853,22 +853,22 @@ android {
 //            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 ////
 
-//            manifestPlaceholders = [channelName: "brand063BTuya"]
-//            buildConfigField("String", "UpdatePlatform", "\"normal\"")
-//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
-//            buildConfigField("String", "model", "\"1039\"")
-//            buildConfigField("String", "brandCode", "\"063B\"")
-//            //appCode 1.01 指向bug修复,2.01指向功能变更
-//            buildConfigField("String", "appCode", "\"1.01\"")
-//            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
-
-            manifestPlaceholders = [channelName: "brand053A"]
-            buildConfigField("String", "UpdatePlatform", "\"night\"")
+            manifestPlaceholders = [channelName: "brand063BTuya"]
+            buildConfigField("String", "UpdatePlatform", "\"normal\"")
             resValue("string", "app_theme", "@style/SplashThemeNotLogo")
             buildConfigField("String", "model", "\"1039\"")
-            buildConfigField("String", "brandCode", "\"053A\"")
+            buildConfigField("String", "brandCode", "\"063B\"")
             //appCode 1.01 指向bug修复,2.01指向功能变更
             buildConfigField("String", "appCode", "\"1.01\"")
+            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
+//
+//            manifestPlaceholders = [channelName: "brand053A"]
+//            buildConfigField("String", "UpdatePlatform", "\"night\"")
+//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+//            buildConfigField("String", "model", "\"1039\"")
+//            buildConfigField("String", "brandCode", "\"053A\"")
+//            //appCode 1.01 指向bug修复,2.01指向功能变更
+//            buildConfigField("String", "appCode", "\"1.01\"")
 
 //            manifestPlaceholders = [channelName: "brand054ATuya"]
 //            buildConfigField("String", "UpdatePlatform", "\"night\"")

+ 2 - 2
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -252,10 +252,10 @@ fun getSN(): String {
 //        return  "063A10390020123010190015"
 //        return  "063B10390020123010190001"
 //        return  "063B20030020123010190015"
-//        return "063B21050020123010190001"
+        return "063B21050020123010190001"
 //        return  "049B10390020123010190001"
 //        return "000A50370020123010190017"
-        return  "053A10390020123010190088"
+//        return  "053A10390020123010190088"
 //        return  "000A10390020123010190023"
 //        return  "000A21050020123010190023"
 //        return "000A50670020123010190005"