Browse Source

冒菜修改

master
pry 2 years ago
parent
commit
4193c7cc9d
2 changed files with 26 additions and 4 deletions
  1. +26
    -3
      HBLConsole.MORKM/Control_MORKM.cs
  2. +0
    -1
      HBLConsole/App.xaml.cs

+ 26
- 3
HBLConsole.MORKM/Control_MORKM.cs View File

@@ -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 View File

@@ -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…
Cancel
Save