修复bug
This commit is contained in:
Binary file not shown.
@@ -339,13 +339,23 @@ namespace WMS.Web.Repositories
|
||||
var materials = materials_result.Data.ToList();
|
||||
List<int> ids = new List<int>();
|
||||
|
||||
|
||||
var list = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
||||
f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||
List<OutStockTask> list = new List<OutStockTask>();
|
||||
var list1 = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.ToListAsync();
|
||||
if (list1 != null && list1.Count() > 0)
|
||||
list.AddRange(list1);
|
||||
|
||||
var list2 = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.ToListAsync();
|
||||
if (list2 != null && list2.Count() > 0)
|
||||
list.AddRange(list2);
|
||||
|
||||
var response = _mapper.Map<List<GetOutStockTaskByNoResponse>>(list);
|
||||
foreach (var r in response)
|
||||
{
|
||||
@@ -448,13 +458,21 @@ namespace WMS.Web.Repositories
|
||||
|
||||
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo)
|
||||
{
|
||||
return await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => (EF.Functions.Like(f.BillNo, "%" + billNo + "%") ||
|
||||
f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||
var res = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
.ToListAsync();
|
||||
|
||||
var ress = await _context.OutStockTask.Include(x => x.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
.ToListAsync();
|
||||
res.AddRange(ress);
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user