优化
This commit is contained in:
@@ -560,13 +560,18 @@ namespace WMS.Web.Domain.Services
|
|||||||
{
|
{
|
||||||
MaterialId = x.Key,
|
MaterialId = x.Key,
|
||||||
AccruedQtyTotal = x.Sum(t => t.AccruedQty),
|
AccruedQtyTotal = x.Sum(t => t.AccruedQty),
|
||||||
RealityQtyTotal=x.Sum(t=>t.RealityQty)
|
ReceiveQtyTotal=x.Sum(t=>t.ReceiveQty),
|
||||||
|
RealityQtyTotal =x.Sum(t=>t.RealityQty)
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
bool IsAny = details_Groups.Any(d => d.AccruedQtyTotal > d.RealityQtyTotal);
|
bool IsAny = details_Groups.Any(d => d.RealityQtyTotal != 0 && d.AccruedQtyTotal > d.RealityQtyTotal);
|
||||||
if(IsAny)
|
if (IsAny)
|
||||||
order.Status = InstockStatus.Part;
|
order.Status = InstockStatus.Part;
|
||||||
else
|
else if (details_Groups.Sum(x => x.ReceiveQtyTotal) <= 0)
|
||||||
|
order.Status = InstockStatus.Wait;
|
||||||
|
else if (details_Groups.Sum(x => x.RealityQtyTotal) <= 0)
|
||||||
|
order.Status = InstockStatus.WaitInStock;
|
||||||
|
else if(details_Groups.Sum(x => x.RealityQtyTotal) >= details_Groups.Sum(x => x.AccruedQtyTotal))
|
||||||
order.Status = InstockStatus.Already;
|
order.Status = InstockStatus.Already;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user