Browse Source

ces3223223111

master
fyf 1 year ago
parent
commit
769ff0cab8
2 changed files with 12 additions and 8 deletions
  1. +12
    -4
      app/src/main/java/com/example/bpa/app/BusinessServer.java
  2. +0
    -4
      app/src/main/java/com/example/bpa/app/ICSApp.java

+ 12
- 4
app/src/main/java/com/example/bpa/app/BusinessServer.java View File

@@ -28,9 +28,10 @@ public class BusinessServer {
private BusinessServer() {
}

/**
* 商品制作队列
*/
ConcurrentLinkedQueue<String> Commoditys = new ConcurrentLinkedQueue<String>();


/**
* 添加配方
*
@@ -40,8 +41,12 @@ public class BusinessServer {
Commoditys.offer(info);
}

/**
* 订单制作线程
*/
public void Start() {
DeviceData.Get().TestInit();
//DeviceData.Get().TestInit();

ThreadManager.Get().StartLong("配方执行业务流程", true, new IThread() {
@Override
public void Run() throws InterruptedException {
@@ -60,6 +65,7 @@ public class BusinessServer {
for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) {
for (int m = 0; m < entry.getValue().size(); m++) {
int materialType = entry.getValue().get(m).materialType;
//1.正常物料
if (materialType == 1) {
//获取料仓信息
List<BPA_SILOS> bss = QueryDB.GetSolisByMaterialID(entry.getValue().get(m).materialID);
@@ -70,7 +76,9 @@ public class BusinessServer {
DeviceData.Get().setDemandValue((short) entry.getValue().get(m).value, bss.get(x).num, null);
}
}
} else if (materialType == 2) {
}
//2.果糖
else if (materialType == 2) {
BPA_SUGAR bs = QueryDB.GetsugarId(entry.getValue().get(m).materialID);
ModbusTcpServer.get().WriteBool(bs.plcvar, true);
}


+ 0
- 4
app/src/main/java/com/example/bpa/app/ICSApp.java View File

@@ -30,20 +30,16 @@ public class ICSApp extends Application {
@Override
public void onCreate() {
super.onCreate();


MessageLog.MsgNotify = new IMessageLogNotify() {
@Override
public void ErrorMsg(String msg) {
Log.e("Error", msg);

}

@Override
public void InfoMsg(String msg, String datetime) {
Log.i("Info", msg);
}

@Override
public void WarnMsg(String msg) {
Log.w("Warn", msg);


Loading…
Cancel
Save