Browse Source

出餐盆检测添加提示

炒锅机器人_一拖多
liup 2 months ago
parent
commit
89b5adada7
8 changed files with 30 additions and 18 deletions
  1. +3
    -3
      app/release/output-metadata.json
  2. +3
    -4
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  3. +1
    -1
      app/src/main/java/com/bonait/bnframework/newui/activity/LoginHActivity.java
  4. +2
    -2
      app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java
  5. +2
    -2
      app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog2.java
  6. +2
    -2
      app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog3.java
  7. +15
    -2
      app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java
  8. +2
    -2
      build.gradle

+ 3
- 3
app/release/output-metadata.json View File

@@ -11,9 +11,9 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 104,
"versionName": "1.0.4",
"outputFile": "robot-xiaochao-v104-202410111604-unsigned-release.apk"
"versionCode": 105,
"versionName": "1.0.5",
"outputFile": "robot-xiaochao-v105-202410281311-unsigned-release.apk"
}
],
"elementType": "File"

+ 3
- 4
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -441,7 +441,7 @@ public class ExecuteTheRecipe {
break;
case "出菜":
ConfigName.RobotIsWorking[deviceNum-1] = true;
Write_PLC_MainOutdishes(deviceNum,formulation);
Write_PLC_MainOutdishes(deviceNum,formulation,0);
ConfigName.RobotIsWorking[deviceNum-1] = false;
break;
case "清洗":
@@ -1143,7 +1143,7 @@ public class ExecuteTheRecipe {
*
* @param data
*/
public static void Write_PLC_MainOutdishes(int deviceNum,HashMap<String, String> data) {
public static void Write_PLC_MainOutdishes(int deviceNum,HashMap<String, String> data,int index) {
try {
showlog("准备出菜!");
//先延迟
@@ -1164,7 +1164,6 @@ public class ExecuteTheRecipe {
Wait_Robot_No_Working(deviceNum);//等待机器人空闲

boolean isCheck = false;
int index = 0;
long b = System.currentTimeMillis();
while (!isCheck && !ConfigName.IsForcedEnd[deviceNum-1]){
if ((System.currentTimeMillis() - b) > 1000 * (whileTime * 3)) {
@@ -1210,7 +1209,7 @@ public class ExecuteTheRecipe {
}
}
if(!isCheck){
NewToastUtil.getInstance().showToast("请放置出餐空盆!");
NewToastUtil.getInstance().showToast("请检测出餐盆是否放置正确!");
}
}
Thread.sleep(100);


+ 1
- 1
app/src/main/java/com/bonait/bnframework/newui/activity/LoginHActivity.java View File

@@ -293,6 +293,6 @@ public class LoginHActivity extends BaseActivity {
@Override
protected void onResume() {
super.onResume();
UpdateAppUtils.updateApp(this,false);
// UpdateAppUtils.updateApp(this,false);
}
}

+ 2
- 2
app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog.java View File

@@ -450,7 +450,7 @@ public class RobotControlDialog extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());
@@ -474,7 +474,7 @@ public class RobotControlDialog extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());


+ 2
- 2
app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog2.java View File

@@ -450,7 +450,7 @@ public class RobotControlDialog2 extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());
@@ -474,7 +474,7 @@ public class RobotControlDialog2 extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());


+ 2
- 2
app/src/main/java/com/bonait/bnframework/newui/dialog/control/RobotControlDialog3.java View File

@@ -450,7 +450,7 @@ public class RobotControlDialog3 extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(1,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());
@@ -475,7 +475,7 @@ public class RobotControlDialog3 extends DialogFragment {
@Override
public void run() {
try {
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data);
ExecuteTheRecipe.Write_PLC_MainOutdishes(2,data,0);
WaitProcessUtil.getInstance().dismiss();
}catch (Exception e){
LogUtils.d("异常信息:"+e.getMessage());


+ 15
- 2
app/src/main/java/com/bonait/bnframework/newui/fragment/main/HomeOrderFragment.java View File

@@ -266,9 +266,22 @@ public class HomeOrderFragment extends BaseFragment {
boolean pan3 = (Boolean) ModbusCenter.ReadPlc(1,"3#空盆库位检测有无");
if(!pan1&&!pan2&&!pan3){
NewToastUtil.getInstance().showToastError("请至少放一个出餐空盆!");
AlertDialogUtils.showCancelAndConfirmDialog((AppCompatActivity) getActivity(), R.layout.dialog_order, (layoutView, xCom) -> {
DialogOrderBinding binding = DialogOrderBinding.bind(layoutView);
binding.title.setText("出菜盆检测警告");
binding.edit.setText("未检测到出菜盆,请至少放一个出餐空盆!或检测盆是否放置正确");
binding.cancel.setVisibility(View.GONE);
binding.submit.setText("确认");
binding.submit.setOnClickListener(v->{
xCom.dismissX();
});
binding.cancel.setOnClickListener(v->{
xCom.dismissX();
});
});
return;
}

}
String error = checkPosition(mData.get(position));
makingOrderDialog( mData.get(position),error.isEmpty()?0:-1,name,error,position);
return;
@@ -405,7 +418,7 @@ public class HomeOrderFragment extends BaseFragment {
switch (status){
case -1:
if(error.contains("未放置")){
binding.submit.setText("确认已放盆,开始制作");
binding.submit.setText("确认已放盆,开始制作");
}else {
binding.submit.setText("确认已补料,开始制作");
}


+ 2
- 2
build.gradle View File

@@ -35,8 +35,8 @@ task clean(type: Delete) {

ext { // 统一版本入口
//App版本号
versionCode = 104
versionName = "1.0.4"
versionCode = 105
versionName = "1.0.5"

// 支持Android版本
buildToolsVersion = "33.0.0"


Loading…
Cancel
Save