Browse Source

优化

调味吧台
liup 4 months ago
parent
commit
e20ca95947
7 changed files with 25 additions and 13 deletions
  1. +1
    -0
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  2. +7
    -1
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  3. +4
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java
  4. +4
    -3
      app/src/main/res/layout/fragment_make_good.xml
  5. +2
    -2
      app/src/main/res/layout/item/layout/dialog_add_silos_ck.xml
  6. +6
    -7
      app/src/main/res/layout/item/layout/loadinggood_item.xml
  7. +1
    -0
      app/src/main/res/layout/item/layout/newmakegood.xml

+ 1
- 0
app/src/main/java/com/bonait/bnframework/business/ConfigData.java View File

@@ -997,6 +997,7 @@ public class ConfigData {


}

//endregion
}


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

@@ -296,7 +296,7 @@ public class ExecuteTheRecipe {
} catch (Exception ex) {
ToastUtils.error("PLC设备数据监听异常:" + ex.getMessage());
}
Thread.sleep(1);
Thread.sleep(50);
}

@Override
@@ -510,6 +510,12 @@ public class ExecuteTheRecipe {
}
});
}

public static void releaseListening(){
ThreadManager.Get().Stop("PLC设备数据监听");
ThreadManager.Get().Stop("PLC设备数据监听-信号检测");
ThreadManager.Get().Stop("商品制作线程");
}
//endregion

//region PLC基础控制类


+ 4
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java View File

@@ -20,6 +20,7 @@ import android.widget.RelativeLayout;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.business.OrderServer;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.ConfigName;
@@ -140,6 +141,9 @@ public class BottomNavigationMainActivity extends BaseActivity{
ConfigData.getInstance().ColsePLC();
MediaPlayerHelper.getInstance().Release();
MQTT.get().ConnMqttBroken(false);//释放mqtt
ThreadManager.Get().Stop("PLC断线重连线程");
ThreadManager.Get().Stop("心跳服务");
ExecuteTheRecipe.releaseListening();
super.onDestroy();

Glide.get(this).clearMemory();


+ 4
- 3
app/src/main/res/layout/fragment_make_good.xml View File

@@ -18,7 +18,7 @@
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="90dp"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_marginBottom="35dp"
android:background="@color/white"
@@ -66,13 +66,14 @@
android:id="@+id/rv_right"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="360dp"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

<LinearLayout
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_10"
android:layout_width="200dp"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
@@ -84,7 +85,7 @@
<RelativeLayout
android:id="@+id/loadgoodliebiao"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="200dp"
android:layout_width="350dp"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"


+ 2
- 2
app/src/main/res/layout/item/layout/dialog_add_silos_ck.xml View File

@@ -139,7 +139,7 @@
<Button
android:id="@+id/control_switch_shoudong"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:background="@drawable/silosbuttonbj"
android:text="出料"
@@ -150,7 +150,7 @@
android:layout_marginTop="@dimen/dp_10"
android:id="@+id/control_huishou"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:background="@drawable/silosbuttonbj"
android:text="回收"


+ 6
- 7
app/src/main/res/layout/item/layout/loadinggood_item.xml View File

@@ -10,7 +10,7 @@
<RelativeLayout
android:id="@+id/loading_main"
android:layout_width="match_parent"
android:layout_height="70dp">
android:layout_height="100dp">

<RelativeLayout
android:layout_width="match_parent"
@@ -78,17 +78,16 @@
<TextView
android:id="@+id/loading_status"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_width="100dp"
android:layout_height="50dp"
android:text="制作中"></TextView>
<Button
android:layout_alignParentBottom="true"
android:id="@+id/quxiaozhizuo"
android:layout_width="50dp"
android:layout_height="30dp"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:layout_alignParentRight="true"


+ 1
- 0
app/src/main/res/layout/item/layout/newmakegood.xml View File

@@ -8,6 +8,7 @@
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="5dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent"


Loading…
Cancel
Save