Browse Source

777

燃气自翻炒锅
fyf 1 year ago
parent
commit
6f837bd043
8 changed files with 75 additions and 71 deletions
  1. +0
    -20
      app/release/output-metadata.json
  2. BIN
     
  3. +27
    -7
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  4. +4
    -3
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  5. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java
  6. +3
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java
  7. +4
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyMemoryActivity.java
  8. +36
    -33
      app/src/main/res/layout/activity_dishtest.xml

+ 0
- 20
app/release/output-metadata.json View File

@@ -1,20 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.bonait.bnframework",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}

BIN
View File


+ 27
- 7
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -29,7 +29,9 @@ import com.bonait.bnframework.modules.home.fragment.mode.MyStatus;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.List;
@@ -132,23 +134,23 @@ public class ExecuteTheRecipe {
if (recipe.materialType == 0)//正常物料
{
//先到达抽料位
BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
ExecuteOperationSteps(data1.processname, data1.processvalue);

ExecuteMaterialIssuance(recipe.processvalue);
} else if (recipe.materialType == 1)//工序模型
{
if (recipe.processname.equals("加水")) {
BPA_GOODSRECIPE data2 = Get位置("高", "抽料位");
BPA_GOODSRECIPE data2 = Get位置("高", "抽料位");
ExecuteOperationSteps(data2.processname, data2.processvalue);
} else if (recipe.processname.equals("主料")) {
BPA_GOODSRECIPE data3 = Get位置("高", "炒菜位1");
BPA_GOODSRECIPE data3 = Get位置("高", "炒菜位1");
ExecuteOperationSteps(data3.processname, data3.processvalue);
}
ExecuteOperationSteps(recipe.processname, recipe.processvalue);

if (recipe.processname.equals("出菜")) {
BPA_GOODSRECIPE data4 = Get位置("高", "炒菜位1");
BPA_GOODSRECIPE data4 = Get位置("高", "炒菜位1");
ExecuteOperationSteps(data4.processname, data4.processvalue);
}
}
@@ -992,7 +994,6 @@ public class ExecuteTheRecipe {
}
}).start();


ThreadManager.Get().StartLong("PLC设备数据监听", true, new IThread() {
@Override
public void Run() throws InterruptedException {
@@ -1009,15 +1010,34 @@ public class ExecuteTheRecipe {
if (ConfigName.getInstance().PlcIsConnect) {
TempControl();
ReadPLCStatus();
}

} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
Thread.sleep(100);
}

@Override
public void RunComplete() throws InterruptedException {

}
});

ThreadManager.Get().StartLong("PLC设备-心跳", true, new IThread() {
@Override
public void Run() throws InterruptedException {
try {
if (ConfigName.getInstance().PlcIsConnect) {
//心跳
WritePLC("心跳位",false,null);
WritePLC("心跳位",0,null);
Log.e("心跳", "心跳: "+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
}

} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
Thread.sleep(100);
Thread.sleep(2000);
}

@Override


+ 4
- 3
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -347,7 +347,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0));
add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0));
add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1));


//检测信号
@@ -566,7 +566,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0));
add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0));
add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1));


//检测信号
@@ -786,7 +786,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0));
add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0));
add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "VW1000", 0, 1));

