pda库存查询
This commit is contained in:
Binary file not shown.
@@ -191,5 +191,51 @@ namespace WMS.Web.Api.Controllers
|
|||||||
result.BoxBillNo = boxBillNo;
|
result.BoxBillNo = boxBillNo;
|
||||||
return Result <BoxInventoryResponse>.ReSuccess(result);
|
return Result <BoxInventoryResponse>.ReSuccess(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PDA-库存查询(物料)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("GetPagedListBoxByMaterial")]
|
||||||
|
public async Task<Result<GetPagedListBoxByMaterialResponse>> GetPagedListBoxByMaterial([FromBody] GetPagedListBoxByMaterialRequest dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result<GetPagedListBoxByMaterialResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
var response = await _boxInventoryRepositories.GetPagedListBoxByMaterial(dto, loginInfo.UserInfo.CompanyId);
|
||||||
|
return Result<GetPagedListBoxByMaterialResponse>.ReSuccess(response);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// PDA-库存查询(箱号)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("GetPagedListBoxByBox")]
|
||||||
|
public async Task<Result<GetPagedListBoxByBoxResponse>> GetPagedListBoxByBox([FromBody] GetPagedListBoxByBoxRequest dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result<GetPagedListBoxByBoxResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
var response = await _boxInventoryRepositories.GetPagedListBoxByBox(dto, loginInfo.UserInfo.CompanyId);
|
||||||
|
return Result<GetPagedListBoxByBoxResponse>.ReSuccess(response);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// PDA-库存查询(仓位)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("GetPagedListBoxBySubStock")]
|
||||||
|
public async Task<Result<GetPagedListBoxBySubStockResponse>> GetPagedListBoxBySubStock([FromBody] GetPagedListBoxBySubStockRequest dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result<GetPagedListBoxBySubStockResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
var response = await _boxInventoryRepositories.GetPagedListBoxBySubStock(dto, loginInfo.UserInfo.CompanyId);
|
||||||
|
return Result<GetPagedListBoxBySubStockResponse>.ReSuccess(response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,6 +380,27 @@
|
|||||||
<param name="boxBillNo"></param>
|
<param name="boxBillNo"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.InventoryController.GetPagedListBoxByMaterial(WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialRequest)">
|
||||||
|
<summary>
|
||||||
|
PDA-库存查询(物料)
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.InventoryController.GetPagedListBoxByBox(WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxRequest)">
|
||||||
|
<summary>
|
||||||
|
PDA-库存查询(箱号)
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.InventoryController.GetPagedListBoxBySubStock(WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockRequest)">
|
||||||
|
<summary>
|
||||||
|
PDA-库存查询(仓位)
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Api.Controllers.LoginController">
|
<member name="T:WMS.Web.Api.Controllers.LoginController">
|
||||||
<summary>
|
<summary>
|
||||||
登录接口
|
登录接口
|
||||||
|
|||||||
@@ -3699,6 +3699,206 @@
|
|||||||
序列号集
|
序列号集
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxRequest">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxRequest.StockCode">
|
||||||
|
<summary>
|
||||||
|
仓库编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxRequest.BoxBillNo">
|
||||||
|
<summary>
|
||||||
|
箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse.BoxBillNo">
|
||||||
|
<summary>
|
||||||
|
箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse.TotalQty">
|
||||||
|
<summary>
|
||||||
|
总数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse.TotalCount">
|
||||||
|
<summary>
|
||||||
|
总条数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxResponse.Details">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxDetailsResponse">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxDetailsResponse.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxDetailsResponse.Specifications">
|
||||||
|
<summary>
|
||||||
|
物料规格型号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxDetailsResponse.Qty">
|
||||||
|
<summary>
|
||||||
|
数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialRequest">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-物料
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialRequest.StockCode">
|
||||||
|
<summary>
|
||||||
|
仓库编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialRequest.MaterialNumber">
|
||||||
|
<summary>
|
||||||
|
物料
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-物料
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.MaterialName">
|
||||||
|
<summary>
|
||||||
|
物料名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.MaterialNumber">
|
||||||
|
<summary>
|
||||||
|
物料编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.Specifications">
|
||||||
|
<summary>
|
||||||
|
物料规格型号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.TotalQty">
|
||||||
|
<summary>
|
||||||
|
总数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.TotalCount">
|
||||||
|
<summary>
|
||||||
|
总条数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialResponse.Details">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialDetailsResponse">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialDetailsResponse.BoxBillNo">
|
||||||
|
<summary>
|
||||||
|
箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialDetailsResponse.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialDetailsResponse.Qty">
|
||||||
|
<summary>
|
||||||
|
数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockRequest">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-仓位
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockRequest.StockCode">
|
||||||
|
<summary>
|
||||||
|
仓库编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockRequest.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockResponse">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-仓位
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockResponse.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockResponse.TotalQty">
|
||||||
|
<summary>
|
||||||
|
总数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockResponse.TotalCount">
|
||||||
|
<summary>
|
||||||
|
总条数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockResponse.Details">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockDetailsResponse">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockDetailsResponse.SubStock">
|
||||||
|
<summary>
|
||||||
|
仓位名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockDetailsResponse.BoxBillNo">
|
||||||
|
<summary>
|
||||||
|
箱号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockDetailsResponse.Specifications">
|
||||||
|
<summary>
|
||||||
|
物料规格型号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockDetailsResponse.Qty">
|
||||||
|
<summary>
|
||||||
|
数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.Inventory.InventoryDetailsGenerateDto">
|
<member name="T:WMS.Web.Core.Dto.Inventory.InventoryDetailsGenerateDto">
|
||||||
<summary>
|
<summary>
|
||||||
即时库存明细:生成dto
|
即时库存明细:生成dto
|
||||||
|
|||||||
@@ -2809,6 +2809,30 @@
|
|||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IBoxInventoryRepositories.GetPagedListBoxByMaterial(WMS.Web.Core.Dto.Inventory.GetPagedListBoxByMaterialRequest,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-物料
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="companyId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IBoxInventoryRepositories.GetPagedListBoxByBox(WMS.Web.Core.Dto.Inventory.GetPagedListBoxByBoxRequest,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-箱号
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="companyId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IBoxInventoryRepositories.GetPagedListBoxBySubStock(WMS.Web.Core.Dto.Inventory.GetPagedListBoxBySubStockRequest,System.Int32)">
|
||||||
|
<summary>
|
||||||
|
PDA库存查询-仓位
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="companyId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Infrastructure.IBoxMarkRepositories">
|
<member name="T:WMS.Web.Domain.Infrastructure.IBoxMarkRepositories">
|
||||||
<summary>
|
<summary>
|
||||||
箱唛-仓储接口
|
箱唛-仓储接口
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-箱号
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByBoxRequest : PaginationBaseRequestDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库编码
|
||||||
|
/// </summary>
|
||||||
|
public string StockCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 箱号
|
||||||
|
/// </summary>
|
||||||
|
public string BoxBillNo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-箱号
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByBoxResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 箱号
|
||||||
|
/// </summary>
|
||||||
|
public string BoxBillNo { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal TotalQty { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总条数
|
||||||
|
/// </summary>
|
||||||
|
public int TotalCount { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public List<GetPagedListBoxByBoxDetailsResponse> Details { get; set; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByBoxDetailsResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料规格型号
|
||||||
|
/// </summary>
|
||||||
|
public string Specifications { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal Qty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-物料
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByMaterialRequest : PaginationBaseRequestDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库编码
|
||||||
|
/// </summary>
|
||||||
|
public string StockCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料
|
||||||
|
///</summary>
|
||||||
|
public string MaterialNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-物料
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByMaterialResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
public string MaterialName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料编码
|
||||||
|
/// </summary>
|
||||||
|
public string MaterialNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料规格型号
|
||||||
|
/// </summary>
|
||||||
|
public string Specifications { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal TotalQty { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总条数
|
||||||
|
/// </summary>
|
||||||
|
public int TotalCount { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public List<GetPagedListBoxByMaterialDetailsResponse> Details { get; set; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxByMaterialDetailsResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 箱号
|
||||||
|
/// </summary>
|
||||||
|
public string BoxBillNo { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal Qty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-仓位
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxBySubStockRequest : PaginationBaseRequestDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库编码
|
||||||
|
/// </summary>
|
||||||
|
public string StockCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-仓位
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxBySubStockResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal TotalQty { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 总条数
|
||||||
|
/// </summary>
|
||||||
|
public int TotalCount { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public List<GetPagedListBoxBySubStockDetailsResponse> Details { get; set; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public class GetPagedListBoxBySubStockDetailsResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位名称
|
||||||
|
/// </summary>
|
||||||
|
public string SubStock { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 箱号
|
||||||
|
/// </summary>
|
||||||
|
public string BoxBillNo { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料规格型号
|
||||||
|
/// </summary>
|
||||||
|
public string Specifications { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal Qty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -73,5 +73,26 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <param name="isTransaction"></param>
|
/// <param name="isTransaction"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<bool> DeleteRange(List<int> ids, bool isTransaction = true);
|
Task<bool> DeleteRange(List<int> ids, bool isTransaction = true);
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-物料
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetPagedListBoxByMaterialResponse> GetPagedListBoxByMaterial(GetPagedListBoxByMaterialRequest dto, int companyId);
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-箱号
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetPagedListBoxByBoxResponse> GetPagedListBoxByBox(GetPagedListBoxByBoxRequest dto, int companyId);
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-仓位
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetPagedListBoxBySubStockResponse> GetPagedListBoxBySubStock(GetPagedListBoxBySubStockRequest dto, int companyId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ using System.Threading.Tasks;
|
|||||||
using WMS.Web.Core.Dto.Erp;
|
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.Inventory;
|
using WMS.Web.Core.Dto.Inventory;
|
||||||
|
using WMS.Web.Core.Dto.Login;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
using WMS.Web.Domain.Mappers;
|
using WMS.Web.Domain.Mappers;
|
||||||
|
using WMS.Web.Domain.Values;
|
||||||
using WMS.Web.Domain.Values.Single;
|
using WMS.Web.Domain.Values.Single;
|
||||||
using WMS.Web.Repositories.Configuration;
|
using WMS.Web.Repositories.Configuration;
|
||||||
|
|
||||||
@@ -33,7 +35,7 @@ namespace WMS.Web.Repositories
|
|||||||
private readonly IErpService _erpService;
|
private readonly IErpService _erpService;
|
||||||
private ILogger<BoxInventoryRepositories> _logger;
|
private ILogger<BoxInventoryRepositories> _logger;
|
||||||
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
||||||
|
private readonly IBasicsRepositories _basicsRepositories;
|
||||||
|
|
||||||
public BoxInventoryRepositories(RepositoryDbContext context,
|
public BoxInventoryRepositories(RepositoryDbContext context,
|
||||||
IMapper mapper,
|
IMapper mapper,
|
||||||
@@ -42,6 +44,7 @@ namespace WMS.Web.Repositories
|
|||||||
ILoginRepositories loginRepositories,
|
ILoginRepositories loginRepositories,
|
||||||
IServiceProvider serviceProvider,
|
IServiceProvider serviceProvider,
|
||||||
ISingleDataService singleDataService,
|
ISingleDataService singleDataService,
|
||||||
|
IBasicsRepositories basicsRepositories,
|
||||||
IErpBasicDataExtendService erpBasicDataExtendService)
|
IErpBasicDataExtendService erpBasicDataExtendService)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
@@ -52,6 +55,7 @@ namespace WMS.Web.Repositories
|
|||||||
_serviceProvider = serviceProvider;
|
_serviceProvider = serviceProvider;
|
||||||
_loginRepositories = loginRepositories;
|
_loginRepositories = loginRepositories;
|
||||||
_singleDataService = singleDataService;
|
_singleDataService = singleDataService;
|
||||||
|
_basicsRepositories = basicsRepositories;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -321,5 +325,147 @@ namespace WMS.Web.Repositories
|
|||||||
{
|
{
|
||||||
return await GetPagedList(dto, companyId);
|
return await GetPagedList(dto, companyId);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-物料
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<GetPagedListBoxByMaterialResponse> GetPagedListBoxByMaterial(GetPagedListBoxByMaterialRequest dto, int companyId)
|
||||||
|
{
|
||||||
|
//1.获取物料集合和组织集合
|
||||||
|
var materials = new List<ErpMaterialDto>();
|
||||||
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
|
if (materials_result.IsSuccess)
|
||||||
|
materials = materials_result.Data.ToList();
|
||||||
|
|
||||||
|
ErpMaterialDto material = null;
|
||||||
|
//物料集合;模糊查询后的物料集合
|
||||||
|
if (!string.IsNullOrEmpty(dto.MaterialNumber))
|
||||||
|
{
|
||||||
|
if (materials.Count != 0)
|
||||||
|
{
|
||||||
|
material = materials.FirstOrDefault(w => w.MaterialNumber.Equals(dto.MaterialNumber)
|
||||||
|
|| w.MaterialName.Equals(dto.MaterialNumber)
|
||||||
|
|| w.Specifications.Equals(dto.MaterialNumber)
|
||||||
|
);
|
||||||
|
if (material == null) return new GetPagedListBoxByMaterialResponse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var query = _context.BoxInventoryDetails
|
||||||
|
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||||
|
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||||
|
.GroupJoin(_context.Box, p => p.order.BoxId, t => t.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||||
|
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||||
|
.Where(adv => 1 == 1 && adv.detail.MaterialNumber.Equals(material.MaterialNumber));
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(dto.StockCode))
|
||||||
|
{
|
||||||
|
var splitStrs = dto.StockCode.Split("_$");
|
||||||
|
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
|
||||||
|
}
|
||||||
|
GetPagedListBoxByMaterialResponse response = new GetPagedListBoxByMaterialResponse();
|
||||||
|
response.Specifications = material.Specifications;
|
||||||
|
response.MaterialNumber = material.MaterialNumber;
|
||||||
|
response.MaterialName = material.MaterialName;
|
||||||
|
|
||||||
|
response.TotalCount = await query.CountAsync();
|
||||||
|
response.Details = await query.Select(s => new GetPagedListBoxByMaterialDetailsResponse()
|
||||||
|
{
|
||||||
|
BoxBillNo = s.box.BoxBillNo,
|
||||||
|
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.order.SubStockCode + s.order.StockCode + s.order.OrgCode),
|
||||||
|
Qty = s.detail.Qty,
|
||||||
|
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
response.TotalQty = response.Details.Sum(s => s.Qty);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-箱号
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public async Task<GetPagedListBoxByBoxResponse> GetPagedListBoxByBox(GetPagedListBoxByBoxRequest dto, int companyId)
|
||||||
|
{
|
||||||
|
//1.获取物料集合和组织集合
|
||||||
|
var materials = new List<ErpMaterialDto>();
|
||||||
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
|
if (materials_result.IsSuccess)
|
||||||
|
materials = materials_result.Data.ToList();
|
||||||
|
|
||||||
|
var query = _context.BoxInventoryDetails
|
||||||
|
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||||
|
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||||
|
.GroupJoin(_context.Box, p => p.order.BoxId, t => t.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||||
|
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||||
|
.Where(adv => 1 == 1 && adv.box.BoxBillNo.Equals(dto.BoxBillNo));
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(dto.StockCode))
|
||||||
|
{
|
||||||
|
var splitStrs = dto.StockCode.Split("_$");
|
||||||
|
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
|
||||||
|
}
|
||||||
|
GetPagedListBoxByBoxResponse response = new GetPagedListBoxByBoxResponse();
|
||||||
|
response.BoxBillNo = dto.BoxBillNo;
|
||||||
|
|
||||||
|
response.TotalCount = await query.CountAsync();
|
||||||
|
response.Details = await query.Select(s => new GetPagedListBoxByBoxDetailsResponse()
|
||||||
|
{
|
||||||
|
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
|
||||||
|
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.order.SubStockCode + s.order.StockCode + s.order.OrgCode),
|
||||||
|
Qty = s.detail.Qty,
|
||||||
|
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
response.TotalQty = response.Details.Sum(s => s.Qty);
|
||||||
|
if (response.Details.Count > 0) response.SubStock = response.Details.First().SubStock;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// PDA库存查询-仓位
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="companyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public async Task<GetPagedListBoxBySubStockResponse> GetPagedListBoxBySubStock(GetPagedListBoxBySubStockRequest dto, int companyId)
|
||||||
|
{
|
||||||
|
//1.获取物料集合和组织集合
|
||||||
|
var materials = new List<ErpMaterialDto>();
|
||||||
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
|
if (materials_result.IsSuccess)
|
||||||
|
materials = materials_result.Data.ToList();
|
||||||
|
|
||||||
|
var r = await _basicsRepositories.GetSubUcStockAsync(ManagementSystemCode.GLXT0004.ToString(), dto.SubStock, companyId);
|
||||||
|
var subStock = r.FirstOrDefault(f => f.Name.Equals(dto.StockCode));
|
||||||
|
if (subStock == null) return new GetPagedListBoxBySubStockResponse();
|
||||||
|
|
||||||
|
var query = _context.BoxInventoryDetails
|
||||||
|
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
|
||||||
|
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
|
||||||
|
.GroupJoin(_context.Box, p => p.order.BoxId, t => t.Id, (p, ts) => new { p.detail, p.order, ts })
|
||||||
|
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
|
||||||
|
.Where(adv => 1 == 1 && adv.order.SubStockCode.Equals(subStock.Code));
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(dto.StockCode))
|
||||||
|
{
|
||||||
|
var splitStrs = dto.StockCode.Split("_$");
|
||||||
|
query = query.Where(w => w.order.StockCode == splitStrs[0] && w.order.OrgCode == splitStrs[1]);
|
||||||
|
}
|
||||||
|
GetPagedListBoxBySubStockResponse response = new GetPagedListBoxBySubStockResponse();
|
||||||
|
|
||||||
|
response.TotalCount = await query.CountAsync();
|
||||||
|
response.Details = await query.Select(s => new GetPagedListBoxBySubStockDetailsResponse()
|
||||||
|
{
|
||||||
|
BoxBillNo = s.box.BoxBillNo,
|
||||||
|
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
|
||||||
|
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.order.SubStockCode + s.order.StockCode + s.order.OrgCode),
|
||||||
|
Qty = s.detail.Qty,
|
||||||
|
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
response.TotalQty = response.Details.Sum(s => s.Qty);
|
||||||
|
if (response.Details.Count > 0) response.SubStock = response.Details.First().SubStock;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user