瀏覽代碼

冒菜修改

master
pry 2 年之前
父節點
當前提交
4193c7cc9d
共有 2 個檔案被更改,包括 26 行新增4 行删除
  1. +26
    -3
      HBLConsole.MORKM/Control_MORKM.cs
  2. +0
    -1
      HBLConsole/App.xaml.cs

+ 26
- 3
HBLConsole.MORKM/Control_MORKM.cs 查看文件

@@ -256,6 +256,7 @@ namespace HBLConsole.MORKM
MessageLog.GetInstance.Show($"接收到{OrderCount}次订单");
if (order is MorkOrderPush morkOrderPush)
{
List<OrderLocInfo> locs = new List<OrderLocInfo>();
foreach (var item in morkOrderPush.GoodBatchings)
{
var res = Json<BatchingInfoPar>.Data.orderMaterialDelivery?.BatchingInfo?.FirstOrDefault(p => p.BatchingId == item.BatchingId);
@@ -265,8 +266,7 @@ namespace HBLConsole.MORKM
{
if (loc >= 1 && loc <= 5)
{
if (mORKS.RBTakeNoodleTask.FirstOrDefault(p => p.SuborderId == morkOrderPush.SuborderId) == null)
mORKS.RBTakeNoodleTask.Enqueue(new OrderLocInfo() { Loc = ushort.Parse(res.BatchingLoc), SuborderId = morkOrderPush.SuborderId, BatchingId = res.BatchingId });
locs.Add(new OrderLocInfo() { Loc = ushort.Parse(res.BatchingLoc), SuborderId = morkOrderPush.SuborderId, BatchingId = res.BatchingId });
}
else if (loc >= 10 && loc <= 11)
{
@@ -287,8 +287,31 @@ namespace HBLConsole.MORKM
}
}
}
}


while (locs.Count > 0)
{
for (int i = 0; i < locs.Count; i++)
{
var res = locs.FirstOrDefault(p => p.Loc % 2 != 0);
if (res != null)
{
if (mORKS.RBTakeNoodleTask.FirstOrDefault(p => p.SuborderId == res.SuborderId) == null)
mORKS.RBTakeNoodleTask.Enqueue(res);
locs.Remove(res);

}
else
{
if (mORKS.RBTakeNoodleTask.FirstOrDefault(p => p.SuborderId == locs[i].SuborderId) == null)
mORKS.RBTakeNoodleTask.Enqueue(locs[i]);
locs.RemoveAt(i);

}
}
}

}
}

public void Main()


+ 0
- 1
HBLConsole/App.xaml.cs 查看文件

@@ -36,7 +36,6 @@ namespace HBLConsole
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
//SystemHelper.GetInstance.AutoStart(true);
ViewModelBase.Init();
SystemHelper.GetInstance.CreateDesktopShortcut();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;


Loading…
取消
儲存