@@ -5,6 +5,8 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.modules.home.fragment.mode.LocationStatus; | |||
import com.bonait.bnframework.modules.home.fragment.mode.MyStatus; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
@@ -359,4 +361,80 @@ public class ExecuteTheRecipe { | |||
} | |||
//endregion | |||
//region 主页按钮 | |||
/** | |||
* 点击清洗按钮 | |||
* @param data | |||
*/ | |||
public static void Write_PLC_Clean(MyStatus data) | |||
{ | |||
try | |||
{ | |||
if(data==MyStatus.Start) | |||
{ | |||
ToastUtils.info("点击启动搅拌清洗按钮"); | |||
}else if(data==MyStatus.Paused) | |||
{ | |||
ToastUtils.info("点击暂停清洗按钮"); | |||
}else if(data==MyStatus.Stop) | |||
{ | |||
ToastUtils.info("点击停止清洗按钮"); | |||
} | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
/** | |||
* 点击清洗按钮 | |||
* @param data | |||
*/ | |||
public static void Write_PLC_Location(LocationStatus data) | |||
{ | |||
try | |||
{ | |||
if(data==LocationStatus.InLocation) | |||
{ | |||
ToastUtils.info("点击炒菜位按钮"); | |||
}else if(data==LocationStatus.OutLocation) | |||
{ | |||
ToastUtils.info("点击出菜位按钮"); | |||
}else if(data==LocationStatus.PourWaterLocation) | |||
{ | |||
ToastUtils.info("点击倒水位按钮"); | |||
} | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
/** | |||
* 点击摇欠按钮 | |||
* @param data | |||
*/ | |||
public static void Write_PLC_YaoQian(MyStatus data) | |||
{ | |||
try | |||
{ | |||
if(data==MyStatus.Start) | |||
{ | |||
ToastUtils.info("点击摇浅按钮"); | |||
}else if(data==MyStatus.Stop) | |||
{ | |||
ToastUtils.info("点击停摇按钮"); | |||
} | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
} | |||
//endregion | |||
} |
@@ -35,6 +35,8 @@ import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.common.view.MyLayoutManager; | |||
import com.bonait.bnframework.modules.home.adapter.lc_adapter; | |||
import com.bonait.bnframework.modules.home.fragment.from.CpxzActivity; | |||
import com.bonait.bnframework.modules.home.fragment.mode.LocationStatus; | |||
import com.bonait.bnframework.modules.home.fragment.mode.MyStatus; | |||
import com.bonait.bnframework.modules.home.fragment.mode.huoli_control; | |||
import com.capton.colorfulprogressbar.ColorfulProgressbar; | |||
import com.orhanobut.logger.Logger; | |||
@@ -325,28 +327,28 @@ public class Home1Fragment extends BaseFragment { | |||
} | |||
break; | |||
case R.id.qdjb: | |||
ToastUtils.info("点击启动搅拌清洗按钮"); | |||
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Start); | |||
break; | |||
case R.id.ztjb: | |||
ToastUtils.info("点击暂停清洗按钮"); | |||
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Paused); | |||
break; | |||
case R.id.tzjb: | |||
ToastUtils.info("点击停止清洗按钮"); | |||
ExecuteTheRecipe.Write_PLC_Clean(MyStatus.Stop); | |||
break; | |||
case R.id.ccw: | |||
ToastUtils.info("点击炒菜位按钮"); | |||
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.InLocation); | |||
break; | |||
case R.id.chucw: | |||
ToastUtils.info("点击出菜位按钮"); | |||
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.OutLocation); | |||
break; | |||
case R.id.dsw: | |||
ToastUtils.info("点击倒水位按钮"); | |||
ExecuteTheRecipe.Write_PLC_Location(LocationStatus.PourWaterLocation); | |||
break; | |||
case R.id.yaoqian: | |||
ToastUtils.info("点击摇浅按钮"); | |||
ExecuteTheRecipe.Write_PLC_YaoQian(MyStatus.Start); | |||
break; | |||
case R.id.tingyao: | |||
ToastUtils.info("点击停摇按钮"); | |||
ExecuteTheRecipe.Write_PLC_YaoQian(MyStatus.Stop); | |||
break; | |||
} | |||
} | |||
@@ -0,0 +1,8 @@ | |||
package com.bonait.bnframework.modules.home.fragment.mode; | |||
public enum LocationStatus { | |||
InLocation, | |||
OutLocation, | |||
PourWaterLocation | |||
} |
@@ -0,0 +1,10 @@ | |||
package com.bonait.bnframework.modules.home.fragment.mode; | |||
/** | |||
* 状态 | |||
*/ | |||
public enum MyStatus { | |||
Start, | |||
Paused, | |||
Stop | |||
} |