Browse Source

7

燃气自翻炒锅
fyf 1 year ago
parent
commit
43db2f4adc
7 changed files with 60 additions and 23 deletions
  1. +16
    -6
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java
  2. +21
    -9
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  3. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DishTestActivity.java
  4. +10
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_message.java
  5. +3
    -1
      app/src/main/res/layout/activity_cooking.xml
  6. +3
    -1
      app/src/main/res/layout/activity_cookingsimulated.xml
  7. +6
    -4
      app/src/main/res/layout/activity_dishtest.xml

+ 16
- 6
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationNewActivity.java View File

@@ -103,6 +103,9 @@ public class BottomNavigationNewActivity extends BaseActivity {
@Override
protected void onDestroy() {
ConfigData.getInstance().ColsePLC();
IsRunThread=false;
if(makeThread!=null){makeThread=null;}
if(makeThreadDC!=null){makeThreadDC=null;}
super.onDestroy();
}

@@ -292,15 +295,20 @@ public class BottomNavigationNewActivity extends BaseActivity {
//商品
public BPA_GOODS goods = null;


public Thread makeThread=null;
public Thread makeThreadDC=null;
public boolean IsRunThread=true;

/**
* 商品制作线程
*/
public void MakeThread() {
ExecuteTheRecipe.context = this;
new Thread(new Runnable() {
makeThread=new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (IsRunThread) {
try {
if (ExecuteTheRecipe.IsStart && goods != null) {
long startTime= System.currentTimeMillis(); //起始时间
@@ -366,12 +374,13 @@ public class BottomNavigationNewActivity extends BaseActivity {
}
}
}
}).start();
});
makeThread.start();

new Thread(new Runnable() {
makeThreadDC=new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (IsRunThread) {
try {

if (ExecuteTheRecipe.IsStart && goods != null && gongxuIndex != 10000 && goodsrecipesL != null && MakeCipe != null) {
@@ -467,7 +476,8 @@ public class BottomNavigationNewActivity extends BaseActivity {
}
}
}
}).start();
});
makeThreadDC.start();
}

/**


+ 21
- 9
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java View File

@@ -530,16 +530,21 @@ public class Home1Fragment extends BaseFragment {

BPA_GOODSRECIPE MakeCipe = null;

public Thread makeThread=null;
public Thread makeThreadDC=null;
public Thread makeThreadUI=null;
public boolean IsRunThread=true;

/**
* 商品制作线程
*/
public void MakeThread() {
ExecuteTheRecipe.context = context;

new Thread(new Runnable() {
makeThread=new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (IsRunThread) {
try {

if (Status && good != null) {
@@ -603,12 +608,13 @@ public class Home1Fragment extends BaseFragment {
}
}
}
}).start();
});
makeThread.start();

new Thread(new Runnable() {
makeThreadDC=new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (IsRunThread) {
try {

if (Status && good != null && gongxuIndex != 10000 && goodsrecipesL != null && MakeCipe != null) {
@@ -704,12 +710,13 @@ public class Home1Fragment extends BaseFragment {
}
}
}
}).start();
});
makeThreadDC.start();

new Thread(new Runnable() {
makeThreadUI=new Thread(new Runnable() {
@Override
public void run() {
while (true) {
while (IsRunThread) {
try {
SxUI();
Thread.sleep(1000);
@@ -718,7 +725,8 @@ public class Home1Fragment extends BaseFragment {
}
}
}
}).start();
});
makeThreadUI.start();
}

/**
@@ -1042,6 +1050,10 @@ public class Home1Fragment extends BaseFragment {
public void onDestroy() {
super.onDestroy();
Logger.d("第一页销毁");
IsRunThread=false;
if(makeThread!=null){makeThread=null;}
if(makeThreadDC!=null){makeThreadDC=null;}
if(makeThreadUI!=null){makeThreadUI=null;}
}

/**


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

@@ -1078,7 +1078,7 @@ public class DishTestActivity extends BaseActivity {
BPA_GOODSRECIPE data = Get出菜(time_c);
DataBus.getInstance().bpa_goodsrecipes.add(data);
BPA_GOODSRECIPE data2 = Get清洗(0);
DataBus.getInstance().bpa_goodsrecipes.add(data);
DataBus.getInstance().bpa_goodsrecipes.add(data2);
new Thread(new Runnable() {
@Override
public void run() {


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

@@ -256,7 +256,7 @@ public class add_silos_message extends LinearLayout {
* @param num
* @return
*/
private String GetNum(int num)
public String GetNum(int num)
{
if(num==1)
{
@@ -267,6 +267,15 @@ public class add_silos_message extends LinearLayout {
}else if(num==3)
{
return "③";
}else if(num==4)
{
return "④(水阀)";
}else if(num==5)
{
return "⑤";
}else if(num==6)
{
return "⑥";
}else
{
return "①";


+ 3
- 1
app/src/main/res/layout/activity_cooking.xml View File

@@ -50,7 +50,9 @@
android:shadowRadius="6.0"
android:text="爆炒鱼香肉丝"
android:textColor="@color/black"
android:textSize="45dp" />
android:textSize="45dp"
android:ellipsize="end"
android:maxLines="1"/>

<RelativeLayout
android:layout_width="match_parent"


+ 3
- 1
app/src/main/res/layout/activity_cookingsimulated.xml View File

@@ -50,7 +50,9 @@
android:shadowRadius="6.0"
android:text="爆炒鱼香肉丝"
android:textColor="@color/black"
android:textSize="45dp" />
android:textSize="45dp"
android:ellipsize="end"
android:maxLines="1"/>

<RelativeLayout
android:layout_width="match_parent"


+ 6
- 4
app/src/main/res/layout/activity_dishtest.xml View File

@@ -20,13 +20,15 @@
android:layout_height="match_parent"
android:orientation="vertical">

<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.4">
android:layout_weight="0.4"
android:orientation="horizontal">

<RelativeLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginLeft="30dp">

@@ -81,7 +83,7 @@
app:imagesrc_ks="@mipmap/zhizuo_zt2"
app:imagesrc_tz="@mipmap/zhizuo_jx2" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>

<RelativeLayout
android:layout_width="match_parent"


Loading…
Cancel
Save