@@ -103,6 +103,9 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
@Override | @Override | ||||
protected void onDestroy() { | protected void onDestroy() { | ||||
ConfigData.getInstance().ColsePLC(); | ConfigData.getInstance().ColsePLC(); | ||||
IsRunThread=false; | |||||
if(makeThread!=null){makeThread=null;} | |||||
if(makeThreadDC!=null){makeThreadDC=null;} | |||||
super.onDestroy(); | super.onDestroy(); | ||||
} | } | ||||
@@ -292,15 +295,20 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
//商品 | //商品 | ||||
public BPA_GOODS goods = null; | public BPA_GOODS goods = null; | ||||
public Thread makeThread=null; | |||||
public Thread makeThreadDC=null; | |||||
public boolean IsRunThread=true; | |||||
/** | /** | ||||
* 商品制作线程 | * 商品制作线程 | ||||
*/ | */ | ||||
public void MakeThread() { | public void MakeThread() { | ||||
ExecuteTheRecipe.context = this; | ExecuteTheRecipe.context = this; | ||||
new Thread(new Runnable() { | |||||
makeThread=new Thread(new Runnable() { | |||||
@Override | @Override | ||||
public void run() { | public void run() { | ||||
while (true) { | |||||
while (IsRunThread) { | |||||
try { | try { | ||||
if (ExecuteTheRecipe.IsStart && goods != null) { | if (ExecuteTheRecipe.IsStart && goods != null) { | ||||
long startTime= System.currentTimeMillis(); //起始时间 | 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 | @Override | ||||
public void run() { | public void run() { | ||||
while (true) { | |||||
while (IsRunThread) { | |||||
try { | try { | ||||
if (ExecuteTheRecipe.IsStart && goods != null && gongxuIndex != 10000 && goodsrecipesL != null && MakeCipe != null) { | if (ExecuteTheRecipe.IsStart && goods != null && gongxuIndex != 10000 && goodsrecipesL != null && MakeCipe != null) { | ||||
@@ -467,7 +476,8 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
}).start(); | |||||
}); | |||||
makeThreadDC.start(); | |||||
} | } | ||||
/** | /** | ||||
@@ -530,16 +530,21 @@ public class Home1Fragment extends BaseFragment { | |||||
BPA_GOODSRECIPE MakeCipe = null; | BPA_GOODSRECIPE MakeCipe = null; | ||||
public Thread makeThread=null; | |||||
public Thread makeThreadDC=null; | |||||
public Thread makeThreadUI=null; | |||||
public boolean IsRunThread=true; | |||||
/** | /** | ||||
* 商品制作线程 | * 商品制作线程 | ||||
*/ | */ | ||||
public void MakeThread() { | public void MakeThread() { | ||||
ExecuteTheRecipe.context = context; | ExecuteTheRecipe.context = context; | ||||
new Thread(new Runnable() { | |||||
makeThread=new Thread(new Runnable() { | |||||
@Override | @Override | ||||
public void run() { | public void run() { | ||||
while (true) { | |||||
while (IsRunThread) { | |||||
try { | try { | ||||
if (Status && good != null) { | 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 | @Override | ||||
public void run() { | public void run() { | ||||
while (true) { | |||||
while (IsRunThread) { | |||||
try { | try { | ||||
if (Status && good != null && gongxuIndex != 10000 && goodsrecipesL != null && MakeCipe != null) { | 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 | @Override | ||||
public void run() { | public void run() { | ||||
while (true) { | |||||
while (IsRunThread) { | |||||
try { | try { | ||||
SxUI(); | SxUI(); | ||||
Thread.sleep(1000); | 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() { | public void onDestroy() { | ||||
super.onDestroy(); | super.onDestroy(); | ||||
Logger.d("第一页销毁"); | Logger.d("第一页销毁"); | ||||
IsRunThread=false; | |||||
if(makeThread!=null){makeThread=null;} | |||||
if(makeThreadDC!=null){makeThreadDC=null;} | |||||
if(makeThreadUI!=null){makeThreadUI=null;} | |||||
} | } | ||||
/** | /** | ||||
@@ -1078,7 +1078,7 @@ public class DishTestActivity extends BaseActivity { | |||||
BPA_GOODSRECIPE data = Get出菜(time_c); | BPA_GOODSRECIPE data = Get出菜(time_c); | ||||
DataBus.getInstance().bpa_goodsrecipes.add(data); | DataBus.getInstance().bpa_goodsrecipes.add(data); | ||||
BPA_GOODSRECIPE data2 = Get清洗(0); | BPA_GOODSRECIPE data2 = Get清洗(0); | ||||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||||
DataBus.getInstance().bpa_goodsrecipes.add(data2); | |||||
new Thread(new Runnable() { | new Thread(new Runnable() { | ||||
@Override | @Override | ||||
public void run() { | public void run() { | ||||
@@ -256,7 +256,7 @@ public class add_silos_message extends LinearLayout { | |||||
* @param num | * @param num | ||||
* @return | * @return | ||||
*/ | */ | ||||
private String GetNum(int num) | |||||
public String GetNum(int num) | |||||
{ | { | ||||
if(num==1) | if(num==1) | ||||
{ | { | ||||
@@ -267,6 +267,15 @@ public class add_silos_message extends LinearLayout { | |||||
}else if(num==3) | }else if(num==3) | ||||
{ | { | ||||
return "③"; | return "③"; | ||||
}else if(num==4) | |||||
{ | |||||
return "④(水阀)"; | |||||
}else if(num==5) | |||||
{ | |||||
return "⑤"; | |||||
}else if(num==6) | |||||
{ | |||||
return "⑥"; | |||||
}else | }else | ||||
{ | { | ||||
return "①"; | return "①"; | ||||
@@ -50,7 +50,9 @@ | |||||
android:shadowRadius="6.0" | android:shadowRadius="6.0" | ||||
android:text="爆炒鱼香肉丝" | android:text="爆炒鱼香肉丝" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="45dp" /> | |||||
android:textSize="45dp" | |||||
android:ellipsize="end" | |||||
android:maxLines="1"/> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -50,7 +50,9 @@ | |||||
android:shadowRadius="6.0" | android:shadowRadius="6.0" | ||||
android:text="爆炒鱼香肉丝" | android:text="爆炒鱼香肉丝" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="45dp" /> | |||||
android:textSize="45dp" | |||||
android:ellipsize="end" | |||||
android:maxLines="1"/> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -20,13 +20,15 @@ | |||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:orientation="vertical"> | android:orientation="vertical"> | ||||
<RelativeLayout | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="0dp" | android:layout_height="0dp" | ||||
android:layout_weight="0.4"> | |||||
android:layout_weight="0.4" | |||||
android:orientation="horizontal"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | |||||
android:layout_width="0dp" | |||||
android:layout_weight="1" | |||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginLeft="30dp"> | android:layout_marginLeft="30dp"> | ||||
@@ -81,7 +83,7 @@ | |||||
app:imagesrc_ks="@mipmap/zhizuo_zt2" | app:imagesrc_ks="@mipmap/zhizuo_zt2" | ||||
app:imagesrc_tz="@mipmap/zhizuo_jx2" /> | app:imagesrc_tz="@mipmap/zhizuo_jx2" /> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||