Browse Source

更新010代码

zhangshenjie 11 months ago
parent
commit
92e4c6521a
21 changed files with 153 additions and 39 deletions
  1. 4 0
      BusinessCommon/src/main/java/com/develop/common/data_repo/db/dao/UserInfoDao.kt
  2. 17 2
      BusinessCommon/src/main/java/com/develop/common/data_repo/net/model/request/DeviceInfoBody.kt
  3. 5 0
      BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt
  4. 22 9
      BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt
  5. 11 3
      BusinessCommon/src/main/java/com/develop/common/widget/HomeFilterSortSearchView.kt
  6. 7 0
      BusinessCommon/src/main/res/drawable/bg_evaluate_button_false.xml
  7. 1 1
      BusinessCommon/src/main/res/values-de/strings.xml
  8. 5 5
      BusinessCommon/src/main/res/values-fr/strings.xml
  9. 1 1
      BusinessCommon/src/main/res/values-it/strings.xml
  10. 3 1
      BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt
  11. 13 3
      BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt
  12. 1 0
      BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt
  13. 1 1
      BusinessSetting/src/main/java/com/develop/setting/ui/LanguageActivity.kt
  14. 1 0
      BusinessSetting/src/main/java/com/develop/setting/ui/RestoreActivity.kt
  15. 20 8
      BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt
  16. 0 1
      BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookDetailActivity.kt
  17. 5 0
      BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookEvaluateActivity.kt
  18. 2 1
      BusinessStep/src/main/res/layout/activity_cook_evaluate.xml
  19. 31 3
      app/build.gradle
  20. 3 0
      app/src/main/java/com/develop/foodcooking/FoodCookingApp.kt
  21. BIN
      libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar

+ 4 - 0
BusinessCommon/src/main/java/com/develop/common/data_repo/db/dao/UserInfoDao.kt

@@ -69,6 +69,10 @@ interface UserInfoDao {
     @Query("Delete from user_favorite_recipes where userId = :userId")
     fun removeAllFavouriteRecipe(userId: Long)
 
+    @Query("Delete from user_tag where userId = :userId")
+    fun removeAllOnUserTag(userId: Long)
+
+
     @Query("select * from user_online_recipes")
     fun queryUserOnLineRecipesIds(): List<UserOnLineRecipes>
 

+ 17 - 2
BusinessCommon/src/main/java/com/develop/common/data_repo/net/model/request/DeviceInfoBody.kt

@@ -3,6 +3,7 @@ package com.develop.common.data_repo.net.model.request
 import com.blankj.utilcode.util.AppUtils
 import com.develop.base.ext.genMultipartBody
 import com.develop.base.ext.getSN
+import com.develop.base.util.MMkvUtils
 import com.develop.common.data_repo.FoodDataProvider
 import okhttp3.RequestBody
 
@@ -12,9 +13,23 @@ object DeviceInfoBody {
         val v = FoodDataProvider.getUserDatabase().devConfigDao().recipeVersion()
         val recipeUpdateTime: Long = v?.recipeUpdateTime ?: 0
         val map = HashMap<String, String>()
+        val sn = getSN()
+
+        val times = MMkvUtils.getString("appTime") ?: "0"
+        val appTime: Long = times.toLong()
+
+        val time = if (sn.startsWith("010")) {
+            if (appTime > recipeUpdateTime) {
+                appTime.toString()
+            } else {
+                recipeUpdateTime.toString()
+            }
+        } else {
+            recipeUpdateTime.toString()
+        }
         map["apkVersin"] = AppUtils.getAppVersionName()
-        map["sn"] = getSN()
-        map["recipeUpdateTime"] = recipeUpdateTime.toString()
+        map["sn"] = sn
+        map["recipeUpdateTime"] = time
         return map.genMultipartBody()
     }
 }

