Ver código fonte

优化444

茶饮新(现场)
fyf 11 meses atrás
pai
commit
7ae8fe354a
4 arquivos alterados com 41 adições e 30 exclusões
  1. +9
    -5
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +10
    -7
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java
  3. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java
  4. +21
    -17
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_lsjy_fragment.java

+ 9
- 5
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java Ver arquivo

@@ -247,9 +247,11 @@ public class ExecuteTheRecipe {
// ListeningValue.put(key, val);
// }
// }
ReadCode();
ReadPLCStatus();

if(!IsMakeGood)
{
ReadCode();
ReadPLCStatus();
}
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
@@ -266,7 +268,10 @@ public class ExecuteTheRecipe {
@Override
public void Run() throws InterruptedException {
try {
AutoJR();
if(!IsMakeGood)
{
AutoJR();
}
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}
@@ -283,7 +288,6 @@ public class ExecuteTheRecipe {
@Override
public void Run() throws InterruptedException {
try {

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


+ 10
- 7
app/src/main/java/com/bonait/bnframework/modules/home/adapter/wdsz_adapter.java Ver arquivo

@@ -92,17 +92,20 @@ public class wdsz_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
new Thread(new Runnable() {
@Override
public void run() {
while (ConfigName.getInstance().PlcIsConnect) {
while(true)
{
try {
Object obj= ExecuteTheRecipe.ReadPLC(goodsMake.name);
if(obj!=null)
if(ConfigName.getInstance().PlcIsConnect && !ExecuteTheRecipe.IsMakeGood)
{
temp[0] =String.valueOf(obj);
mHandler.sendEmptyMessage(0);
Object obj= ExecuteTheRecipe.ReadPLC(goodsMake.name);
if(obj!=null)
{
temp[0] =String.valueOf(obj);
mHandler.sendEmptyMessage(0);
}
}
Thread.sleep(100);
Thread.sleep(200);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java Ver arquivo

@@ -420,7 +420,7 @@ public class MakeGoodFragment extends BaseFragment {
public void run() {
while (true) {
try {
if(ConfigName.getInstance().PlcIsConnect)
if(ConfigName.getInstance().PlcIsConnect && !ExecuteTheRecipe.IsMakeGood)
{
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量");
if(obj!=null)


+ 21
- 17
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/JiaoYan_lsjy_fragment.java Ver arquivo

@@ -395,29 +395,33 @@ public class JiaoYan_lsjy_fragment extends BaseFragment {
new Thread(new Runnable() {
@Override
public void run() {
while (ConfigName.getInstance().PlcIsConnect) {
while(true)
{
try {
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量");
Object obj1= ExecuteTheRecipe.ReadPLC("出料口检测");

if(obj!=null)
if(ConfigName.getInstance().PlcIsConnect && !ExecuteTheRecipe.IsMakeGood)
{
zhongliangxianshi=(int)obj;//
mHandler.sendEmptyMessage(0);
}
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量");
Object obj1= ExecuteTheRecipe.ReadPLC("出料口检测");

if(obj!=null)
{
zhongliangxianshi=(int)obj;//
mHandler.sendEmptyMessage(0);
}

clk=obj1==null?false:(boolean) obj1;
clk=obj1==null?false:(boolean) obj1;

if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台"))
{
Object obj2= ExecuteTheRecipe.ReadPLC("果糖左温度");
Object obj3= ExecuteTheRecipe.ReadPLC("果糖右温度");
gt1wd=obj2==null?0:(int)obj2;
gt2wd=obj3==null?0:(int)obj3;
if (!ConfigName.getInstance().versionSelectionEnum.equals("配料吧台"))
{
Object obj2= ExecuteTheRecipe.ReadPLC("果糖左温度");
Object obj3= ExecuteTheRecipe.ReadPLC("果糖右温度");
gt1wd=obj2==null?0:(int)obj2;
gt2wd=obj3==null?0:(int)obj3;
}
}
Thread.sleep(200);

Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}


Carregando…
Cancelar
Salvar