From cfa19971c89eac32faaa8980a0bb6d90252eb64e Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 27 Dec 2023 17:23:51 +0800 Subject: [PATCH] 2 --- .../modules/home/fragment/Home4Fragment.java | 11 ++++++++++ .../home/fragment/mode/add_qupenren.java | 22 +++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java index 60aff659..4e7b9347 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java @@ -83,6 +83,17 @@ public class Home4Fragment extends BaseFragment { OpenActivity(BunkerSetupActivity.class); break; case R.id.caipinyanfa: + if (!ConfigName.getInstance().PlcIsConnect) { + ToastUtils.warning("PLC未准备就绪!!!"); + return; + } + + Object chushiover = ExecuteTheRecipe.getListingValue("初始化完成"); + //Object jiting = ExecuteTheRecipe.getListingValue("设备急停"); + if (chushiover == null || !(boolean) chushiover) { + ToastUtils.warning("设备未初始化,请先手动初始化设备!!!"); + return; + } OpenActivity(DishTestActivity.class); break; case R.id.zhuxiaodenglu: diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_qupenren.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_qupenren.java index 66fa84da..e3d0dabd 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_qupenren.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_qupenren.java @@ -146,17 +146,17 @@ public class add_qupenren extends LinearLayout { quzhizuo.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { -// if (!ConfigName.getInstance().PlcIsConnect) { -// ToastUtils.warning("PLC未准备就绪!!!"); -// return; -// } -// -// Object chushiover = ExecuteTheRecipe.getListingValue("初始化完成"); -// //Object jiting = ExecuteTheRecipe.getListingValue("设备急停"); -// if (chushiover == null || !(boolean) chushiover) { -// ToastUtils.warning("设备未初始化,请先手动初始化设备!!!"); -// return; -// } + if (!ConfigName.getInstance().PlcIsConnect) { + ToastUtils.warning("PLC未准备就绪!!!"); + return; + } + + Object chushiover = ExecuteTheRecipe.getListingValue("初始化完成"); + //Object jiting = ExecuteTheRecipe.getListingValue("设备急停"); + if (chushiover == null || !(boolean) chushiover) { + ToastUtils.warning("设备未初始化,请先手动初始化设备!!!"); + return; + } if (mListener != null) { mListener.clickListenerNew(view, 5, mode); }