From ca003243d7fb3c8c538a9cb36ffe4ad42f1a4405 Mon Sep 17 00:00:00 2001 From: fyf <11621@LAPTOP-04QQU0AO> Date: Mon, 4 Sep 2023 15:34:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E4=BF=AE=E6=94=B977777?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ExecuteTheRecipe.java | 4 ++ .../bonait/bnframework/business/MainInit.java | 51 +++++++++++++++++++ .../modules/home/fragment/Home1Fragment.java | 16 +++--- .../fragment/mode/QDListSectionAdapter.java | 9 ++++ 4 files changed, 72 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index 05a90363..2d5c96f1 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -427,6 +427,10 @@ public class ExecuteTheRecipe { if(ishand) { + if(ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本") || ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) + { + ExecuteTheRecipe.BottomClick("平移-去1号位"); + } String name = ""; String zl = ""; int val = 0; diff --git a/app/src/main/java/com/bonait/bnframework/business/MainInit.java b/app/src/main/java/com/bonait/bnframework/business/MainInit.java index da31c2e5..89c58b01 100644 --- a/app/src/main/java/com/bonait/bnframework/business/MainInit.java +++ b/app/src/main/java/com/bonait/bnframework/business/MainInit.java @@ -104,6 +104,8 @@ public class MainInit { // NetworkUtils.connetEnternet(app); //text(); + + //cx_cp(); } @@ -126,6 +128,55 @@ public class MainInit { } } } + + + + + + } + + /** + * 根据第一个配方重新写配方 + */ + public static void cx_cp() + { + ArrayList goods= QueryDB.GetGoodsALL(); + //38f0a737-2476-40d8-a7d8-28ff7796e9d2 鱼香肉丝 + //b414cef3-a315-4841-954a-abee17af02d6 重游发财 + + + String ydrs="dc2136ad-ee32-48c1-8077-afbdb80af9a3"; + ArrayList ydrs_pf=QueryDB.GetGoodsSrecipeID(ydrs); + + + String hc="b414cef3-a315-4841-954a-abee17af02d6"; + ArrayList hc_pf=QueryDB.GetGoodsSrecipeID(hc); + + ArrayList rec= QueryDB.GetGoodsSrecipeALL(); + for (BPA_GOODSRECIPE pf:rec) + { + QueryDB.DeleteGoodsSrecipe(pf); + } + for (BPA_GOODS good:goods) + { + if(good.sort<=30) + { + for (BPA_GOODSRECIPE m:ydrs_pf) + { + m.id=java.util.UUID.randomUUID().toString(); + m.goodsID=good.id; + QueryDB.AddGoodsSrecipe(m); + } + }else + { + for (BPA_GOODSRECIPE m:hc_pf) + { + m.id=java.util.UUID.randomUUID().toString(); + m.goodsID=good.id; + QueryDB.AddGoodsSrecipe(m); + } + } + } } /** * 初始化数据库数据(默认数据) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java index f7b2ea41..1802d764 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java @@ -351,10 +351,10 @@ public class Home1Fragment extends BaseFragment { @Override public void clickListener(View v, Object data) { boolean status = !(boolean) data; - if (!IsMake(true)) - { - return; - } +// if (!IsMake(true)) +// { +// return; +// } choushui_control.SetStatus(status); ToastUtils.info("点击按钮:炒锅抽水" + status); ExecuteTheRecipe.WritePLC("炒锅抽水", status, null); @@ -370,10 +370,10 @@ public class Home1Fragment extends BaseFragment { @Override public void clickListener(View v, Object data) { boolean status = !(boolean) data; - if (!IsMake(true)) - { - return; - } +// if (!IsMake(true)) +// { +// return; +// } fangshui_control.SetStatus(status); ToastUtils.info("点击按钮:炒锅放水" + status); ExecuteTheRecipe.WritePLC("炒锅放水", status, null); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java index 7513016d..e5491381 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java @@ -15,6 +15,8 @@ import com.bonait.bnframework.business.ConfigData; import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.MessageName; import com.bonait.bnframework.common.db.QueryDB; +import com.bonait.bnframework.common.db.mode.BPA_GOODS; +import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; import com.bonait.bnframework.common.helper.I.MyClickListener; import com.bonait.bnframework.common.image.MyBitmapUtils; import com.bonait.bnframework.common.message.MessageManager; @@ -25,6 +27,8 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; import com.qmuiteam.qmui.widget.section.QMUIDefaultStickySectionAdapter; import com.qmuiteam.qmui.widget.section.QMUISection; +import java.util.ArrayList; + public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { private TextView tvTag ,tvNote,tvAccount,Sc_text,delete_text; @@ -113,6 +117,11 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { ConfigData.getInstance().GetGoodProcess(holder.itemView.getContext(),id,true); }else { +// ArrayList goods= QueryDB.GetGoodsALL(); +// for (BPA_GOODS good:goods) +// { +// ConfigData.getInstance().UploadGoods(holder.itemView.getContext(),good.id); +// } ConfigData.getInstance().UploadGoods(holder.itemView.getContext(),id); } }