修复bug
This commit is contained in:
Binary file not shown.
@@ -219,6 +219,27 @@ namespace WMS.Web.Api.Controllers
|
||||
return ResultPagedList<string>.ReSuccess(res, total);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据出库单任务编号模糊搜索下拉-PDA出库箱信息查询
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("GetOutStockTaskNosByNoBox")]
|
||||
public async Task<ResultPagedList<string>> GetOutStockTaskNosByNoBox([FromBody] GetOutStockTaskNosByNoRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultPagedList<string>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var res = await _repositories.GetOutStockTaskNosByNoBox(dto.BillNo, dto.StockCode);
|
||||
int total = res.Count();
|
||||
res = res.OrderByDescending(o => o).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToList();
|
||||
|
||||
if (res == null || res.Count() == 0) return ResultPagedList<string>.ReFailure(ResultCodes.OutStockTaskNoData);
|
||||
return ResultPagedList<string>.ReSuccess(res, total);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据出库单任务编号精确搜索(并且同步金蝶数据)-PDA出库
|
||||
/// </summary>
|
||||
|
||||
@@ -156,6 +156,7 @@ namespace WMS.Web.Api.Controllers
|
||||
//await _outStockTaskService.BillQueryForMisDeliveryOutStock(true, new List<string>() { "QTCK026812" });
|
||||
//await _inStockTaskService.SysnMiscellaneous(new List<string>() { "QTRK028204" }, true);
|
||||
|
||||
//var b=await _erpService.BillQueryForTransferOutOutStock(new List<string>() { "FBDC089527" });
|
||||
|
||||
// List<int> boxIds = new List<int>();
|
||||
// boxIds.Add(5324);
|
||||
|
||||
@@ -57,6 +57,8 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
Task<List<GetOutStockTaskByNoResponse>> GetOutStockTaskListByNo(string billNo);
|
||||
//模糊搜索订单号
|
||||
Task<List<string>> GetOutStockTaskNosByNo(string billNo, string stockCode);
|
||||
//模糊搜索订单号
|
||||
Task<List<string>> GetOutStockTaskNosByNoBox(string billNo, string stockCode);
|
||||
//根据订单号获取订单信息
|
||||
Task<GetOutStockTaskByNoResponse> GetOutStockTaskByNo(string billNo);
|
||||
}
|
||||
|
||||
@@ -562,6 +562,27 @@ namespace WMS.Web.Repositories
|
||||
return res.Distinct().ToList();
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetOutStockTaskNosByNoBox(string billNo, string stockCode)
|
||||
{
|
||||
var split = stockCode.Split("_$");
|
||||
|
||||
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.Already) && f.StockCode.Equals(split[0]) && f.OrgCode.Equals(split[1]))
|
||||
.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.Already) && f.StockCode.Equals(split[0]) && f.OrgCode.Equals(split[1]))
|
||||
.OrderByDescending(o => o.Id)
|
||||
.Select(s => s.BillNo)
|
||||
.ToListAsync();
|
||||
res.AddRange(ress);
|
||||
return res.Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出列表
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user