diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index b268ef36..d1a3c1b3 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,6 +4,14 @@ diff --git a/app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java b/app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java index 5dbe32bd..b261c85a 100644 --- a/app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java +++ b/app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java @@ -47,7 +47,7 @@ public class CookTimeUtils { if(!silos.isEmpty()){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum( silos.get(0).num); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; time += valueDeal; LogUtils.d("measureCookTime name="+name+";重量="+val+";换算时间="+valueDeal); } @@ -67,6 +67,8 @@ public class CookTimeUtils { } time += val; } + }else if(value!=null && value.contains("上升")||value.contains("下降")){ + time += 10; }else if(value!=null && value.contains("(克),")){ String[] res = value.split("克"); if(res.length==2){ @@ -76,13 +78,13 @@ public class CookTimeUtils { if(item.processname.contains("加水")){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(10); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal); time += valueDeal; }else if(item.processname.contains("勾芡")){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(11); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal); time += valueDeal; } @@ -128,7 +130,7 @@ public class CookTimeUtils { if(!silos.isEmpty()){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum( silos.get(0).num); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; time += valueDeal; LogUtils.d("measureCookTime name="+name+";重量="+val+";换算时间="+valueDeal); } @@ -148,6 +150,8 @@ public class CookTimeUtils { } time += val; } + }else if(value!=null && value.contains("上升")||value.contains("下降")){ + time += 10; }else if(value!=null && value.contains("(克),")){ String[] res = value.split("克"); if(res.length==2){ @@ -157,13 +161,13 @@ public class CookTimeUtils { if(item.processname.contains("加水")){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(10); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal); time += valueDeal; }else if(item.processname.contains("勾芡")){ BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(11); int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin, - bean.outputTimeMax, bean.outputTimeMin); + bean.outputTimeMax, bean.outputTimeMin)/100; LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal); time += valueDeal; } diff --git a/app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java b/app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java index 6e52e125..26cec43e 100644 --- a/app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java +++ b/app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java @@ -24,6 +24,7 @@ import com.bonait.bnframework.R; import com.bonait.bnframework.Service.AnalogConvert; import com.bonait.bnframework.Service.ControlAdress; import com.bonait.bnframework.Service.ModbusHelper; +import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.db.QueryDB; import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; import com.bonait.bnframework.common.db.mode.BPA_SILOS; @@ -186,6 +187,9 @@ public class DeviceControlDialog extends DialogFragment { */ private void initSilos(){ viewBinding.layoutSilos.btnClose1.setOnClickListener(v->{ + if(ConfigName.getInstance().isFastClick()){ + return; + } dismiss(); }); //加水