feat: implement new order methods, transport enums, and conveyor telegram overrides
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/// <summary>
|
||||
/// finish this order, related OrdersMiniload, Orders Conveyor and clear the resources
|
||||
/// </summary>
|
||||
public void Finish()
|
||||
{
|
||||
OrdersConveyor.ToList().ForEach(oc =>
|
||||
{
|
||||
if (TransportOrderStatusGroups.Open.Contains(oc.Status))
|
||||
{
|
||||
oc.HandleFinished();
|
||||
using IWcsDbContext db = new WcsDbContextFactory().GetDbContext();
|
||||
ConveyorTelegrams.SendTordDeleteEtra(db, oc.LeNo);
|
||||
db.SaveChanges();
|
||||
}
|
||||
});
|
||||
OrdersMiniload.ToList().ForEach(om =>
|
||||
{
|
||||
if (TransportOrderStatusGroups.Open.Contains(om.Status))
|
||||
{
|
||||
om.HandleFinished();
|
||||
}
|
||||
});
|
||||
Status = TransportOrderStatus.Finished;
|
||||
UpdateResources(TransportOrderStatus.Finished, null);
|
||||
}
|
||||
Reference in New Issue
Block a user