移箱改箱增加订单号
This commit is contained in:
Binary file not shown.
@@ -130,6 +130,11 @@
|
|||||||
明细ID
|
明细ID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.BackRecordQueryResponse.BillNo">
|
||||||
|
<summary>
|
||||||
|
单据编号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.BackRecordQueryResponse.BoxBillNo">
|
<member name="P:WMS.Web.Core.Dto.BackRecordQueryResponse.BoxBillNo">
|
||||||
<summary>
|
<summary>
|
||||||
所属箱号ID
|
所属箱号ID
|
||||||
|
|||||||
@@ -284,6 +284,11 @@
|
|||||||
<param name="materialId"></param>
|
<param name="materialId"></param>
|
||||||
<param name="serialNumbers"></param>
|
<param name="serialNumbers"></param>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.ChangeBoxRecord.GenerateNo">
|
||||||
|
<summary>
|
||||||
|
生成单据号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.ErpOpsSyncDate">
|
<member name="T:WMS.Web.Domain.Entitys.ErpOpsSyncDate">
|
||||||
<summary>
|
<summary>
|
||||||
erp同步时间管理 记录最新一次重金蝶和ops拉取数据时间
|
erp同步时间管理 记录最新一次重金蝶和ops拉取数据时间
|
||||||
@@ -734,6 +739,11 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<param name="creatorId"></param>
|
<param name="creatorId"></param>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.MoveBoxRecord.GenerateNo">
|
||||||
|
<summary>
|
||||||
|
生成单据号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.OutStock">
|
<member name="T:WMS.Web.Domain.Entitys.OutStock">
|
||||||
<summary>
|
<summary>
|
||||||
wms出库单
|
wms出库单
|
||||||
|
|||||||
@@ -76,5 +76,27 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
this.CreatorId = creatorId;
|
this.CreatorId = creatorId;
|
||||||
this.CreateTime = DateTime.Now;
|
this.CreateTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 生成单据号
|
||||||
|
/// </summary>
|
||||||
|
public void GenerateNo()
|
||||||
|
{
|
||||||
|
//用户手动输入了 就不自动生成了
|
||||||
|
if (!string.IsNullOrEmpty(this.BillNo)) return;
|
||||||
|
|
||||||
|
if (this.Id.ToString().Length >= 8)
|
||||||
|
{
|
||||||
|
this.BillNo = "GX" + this.Id.ToString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string idStr = this.Id.ToString();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
idStr = "0" + idStr;
|
||||||
|
if (idStr.Length >= 8) break;
|
||||||
|
}
|
||||||
|
this.BillNo = "GX" + idStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,5 +70,27 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
this.CreatorId = creatorId;
|
this.CreatorId = creatorId;
|
||||||
this.CreateTime = DateTime.Now;
|
this.CreateTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 生成单据号
|
||||||
|
/// </summary>
|
||||||
|
public void GenerateNo()
|
||||||
|
{
|
||||||
|
//用户手动输入了 就不自动生成了
|
||||||
|
if (!string.IsNullOrEmpty(this.BillNo)) return;
|
||||||
|
|
||||||
|
if (this.Id.ToString().Length >= 8)
|
||||||
|
{
|
||||||
|
this.BillNo = "YX" + this.Id.ToString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string idStr = this.Id.ToString();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
idStr = "0" + idStr;
|
||||||
|
if (idStr.Length >= 8) break;
|
||||||
|
}
|
||||||
|
this.BillNo = "YX" + idStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ namespace WMS.Web.Repositories
|
|||||||
await _context.ChangeBoxRecord.AddAsync(entity);
|
await _context.ChangeBoxRecord.AddAsync(entity);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
//if (string.IsNullOrEmpty(entity.OutSourcFeedNo))
|
if (string.IsNullOrEmpty(entity.BillNo))
|
||||||
//{
|
{
|
||||||
// entity.GenerateNo();
|
entity.GenerateNo();
|
||||||
// await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
//}
|
}
|
||||||
|
|
||||||
if (_transaction != null)
|
if (_transaction != null)
|
||||||
_transaction.Commit();
|
_transaction.Commit();
|
||||||
@@ -92,6 +92,14 @@ namespace WMS.Web.Repositories
|
|||||||
_context.ChangeBoxRecord.AddRange(list);
|
_context.ChangeBoxRecord.AddRange(list);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(item.BillNo))
|
||||||
|
//自动生成单据编号
|
||||||
|
item.GenerateNo();
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
if (_transaction != null)
|
if (_transaction != null)
|
||||||
_transaction.Commit();
|
_transaction.Commit();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ namespace WMS.Web.Repositories
|
|||||||
await _context.MoveBoxRecord.AddAsync(entity);
|
await _context.MoveBoxRecord.AddAsync(entity);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
//if (string.IsNullOrEmpty(entity.OutSourcFeedNo))
|
if (string.IsNullOrEmpty(entity.BillNo))
|
||||||
//{
|
{
|
||||||
// entity.GenerateNo();
|
entity.GenerateNo();
|
||||||
// await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
//}
|
}
|
||||||
|
|
||||||
if (_transaction != null)
|
if (_transaction != null)
|
||||||
_transaction.Commit();
|
_transaction.Commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user