This commit is contained in:
tongfei
2023-11-03 10:28:38 +08:00
12 changed files with 219 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using WMS.Web.Core;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Values;
namespace WMS.Web.Domain.Entitys
{
@@ -74,5 +76,21 @@ namespace WMS.Web.Domain.Entitys
///</summary>
[Column("CreateTime")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 出库 反写 任务单
/// </summary>
/// <param name="materialId"></param>
/// <param name="qty"></param>
/// <returns></returns>
public Result OutStock(int materialId,decimal qty)
{
if ((this.AccruedQty - this.RealityQty) < qty)
return Result.ReFailure(ResultCodes.OutStockQtyError);
this.RealityQty = this.RealityQty + qty;
return Result.ReSuccess();
}
}
}