This commit is contained in:
tongfei
2023-11-08 15:16:28 +08:00
10 changed files with 67 additions and 23 deletions

View File

@@ -107,5 +107,35 @@ namespace WMS.Web.Repositories
return entity.Clone();
}
//根据箱号搜索 用来比对确定是否箱号信息是否存在
public async Task<List<string>> GetByNos(List<string> billNos)
{
return await _context.Box
.Where(w => billNos.Contains(w.BoxBillNo)).Select(s=>s.BoxBillNo).ToListAsync();
}
public async Task<bool> AddRange(List<Box> entitys, bool isTransaction = true)
{
IDbContextTransaction _transaction = null;
if (isTransaction)
_transaction = _context.Database.BeginTransaction();
try
{
if (entitys != null && entitys.Count != 0)
{
await _context.Box.AddRangeAsync(entitys);
await _context.SaveChangesAsync();
}
if (_transaction != null)
_transaction.Commit();
return true;
}
catch
{
if (_transaction != null)
_transaction.Rollback();
return false;
}
}
}
}

View File

@@ -132,7 +132,6 @@ namespace WMS.Web.Repositories
#region dto组装
Id = s.order.Id,
BillNo = s.order.BillNo,
Status = s.order.Status.GetRemark(),
Type = s.order.Type.GetRemark(),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.CreatorId),
CreateTime = s.order.CreateTime.DateToStringSeconds(),