//检测信号
add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0));
@@ -981,6 +981,7 @@ public class ConfigName {
add("料仓1下料");
add("料仓2下料");
add("料仓3下料");
add("料仓4下料");


add("平移-回原点");


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java View File

@@ -631,7 +631,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
new Thread(new Runnable() {
@Override
public void run() {
BPA_GOODSRECIPE data1 = Get位置("高", "炒菜位1");
BPA_GOODSRECIPE data1 = Get位置("高", "炒菜位1");
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue);

BPA_GOODSRECIPE data = Get主料(num);


+ 3
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java View File

@@ -895,7 +895,7 @@ public class DishTestActivity extends BaseActivity {
@Override
public void run() {

BPA_GOODSRECIPE data1 = Get位置("高", "炒菜位1");
BPA_GOODSRECIPE data1 = Get位置("高", "炒菜位1");
//DataBus.getInstance().bpa_goodsrecipes.add(data1);
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue);

@@ -972,7 +972,7 @@ public class DishTestActivity extends BaseActivity {
public void run() {


BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
//DataBus.getInstance().bpa_goodsrecipes.add(data1);
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue);

@@ -1021,7 +1021,7 @@ public class DishTestActivity extends BaseActivity {
new Thread(new Runnable() {
@Override
public void run() {
BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
BPA_GOODSRECIPE data1 = Get位置("高", "抽料位");
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue);
runOnUiThread(new Runnable() {
@Override


+ 4
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyMemoryActivity.java View File

@@ -356,7 +356,7 @@ public class DiyMemoryActivity extends BaseActivity {
}

//控制去炒菜位
BPA_GOODSRECIPE data1=Get位置("高","炒菜位1");
BPA_GOODSRECIPE data1=Get位置("高","炒菜位1");
DataBus.getInstance().bpa_goodsrecipes.add(data1);

BPA_GOODSRECIPE data=Get主料(num);
@@ -377,7 +377,7 @@ public class DiyMemoryActivity extends BaseActivity {

// int sd = (int) nifty_slider3.getValue();
// String sdstr= Get速度(sd);
BPA_GOODSRECIPE data=Get位置("高",name);
BPA_GOODSRECIPE data=Get位置("高",name);
DataBus.getInstance().bpa_goodsrecipes.add(data);
MakeRecipe(data);
ClikTime=time;
@@ -393,7 +393,7 @@ public class DiyMemoryActivity extends BaseActivity {
public void run() {
if (recipe.materialType == 0)//正常物料
{
BPA_GOODSRECIPE data1=Get位置("高","抽料位");
BPA_GOODSRECIPE data1=Get位置("高","抽料位");
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname,data1.processvalue);

ExecuteTheRecipe.ExecuteMaterialIssuance(recipe.processvalue);
@@ -401,7 +401,7 @@ public class DiyMemoryActivity extends BaseActivity {
{
if(recipe.processname.equals("主料"))
{
BPA_GOODSRECIPE data1=Get位置("高","炒菜位1");
BPA_GOODSRECIPE data1=Get位置("高","炒菜位1");
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname,data1.processvalue);
ExecuteTheRecipe.ExecuteOperationSteps(recipe.processname,recipe.processvalue);
}else


+ 36
- 33
app/src/main/res/layout/activity_dishtest.xml View File

@@ -6,6 +6,7 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:windowSoftInputMode="adjustResize"
tools:context=".modules.home.fragment.from.DishTestActivity">

<RelativeLayout
@@ -620,19 +621,19 @@
android:layout_height="match_parent"
android:background="@color/dialogbj"
android:clickable="true"
android:focusable="true"
android:visibility="gone">
android:focusable="true">

<RelativeLayout
<androidx.core.widget.NestedScrollView
android:layout_width="500dp"
android:layout_height="650dp"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_centerInParent="true"
android:layout_margin="50dp"
android:background="@drawable/silosbj">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="vertical">

@@ -640,13 +641,39 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="30dp"
android:layout_marginTop="10dp"
android:fontFamily="@font/fz2"
android:text="请先定义料盒信息"
android:textAlignment="center"
android:textColor="@color/topbj1"
android:textSize="30dp" />

<TextView
android:id="@+id/liaohedata_num"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="10dp"
android:text="①号料盒"
android:textAlignment="center"
android:textColor="#567722"
android:textSize="24dp" />

<EditText
android:id="@+id/liaohedata_text"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:layout_marginRight="40dp"
android:background="@drawable/input_bj1"
android:hint="请输入料盒描述"
android:inputType="textMultiLine"
android:lines="3"
android:padding="3dp"
android:textSize="19dp"
android:imeOptions="actionDone"/>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -714,31 +741,6 @@

</RelativeLayout>

<TextView
android:id="@+id/liaohedata_num"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="10dp"
android:text="①号料盒"
android:textAlignment="center"
android:textColor="#567722"
android:textSize="24dp" />

<EditText
android:id="@+id/liaohedata_text"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:layout_marginRight="40dp"
android:background="@drawable/input_bj1"
android:hint="请输入料盒描述"
android:inputType="textMultiLine"
android:lines="3"
android:padding="3dp"
android:textSize="19dp" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -761,9 +763,10 @@
android:scaleType="fitCenter"
android:src="@mipmap/huituisyb" />
</RelativeLayout>

</LinearLayout>

</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>

<!-- 不透明蒙版 执行中-->


Loading…
Cancel
Save