Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user