|
|
@@ -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() |
|
|
|