反作废

This commit is contained in:
18942506660
2024-06-14 10:59:19 +08:00
parent 8d17b858ee
commit b5fd86f270
7 changed files with 72 additions and 6 deletions

View File

@@ -207,6 +207,27 @@ namespace WMS.Web.Domain.Entitys
GenerateStatus();
}
/// <summary>
/// 反作废
/// </summary>
public void NoRepeal(int creatorId, List<int> ids)
{
this.OperatorId = 0;
this.OperateTime = null;
foreach (var d in this.Details.Where(w => ids.Contains(w.Id)))
{
d.IsRepeal = false;
}
var details = this.Details.Where(w => w.IsRepeal != true).ToList();
if (details.Where(w => w.RealityQty <= 0).Count() == details.Count())
this.Status = OutStockStatus.Wait;
else if (details.Where(w => w.RealityQty >= w.AccruedQty).Count() == details.Count())
this.Status = OutStockStatus.Already;
else
this.Status = OutStockStatus.Part;
}
/// <summary>
/// 合并
/// </summary>
/// <param name="list"></param>