搜索出库增加仓库
This commit is contained in:
Binary file not shown.
@@ -209,7 +209,7 @@ namespace WMS.Web.Api.Controllers
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultPagedList<string>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var res = await _repositories.GetOutStockTaskNosByNo(dto.BillNo);
|
||||
var res = await _repositories.GetOutStockTaskNosByNo(dto.BillNo,dto.StockCode);
|
||||
int total = res.Count();
|
||||
res = res.OrderByDescending(o => o).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToList();
|
||||
|
||||
|
||||
@@ -4954,6 +4954,11 @@
|
||||
单号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskNosByNoRequest.StockCode">
|
||||
<summary>
|
||||
仓库编码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse">
|
||||
<summary>
|
||||
出库任务单对应出库明细
|
||||
|
||||
@@ -13,5 +13,9 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
||||
/// 单号
|
||||
/// </summary>
|
||||
public string BillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 仓库编码
|
||||
/// </summary>
|
||||
public string StockCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
//根据订单号获取订单信息
|
||||
Task<List<GetOutStockTaskByNoResponse>> GetOutStockTaskListByNo(string billNo);
|
||||
//模糊搜索订单号
|
||||
Task<List<string>> GetOutStockTaskNosByNo(string billNo);
|
||||
Task<List<string>> GetOutStockTaskNosByNo(string billNo, string stockCode);
|
||||
//根据订单号获取订单信息
|
||||
Task<GetOutStockTaskByNoResponse> GetOutStockTaskByNo(string billNo);
|
||||
}
|
||||
|
||||
@@ -520,18 +520,18 @@ namespace WMS.Web.Repositories
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo)
|
||||
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo, string stockCode)
|
||||
{
|
||||
var res = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).ThenInclude(s => s.ErpDetails)
|
||||
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait))
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(stockCode))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
.ToListAsync();
|
||||
|
||||
var ress = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).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))
|
||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(stockCode))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
.ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user