瀏覽代碼

3333

一拖四味魔方
fyf 1 年之前
父節點
當前提交
0fd572bbad
共有 3 個文件被更改,包括 22 次插入18 次删除
  1. +5
    -1
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +2
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SilosNewActivity.java
  3. +15
    -17
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/Silos_item_fragment.java

+ 5
- 1
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java 查看文件

@@ -241,7 +241,7 @@ public class ExecuteTheRecipe {
ExecuteTheRecipe.WritePLC("手动控制"+i,false,null);
}
}
});
}).start();

ThreadManager.Get().StartLong("PLC设备数据监听", true, new IThread() {
@Override
@@ -410,6 +410,10 @@ public class ExecuteTheRecipe {
//MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, message + "准备下发【" + silos.num + "】号料仓PLC控制命令,需求量:=" + recipe.value);
int _val = (int)Math.round((Double.parseDouble(recipe.value) * 10));
WritePLC("需求值" + silos.num, (short) _val, null);

//減去料仓数量
int otherG=silos.silosmargin-(_val/10);
QueryDB.UpdateYL(silos.id,otherG>=0?otherG:0);
}
}
MessageLog.ShowInfo(RecipesNames + "下发成功!");


+ 2
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SilosNewActivity.java 查看文件

@@ -102,6 +102,7 @@ public class SilosNewActivity extends BaseActivity {
@Override
public void clickListenerNew(View v, int k, Object data) {
if (k == 0) {
DataBus.getInstance().RefreshSilos();
MessageManager.getInstance().sendMessage(MessageName.RefreshSilos,"RefreshSilos");
add_yijian.setVisibility(View.GONE);
} else if (k == 1) {
@@ -131,6 +132,7 @@ public class SilosNewActivity extends BaseActivity {
@Override
public void clickListenerNew(View v, int k, Object data) {
if (k == 0) {
DataBus.getInstance().RefreshSilos();
MessageManager.getInstance().sendMessage(MessageName.RefreshSilos,"RefreshSilos");
add_silos.setVisibility(View.GONE);
} else if (k == 1) {


+ 15
- 17
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/Silos_item_fragment.java 查看文件

@@ -78,23 +78,21 @@ public class Silos_item_fragment extends BaseFragment {
*/
public void InitViewData()
{
// new Thread(new Runnable() {
// @Override
// public void run() {
// if(activity!=null)
// {
// activity.runOnUiThread(new Runnable() {
// @Override
// public void run() {
//
// }
// });
// }
// }
// });

DataBus.getInstance().RefreshSilos();
InitView();
new Thread(new Runnable() {
@Override
public void run() {
if(activity!=null)
{
activity.runOnUiThread(new Runnable() {
@Override
public void run() {

InitView();
}
});
}
}
}).start();
}
/**
* 初始化界面


Loading…
取消
儲存