找到已收货的箱子
This commit is contained in:
@@ -32,7 +32,9 @@ namespace WMS.Web.Api.Controllers
|
|||||||
private readonly IInStockTaskService _inStockTaskService;
|
private readonly IInStockTaskService _inStockTaskService;
|
||||||
private readonly IInStockTaskRepositories _inStockTaskRepositories;
|
private readonly IInStockTaskRepositories _inStockTaskRepositories;
|
||||||
private readonly IInventoryDetailsRepositories _inventoryDetailsRepositories;
|
private readonly IInventoryDetailsRepositories _inventoryDetailsRepositories;
|
||||||
|
private readonly IInStockRepositories _inStockRepositories;
|
||||||
public InStockTaskController(
|
public InStockTaskController(
|
||||||
|
IInStockRepositories inStockRepositories,
|
||||||
IOptions<QiniuOptions> option,
|
IOptions<QiniuOptions> option,
|
||||||
IExportExcelService exportExcelService,
|
IExportExcelService exportExcelService,
|
||||||
ILoginService loginService,
|
ILoginService loginService,
|
||||||
@@ -41,6 +43,7 @@ namespace WMS.Web.Api.Controllers
|
|||||||
IInventoryDetailsRepositories inventoryDetailsRepositories,
|
IInventoryDetailsRepositories inventoryDetailsRepositories,
|
||||||
IInStockService inStockService)
|
IInStockService inStockService)
|
||||||
{
|
{
|
||||||
|
_inStockRepositories = inStockRepositories;
|
||||||
_inventoryDetailsRepositories = inventoryDetailsRepositories;
|
_inventoryDetailsRepositories = inventoryDetailsRepositories;
|
||||||
this._option = option?.Value;
|
this._option = option?.Value;
|
||||||
this._exportExcelService = exportExcelService;
|
this._exportExcelService = exportExcelService;
|
||||||
@@ -186,6 +189,32 @@ namespace WMS.Web.Api.Controllers
|
|||||||
return ResultList<SourceBillNoQueryResponse>.ReSuccess(list);
|
return ResultList<SourceBillNoQueryResponse>.ReSuccess(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 来源单-已收货未入库的箱集合-采购上架使用-pad
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
[Route("GetReceiveBox/{taskId}")]
|
||||||
|
public async Task<ResultList<ReceiveBoxResponse>> GetReceiveBox([FromRoute] int taskId)
|
||||||
|
{
|
||||||
|
//找到收货的箱子
|
||||||
|
var receiveBoxList= await _inStockTaskRepositories.GetReceiveBox(taskId);
|
||||||
|
|
||||||
|
//找到已入库的箱子
|
||||||
|
var instockBoxList= await _inStockRepositories.GetInstockBox(taskId);
|
||||||
|
if (receiveBoxList.Count!=0 && instockBoxList.Count != 0)
|
||||||
|
{
|
||||||
|
//剔除已入库的箱子
|
||||||
|
foreach (var item in instockBoxList.Distinct().ToList())
|
||||||
|
{
|
||||||
|
receiveBoxList.Remove(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultList<ReceiveBoxResponse>.ReSuccess(receiveBoxList);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源单-编号模糊查询-非采购上架使用-pad
|
/// 来源单-编号模糊查询-非采购上架使用-pad
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -244,6 +244,13 @@
|
|||||||
<param name="sourceBillNo">来源单号</param>
|
<param name="sourceBillNo">来源单号</param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.GetReceiveBox(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
来源单-已收货未入库的箱集合-采购上架使用-pad
|
||||||
|
</summary>
|
||||||
|
<param name="taskId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.GetSourceOrderNoPurchaseBy(WMS.Web.Core.Dto.InStockTask.InStockTaskBillNoQueryRequest)">
|
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.GetSourceOrderNoPurchaseBy(WMS.Web.Core.Dto.InStockTask.InStockTaskBillNoQueryRequest)">
|
||||||
<summary>
|
<summary>
|
||||||
来源单-编号模糊查询-非采购上架使用-pad
|
来源单-编号模糊查询-非采购上架使用-pad
|
||||||
|
|||||||
@@ -1917,6 +1917,26 @@
|
|||||||
明细
|
明细
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.InStockTask.ReceiveBoxResponse">
|
||||||
|
<summary>
|
||||||
|
收货箱
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.ReceiveBoxResponse.TaskId">
|
||||||
|
<summary>
|
||||||
|
任务ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.ReceiveBoxResponse.BoxId">
|
||||||
|
<summary>
|
||||||
|
箱ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.ReceiveBoxResponse.BoxBillNo">
|
||||||
|
<summary>
|
||||||
|
箱编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.InStockTask.SourceBillNoNoPurchaseQueryResponse">
|
<member name="T:WMS.Web.Core.Dto.InStockTask.SourceBillNoNoPurchaseQueryResponse">
|
||||||
<summary>
|
<summary>
|
||||||
来源单模糊查询响应-非采购-对象
|
来源单模糊查询响应-非采购-对象
|
||||||
@@ -4233,12 +4253,17 @@
|
|||||||
物料对应的仓位有哪些
|
物料对应的仓位有哪些
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.MaterialSubStock.MaterialNumber">
|
||||||
|
<summary>
|
||||||
|
物料编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.MaterialSubStock.SubStockCode">
|
<member name="P:WMS.Web.Core.Dto.MaterialSubStock.SubStockCode">
|
||||||
<summary>
|
<summary>
|
||||||
仓位编码
|
仓位编码
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.MaterialSubStock.SubStockName">
|
<member name="P:WMS.Web.Core.Dto.MaterialSubStock.SubStock">
|
||||||
<summary>
|
<summary>
|
||||||
仓位名称
|
仓位名称
|
||||||
</summary>
|
</summary>
|
||||||
|
|||||||
@@ -2532,6 +2532,13 @@
|
|||||||
<param name="ids"></param>
|
<param name="ids"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockRepositories.GetInstockBox(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
获取-已入库的箱
|
||||||
|
</summary>
|
||||||
|
<param name="taskId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Infrastructure.IInStockTaskBoxRepositories">
|
<member name="T:WMS.Web.Domain.Infrastructure.IInStockTaskBoxRepositories">
|
||||||
<summary>
|
<summary>
|
||||||
箱与任务单绑定(收货)关系表-仓储接口
|
箱与任务单绑定(收货)关系表-仓储接口
|
||||||
@@ -2649,6 +2656,13 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.GetReceiveBox(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
获取-已收货的箱子
|
||||||
|
</summary>
|
||||||
|
<param name="taskId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.InStockTask},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.InStockTask},System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
批量添加
|
批量添加
|
||||||
@@ -2729,6 +2743,15 @@
|
|||||||
<param name="orgCodes"></param>
|
<param name="orgCodes"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IInventoryDetailsRepositories.GetMaterialSubStocks(System.Collections.Generic.List{System.String},System.Collections.Generic.List{System.String},System.Int32)">
|
||||||
|
<summary>
|
||||||
|
获取物料对应的仓位集合
|
||||||
|
</summary>
|
||||||
|
<param name="materialNumbers"></param>
|
||||||
|
<param name="stockCodes"></param>
|
||||||
|
<param name="companyId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Infrastructure.IInventoryInOutDetailsRepositories">
|
<member name="T:WMS.Web.Domain.Infrastructure.IInventoryInOutDetailsRepositories">
|
||||||
<summary>
|
<summary>
|
||||||
物料收发明细-仓储接口
|
物料收发明细-仓储接口
|
||||||
|
|||||||
27
src/WMS.Web.Core/Dto/InStockTask/ReceiveBoxResponse.cs
Normal file
27
src/WMS.Web.Core/Dto/InStockTask/ReceiveBoxResponse.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.InStockTask
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 收货箱
|
||||||
|
/// </summary>
|
||||||
|
public class ReceiveBoxResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 任务ID
|
||||||
|
/// </summary>
|
||||||
|
public int TaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 箱ID
|
||||||
|
/// </summary>
|
||||||
|
public int BoxId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 箱编码
|
||||||
|
/// </summary>
|
||||||
|
public string BoxBillNo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WMS.Web.Core.Dto;
|
using WMS.Web.Core.Dto;
|
||||||
using WMS.Web.Core.Dto.InStock;
|
using WMS.Web.Core.Dto.InStock;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
|
|
||||||
@@ -73,5 +74,12 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <param name="ids"></param>
|
/// <param name="ids"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<InStock>> GetList(List<int> ids);
|
Task<List<InStock>> GetList(List<int> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取-已入库的箱
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ReceiveBoxResponse>> GetInstockBox(int taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,13 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<SourceBillNoNoPurchaseQueryResponse>> GetListInfoBy(InStockTaskBillNoQueryRequest dto);
|
Task<List<SourceBillNoNoPurchaseQueryResponse>> GetListInfoBy(InStockTaskBillNoQueryRequest dto);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取-已收货的箱子
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ReceiveBoxResponse>> GetReceiveBox(int taskId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量添加
|
/// 批量添加
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using WMS.Web.Core.Dto.Erp;
|
|||||||
using WMS.Web.Core.Dto.Erp.Org;
|
using WMS.Web.Core.Dto.Erp.Org;
|
||||||
using WMS.Web.Core.Dto.Erp.Supplier;
|
using WMS.Web.Core.Dto.Erp.Supplier;
|
||||||
using WMS.Web.Core.Dto.InStock;
|
using WMS.Web.Core.Dto.InStock;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
using WMS.Web.Core.Help;
|
using WMS.Web.Core.Help;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
@@ -254,6 +255,20 @@ namespace WMS.Web.Repositories
|
|||||||
return res.Clone();
|
return res.Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取-已入库的箱
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<ReceiveBoxResponse>> GetInstockBox(int taskId)
|
||||||
|
{
|
||||||
|
return await _context.InStockDetails.Where(x => x.TaskId == taskId).Select(x => new ReceiveBoxResponse()
|
||||||
|
{
|
||||||
|
TaskId=x.TaskId,
|
||||||
|
BoxId=x.BoxId
|
||||||
|
}).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 列表-分页
|
/// 列表-分页
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -299,6 +299,20 @@ namespace WMS.Web.Repositories
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取-已收货的箱子
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<ReceiveBoxResponse>> GetReceiveBox(int taskId)
|
||||||
|
{
|
||||||
|
return await _context.InstockTaskBox.Where(x => x.TaskId == taskId).Select(x => new ReceiveBoxResponse()
|
||||||
|
{
|
||||||
|
TaskId = x.TaskId,
|
||||||
|
BoxId = x.BoxId,
|
||||||
|
BoxBillNo = x.BoxBillNo
|
||||||
|
}).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量添加
|
/// 批量添加
|
||||||
|
|||||||
Reference in New Issue
Block a user