|
|
@@ -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); |
|
|
|
} |
|
|
|