diff --git a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java index 157e4da1..1f92607a 100644 --- a/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java +++ b/app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java @@ -388,6 +388,7 @@ public class ConfigName { //位置动作 add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); + add(new Res_PLCADDRESS("维护位", "M20.0", 0, 1)); add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); @@ -1149,7 +1150,8 @@ public class ConfigName { put("一直反转","Negative"); put("原点位","Origin"); put("出餐启动","Pour-start"); - put("倒菜位","Pour"); + put("倒菜位","Maintenance"); + put("维护位","Pour"); put("抽料位","Extract"); put("清洗位","Clean"); put("炒菜位1","Fry1"); @@ -1187,8 +1189,9 @@ public class ConfigName { put("Origin","原点位"); put("Pour-start","出餐启动"); put("Pour","倒菜位"); + put("Maintenance","维护位"); put("Extract","抽料位"); - put("Clean","清洗位"); + put("Clean-pos","清洗位"); put("Fry1","炒菜位1"); put("Fry2","炒菜位2"); put("Fry3","炒菜位3"); @@ -1303,6 +1306,8 @@ public class ConfigName { //位置动作 add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); + add(new Res_PLCADDRESS("维护位", "M20.0", 0, 1)); + add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); @@ -1589,6 +1594,7 @@ public class ConfigName { //位置动作 add(new Res_PLCADDRESS("原点位", "M11.4", 0, 1)); add(new Res_PLCADDRESS("倒菜位", "M12.7", 0, 1)); + add(new Res_PLCADDRESS("维护位", "M20.0", 0, 1)); add(new Res_PLCADDRESS("抽料位", "M11.7", 0, 1)); add(new Res_PLCADDRESS("清洗位", "M13.0", 0, 1)); add(new Res_PLCADDRESS("炒菜位1", "M12.0", 0, 1)); diff --git a/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java b/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java index 98953666..c090ace6 100644 --- a/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java +++ b/app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java @@ -80,10 +80,15 @@ public class SdCart { File file2 = new File(dbPath); if(file2.exists()){ copyDirectory(dbPath,ConfigName.getInstance().appResRoot); + }else{ + //1.复制本地文件到SD卡 +// copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath); + //2.创建数据库结构 + DBHelper.getInstance(ConfigName.getInstance().dishesCon).CreateTables(); } }else { //1.复制本地文件到SD卡 - copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath); +// copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath); //2.创建数据库结构 DBHelper.getInstance(ConfigName.getInstance().dishesCon).CreateTables(); } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java index 049ec9b2..4bfc1d93 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsPLCFragment.java @@ -28,6 +28,7 @@ import com.bonait.bnframework.common.utils.NetworkUtils; import com.bonait.bnframework.common.utils.ToastUtils; import com.bonait.bnframework.modules.home.fragment.mode.fragment_gx; import com.bonait.bnframework.modules.home.fragment.mode.fragment_plc; +import com.bonait.bnframework.ui.widget.NewToastUtil; import com.orhanobut.logger.Logger; import com.qmuiteam.qmui.widget.QMUILoadingView; import com.qmuiteam.qmui.widget.dialog.QMUIDialog; @@ -81,14 +82,16 @@ public class SystemCsPLCFragment extends BaseFragment { @Override public void run() { try { + plcview.removeAllViews(); ArrayList arrayList = QueryDB.GetPlcaddressALL(); for (BPA_PLCADDRESS item : arrayList) { fragment_plc gongxu = new fragment_plc(context, null, item); plcview.addView(gongxu); } + load_view.setVisibility(View.INVISIBLE); } catch (Exception e) { }finally { - load_view.setVisibility(View.INVISIBLE); + } } }); @@ -121,10 +124,21 @@ public class SystemCsPLCFragment extends BaseFragment { @Override public void onClick(QMUIDialog dialog, int index) { load_view.setVisibility(View.VISIBLE); - ConfigData.getInstance().RevertPLC(); - Init(); - ToastUtils.info("初始化成功!","Successful initialization!"); - dialog.dismiss(); + try{ + NewToastUtil.getInstance().showToast("正在初始化,请等待!"); + ConfigData.getInstance().RevertPLC(); +// Init(); + Activity activity = findActivity(context); + if (activity != null) { + activity.finish(); + } + NewToastUtil.getInstance().showToast("初始化成功,请重新进入!"); + }catch (Exception e){ + + }finally { + dialog.dismiss(); + } + } }); break; diff --git a/app/src/main/res/layout/fragment_cloud_goods.xml b/app/src/main/res/layout/fragment_cloud_goods.xml index ee28ceea..dc39efc8 100644 --- a/app/src/main/res/layout/fragment_cloud_goods.xml +++ b/app/src/main/res/layout/fragment_cloud_goods.xml @@ -24,7 +24,7 @@