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 81c66a72..f94d80ce 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 @@ -74,10 +74,10 @@ public class UpdateAppUtils { private static void doPost(final Context context) { VersionMode mode=new VersionMode(); //大炒 - mode.productCode="1679306986915368960"; - mode.moduleCode="dcdjbbd"; - mode.serverCode="1680766359592243200"; - mode.branchCode="1679308856555737089"; +// mode.productCode="1679306986915368960"; +// mode.moduleCode="dcdjbbd"; +// mode.serverCode="1680766359592243200"; +// mode.branchCode="1679308856555737089"; //小炒网络v版本 // mode.productCode="1679306986915368960"; @@ -86,10 +86,10 @@ public class UpdateAppUtils { // mode.branchCode="1679307408505835521"; //小炒单击 -// mode.productCode="1679306986915368960"; -// mode.moduleCode="xcdjbbd"; -// mode.serverCode="1680766359592243200"; -// mode.branchCode="1679308917918404609"; + mode.productCode="1679306986915368960"; + mode.moduleCode="xcdjbbd"; + mode.serverCode="1680766359592243200"; + mode.branchCode="1679308917918404609"; String msg= new Json().objectToJson(VersionMode.class, mode); String getNewVersionUrl =ConfigName.getInstance().UpdateVersion; MediaType JSON = MediaType.parse("application/json; charset=utf-8"); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java index 424b31cd..85a16f62 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java @@ -51,7 +51,7 @@ public class BottomNavigationMainActivity extends BaseActivity { ButterKnife.bind(this); mNavigateTabBar.onRestoreInstanceState(savedInstanceState); mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.gongneng, R.mipmap.gongneng_selected, "功能")); - mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.dingdan, R.mipmap.dingdan_selected, "订单")); + mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.dingdan, R.mipmap.dingdan_selected, "成品")); mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.dingdan, R.mipmap.dingdan_selected, "手动控制")); mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(0, 0, "")); mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.dingdan, R.mipmap.dingdan_selected, "IO监控")); @@ -168,7 +168,7 @@ public class BottomNavigationMainActivity extends BaseActivity { case "功能": _postion = 0; break; - case "订单": + case "成品": _postion = 1; break; case "手动控制": diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java index 62fc6e48..9edb745d 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java @@ -64,7 +64,7 @@ public class sp_adapter extends RecyclerView.Adapter { @Override public void onClick(View view) { //按钮点击 - String title = "选择菜品操作提示!"; + String title = "选择配方操作提示!"; String message = "请问客官确定要选择["+goods.get(position).name+"],开始制作吗?"; AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { @Override diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java index 65db3a75..7d204228 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java @@ -435,17 +435,15 @@ public class MakeGoodFragment extends BaseFragment { SetVisibility(0); break; case R.id.startbutton: - if (ExecuteTheRecipe.IsStart.getValue()) { //强制结束 AlertDialogUtils.showDialog("强制停止会提前结束任务,请问是否停止?",AlertDialogButton.OKCancel,(s)->{ if(s) ExecuteTheRecipe.SetForcedEnd(); //强制结束 }); - } else { //开始制作 if (!IsMake(true)) return; - AlertDialogUtils.showDialog(context, "提示", "是否开始制作商品?", (s)->{ + AlertDialogUtils.showDialog(context, "提示", "是否开始任务?", (s)->{ if(s){ ExecuteTheRecipe.showlog("开始任务"); ExecuteTheRecipe.StopForcedEnd(); @@ -453,9 +451,7 @@ public class MakeGoodFragment extends BaseFragment { } }); } - break; - case R.id.button_出料: if (!ExecuteTheRecipe.getDeviceData.SystemStartStopStatusNotify.getValue()) { AlertDialogUtils.showDialog(context, "提示", "系统未启动,请启动后重试!"); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java index 63d2bd70..c94beacf 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java @@ -208,11 +208,11 @@ public class CpActivity extends BaseActivity { ArrayList good = QueryDB.GetGoodsALL(); List Bendi_id = new ArrayList<>(); - SectionHeader header_bdcp = new SectionHeader("本地菜谱", "", ""); + SectionHeader header_bdcp = new SectionHeader("本地配方", "", ""); ArrayList contents_bdcp = new ArrayList<>(); - SectionHeader header_sccp = new SectionHeader("收藏菜谱", "", ""); - ArrayList contents_sccp = new ArrayList<>(); +// SectionHeader header_sccp = new SectionHeader("收藏配方", "", ""); +// ArrayList contents_sccp = new ArrayList<>(); for (BPA_GOODS item : good) { @@ -220,18 +220,18 @@ public class CpActivity extends BaseActivity { item.url = "未知"; } contents_bdcp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true)); - if (item.issc == 1) { - contents_sccp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true)); - } - Bendi_id.add(item.id); +// if (item.issc == 1) { +// contents_sccp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true)); +// } +// Bendi_id.add(item.id); } list.add(new QMUISection<>(header_bdcp, contents_bdcp, false)); - list.add(new QMUISection<>(header_sccp, contents_sccp, true)); +// list.add(new QMUISection<>(header_sccp, contents_sccp, true)); return list; } private void initTopBar() { - mTopBar.setTitle("菜谱管理"); + mTopBar.setTitle("配方管理"); /** * 返回按钮 */ @@ -244,7 +244,7 @@ public class CpActivity extends BaseActivity { /** * 新建商品 */ - mTopBar.addRightTextButton("新建商品", R.id.topbar).setOnClickListener(new View.OnClickListener() { + mTopBar.addRightTextButton("新建配方", R.id.topbar).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { skipToActivity(DiyActivity.class); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java index 4089cb28..3ff3fdc5 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java @@ -41,7 +41,7 @@ public class CpxzActivity extends BaseActivity { } private void initTopBar() { - mTopBar.setTitle("菜谱列表"); + mTopBar.setTitle("配方列表"); mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java index e471e8ae..2b3e5d5c 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java @@ -440,17 +440,17 @@ public class DiyActivity extends BaseActivity { if (name.isEmpty()) { - ToastUtils.info("菜谱名称不能为空!"); + ToastUtils.info("配方名称不能为空!"); return; } else { boolean isSucess = QueryDB.GetGoodsIs(name); if (isSucess) { - ToastUtils.info("菜谱名称已存在!"); + ToastUtils.info("配方名称已存在!"); return; } //按钮点击 - String title = "生成菜谱操作提示!"; - String message = "请问客官确定要生成[" + name + "]菜谱吗?"; + String title = "生成配方操作提示!"; + String message = "请问客官确定要生成[" + name + "]配方吗?"; AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { @@ -465,7 +465,7 @@ public class DiyActivity extends BaseActivity { good.status = 1; good.sort = goods.size() + 1; good.maketime = sc; - good.issc = check.isChecked() ? 1 : 0; + good.issc = 0;//check.isChecked() ? 1 : 0; good.url = imageUrl; QueryDB.AddGoods(good); for (int k = 0; k < bpa_goodsrecipes.size(); k++) { @@ -474,7 +474,7 @@ public class DiyActivity extends BaseActivity { item.sort = k + 1; QueryDB.AddGoodsSrecipe(item); } - ToastUtils.info("菜谱生成成功!"); + ToastUtils.info("配方生成成功!"); MessageManager.getInstance().sendMessage(MessageName.ScGood, "Good"); dialog.dismiss(); } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java index b04b11f3..818e5abe 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java @@ -66,8 +66,8 @@ public class DiyUpdateActivity extends BaseActivity { ImageView cpfm;//菜谱封面 @BindView(R.id.zzsc) EditText zzsc;//制作时长 - @BindView(R.id.check) - CheckBox check;//默认收藏 +// @BindView(R.id.check) +// CheckBox check;//默认收藏 // @BindView(R.id.Banner_Main) // Banner Banner_Main;//轮播图 //用于存放获取的图片 @@ -277,7 +277,7 @@ public class DiyUpdateActivity extends BaseActivity { bpa_goodsrecipes.add(item); } edittext.setText(good.name); - check.setChecked(good.issc==1); + //check.setChecked(good.issc==1); zzsc.setText(good.maketime+""); gxbz_adapter.notifyDataSetChanged();//刷新商品配方 new MyBitmapUtils().disPlay(cpfm,good.url); @@ -396,7 +396,7 @@ public class DiyUpdateActivity extends BaseActivity { } } private void initTopBar() { - mTopBar.setTitle("菜谱信息修改"); + mTopBar.setTitle("配方信息修改"); mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -521,19 +521,19 @@ public class DiyUpdateActivity extends BaseActivity { String name1=edittext.getText().toString(); if(name1.isEmpty()) { - ToastUtils.info("菜谱名称不能为空!"); + ToastUtils.info("配方名称不能为空!"); return; }else { boolean isSucess= QueryDB.GetGoodsIs(name1); if(isSucess) { - ToastUtils.info("菜谱名称已存在!"); + ToastUtils.info("配方名称已存在!"); return; } //按钮点击 - String title = "生成菜谱操作提示!"; - String message = "请问客官确定要生成["+name1+"]菜谱吗?"; + String title = "生成配方操作提示!"; + String message = "请问客官确定要生成["+name1+"]配方吗?"; AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { @Override public void onClick(QMUIDialog dialog, int index) { @@ -549,7 +549,7 @@ public class DiyUpdateActivity extends BaseActivity { good1.status=1; good1.sort=goods.size()+1; good1.maketime=sc; - good1.issc=check.isChecked()?1:0; + good1.issc=0;//check.isChecked()?1:0; good1.url=good.url; QueryDB.AddGoods(good1); for (int k=0;k pe=QueryDB.GetGoodsSrecipeID(good.id); @@ -610,7 +610,7 @@ public class DiyUpdateActivity extends BaseActivity { item.sort=k+1; QueryDB.AddGoodsSrecipe(item); } - ToastUtils.info("菜谱修改成功!"); + ToastUtils.info("配方修改成功!"); dialog.dismiss(); MessageManager.getInstance().sendMessage(MessageName.ScGood,"Good"); finish(); diff --git a/app/src/main/res/layout/activity_diy_update.xml b/app/src/main/res/layout/activity_diy_update.xml index 907a8b38..3a05872e 100644 --- a/app/src/main/res/layout/activity_diy_update.xml +++ b/app/src/main/res/layout/activity_diy_update.xml @@ -24,13 +24,15 @@ android:layout_height="wrap_content" android:orientation="vertical"> + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/dp_10"> + + + + android:text="配方封面" + android:textSize="@dimen/textSize" + android:textAlignment="center" /> + + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/dp_10" + android:layout_marginBottom="12dp"> + + tools:ignore="TouchTargetSizeCheck" + android:textSize="@dimen/textSize" + android:text="配方名称:" /> + android:textSize="@dimen/textSize" /> + + android:layout_height="wrap_content" + android:layout_marginBottom="12dp"> + + android:textSize="@dimen/textSize" + android:text="制作时长:" /> + - + tools:ignore="TouchTargetSizeCheck" + android:text="0" + android:textSize="@dimen/textSize" /> - - + android:layout_marginLeft="5dp" + android:textSize="@dimen/textSize" + android:text="秒" /> + + + + + + + + + + + + + + + - + + + + tools:ignore="TouchTargetSizeCheck" + android:textSize="@dimen/textSize" + android:text="步骤:" /> +