Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user