来源单号查询-接口优化
This commit is contained in:
@@ -80,6 +80,23 @@ namespace WMS.Web.Api.Controllers
|
||||
return ResultList<InStockTaskBillNoQueryResponse>.ReSuccess(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 来源单-编号模糊查询-pad
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("InStockTask/{code}")]
|
||||
public async Task<ResultList<InStockTaskBillNoQueryResponse>> InStockTask([FromRoute] string code)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultList<InStockTaskBillNoQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var list = await _inStockTaskRepositories.GetListBy(code);
|
||||
return ResultList<InStockTaskBillNoQueryResponse>.ReSuccess(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 采购订单物料明细和箱物料明细-对比-pad
|
||||
/// </summary>
|
||||
|
||||
@@ -115,6 +115,13 @@
|
||||
<param name="code"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.InStockTask(System.String)">
|
||||
<summary>
|
||||
来源单-编号模糊查询-pad
|
||||
</summary>
|
||||
<param name="code"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.Contrast(WMS.Web.Core.Dto.InStockTask.ContrastMaterialsRequest)">
|
||||
<summary>
|
||||
采购订单物料明细和箱物料明细-对比-pad
|
||||
|
||||
@@ -236,10 +236,11 @@ namespace WMS.Web.Repositories
|
||||
if (materials_result.IsSuccess)
|
||||
materials = materials_result.Data.ToList();
|
||||
|
||||
//这里只查状态为:部分入库和等待收货
|
||||
var query = _context.InStockTaskDetails
|
||||
.GroupJoin(_context.InStockTask, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||
.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + sourceBillNo + "%"));
|
||||
.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + sourceBillNo + "%") && (w.order.Status== InstockStatus.Part || w.order.Status==InstockStatus.Wait));
|
||||
|
||||
if(type.HasValue)
|
||||
query = query.Where(w => w.order.Type == type.Value);
|
||||
|
||||
Reference in New Issue
Block a user