@@ -997,6 +997,7 @@ public class ConfigData { | |||||
} | } | ||||
//endregion | //endregion | ||||
} | } | ||||
@@ -296,7 +296,7 @@ public class ExecuteTheRecipe { | |||||
} catch (Exception ex) { | } catch (Exception ex) { | ||||
ToastUtils.error("PLC设备数据监听异常:" + ex.getMessage()); | ToastUtils.error("PLC设备数据监听异常:" + ex.getMessage()); | ||||
} | } | ||||
Thread.sleep(1); | |||||
Thread.sleep(50); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -510,6 +510,12 @@ public class ExecuteTheRecipe { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
public static void releaseListening(){ | |||||
ThreadManager.Get().Stop("PLC设备数据监听"); | |||||
ThreadManager.Get().Stop("PLC设备数据监听-信号检测"); | |||||
ThreadManager.Get().Stop("商品制作线程"); | |||||
} | |||||
//endregion | //endregion | ||||
//region PLC基础控制类 | //region PLC基础控制类 | ||||
@@ -20,6 +20,7 @@ import android.widget.RelativeLayout; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.business.ConfigData; | import com.bonait.bnframework.business.ConfigData; | ||||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||||
import com.bonait.bnframework.business.OrderServer; | import com.bonait.bnframework.business.OrderServer; | ||||
import com.bonait.bnframework.common.base.BaseActivity; | import com.bonait.bnframework.common.base.BaseActivity; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
@@ -140,6 +141,9 @@ public class BottomNavigationMainActivity extends BaseActivity{ | |||||
ConfigData.getInstance().ColsePLC(); | ConfigData.getInstance().ColsePLC(); | ||||
MediaPlayerHelper.getInstance().Release(); | MediaPlayerHelper.getInstance().Release(); | ||||
MQTT.get().ConnMqttBroken(false);//释放mqtt | MQTT.get().ConnMqttBroken(false);//释放mqtt | ||||
ThreadManager.Get().Stop("PLC断线重连线程"); | |||||
ThreadManager.Get().Stop("心跳服务"); | |||||
ExecuteTheRecipe.releaseListening(); | |||||
super.onDestroy(); | super.onDestroy(); | ||||
Glide.get(this).clearMemory(); | Glide.get(this).clearMemory(); | ||||
@@ -18,7 +18,7 @@ | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:orientation="horizontal"> | android:orientation="horizontal"> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_width="90dp" | |||||
android:layout_width="100dp" | |||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginBottom="35dp" | android:layout_marginBottom="35dp" | ||||
android:background="@color/white" | android:background="@color/white" | ||||
@@ -66,13 +66,14 @@ | |||||
android:id="@+id/rv_right" | android:id="@+id/rv_right" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginRight="360dp" | |||||
android:orientation="vertical" | android:orientation="vertical" | ||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_marginRight="@dimen/dp_10" | android:layout_marginRight="@dimen/dp_10" | ||||
android:layout_width="200dp" | |||||
android:layout_width="350dp" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:orientation="vertical"> | android:orientation="vertical"> | ||||
<ImageView | <ImageView | ||||
@@ -84,7 +85,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/loadgoodliebiao" | android:id="@+id/loadgoodliebiao" | ||||
android:layout_marginTop="@dimen/dp_10" | android:layout_marginTop="@dimen/dp_10" | ||||
android:layout_width="200dp" | |||||
android:layout_width="350dp" | |||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
<ScrollView | <ScrollView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -139,7 +139,7 @@ | |||||
<Button | <Button | ||||
android:id="@+id/control_switch_shoudong" | android:id="@+id/control_switch_shoudong" | ||||
android:layout_width="80dp" | android:layout_width="80dp" | ||||
android:layout_height="40dp" | |||||
android:layout_height="50dp" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:background="@drawable/silosbuttonbj" | android:background="@drawable/silosbuttonbj" | ||||
android:text="出料" | android:text="出料" | ||||
@@ -150,7 +150,7 @@ | |||||
android:layout_marginTop="@dimen/dp_10" | android:layout_marginTop="@dimen/dp_10" | ||||
android:id="@+id/control_huishou" | android:id="@+id/control_huishou" | ||||
android:layout_width="80dp" | android:layout_width="80dp" | ||||
android:layout_height="40dp" | |||||
android:layout_height="50dp" | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:background="@drawable/silosbuttonbj" | android:background="@drawable/silosbuttonbj" | ||||
android:text="回收" | android:text="回收" | ||||
@@ -10,7 +10,7 @@ | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/loading_main" | android:id="@+id/loading_main" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="70dp"> | |||||
android:layout_height="100dp"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -78,17 +78,16 @@ | |||||
<TextView | <TextView | ||||
android:id="@+id/loading_status" | android:id="@+id/loading_status" | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_marginTop="10dp" | |||||
android:layout_marginRight="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> | android:text="制作中"></TextView> | ||||
<Button | <Button | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:id="@+id/quxiaozhizuo" | 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_marginRight="10dp" | ||||
android:layout_marginBottom="5dp" | android:layout_marginBottom="5dp" | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
@@ -8,6 +8,7 @@ | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="@dimen/dp_10" | android:layout_marginTop="@dimen/dp_10" | ||||
android:layout_marginLeft="5dp" | android:layout_marginLeft="5dp" | ||||
android:layout_marginRight="10dp" | |||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||