refactor: migrate project structure by reorganizing realization code snippets into documentation and analysis categories.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
public static IOrderedQueryable<OrdersHost> ApplyWmsOrderingSequencerRetrievalTime(this IQueryable<OrdersHost> entity,
|
||||
IWcsDbContext db)
|
||||
{
|
||||
var query = entity
|
||||
.GroupJoin(
|
||||
db.OrdersHost
|
||||
.GroupBy(xx => xx.IdOrderWmsHead)
|
||||
.Select(g => new
|
||||
{
|
||||
IdOrderWmsHead = g.Key,
|
||||
SequencerRetrievalTime = g.Min(y => y.SequencerRetrievalTime)
|
||||
}),
|
||||
o => o.IdOrderWmsHead,
|
||||
m => m.IdOrderWmsHead,
|
||||
(o, m) => new { o, m }
|
||||
)
|
||||
.SelectMany(x => x.m.DefaultIfEmpty(), (x, m) => new { x.o, m })
|
||||
.OrderByDescending(x => x.o.IsStolen)
|
||||
.ThenByDescending(x => x.o.IsDirectPicking)
|
||||
.ThenByDescending(x => x.m.SequencerRetrievalTime != null)
|
||||
.ThenBy(x => x.m.SequencerRetrievalTime)
|
||||
.ThenBy(x => x.o.Created)
|
||||
.Select(x => x.o);
|
||||
return (IOrderedQueryable<OrdersHost>) query;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public static IQueryable<OrdersHost> ByCancelledSequencerOrder(this IQueryable<OrdersHost> entity)
|
||||
{
|
||||
return entity.Where(o => o.Source.Contains(WcsNames.SEQ) && o.Destination == MfcAllDestinations.StorageLoop2);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public static IQueryable<OrdersHost> ExcludeNextEmpty(this IQueryable<OrdersHost> entity)
|
||||
{
|
||||
return entity.Where(o => o.LeNo != LeTypeName.NextEmptyMiniloadSmall.ToString() && o.LeNo != LeTypeName.NextEmptyMiniloadBig.ToString());
|
||||
}
|
||||
Reference in New Issue
Block a user