增加明细行作废

This commit is contained in:
18942506660
2024-03-22 14:11:17 +08:00
parent 4a5f2d025f
commit 0558f5d024
6 changed files with 50 additions and 13 deletions

View File

@@ -191,11 +191,17 @@ namespace WMS.Web.Domain.Entitys
/// <summary>
/// 作废
/// </summary>
public void Repeal(int creatorId)
public void Repeal(int creatorId, List<int> ids)
{
this.OperatorId = creatorId;
this.OperateTime = DateTime.Now;
this.Status = OutStockStatus.Repeal;
foreach (var d in this.Details.Where(w => ids.Contains(w.Id)))
{
d.IsRepeal = true;
}
//如果明细全部作废,则单据状态作废
if (this.Details.Where(w => w.IsRepeal == true).Count() == this.Details.Count())
this.Status = OutStockStatus.Repeal;
}
/// <summary>
/// 合并

View File

@@ -63,6 +63,11 @@ namespace WMS.Web.Domain.Entitys
[Column("OutStockEndTime")]
public DateTime? OutStockEndTime { get; set; }
/// <summary>
/// 是否作废
/// </summary>
[Column("IsRepeal")]
public bool? IsRepeal { get; set; } = false;
/// <summary>
/// 对应erp明细 同一个物料 存在于不同的来源单中(合并后出现多条)
/// </summary>
public List<OutStockTaskErpDetails> ErpDetails { get; set; } = new List<OutStockTaskErpDetails>();