diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java index 6dbe870d..f3c043f5 100644 --- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java +++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java @@ -411,6 +411,8 @@ public class ConfigName { add(new Res_PLCADDRESS("自动清洗", "-------------", 0, 0)); add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); + add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); + add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); @@ -720,6 +722,8 @@ public class ConfigName { add(new Res_PLCADDRESS("自动清洗", "-------------", 0, 0)); add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); + add(new Res_PLCADDRESS("加热时间", "VW248", 1, 1)); + add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); add(new Res_PLCADDRESS("自动清洗完成", "M0.6", 1, 1)); diff --git a/app/src/main/java/com/bonait/bnframework/common/helper/InputFilterMinMax.java b/app/src/main/java/com/bonait/bnframework/common/helper/InputFilterMinMax.java new file mode 100644 index 00000000..55e5712d --- /dev/null +++ b/app/src/main/java/com/bonait/bnframework/common/helper/InputFilterMinMax.java @@ -0,0 +1,32 @@ +package com.bonait.bnframework.common.helper; + +import android.text.InputFilter; +import android.text.Spanned; + +public class InputFilterMinMax implements InputFilter { + private int min, max; + + public InputFilterMinMax(int min, int max) { + this.min = min; + this.max = max; + } + + public InputFilterMinMax(String min, String max) { + this.min = Integer.parseInt(min); + this.max = Integer.parseInt(max); + } + + @Override + public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { + try { + int input = Integer.parseInt(dest.toString() + source.toString()); + if (isInRange(min, max, input)) + return null; + } catch (NumberFormatException nfe) { } + return ""; + } + + private boolean isInRange(int a, int b, int c) { + return b > a ? c >= a && c <= b : c >= b && c <= a; + } +} diff --git a/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java b/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java index b33c6d54..d1328c9a 100644 --- a/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java +++ b/app/src/main/java/com/bonait/bnframework/common/utils/UpdateAppUtils.java @@ -94,15 +94,15 @@ public class UpdateAppUtils { if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) { mode.productCode="1679307017135329280"; - mode.moduleCode="ncapp"; - mode.serverCode="1680767784879656960"; - mode.branchCode="1679307481578999809"; + mode.moduleCode="newncapp"; + mode.serverCode="1680767784879656960";//服务器 + mode.branchCode="1712279450412756993"; }else { mode.productCode="1679307017135329280"; - mode.moduleCode="twbt"; - mode.serverCode="1680767784879656960"; - mode.branchCode="1679309003247325185"; + mode.moduleCode="newtwbt"; + mode.serverCode="1680767784879656960";//服务器 + mode.branchCode="1712279534630187009"; } //调味吧台 diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java index 75fa0c86..0d681626 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java @@ -5,6 +5,7 @@ import android.content.Context; import android.content.ContextWrapper; import android.os.Handler; import android.os.Message; +import android.text.InputFilter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -24,6 +25,7 @@ import com.bonait.bnframework.common.constant.DataBus; import com.bonait.bnframework.common.db.res.SilosLsjyMode; import com.bonait.bnframework.common.db.res.wdszMode; import com.bonait.bnframework.common.helper.I.IWriteCallBack; +import com.bonait.bnframework.common.helper.InputFilterMinMax; import com.bonait.bnframework.common.utils.ToastUtils; import com.suke.widget.SwitchButton; @@ -59,6 +61,14 @@ public class wdsz_adapter extends RecyclerView.Adapter myViewHolder.name.setText(goodsMake.name+""); myViewHolder.edittext_sx.setText(goodsMake.tempup+""); + if(goodsMake.name.equals("水池温度")) + { + myViewHolder.edittext_sx.setFilters(new InputFilter[]{ new InputFilterMinMax("0", "45")}); + } else if (goodsMake.name.equals("果糖左温度")) { + myViewHolder.edittext_sx.setFilters(new InputFilter[]{ new InputFilterMinMax("0", "60")}); + }else if (goodsMake.name.equals("果糖右温度")) { + myViewHolder.edittext_sx.setFilters(new InputFilter[]{ new InputFilterMinMax("0", "60")}); + } myViewHolder.temp.setText(goodsMake.temp+""); myViewHolder.control_switch.setChecked(goodsMake.autoheat); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java index 61583c0b..8d0e3302 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/zdqxchid_adapter.java @@ -81,7 +81,7 @@ public class zdqxchid_adapter extends RecyclerView.Adapter + + + + - - - -