入库单-接口
This commit is contained in:
@@ -43,5 +43,38 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public List<InStockDetails> Details = new List<InStockDetails>();
|
||||
|
||||
/// <summary>
|
||||
/// 创建
|
||||
/// </summary>
|
||||
/// <param name="creatorId"></param>
|
||||
public void Create(int creatorId)
|
||||
{
|
||||
this.CreatorId = creatorId;
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成单据号
|
||||
/// </summary>
|
||||
public void GenerateNo()
|
||||
{
|
||||
//用户手动输入了 就不自动生成了
|
||||
if (!string.IsNullOrEmpty(this.BillNo)) return;
|
||||
|
||||
if (this.Id.ToString().Length >= 8)
|
||||
{
|
||||
this.BillNo = "RK" + this.Id.ToString();
|
||||
return;
|
||||
}
|
||||
|
||||
string idStr = this.Id.ToString();
|
||||
while (true)
|
||||
{
|
||||
idStr = "0" + idStr;
|
||||
if (idStr.Length >= 8) break;
|
||||
}
|
||||
this.BillNo = "RK" + idStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user