diff --git a/.idea/other.xml b/.idea/other.xml
index 104e542e..b45a6e02 100644
--- a/.idea/other.xml
+++ b/.idea/other.xml
@@ -14,6 +14,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 4a254f62..dce49e72 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -67,6 +67,7 @@ android {
jni.srcDirs = []//禁止gradle 自动编译,使用已经编译好的So库
jniLibs.srcDirs = ['libs']//指向要使用的库文件//的路径,前边的是自己项目的,后边的是第三方的so 'src/main/jniLibs',
res.srcDirs = [
+ 'src/main/res/layout/svg',
'src/main/res/layout/dialog',
'src/main/res/layout/datatab',
'src/main/res/layout/item',
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 5786716d..38747548 100644
--- a/app/src/main/java/com/bonait/bnframework/business/MainInit.java
+++ b/app/src/main/java/com/bonait/bnframework/business/MainInit.java
@@ -220,8 +220,8 @@ public class MainInit {
}
- if(QueryDB.GetProcessALL().isEmpty() || PreferenceUtils.getInt("PlcInit",4)!=5){
- PreferenceUtils.setInt("PlcInit",5);
+ if(QueryDB.GetProcessALL().isEmpty() || PreferenceUtils.getInt("PlcInit",5)!=6){
+ PreferenceUtils.setInt("PlcInit",6);
ConfigData.getInstance().RevertPLCProcess();
}
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 31a0d030..56ec9674 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
@@ -776,31 +776,6 @@ public class ConfigName {
add(new ProcessT("出菜", Arrays.asList("等待(秒)","描述")));
add(new ProcessT("清洗", Arrays.asList("清洗方式","抽水量","清洗时间(秒)","等待(秒)","描述")));
}};
- /**
- * 烤箱工序模型
- */
- public List Process_烤箱 = new ArrayList() {{
- add(new ProcessT("放入烤盘", Arrays.asList("烤盘位置")));
- add(new ProcessT("烤箱设置", Arrays.asList("烤箱工作模式","烤箱温度(°C)", "等待时间")));
- add(new ProcessT("取出烤盘", Arrays.asList("等待时间")));
- }};
-
- /**
- * 小炒工序模型
- */
- public List Process_桌面小炒 = new ArrayList() {{
- add(new ProcessT("加热", Arrays.asList("加热档位","加热控制", "延迟(秒)")));
- add(new ProcessT("液体料", new ArrayList<>()));
- add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置","烹饪(秒)")));
- add(new ProcessT("升降", Arrays.asList("升降控制", "延迟(秒)")));
- add(new ProcessT("单向搅拌", Arrays.asList("搅拌档位","搅拌控制", "方向选择","延迟(秒)")));
- add(new ProcessT("双向搅拌", Arrays.asList("搅拌档位","搅拌控制", "正转时间","反转时间","延迟(秒)")));
- add(new ProcessT("打散搅拌", Arrays.asList("打散时间(秒)")));
- add(new ProcessT("勾芡", Arrays.asList("重量(克)")));
- add(new ProcessT("加水", Arrays.asList("重量(克)")));
- add(new ProcessT("延迟", Arrays.asList("延迟(秒)")));
- add(new ProcessT("出菜", Arrays.asList("等待(秒)")));
- }};
/**
* 根据名称获取变量
@@ -809,40 +784,6 @@ public class ConfigName {
* @return
*/
public String GetProcessTypeVal(String item) {
-// String data = "";
-// if (item.equals("搅拌动作")) {
-// data = "正转反转、一直正转、一直反转";
-// } else if (item.equals("位置动作")) {
-// data = "原点位、出餐启动、倒菜位、抽料位、清洗位、炒菜位1、炒菜位2、炒菜位3";
-// } else if (item.equals("投料动作")) {
-// //data = "投出抖动三次、投出等待三秒、直接投出、手动投料";
-// data = "投出等待三秒、直接投出、手动投料";
-// } else if (item.equals("主料位置")) {
-// data = "1号位、2号位、3号位、4号位、5号位";
-// } else if (item.equals("正转速度") || item.equals("反转速度") || item.equals("转动速度") || item.equals("搅拌速度")) {
-// data = "停止、最低、低速、中速、高速、最高、极高";
-// } else if (item.equals("加热功率") || item.equals("热锅功率")) {
-// data = "停止、一档、二档、三档、四档、五档、六档、七档、八档";
-// }
-// return data;
-
-// String data = "";
-// if (item.equals("加热控制")) {
-// data = "启动加热、停止加热";
-// } else if (item.equals("主料位置")) {
-// data = "1号位、2号位、3号位、4号位、5号位、6号位";
-// } else if (item.equals("升降控制") ) {
-// data = "上升、下降";
-// } else if (item.equals("搅拌控制") ) {
-// data = "启动搅拌、停止搅拌";
-// } else if (item.equals("方向选择") ) {
-// data = "正转、反转";
-// }else if(item.equals("加热档位")){
-// data = "0档、1档、2档、3档、4档、5档、6档、7档、8档、9档、10档";
-// }else if(item.equals("搅拌档位")){
-// data = "0档、1档、2档、3档、4档、5档";
-// }
-
String data = "";
switch (item) {
case "搅拌动作":
@@ -854,18 +795,18 @@ public class ConfigName {
case "炒制位置":
data = "炒菜位高、炒菜位低、原点位";
break;
- case "投料动作":
- //data = "投出抖动三次、投出等待三秒、直接投出、手动投料";
- data = "投出等待三秒、直接投出、手动投料";
- break;
+// case "投料动作":
+// //data = "投出抖动三次、投出等待三秒、直接投出、手动投料";
+// data = "投出等待三秒、直接投出、手动投料";
+// break;
case "清洗方式":
data = "一般清洗、深度清洗";
break;
case "主料位置":
- data = "Z1、Z2、Z3、Z4、Z5、Z6";
+ data = "1号位、2号位";
break;
case "辅料位置":
- data = "F1、F2、F3、F4、F5、F6";
+ data = "F1、F2、F3、F4、F5、F6、F7、F8";
break;
case "正转速度":
case "反转速度":
@@ -877,15 +818,6 @@ public class ConfigName {
case "热锅功率":
data = "停止、一档、二档、三档、四档、五档、六档、七档、八档";
break;
- case "烤盘位置":
- data = "K1、K2";
- break;
- case "烤箱工作模式":
- data = "关闭、蒸、烤、蒸烤、其他";
- break;
-// case "烤箱温度":
-// data = "0档0°C、1档50°C、2档100°C、3档150°C、4档200°C";
-// break;
}
return data;
diff --git a/app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java b/app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java
index 208b6e98..3dcb5604 100644
--- a/app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java
+++ b/app/src/main/java/com/bonait/bnframework/common/glide/GlideUtil.java
@@ -95,6 +95,35 @@ public class GlideUtil {
.into(imageView);
}
+ public static void showImageById(Context context, ImageView imageView,int placeId) {
+ if (context == null) {
+ return;
+ }
+
+ GlideApp.with(context)
+ .load(placeId)
+ .addListener(new RequestListener() {
+ @Override
+ public boolean onLoadFailed(@Nullable GlideException e, Object model,
+ Target target, boolean isFirstResource) {
+ return false;
+ }
+
+ @Override
+ public boolean onResourceReady(Drawable resource, Object model,
+ Target target, DataSource dataSource,
+ boolean isFirstResource) {
+ if (imageView == null) {
+ return false;
+ }
+ imageView.setBackground(null);
+ return false;
+ }
+ })
+ .transition(DrawableTransitionOptions.withCrossFade(CROSS_FADE_DURATION))
+ .into(imageView);
+ }
+
public static void showImageWithRadius(Context context, String path, ImageView imageView,int placeId,int radius) {
if (context == null||path==null) {
return;
diff --git a/app/src/main/java/com/bonait/bnframework/newui/activity/CookingHActivity.java b/app/src/main/java/com/bonait/bnframework/newui/activity/CookingHActivity.java
index 88dec0be..74033f3b 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/activity/CookingHActivity.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/activity/CookingHActivity.java
@@ -20,6 +20,8 @@ import com.bonait.bnframework.databinding.ActivityCookHBinding;
import com.bonait.bnframework.modbus.ModbusCenter;
import com.bonait.bnframework.modbus.Wok1ModbusTcpServer;
import com.bonait.bnframework.modbus.Wok2ModbusTcpServer;
+import com.bonait.bnframework.modbus.Wok3ModbusTcpServer;
+import com.bonait.bnframework.modbus.Wok4ModbusTcpServer;
import com.bonait.bnframework.newui.dialog.control.WokControlDialog;
import com.bonait.bnframework.newui.fragment.cooking.CookingFragment;
import com.bonait.bnframework.newui.widget.NewToastUtil;
@@ -28,41 +30,45 @@ import com.bumptech.glide.Glide;
public class CookingHActivity extends BaseActivity {
private final String TAG = "CookingHActivity==>";
private ActivityCookHBinding viewBinding;
- private CookingFragment cookingFragment1,cookingFragment2;
+ private CookingFragment cookingFragment1,cookingFragment2,cookingFragment3,cookingFragment4;
private boolean isWorking = false;
private Handler handler = new Handler(Looper.getMainLooper()){
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
- BPA_ORDER_DETAIL detail0 = OrderDetailUtil.getByMaking(1);
- BPA_ORDER_DETAIL detail1 = OrderDetailUtil.getByMaking(2);
+// BPA_ORDER_DETAIL detail0 = OrderDetailUtil.getByMaking(1);
+// BPA_ORDER_DETAIL detail1 = OrderDetailUtil.getByMaking(2);
if(msg.what==1){
- boolean working = false;
- if(detail0!=null){
- if(detail0.status==1){
- working = true;
- }
- }
- if(detail1!=null){
- if(detail1.status==1){
- working = true;
- }
- }
- if(working){
- if(!isWorking){
- Glide.with(viewBinding.deviceImage.getContext()).asGif().load(R.mipmap.ic_device_working).into(viewBinding.deviceImage);
- }
- }else{
- if(isWorking){
- Glide.with(viewBinding.deviceImage.getContext()).asBitmap().load(R.mipmap.ic_device_working).into(viewBinding.deviceImage);
- }
- }
- isWorking = working;
+// boolean working = false;
+// if(detail0!=null){
+// if(detail0.status==1){
+// working = true;
+// }
+// }
+// if(detail1!=null){
+// if(detail1.status==1){
+// working = true;
+// }
+// }
+// if(working){
+// if(!isWorking){
+// Glide.with(viewBinding.deviceImage.getContext()).asGif().load(R.mipmap.ic_device_working).into(viewBinding.deviceImage);
+// }
+// }else{
+// if(isWorking){
+// Glide.with(viewBinding.deviceImage.getContext()).asBitmap().load(R.mipmap.ic_device_working).into(viewBinding.deviceImage);
+// }
+// }
+// isWorking = working;
Object val_wd = ModbusCenter.getWokListingValue(1,"当前锅底温度");
Object val_wd2 = ModbusCenter.getWokListingValue(2,"当前锅底温度");
- String s = "1号炒锅温度:" + val_wd + "°C " + "2号炒锅温度:" + val_wd2 + "°C";
- viewBinding.wokWendu.setText(s);
+ Object val_wd3 = ModbusCenter.getWokListingValue(3,"当前锅底温度");
+ Object val_wd4 = ModbusCenter.getWokListingValue(4,"当前锅底温度");
+ viewBinding.tvTitle1.setText("1号炒锅温度:" + val_wd + "°C");
+ viewBinding.tvTitle2.setText("2号炒锅温度:" + val_wd2 + "°C");
+ viewBinding.tvTitle3.setText("3号炒锅温度:" + val_wd3 + "°C");
+ viewBinding.tvTitle4.setText("4号炒锅温度:" + val_wd4 + "°C");
}
if(handler.hasMessages(1)){
handler.removeMessages(1);
@@ -86,12 +92,20 @@ public class CookingHActivity extends BaseActivity {
cookingFragment1 = CookingFragment.newInstance(1);
cookingFragment2 = CookingFragment.newInstance(2);
+ cookingFragment3 = CookingFragment.newInstance(3);
+ cookingFragment4 = CookingFragment.newInstance(4);
getSupportFragmentManager().beginTransaction()
.replace(R.id.fragment1, cookingFragment1)
.commit();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fragment2, cookingFragment2)
.commit();
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment3, cookingFragment3)
+ .commit();
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment4, cookingFragment4)
+ .commit();
viewBinding.btnWok1.setOnClickListener(v->{
showWokDialog(1);
@@ -99,6 +113,12 @@ public class CookingHActivity extends BaseActivity {
viewBinding.btnWok2.setOnClickListener(v->{
showWokDialog(2);
});
+ viewBinding.btnWok3.setOnClickListener(v->{
+ showWokDialog(3);
+ });
+ viewBinding.btnWok4.setOnClickListener(v->{
+ showWokDialog(4);
+ });
}
/**
@@ -106,16 +126,33 @@ public class CookingHActivity extends BaseActivity {
* @param num 几号炒锅
*/
private void showWokDialog(int num){
- if(num==2){
- if(!Wok2ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
- NewToastUtil.getInstance().showToastError("2号炒锅设备未连接!");
- return;
- }
- }else {
- if(!Wok1ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
- NewToastUtil.getInstance().showToastError("1号炒锅设备未连接!");
+ switch (num){
+ case 1:
+ if(!Wok1ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
+ NewToastUtil.getInstance().showToastError("1号炒锅设备未连接!");
+ return;
+ }
+ break;
+ case 2:
+ if(!Wok2ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
+ NewToastUtil.getInstance().showToastError("2号炒锅设备未连接!");
+ return;
+ }
+ break;
+ case 3:
+ if(!Wok3ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
+ NewToastUtil.getInstance().showToastError("3号炒锅设备未连接!");
+ return;
+ }
+ break;
+ case 4:
+ if(!Wok4ModbusTcpServer.get().plcIsConnect &&!ConfigName.TEST){
+ NewToastUtil.getInstance().showToastError("4号炒锅设备未连接!");
+ return;
+ }
+ break;
+ default:
return;
- }
}
WokControlDialog dialog = new WokControlDialog();
@@ -152,6 +189,8 @@ public class CookingHActivity extends BaseActivity {
super.onDestroy();
cookingFragment1.onDestroy();
cookingFragment2.onDestroy();
+ cookingFragment3.onDestroy();
+ cookingFragment4.onDestroy();
LogUtils.d("CookingHActivity onDestroy");
if(handler!=null){
handler.removeCallbacksAndMessages(null);
diff --git a/app/src/main/java/com/bonait/bnframework/newui/activity/DiyProcessHActivity.java b/app/src/main/java/com/bonait/bnframework/newui/activity/DiyProcessHActivity.java
index 38fd33e3..3f92fc13 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/activity/DiyProcessHActivity.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/activity/DiyProcessHActivity.java
@@ -97,10 +97,7 @@ public class DiyProcessHActivity extends BaseActivity {
* 导入已有属性组合弹窗
*/
private AttributeSelectDialog attributeSelectDialog;
- /**
- * 0炒菜 1烤箱
- */
- private int type = 0;
+
private WaiteProgressDialog progressDialog;
private Handler handler = new Handler(Looper.getMainLooper()){
@Override
@@ -168,11 +165,9 @@ public class DiyProcessHActivity extends BaseActivity {
}
BPA_GOODS_CLASSIFY classify = GoodsClassifyDBUtil.getById(goods.goodClassifyid);
assert classify != null;
- type = classify.type;
-// viewBinding.tvType.setText(type==0?"炒菜":"烤菜");
- viewBinding.btnInsertDown.setVisibility(type==0?View.VISIBLE:View.GONE);
- viewBinding.btnInsertUp.setVisibility(type==0?View.VISIBLE:View.GONE);
- viewBinding.tvOvenTip.setVisibility(type==1?View.VISIBLE:View.GONE);
+
+ viewBinding.btnInsertDown.setVisibility(View.VISIBLE);
+ viewBinding.btnInsertUp.setVisibility(View.VISIBLE);
initProcessModel();
initStepAdapter();
initBtnListener();
@@ -255,26 +250,6 @@ public class DiyProcessHActivity extends BaseActivity {
*/
private void initBtnListener(){
viewBinding.btnAdd.setOnClickListener(view -> {
- if(type == 1){
- BPA_GOODS_PROCESS_DETAIL goodsrecipe = getSelectItemFromValue();
- boolean exit = false;
- for(BPA_GOODS_PROCESS_DETAIL bean : processDetails){
- if(bean.processname.equals("放入烤盘")){
- exit = true;
- }
- }
- if(exit){
- if(goodsrecipe.processname.equals("放入烤盘")) {
- NewToastUtil.getInstance().showToastError("一个菜品只能放一次烤盘");
- return;
- }
- }else {
- if(!goodsrecipe.processname.equals("放入烤盘")) {
- NewToastUtil.getInstance().showToastError("请先添加[放入烤盘]步骤");
- return;
- }
- }
- }
addProcess();
});
viewBinding.btnUpdate.setOnClickListener(view -> {
@@ -361,7 +336,7 @@ public class DiyProcessHActivity extends BaseActivity {
*/
private void initProcessModel(){
//初始化工序
- ArrayList data = QueryDB.GetProcessALLByType(type);
+ ArrayList data = QueryDB.GetProcessALLByType(0);
int i = 0;
String id = "";
for (BPA_PROCESS item : data) {
@@ -437,7 +412,20 @@ public class DiyProcessHActivity extends BaseActivity {
private void addProcess(){
RecordManager.getInstance().addLogRecord("角色操作日志", subAttributeGroupName+"-添加工序");
BPA_GOODS_PROCESS_DETAIL goodsrecipe = getSelectItemFromValue();
+
if (goodsrecipe != null) {
+ if(goodsrecipe.processname.contains("主料")){
+ int mainFoodNum = 0;
+ for(BPA_GOODS_PROCESS_DETAIL bean :processDetails){
+ if(bean.processname.contains("主料")){
+ mainFoodNum++;
+ }
+ }
+ if(mainFoodNum>=2){
+ NewToastUtil.getInstance().showToastError("最多只能添加两个主料");
+ return;
+ }
+ }
processDetails.add(goodsrecipe);
stepAdapter.setCurrentPosition(processDetails.size()-1);
stepAdapter.notifyDataSetChanged();
@@ -454,6 +442,18 @@ public class DiyProcessHActivity extends BaseActivity {
RecordManager.getInstance().addLogRecord("角色操作日志", subAttributeGroupName+"-向上插入工序");
BPA_GOODS_PROCESS_DETAIL goodSrecipeUp = getSelectItemFromValue();
if (goodSrecipeUp != null) {
+ if(goodSrecipeUp.processname.contains("主料")){
+ int mainFoodNum = 0;
+ for(BPA_GOODS_PROCESS_DETAIL bean :processDetails){
+ if(bean.processname.contains("主料")){
+ mainFoodNum++;
+ }
+ }
+ if(mainFoodNum>=2){
+ NewToastUtil.getInstance().showToastError("最多只能添加两个主料");
+ return;
+ }
+ }
int index_update = stepAdapter.getCurrentPosition();
if (index_update >= 0 && processDetails.size()>0) {
BPA_GOODS_PROCESS_DETAIL processDetail = goodSrecipeUp;
@@ -474,6 +474,19 @@ public class DiyProcessHActivity extends BaseActivity {
RecordManager.getInstance().addLogRecord("角色操作日志", subAttributeGroupName+"-向下插入工序");
BPA_GOODS_PROCESS_DETAIL goodSrecipeUp = getSelectItemFromValue();
if (goodSrecipeUp != null) {
+ if(goodSrecipeUp.processname.contains("主料")){
+ int mainFoodNum = 0;
+ for(BPA_GOODS_PROCESS_DETAIL bean :processDetails){
+ if(bean.processname.contains("主料")){
+ mainFoodNum++;
+ }
+ }
+ if(mainFoodNum>=2){
+ NewToastUtil.getInstance().showToastError("最多只能添加两个主料");
+ return;
+ }
+ }
+
int index_update = stepAdapter.getCurrentPosition();
if (index_update >= 0 && !processDetails.isEmpty()) {
BPA_GOODS_PROCESS_DETAIL processDetail = goodSrecipeUp;
@@ -611,7 +624,7 @@ public class DiyProcessHActivity extends BaseActivity {
*/
private void initTopBar(){
viewBinding.topbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.topbj1));
- viewBinding.titleBar.setText(type==0?"炒菜-编辑工序":"烤菜-编辑工序");
+ viewBinding.titleBar.setText("编辑工序");
viewBinding.back.setOnClickListener(v->{
goBack();
});
diff --git a/app/src/main/java/com/bonait/bnframework/newui/activity/MainHActivity.java b/app/src/main/java/com/bonait/bnframework/newui/activity/MainHActivity.java
index e93bc47d..097c35d3 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/activity/MainHActivity.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/activity/MainHActivity.java
@@ -271,6 +271,8 @@ public class MainHActivity extends BaseActivity {
public void onPageSelected(int position) {
tabAdapter.setCurrentPosition(position);
tabAdapter.notifyDataSetChanged();
+
+ viewBinding.rlOrderTip.setVisibility(position==1?View.GONE:View.VISIBLE);
}
@Override
diff --git a/app/src/main/java/com/bonait/bnframework/newui/adapter/goods/CloudGoodsAdapter.java b/app/src/main/java/com/bonait/bnframework/newui/adapter/goods/CloudGoodsAdapter.java
index ba538de7..ae4ead75 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/adapter/goods/CloudGoodsAdapter.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/adapter/goods/CloudGoodsAdapter.java
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;
+import com.bonait.bnframework.common.glide.GlideUtil;
import com.bonait.bnframework.newui.adapter.base.BaseAdapter;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.util.GoodsDBUtil;
@@ -53,7 +54,8 @@ public abstract class CloudGoodsAdapter extends BaseAdapter0?false:true);
diff --git a/app/src/main/java/com/bonait/bnframework/newui/dialog/check/FoodInfoDialog.java b/app/src/main/java/com/bonait/bnframework/newui/dialog/check/FoodInfoDialog.java
index d6457141..78712828 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/dialog/check/FoodInfoDialog.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/dialog/check/FoodInfoDialog.java
@@ -117,6 +117,8 @@ public class FoodInfoDialog extends DialogFragment {
viewBinding.top4.setText("");
viewBinding.top5.setText("");
viewBinding.top6.setText("");
+ viewBinding.top7.setText("");
+ viewBinding.top8.setText("");
viewBinding.mainFood1.setText("");
viewBinding.mainFood2.setText("");
viewBinding.mainFood3.setText("");
@@ -374,6 +376,7 @@ public class FoodInfoDialog extends DialogFragment {
orderDetail.mainPosition = mainPosition;
OrderDetailUtil.update(orderDetail);
freshView();
+ xCom.dismissX();
}
};
diff --git a/app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java b/app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java
index b5853f5a..f4d370d2 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java
@@ -188,7 +188,7 @@ public class RobotControlDialog extends DialogFragment {
private HashMap data = new HashMap<>();;
@SuppressLint("NonConstantResourceId")
@OnClick({R.id.top1, R.id.top2,R.id.top3,R.id.top4,R.id.top5,R.id.top6,R.id.top7,R.id.top8,
- R.id.right1,R.id.right2,R.id.right3,R.id.right4,R.id.right5,R.id.right6,R.id.btn_pen_back,
+ R.id.mainFood1,R.id.mainFood2,R.id.mainFood3,R.id.mainFood4,R.id.mainFood5,R.id.mainFood6,R.id.btn_pen_back,
R.id.btn_wok_chucai,R.id.btn_wok_chucai2,R.id.btn_wok_chucai3,R.id.btn_wok_chucai4,R.id.btn_weihu,R.id.btn_weihu_finish})
public void onViewClicked(View view) {
RecordManager.getInstance().addLogRecord("角色操作日志","用户点击按钮-机器人调试");
@@ -331,22 +331,22 @@ public class RobotControlDialog extends DialogFragment {
data.put("烹饪(秒)","0");
robotPutMaterial();
break;
- case R.id.right1:
+ case R.id.mainFood1:
robotPutFood(1);
break;
- case R.id.right2:
+ case R.id.mainFood2:
robotPutFood(2);
break;
- case R.id.right3:
+ case R.id.mainFood3:
robotPutFood(3);
break;
- case R.id.right4:
+ case R.id.mainFood4:
robotPutFood(4);
break;
- case R.id.right5:
+ case R.id.mainFood5:
robotPutFood(5);
break;
- case R.id.right6:
+ case R.id.mainFood6:
robotPutFood(6);
break;
case R.id.btn_wok_chucai:
diff --git a/app/src/main/java/com/bonait/bnframework/newui/fragment/goods/LocalGoodsHFragment.java b/app/src/main/java/com/bonait/bnframework/newui/fragment/goods/LocalGoodsHFragment.java
index 928a08d5..330b7834 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/fragment/goods/LocalGoodsHFragment.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/fragment/goods/LocalGoodsHFragment.java
@@ -11,12 +11,10 @@ import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
-
import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.RecordManager;
@@ -45,11 +43,9 @@ import com.bonait.bnframework.newui.adapter.classify.GoodClassifyAdapter;
import com.bonait.bnframework.newui.adapter.goods.LocalGoodsAdapter;
import com.bonait.bnframework.newui.dialog.add.AddGoodsDialog;
import com.bonait.bnframework.newui.widget.NewToastUtil;
-
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
-
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -194,7 +190,7 @@ public class LocalGoodsHFragment extends BaseFragment {
NewToastUtil.getInstance().showToast("点击过快!");
return;
}
- AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认上传全部分类、全部商品、全部工序信息?上传将会覆盖云端商品,请确认", new AlertDialogUtils.DialogClickListener() {
+ AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认上传选中商品?上传将会覆盖云端商品,请确认", new AlertDialogUtils.DialogClickListener() {
@Override
public void onConfirm() {
List res = goodsList.stream().filter(p->p.status==1).collect(Collectors.toList());
@@ -222,7 +218,7 @@ public class LocalGoodsHFragment extends BaseFragment {
});
viewBinding.deleteAll.setVisibility(isEdit?View.VISIBLE:View.GONE);
viewBinding.deleteAll.setOnClickListener(v->{
- AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除全部分类、全部商品、全部工序信息?", new AlertDialogUtils.DialogClickListener() {
+ AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "请确认", "确认删除选中商品?", new AlertDialogUtils.DialogClickListener() {
@Override
public void onConfirm() {
if(ConfigName.getInstance().isFastClick()){
diff --git a/app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java b/app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java
index b16c3b64..629c97be 100644
--- a/app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java
+++ b/app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java
@@ -247,13 +247,13 @@ public class HomeOrderFragment extends BaseFragment{
if(foodInfoList.isEmpty()){
return;
}
- FoodPosSetDialog foodInfoDialog = new FoodPosSetDialog();
+ FoodPosSetDialog dialog = new FoodPosSetDialog();
Bundle bundle = new Bundle();
bundle.putString("orderId",orderDetail.id);
- foodInfoDialog.setArguments(bundle);
+ dialog.setArguments(bundle);
if(getActivity()!=null){
- foodInfoDialog.show(getActivity().getSupportFragmentManager(),"修改配料位置");
- foodInfoDialog.setListener(new MyClickListener() {
+ dialog.show(getActivity().getSupportFragmentManager(),"修改配料位置");
+ dialog.setListener(new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
orderDetails1.clear();
@@ -279,12 +279,13 @@ public class HomeOrderFragment extends BaseFragment{
*/
private void changeRightBtn(){
if(foodInfoList.isEmpty()){
+ viewBinding.orderName.setText("");
viewBinding.btnLocationInfo.setVisibility(View.GONE);
viewBinding.btnFoodPosSet.setVisibility(View.GONE);
}else {
- if(orderDetail.status==1){
+ if(orderDetail.status!=0){
viewBinding.btnFoodPosSet.setVisibility(View.GONE);
- viewBinding.btnLocationInfo.setVisibility(View.VISIBLE);
+ viewBinding.btnLocationInfo.setVisibility(View.GONE);
}else {
viewBinding.btnFoodPosSet.setVisibility(View.VISIBLE);
viewBinding.btnLocationInfo.setVisibility(View.VISIBLE);
@@ -298,7 +299,10 @@ public class HomeOrderFragment extends BaseFragment{
* @param deviceNum 设备号
* @return
*/
- private boolean checkPosition(int mainPosition,int deviceNum){
+ private boolean validationPosition(BPA_ORDER_DETAIL orderDetail,int mainPosition,int deviceNum){
+ if(orderDetail.status != 0){
+ return true;
+ }
if(mainPosition==0|deviceNum==0){
NewToastUtil.getInstance().showToastError("请先绑定位置信息");
AlertDialogUtils.showTipDialog((AppCompatActivity) getActivity(), "警告",
@@ -354,7 +358,7 @@ public class HomeOrderFragment extends BaseFragment{
* @param position
*/
private void orderMaking(List mData,int position){
- if(!checkPosition(mData.get(position).mainPosition,mData.get(position).type)){
+ if(!validationPosition(mData.get(position),mData.get(position).mainPosition,mData.get(position).type)){
return;
}
if(ConfigName.getInstance().isFastClick()){
@@ -522,6 +526,7 @@ public class HomeOrderFragment extends BaseFragment{
orderDetails1.remove(position);
orderAdapter1.setCurrentPosition(-1);
foodInfoList.clear();
+ changeRightBtn();
foodInfoAdapter.notifyDataSetChanged();
orderAdapter1.notifyDataSetChanged();
NewToastUtil.getInstance().showToast("删除成功");
@@ -595,6 +600,7 @@ public class HomeOrderFragment extends BaseFragment{
foodInfoList.clear();
foodInfoAdapter.notifyDataSetChanged();
orderAdapter1.notifyDataSetChanged();
+ changeRightBtn();
startMakingThread(bean);
jumpToCook(bean);
break;
@@ -612,6 +618,7 @@ public class HomeOrderFragment extends BaseFragment{
orderDetails1.remove(position);
orderAdapter1.setCurrentPosition(-1);
foodInfoList.clear();
+ changeRightBtn();
foodInfoAdapter.notifyDataSetChanged();
orderAdapter1.notifyDataSetChanged();
break;
@@ -632,6 +639,7 @@ public class HomeOrderFragment extends BaseFragment{
orderDetails1.addAll(OrderDetailUtil.getAll());
orderAdapter1.setCurrentPosition(-1);
foodInfoList.clear();
+ changeRightBtn();
foodInfoAdapter.notifyDataSetChanged();
orderAdapter1.notifyDataSetChanged();
viewBinding.recyclerInfo.smoothScrollToPosition(0);
diff --git a/app/src/main/res/drawable/all_edit_btn.xml b/app/src/main/res/drawable/all_edit_btn.xml
index a88429b5..e0b1d89a 100644
--- a/app/src/main/res/drawable/all_edit_btn.xml
+++ b/app/src/main/res/drawable/all_edit_btn.xml
@@ -5,14 +5,14 @@
-
-
+
-
-
+
@@ -20,7 +20,7 @@
-
-
+
diff --git a/app/src/main/res/layout/item/layout/item_file_picker_show.xml b/app/src/main/res/layout/item/layout/item_file_picker_show.xml
index a151a002..fe7fb73d 100644
--- a/app/src/main/res/layout/item/layout/item_file_picker_show.xml
+++ b/app/src/main/res/layout/item/layout/item_file_picker_show.xml
@@ -67,7 +67,7 @@
android:id="@+id/iv_delete"
android:layout_width="40dp"
android:layout_height="40dp"
- android:src="@mipmap/file_picker_delete"
+ android:src="@drawable/ic_delete_x"
/>
diff --git a/app/src/main/res/layout/new/layout/activity_cook_h.xml b/app/src/main/res/layout/new/layout/activity_cook_h.xml
index 8f85ae93..19bddc35 100644
--- a/app/src/main/res/layout/new/layout/activity_cook_h.xml
+++ b/app/src/main/res/layout/new/layout/activity_cook_h.xml
@@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
- android:background="@color/main_color2"
+ android:background="@color/white"
>
@@ -15,19 +15,22 @@
android:layout_marginTop="@dimen/home_tab_height"
android:layout_height="match_parent">
-
+
+
+
+
+
+
+
-
-
+ android:orientation="vertical"
+ android:layout_gravity="end"
+ android:layout_height="match_parent">
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/new/layout/activity_edit_process_h.xml b/app/src/main/res/layout/new/layout/activity_edit_process_h.xml
index 205ad50b..9198143e 100644
--- a/app/src/main/res/layout/new/layout/activity_edit_process_h.xml
+++ b/app/src/main/res/layout/new/layout/activity_edit_process_h.xml
@@ -10,7 +10,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -327,7 +299,7 @@
+ android:layout_height="70dp" >
+ android:layout_height="700dp">
@@ -324,6 +324,7 @@
android:layout_height="match_parent"
android:background="@drawable/bg_box_click"
android:gravity="center_horizontal"
+ android:layout_marginStart="35dp"
android:maxLines="2"
android:ellipsize="end"
android:textSize="28sp"
@@ -334,9 +335,9 @@
android:id="@+id/top5"
android:layout_width="100dp"
android:layout_height="match_parent"
- android:layout_marginStart="25dp"
android:background="@drawable/bg_box_click"
android:gravity="center_horizontal"
+ android:layout_marginStart="25dp"
android:textSize="28sp"
android:maxLines="2"
android:ellipsize="end"
@@ -399,14 +400,14 @@
+ android:layout_height="700dp">
+ android:layout_height="700dp">
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/app/src/main/res/layout/new/layout/dialog_food_pos_set.xml b/app/src/main/res/layout/new/layout/dialog_food_pos_set.xml
index 329c8d79..4016d5ca 100644
--- a/app/src/main/res/layout/new/layout/dialog_food_pos_set.xml
+++ b/app/src/main/res/layout/new/layout/dialog_food_pos_set.xml
@@ -24,16 +24,18 @@
app:layout_constraintLeft_toLeftOf="parent"
/>
-
+ android:layout_marginStart="300dp"
+ android:layout_height="300dp"/>
+ android:layout_height="300dp"/>
+ android:layout_marginStart="1250dp"
+ android:layout_height="300dp"/>
+ android:layout_height="200dp"/>
diff --git a/app/src/main/res/layout/new/layout/fragment_home_mains.xml b/app/src/main/res/layout/new/layout/fragment_home_mains.xml
index 195e7266..1fd3c056 100644
--- a/app/src/main/res/layout/new/layout/fragment_home_mains.xml
+++ b/app/src/main/res/layout/new/layout/fragment_home_mains.xml
@@ -44,7 +44,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
- android:src="@mipmap/home_classify_ic" />
+ android:src="@drawable/home_classify_ic" />
+ android:src="@drawable/home_caiping_ic" />
+ android:src="@drawable/ic_silos" />
+ android:src="@drawable/home_log_ic" />
+ android:src="@drawable/home_order_ic" />
+ android:src="@drawable/home_setting_ic" />
+ android:src="@drawable/ic_update" />
+ android:src="@drawable/ic_logout2" />
+ android:textSize="32sp" />
+ android:textSize="32sp" />
diff --git a/app/src/main/res/layout/new/layout/layout_huojia.xml b/app/src/main/res/layout/new/layout/layout_huojia.xml
index f3810f31..686d34f0 100644
--- a/app/src/main/res/layout/new/layout/layout_huojia.xml
+++ b/app/src/main/res/layout/new/layout/layout_huojia.xml
@@ -5,21 +5,21 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
@@ -63,7 +63,7 @@
android:id="@+id/top5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="30dp"
+ android:layout_marginStart="40dp"
android:gravity="center"
android:textSize="28sp"
android:maxLines="2"
@@ -75,7 +75,7 @@
android:id="@+id/top4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="30dp"
+ android:layout_marginStart="40dp"
android:gravity="center"
android:textSize="28sp"
android:maxLines="2"
@@ -87,7 +87,7 @@
android:id="@+id/top3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="30dp"
+ android:layout_marginStart="40dp"
android:gravity="center"
android:textSize="28sp"
android:maxLines="2"
@@ -99,7 +99,7 @@
android:id="@+id/top2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="30dp"
+ android:layout_marginStart="40dp"
android:gravity="center"
android:textSize="28sp"
android:maxLines="2"
@@ -111,7 +111,7 @@
android:id="@+id/top1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="30dp"
+ android:layout_marginStart="45dp"
android:gravity="center"
android:textSize="28sp"
android:maxLines="2"
@@ -123,89 +123,94 @@
diff --git a/app/src/main/res/layout/new/layout/layout_huojia2.xml b/app/src/main/res/layout/new/layout/layout_huojia2.xml
new file mode 100644
index 00000000..6745439c
--- /dev/null
+++ b/app/src/main/res/layout/new/layout/layout_huojia2.xml
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/new/layout/layout_root_tip2.xml b/app/src/main/res/layout/new/layout/layout_root_tip2.xml
index b258f985..93ebd7bd 100644
--- a/app/src/main/res/layout/new/layout/layout_root_tip2.xml
+++ b/app/src/main/res/layout/new/layout/layout_root_tip2.xml
@@ -35,67 +35,95 @@
app:layout_constraintLeft_toLeftOf="parent"
/>
-
+ android:layout_marginTop="200dp"
+ android:layout_marginStart="50dp"
+ android:layout_height="550dp">
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/home_classify_ic.xml b/app/src/main/res/layout/svg/drawable/home_classify_ic.xml
new file mode 100644
index 00000000..7607a9ce
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/home_classify_ic.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/home_log_ic.xml b/app/src/main/res/layout/svg/drawable/home_log_ic.xml
new file mode 100644
index 00000000..fbae9da4
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/home_log_ic.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/home_order_ic.xml b/app/src/main/res/layout/svg/drawable/home_order_ic.xml
new file mode 100644
index 00000000..2a2df805
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/home_order_ic.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/home_setting_ic.xml b/app/src/main/res/layout/svg/drawable/home_setting_ic.xml
new file mode 100644
index 00000000..af05754a
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/home_setting_ic.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/ic_delete_x.xml b/app/src/main/res/layout/svg/drawable/ic_delete_x.xml
new file mode 100644
index 00000000..81eb25f1
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/ic_delete_x.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/ic_logout2.xml b/app/src/main/res/layout/svg/drawable/ic_logout2.xml
new file mode 100644
index 00000000..31d4d41e
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/ic_logout2.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/ic_silos.xml b/app/src/main/res/layout/svg/drawable/ic_silos.xml
new file mode 100644
index 00000000..6f6b5a70
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/ic_silos.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/layout/svg/drawable/ic_update.xml b/app/src/main/res/layout/svg/drawable/ic_update.xml
new file mode 100644
index 00000000..8705e92c
--- /dev/null
+++ b/app/src/main/res/layout/svg/drawable/ic_update.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_chucan_box.jpg b/app/src/main/res/mipmap-xxxhdpi/ic_chucan_box.jpg
new file mode 100644
index 00000000..3090183f
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_chucan_box.jpg differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_devices_all2.png b/app/src/main/res/mipmap-xxxhdpi/ic_devices_all2.png
index b735279e..cf129e49 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_devices_all2.png and b/app/src/main/res/mipmap-xxxhdpi/ic_devices_all2.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.jpg b/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.jpg
new file mode 100644
index 00000000..7871436d
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.jpg differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.png b/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.png
deleted file mode 100644
index c28a6d62..00000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_huojia_box.png and /dev/null differ