移箱改箱增加订单号

This commit is contained in:
18942506660
2023-11-13 09:54:22 +08:00
parent 8a16ea120f
commit 37a2ba4582
7 changed files with 77 additions and 10 deletions

View File

@@ -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;