移箱改箱增加订单号
This commit is contained in:
@@ -58,11 +58,11 @@ namespace WMS.Web.Repositories
|
||||
await _context.ChangeBoxRecord.AddAsync(entity);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
//if (string.IsNullOrEmpty(entity.OutSourcFeedNo))
|
||||
//{
|
||||
// entity.GenerateNo();
|
||||
// await _context.SaveChangesAsync();
|
||||
//}
|
||||
if (string.IsNullOrEmpty(entity.BillNo))
|
||||
{
|
||||
entity.GenerateNo();
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
if (_transaction != null)
|
||||
_transaction.Commit();
|
||||
@@ -92,6 +92,14 @@ namespace WMS.Web.Repositories
|
||||
_context.ChangeBoxRecord.AddRange(list);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.BillNo))
|
||||
//自动生成单据编号
|
||||
item.GenerateNo();
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
if (_transaction != null)
|
||||
_transaction.Commit();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user