+ 5 - 0
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -408,9 +408,14 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
             cancelConfirmDialog.onDialogClickListener =
                 object : CancelConfirmDialog.OnDialogClickListener {
                     override fun onConfirm() {
+                        //由于锅盖右边没盖紧,但是锅
+                        if (lastMsg=="zhuan_su_fan_kui_yi_chan"){
+                            CofarSDK.stop()
+                        }
                         if (event.confirm != null) {
                             event.confirm.callback();
                         }
+
                         cancelConfirmDialog.removeSelf();
                         lastMsg = "";
                     }

+ 22 - 9
BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt

@@ -16,6 +16,7 @@ import com.develop.base.ext.fromJson
 import com.develop.base.ext.globalApp
 import com.develop.base.ext.setRecipesList
 import com.develop.base.ext.toJson
+import com.develop.base.util.AppActivityManager
 import com.develop.base.util.FileKit
 import com.develop.base.util.GlobalToast
 import com.develop.base.util.MMkvUtils
@@ -51,6 +52,7 @@ import kotlin.collections.List
 
 object AppVersionUtil {
     var numberList = mutableListOf<String>()
+    var dialogRecipeUpdate = RecipeUpdateDialog()
     fun checkRecipeUpdate(shoNoUpdateDialog: Boolean = false) {
         TopResumedAtyHolder.getCurrentActivity()?.apply {
             scopeNetLife {
@@ -127,6 +129,7 @@ object AppVersionUtil {
                         val recipeUpdateTime = result.recipeUpdateTime
                         val newRecipes = LinkedList(result.newRecipes)
                         if (newRecipes.isEmpty() && shoNoUpdateDialog) {
+
                             val dialog = RecipeUpdateDialog()
                             dialog.onDialogClickListener =
                                 object : RecipeUpdateDialog.OnDialogClickListener {
@@ -141,18 +144,19 @@ object AppVersionUtil {
 
                         }
                         if (newRecipes.isNotEmpty()) {
-                            val dialog = RecipeUpdateDialog()
-                            dialog.onDialogClickListener =
+                            if (dialogRecipeUpdate.isShow){
+                                dialogRecipeUpdate.removeSelf()
+                            }
+                            dialogRecipeUpdate.onDialogClickListener =
                                 object : RecipeUpdateDialog.OnDialogClickListener {
                                     override fun onConfirm() {
                                         updateRecipe = !updateRecipe
                                         //清掉list的number
                                         numberList.clear()
-
                                         EventBus.getDefault().post(NoScreenEvent(true))
                                         downloadRecipes(
                                             newRecipes,
-                                            dialog,
+                                            dialogRecipeUpdate,
                                             newRecipes.size.toLong(),
                                             downloadDir,
                                             downloadName,
@@ -165,11 +169,19 @@ object AppVersionUtil {
                                     }
 
                                 }
-                            dialog.showUpdateTips(
-                                supportFragmentManager,
-                                "RECIPE_UPDATE_DIALOG",
-                                newRecipes.size.toLong()
-                            )
+                            var activityName  = AppActivityManager.getInstance().topActivity.localClassName
+                            /**
+                             * 由于访问接口得时候处理数据,这时候切换了其他页面再切换语言导致,
+                             * 更新食谱的dialog的问题会空白,估做下面判断
+                             * */
+                            if (activityName.contains("ModeEntranceActivity")||activityName.contains("ModeEntrance2Activity")||activityName.contains("AboutActivity")){
+                                dialogRecipeUpdate.showUpdateTips(
+                                    supportFragmentManager,
+                                    "RECIPE_UPDATE_DIALOG",
+                                    newRecipes.size.toLong()
+                                )
+                            }
+
                         }
                     }
                 } catch (e: java.lang.Exception) {
@@ -386,4 +398,5 @@ object AppVersionUtil {
     }
 }
 
+
 class NoScreenEvent(var noScreen: Boolean)

+ 11 - 3
BusinessCommon/src/main/java/com/develop/common/widget/HomeFilterSortSearchView.kt

@@ -61,14 +61,11 @@ class HomeFilterSortSearchView : RelativeLayout {
         }
 
         binding.onlineLayout.setOnClickListener {
-            binding.onlineLayout.setGone()
-            binding.recipesLayout.setVisible()
             onFunctionCallback?.onOnlineRecipesClick()
         }
 
 
         binding.recipesLayout.setOnClickListener {
-            binding.recipesLayout.setGone()
             onFunctionCallback?.onLocalRecipesClick()
         }
         binding.etSearch.setOnFocusChangeListener { view, b ->
@@ -113,6 +110,17 @@ class HomeFilterSortSearchView : RelativeLayout {
         binding.etSearch.setText(hotWord)
     }
 
+    fun onLineState(isOnLineState: Boolean){
+        if (isOnLineState){
+            binding.onlineLayout.setGone()
+            binding.recipesLayout.setVisible()
+        }else{
+            binding.onlineLayout.setVisible()
+            binding.recipesLayout.setGone()
+        }
+
+    }
+
     fun hideOnlineLayout(isOnLineState: Boolean) {
         if (isOnLineState) {
             binding.onlineLayout.visibility = View.INVISIBLE

+ 7 - 0
BusinessCommon/src/main/res/drawable/bg_evaluate_button_false.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <solid android:color="#D1CEC9"/>
+    <corners android:radius="@dimen/convert_80px"/>
+
+</shape>

+ 1 - 1
BusinessCommon/src/main/res/values-de/strings.xml

@@ -216,7 +216,7 @@ Nanfang plus client ist eine Online-Informationsplattform, die von Guangdong Nan
     <string name="delete">Delete</string>
     <string name="recipe_update_tips">Es wurden insgesamt {{num}} Rezepte gefunden. Willst du sie herunterladen?</string>
     <string name="no_recipe_update_tips">Kein neues Rezeptdatenpaket Aktuell die neueste Version</string>
-    <string name="recipe_update_process_tips">({{Fortschritte}})Herunterladen von Rezeptdaten…</string>
+    <string name="recipe_update_process_tips">({{progress}})Herunterladen von Rezeptdaten…</string>
     <string name="recipe_update_finish">Aktualisierung der Rezeptdaten abgeschlossen</string>
     <string name="update_recipe_title">Rezeptaktualisierung</string>
     <string name="restore_confirm_tips">Sind Sie sicher, dass die Werkseinstellungen wiederhergestellt werden?</string>

+ 5 - 5
BusinessCommon/src/main/res/values-fr/strings.xml

@@ -212,9 +212,9 @@ Southern plus client est une plate - forme d’information en ligne développée
     <string name="score">Score</string>
     <string name="share">Partager</string>
     <string name="delete">Supprimer</string>
-    <string name="recipe_update_tips">Un total de {{Numérique}} recettes ont été trouvées. Vous souhaitez les télécharger?</string>
+    <string name="recipe_update_tips">Un total de {{num}} recettes ont été trouvées. Vous souhaitez les télécharger?</string>
     <string name="no_recipe_update_tips">Aucun nouveau paquet de recette \ n est actuellement la dernière version</string>
-    <string name="recipe_update_process_tips">({{Le progrès}})Données de recette télécharger…</string>
+    <string name="recipe_update_process_tips">({{progress}})Données de recette télécharger…</string>
     <string name="recipe_update_finish">Mise à jour des données de recette terminée</string>
     <string name="update_recipe_title">Mise à jour de la recette</string>
     <string name="restore_confirm_tips">Êtes - vous sûr de vouloir revenir aux paramètres d’usine?</string>
@@ -232,10 +232,10 @@ Southern plus client est une plate - forme d’information en ligne développée
     <string name="unset_target_time">L’heure n’est pas encore définie.</string>
     <string name="recipe_complete">La formule est terminée</string>
     <string name="engjoy_your_meal">Bon repas à vous!</string>
-    <string name="gan_sao_yi_chan">Attention \ n · température élevée \ n · pas de contenu dans le bol lorsque chauffé \ n · ajouter des ingrédients, liquide</string>
+    <string name="gan_sao_yi_chan">Attention \n · température élevée \n · pas de contenu dans le bol lorsque chauffé \n · ajouter des ingrédients, liquide</string>
 
-    <string name="zhuan_su_fan_kui_yi_chan">Attention \ n · le couvercle du bol n’est pas complètement engagé \ n · le moteur est surchargé, permettant à la machine de refroidir, redémarrez avec moins de contenu du bol.</string>
-    <string name="dian_zi_cheng_tong_xin_yi_chan">Attention \ n · poids non mesuré, balance incorrecte \ n · Échelle défectueuse </string>
+    <string name="zhuan_su_fan_kui_yi_chan">Attention \n · le couvercle du bol n’est pas complètement engagé \n · le moteur est surchargé, permettant à la machine de refroidir, redémarrez avec moins de contenu du bol.</string>
+    <string name="dian_zi_cheng_tong_xin_yi_chan">Attention \n · poids non mesuré, balance incorrecte \n · Échelle défectueuse </string>
     <string name="ntc_yi_chan"> Remarque: NTC ne fonctionne pas correctement, veuillez contacter le service technique.</string>
     <string name="mei_fang_guo_yi_chan">Remarque · le bol à mélanger n’est pas engagé, repositionnez le bol à mélanger</string>
 

+ 1 - 1
BusinessCommon/src/main/res/values-it/strings.xml

@@ -207,7 +207,7 @@ Nanfang plus client è una piattaforma di informazioni online sviluppata e gesti
     <string name="delete">Elimina</string>
     <string name="recipe_update_tips">È stato trovato un totale di {{num}} ricette. Vuoi scaricarli?</string>
     <string name="no_recipe_update_tips">Nessun nuovo pacchetto di dati della ricetta \n Attualmente l\'ultima versione</string>
-    <string name="recipe_update_process_tips">({{progressi}})Scaricare dati della ricetta...</string>
+    <string name="recipe_update_process_tips">({{progress}})Scaricare dati della ricetta…</string>
     <string name="recipe_update_finish">Aggiornamento dei dati della ricetta completato</string>
     <string name="update_recipe_title">Aggiornamento ricetta</string>
     <string name="restore_confirm_tips">Sei sicuro di ripristinare le impostazioni di fabbrica?</string>

+ 3 - 1
BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt

@@ -538,8 +538,10 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
         isResetZero = CofarSDK.devInfo().resetZero.toInt()
         super.onResume()
 
+        if (!AppVersionUtil.dialogRecipeUpdate.isShow){
+            AppVersionUtil.checkRecipeUpdate(false)
 
-        AppVersionUtil.checkRecipeUpdate(false)
+        }
 //        UpdateUtil.checkApkVersion(false)
         val userInfo = FoodDataProvider
             .getUserDatabase()

+ 13 - 3
BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt

@@ -491,14 +491,16 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             viewModel.apply {
                 loadingDialog.showDialog(childFragmentManager, "loadingDialog")
                 getOnLineCategoryList()
-                recipesType = RecipesType.ONLINE
-                netFoodLiveData.postValue(true)
-                homeOrBackLiveData.postValue(HomeOrBack.Back)
+
             }
         }
 
         override fun onLocalRecipesClick() {
             EventBus.getDefault().post(OnLocalRecipesEvent())
+            filterSortSearchView?.let {
+                it.onLineState(false)
+
+            }
         }
 
     }
@@ -671,6 +673,14 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
                     }
 
                 }
+                filterSortSearchView?.let {
+                    it.onLineState(true)
+                }
+                recipesType = RecipesType.ONLINE
+                netFoodLiveData.postValue(true)
+                homeOrBackLiveData.postValue(HomeOrBack.Back)
+
+
                 scopeNet {
                     delay(300)
                     loadingDialog.removeSelf()

+ 1 - 0
BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt

@@ -573,6 +573,7 @@ class HomeViewModel : BaseViewModel() {
         }
     }
 
+    //获取线上食谱
     fun getOnLineRecipeList(
         category: String,
         name: String,

+ 1 - 1
BusinessSetting/src/main/java/com/develop/setting/ui/LanguageActivity.kt

@@ -234,7 +234,7 @@ class LanguageActivity : BaseBindingActivity<ActivityLanguageBinding>() {
             MMkvUtils.save(CURRENT_LANGUAGE, l.value)
             if (isFromSetting){
                 //系统变化语言
-//                  updateLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
+                  updateLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
             }
             LanguageUtils.applyLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
         }

+ 1 - 0
BusinessSetting/src/main/java/com/develop/setting/ui/RestoreActivity.kt

@@ -100,6 +100,7 @@ class RestoreActivity : CommonBindingActivity<ActivityRestoreBinding>() {
                 removeAllOnlineRecipe(CURRENT_USER_ID)
                 removeAllFavouriteRecipe(CURRENT_USER_ID)
                 removeAllHistoryRecipe(CURRENT_USER_ID)
+                removeAllOnUserTag(CURRENT_USER_ID)
             }
 
             if (delete){

+ 20 - 8
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -67,6 +67,7 @@ import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.HeatModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.MotorDirections
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.WorkModes
+import com.kuyuntech.cofarcooking.device.sdk.devmode.core.Knead
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.core.DevInfo
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevCommonEvent
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevStatusEvent
@@ -963,13 +964,11 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             //显示对应模式UI
             if (this == ModesType.WIGHT.name || this == ModesType.SM_WIGHT.name) {
                 CofarSDK.recordConfig()
-
                 //称重模式
                 viewModel.changeStep(CookSettingType.WEIGHT)
                 //CofarSDK.changeMode(baseMode)
             } else if (this == ModesType.TURBO.name || this == ModesType.SM_TURBO.name) {
                 CofarSDK.recordConfig()
-
                 viewModel.changeStep(CookSettingType.TURBO)
                 CofarSDK.changeMode(baseMode)
             } else {
@@ -1208,7 +1207,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                         ModesType.TURBO.name -> {
                             CofarSDK.stop(false)
                         }
+                        ModesType.SM_WIGHT.name -> {
+                            CofarSDK.stop(false)
+                            CofarSDK.startWeight()
+                        }
 
+                        ModesType.SM_TURBO.name -> {
+                            CofarSDK.stop(false)
+                        }
                         else -> {
                             userChanging = false
                             CofarSDK.startRunning(viewModel.modeType)
@@ -1803,6 +1809,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             clCookSpeed.updateChangeValue(currentMotorGer.toString())
             speedRingView.setRange(minMotorGear, maxMotorGear)
             speedRingView.setCanTouch(isMotorGearChange)
+            speedRingText.text = currentMotorGer.toString()
+
             if (!userChanging || focusUpdate) {
                 speedRingView.updateProgress(currentMotorGer)
                 speedRingText.text = currentMotorGer.toString()
@@ -1865,7 +1873,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         //当前用户正在修改不更新按钮状态
         if (userChanging) return
         //切碎功能隐藏按钮
-        if (viewModel.modeType == ModesType.TURBO.name) {
+        if (viewModel.modeType == ModesType.TURBO.name||viewModel.modeType == ModesType.SM_TURBO.name) {
             binding.apply {
                 btnStart.visibility = View.GONE
                 btnResume.visibility = View.GONE
@@ -1877,7 +1885,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             return
         }
 
-        if (viewModel.modeType == ModesType.WIGHT.name) {
+        if (viewModel.modeType == ModesType.WIGHT.name||viewModel.modeType == ModesType.SM_WIGHT.name) {
             binding.apply {
                 btnStart.visibility = View.GONE
                 btnResume.visibility = View.GONE
@@ -1885,6 +1893,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 btnStop.visibility = View.GONE
                 btnCancel.visibility = View.GONE
                 btnConfirm.visibility = View.GONE
+
             }
             return
         }
@@ -1934,7 +1943,12 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                     if (viewModel.modeType == ModesType.CITRUS_JUICER.name){
                         binding.ivTurbo.visibility = View.GONE
                     }else{
-                        ivTurbo.visibility = View.VISIBLE
+                        if (isModelNum == "5067"&&viewModel.modeType == ModesType.SM_WIGHT.name){
+                            ivWeight.visibility = View.GONE
+                            ivTurbo.visibility = View.GONE
+                        }else{
+                            ivTurbo.visibility = View.VISIBLE
+                        }
                     }
                     visibilityEgg(View.VISIBLE)
                     btnStop.visibility = View.INVISIBLE
@@ -2002,8 +2016,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 showMsgDialog(resources.getString(com.develop.common.R.string.dev_remove_orange_parts))
                 return
             }
-
-
             if (CofarSDK.devInfo().potStatus.toInt() == 1) {
                 showErrMsgDialog("mei_fang_guo_yi_chan")
             } else if (CofarSDK.devInfo().potStatus.toInt() == 0 && CofarSDK.devInfo().potCloverStatus.toInt() == 1) {
@@ -2170,7 +2182,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
      */
     private fun backClick() {
         if (modeChange) {
-            if (modeType == ModesType.TURBO.name) { //TURBO未停止之前不能退出
+            if (modeType == ModesType.TURBO.name||modeType == ModesType.SM_TURBO.name) { //TURBO未停止之前不能退出
                 CofarSDK.stop(false)
                 if (DevStatus.STOP != CofarSDK.devInfo().status.toByte()) {
                     return

+ 0 - 1
BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookDetailActivity.kt

@@ -104,7 +104,6 @@ class CookDetailActivity : CommonBVMActivity<ActivityCookDetailBinding, CookDeta
         is062 = isBrand062()
         is011 = isBrand011A()
         isResetZero = CofarSDK.devInfo().resetZero.toInt()
-        Log.e("TAG cookDetail", "number:$recipeNumber")
         initView()
         initData()
         initListener()

+ 5 - 0
BusinessStep/src/main/java/com/develop/step/ui/recipes_detail/CookEvaluateActivity.kt

@@ -149,6 +149,11 @@ class CookEvaluateActivity : CommonBindingActivity<ActivityCookEvaluateBinding>(
     }
 
     private fun selectStar(count: Int) {
+        if (!binding.tvOk.isEnabled){
+            binding.tvOk.background = resources.getDrawable(R.drawable.bg_evaluate_button)
+            binding.tvOk.isEnabled = true
+        }
+
         for (index in starViews.indices) {
             starViews[index].isSelected = index + 1 <= count
         }

+ 2 - 1
BusinessStep/src/main/res/layout/activity_cook_evaluate.xml

@@ -121,7 +121,8 @@
         android:id="@+id/tv_ok"
         android:layout_width="@dimen/convert_160px"
         android:layout_height="@dimen/convert_98px"
-        android:background="@drawable/bg_evaluate_button"
+        android:background="@drawable/bg_evaluate_button_false"
+        android:enabled="false"
         android:gravity="center"
         android:textColor="#fff"
         android:text="@string/ok"

+ 31 - 3
app/build.gradle

@@ -1,5 +1,10 @@
 import java.text.SimpleDateFormat
 
+
+def getCurrentTime() {
+    return new Date().time
+}
+
 plugins {
     id 'com.android.application'
     id 'org.jetbrains.kotlin.android'
@@ -8,12 +13,13 @@ plugins {
 }
 
 
+
 ext {
 
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
-    brandCode="000A"
-//    brandCode = "010F"
+//    brandCode="010D"
+    brandCode = "000A"
     model = "1039"
 
 }
@@ -239,9 +245,22 @@ android {
             buildConfigField("String", "brandCode", "\"010F\"")
             //appCode 1.01 指向bug修复,2.01指向功能变更
             buildConfigField("String", "appCode", "\"1.01\"")
+        }
 
+        brand010DUpdate {
+            dimension "platform"
+            applicationId "com.develop.foodcooking"
+            buildConfigField("String", "UpdatePlatform", "\"night\"")
+            resValue("string", "app_theme", "@style/Splash010DTheme")
+            buildConfigField("String", "model", "\"1039\"")
+            buildConfigField("String", "brandCode", "\"010D\"")
+            //appCode 1.01 指向bug修复,2.01指向功能变更
+            buildConfigField("String", "appCode", "\"1.01\"")
+            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
         }
 
+
+
         brand030A {
             dimension "platform"
             applicationId "com.develop.foodcooking"
@@ -391,7 +410,7 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
-
+//
              resValue("string", "app_theme", "@style/SplashTheme")
             buildConfigField("String", "UpdatePlatform", "\"normal\"")
             buildConfigField("String", "model", "\"1039\"")
@@ -477,6 +496,15 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
+//            buildConfigField("String", "UpdatePlatform", "\"night\"")
+//            resValue("string", "app_theme", "@style/Splash010DTheme")
+//            buildConfigField("String", "model", "\"1039\"")
+//            buildConfigField("String", "brandCode", "\"010D\"")
+//            //appCode 1.01 指向bug修复,2.01指向功能变更
+//            buildConfigField("String", "appCode", "\"1.01\"")
+//            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
+
+
 
         }
     }

+ 3 - 0
app/src/main/java/com/develop/foodcooking/FoodCookingApp.kt

@@ -98,6 +98,9 @@ class FoodCookingApp : BaseApp() {
         setIsBrand054A(BuildConfig.UpdatePlatform.equals("054A"))
         setIsBrand011A(is011)
         setIsBrand062(is062)
+        if (BuildConfig.brandCode.contains("010")){
+            MMkvUtils.save("appTime", BuildConfig.time)
+        }
 
 
         if (is062) {

BIN
libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar