物料收发明细
This commit is contained in:
@@ -2464,6 +2464,21 @@
|
|||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInventoryInOutDetailsService.GenerateDto(System.Int32,System.Int32,System.String,System.String,System.Int32,WMS.Web.Domain.Values.OrderType,System.String,System.Decimal,WMS.Web.Domain.Values.InventoryInOutType)">
|
||||||
|
<summary>
|
||||||
|
生成dto
|
||||||
|
</summary>
|
||||||
|
<param name="boxId"></param>
|
||||||
|
<param name="materialId"></param>
|
||||||
|
<param name="orgCode"></param>
|
||||||
|
<param name="stockCode"></param>
|
||||||
|
<param name="subStockId"></param>
|
||||||
|
<param name="orderType"></param>
|
||||||
|
<param name="billNo"></param>
|
||||||
|
<param name="qty"></param>
|
||||||
|
<param name="inventoryInOutType"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.IService.IOutStockService">
|
<member name="T:WMS.Web.Domain.IService.IOutStockService">
|
||||||
<summary>
|
<summary>
|
||||||
出库服务
|
出库服务
|
||||||
@@ -3341,19 +3356,23 @@
|
|||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeChangeBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryChangeGenerateDto},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeChangeBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryChangeGenerateDto},System.Collections.Generic.List{WMS.Web.Domain.Entitys.BoxInventory},System.Collections.Generic.List{WMS.Web.Domain.Entitys.BoxInventory},System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
改箱-箱库存的变更
|
改箱-箱库存的变更
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dtoDatas"></param>
|
<param name="dtoDatas"></param>
|
||||||
|
<param name="sourceBoxInventorys"></param>
|
||||||
|
<param name="targetBoxInventorys"></param>
|
||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeMoveBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryMoveGenerateDto},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeMoveBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryMoveGenerateDto},System.Collections.Generic.List{WMS.Web.Domain.Entitys.BoxInventory},System.Collections.Generic.List{WMS.Web.Domain.Entitys.Box},System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
移箱-箱库存的变更
|
移箱-箱库存的变更
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dtoDatas"></param>
|
<param name="dtoDatas"></param>
|
||||||
|
<param name="boxInventorys"></param>
|
||||||
|
<param name="boxs"></param>
|
||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
@@ -3672,6 +3691,21 @@
|
|||||||
<param name="isTransaction"></param>
|
<param name="isTransaction"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InventoryInOutDetailsService.GenerateDto(System.Int32,System.Int32,System.String,System.String,System.Int32,WMS.Web.Domain.Values.OrderType,System.String,System.Decimal,WMS.Web.Domain.Values.InventoryInOutType)">
|
||||||
|
<summary>
|
||||||
|
生成dto
|
||||||
|
</summary>
|
||||||
|
<param name="boxId"></param>
|
||||||
|
<param name="materialId"></param>
|
||||||
|
<param name="orgCode"></param>
|
||||||
|
<param name="stockCode"></param>
|
||||||
|
<param name="subStockId"></param>
|
||||||
|
<param name="orderType"></param>
|
||||||
|
<param name="billNo"></param>
|
||||||
|
<param name="qty"></param>
|
||||||
|
<param name="inventoryInOutType"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Services.OutStockService">
|
<member name="T:WMS.Web.Domain.Services.OutStockService">
|
||||||
<summary>
|
<summary>
|
||||||
出库服务
|
出库服务
|
||||||
@@ -4859,6 +4893,26 @@
|
|||||||
组装拆卸出库
|
组装拆卸出库
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="F:WMS.Web.Domain.Values.OrderType.ChangeBox">
|
||||||
|
<summary>
|
||||||
|
改箱
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:WMS.Web.Domain.Values.OrderType.MoveBox">
|
||||||
|
<summary>
|
||||||
|
移箱
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:WMS.Web.Domain.Values.OrderType.Back">
|
||||||
|
<summary>
|
||||||
|
出入库回退单
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:WMS.Web.Domain.Values.OrderType.Take">
|
||||||
|
<summary>
|
||||||
|
盘点单
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Values.OutStockStatus">
|
<member name="T:WMS.Web.Domain.Values.OutStockStatus">
|
||||||
<summary>
|
<summary>
|
||||||
出库状态
|
出库状态
|
||||||
|
|||||||
@@ -47,10 +47,6 @@ namespace WMS.Web.Core.Dto.Inventory
|
|||||||
/// 数量:出入库
|
/// 数量:出入库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal Qty { get; set; }
|
public decimal Qty { get; set; }
|
||||||
///// <summary>
|
|
||||||
///// 结存
|
|
||||||
///// </summary>
|
|
||||||
//public decimal SurplusQty { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 类型:1为入库,2为出库
|
/// 类型:1为入库,2为出库
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WMS.Web.Core.Dto.Inventory;
|
using WMS.Web.Core.Dto.Inventory;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.IService
|
namespace WMS.Web.Domain.IService
|
||||||
{
|
{
|
||||||
@@ -19,5 +20,20 @@ namespace WMS.Web.Domain.IService
|
|||||||
/// <param name="isTransaction"></param>
|
/// <param name="isTransaction"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Result> GenerateInOrOutDetails(List<InventoryInOutDetailsGenerateDto> dtos, bool isTransaction);
|
Task<Result> GenerateInOrOutDetails(List<InventoryInOutDetailsGenerateDto> dtos, bool isTransaction);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成dto
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="boxId"></param>
|
||||||
|
/// <param name="materialId"></param>
|
||||||
|
/// <param name="orgCode"></param>
|
||||||
|
/// <param name="stockCode"></param>
|
||||||
|
/// <param name="subStockId"></param>
|
||||||
|
/// <param name="orderType"></param>
|
||||||
|
/// <param name="billNo"></param>
|
||||||
|
/// <param name="qty"></param>
|
||||||
|
/// <param name="inventoryInOutType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
InventoryInOutDetailsGenerateDto GenerateDto(int boxId, int materialId, string orgCode, string stockCode, int subStockId, OrderType orderType, string billNo, decimal qty, InventoryInOutType inventoryInOutType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,12 @@ namespace WMS.Web.Domain.Services
|
|||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
private readonly IBoxRepositories _boxRepositories;
|
private readonly IBoxRepositories _boxRepositories;
|
||||||
private readonly IInventoryDetailsService _inventoryDetailsService;
|
private readonly IInventoryDetailsService _inventoryDetailsService;
|
||||||
|
private readonly IInventoryInOutDetailsService _inventoryInOutDetailsService;
|
||||||
private readonly ISerialNumbersRepositories _serialNumbersRepositories;
|
private readonly ISerialNumbersRepositories _serialNumbersRepositories;
|
||||||
private readonly IBoxInventoryRepositories _boxInventoryRepositories;
|
private readonly IBoxInventoryRepositories _boxInventoryRepositories;
|
||||||
public BoxInventoryService(IMapper mapper, IBoxRepositories boxRepositories,
|
public BoxInventoryService(IMapper mapper, IBoxRepositories boxRepositories,
|
||||||
IInventoryDetailsService inventoryDetailsService,
|
IInventoryDetailsService inventoryDetailsService,
|
||||||
|
IInventoryInOutDetailsService inventoryInOutDetailsService,
|
||||||
ISerialNumbersRepositories serialNumbersRepositories,
|
ISerialNumbersRepositories serialNumbersRepositories,
|
||||||
IBoxInventoryRepositories boxInventoryRepositories)
|
IBoxInventoryRepositories boxInventoryRepositories)
|
||||||
{
|
{
|
||||||
@@ -33,6 +35,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
_inventoryDetailsService = inventoryDetailsService;
|
_inventoryDetailsService = inventoryDetailsService;
|
||||||
_serialNumbersRepositories = serialNumbersRepositories;
|
_serialNumbersRepositories = serialNumbersRepositories;
|
||||||
_boxInventoryRepositories = boxInventoryRepositories;
|
_boxInventoryRepositories = boxInventoryRepositories;
|
||||||
|
_inventoryInOutDetailsService = inventoryInOutDetailsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -86,7 +89,49 @@ namespace WMS.Web.Domain.Services
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
//4.开始处理
|
//4.开始处理
|
||||||
return await this.ExeChangeBox(generateDtos, isTransaction);
|
var result= await this.ExeChangeBox(generateDtos, sourceBoxInventorys, targetBoxInventorys, isTransaction);
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
//5.物料收发明细dtos
|
||||||
|
var InventoryInOutDetailsGenerateDtoList = new List<InventoryInOutDetailsGenerateDto>();
|
||||||
|
|
||||||
|
//5.1遍历
|
||||||
|
foreach (var item in dtoDatas)
|
||||||
|
{
|
||||||
|
//5.2组装:原箱物料收发明细;有箱库存就需要创建物料收发明细;
|
||||||
|
var sour = sourceBoxInventorys.Where(x => x.BoxId == item.SrcBoxId).FirstOrDefault();
|
||||||
|
if (sour != null)
|
||||||
|
{
|
||||||
|
var inventoryInOutDet = _inventoryInOutDetailsService.GenerateDto(
|
||||||
|
item.SrcBoxId, item.MaterialId,
|
||||||
|
sour.OrgCode, sour.StockCode,
|
||||||
|
sour.SubStockId, OrderType.ChangeBox,
|
||||||
|
item.BillNo, item.Qty, InventoryInOutType.Out);
|
||||||
|
InventoryInOutDetailsGenerateDtoList.Add(inventoryInOutDet);
|
||||||
|
}
|
||||||
|
//5.3组装:目标箱物料收发明细;有箱库存就需要创建物料收发明细;
|
||||||
|
var tagBox = targetBoxInventorys.Where(x => x.BoxId == item.DestBoxId).FirstOrDefault();
|
||||||
|
if (tagBox != null)
|
||||||
|
{
|
||||||
|
var inventoryInOutDet=_inventoryInOutDetailsService.GenerateDto(
|
||||||
|
item.DestBoxId, item.MaterialId,
|
||||||
|
item.DestBoxOrgCode, item.DestStockCode,
|
||||||
|
item.DestSubStockId, OrderType.ChangeBox,
|
||||||
|
item.BillNo, item.Qty, InventoryInOutType.In);
|
||||||
|
InventoryInOutDetailsGenerateDtoList.Add(inventoryInOutDet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//5.提交物料收发明细:新增
|
||||||
|
if (InventoryInOutDetailsGenerateDtoList.Count != 0)
|
||||||
|
{
|
||||||
|
var inout_result = await _inventoryInOutDetailsService.GenerateInOrOutDetails(InventoryInOutDetailsGenerateDtoList,isTransaction);
|
||||||
|
if (!inout_result.IsSuccess)
|
||||||
|
return inout_result;
|
||||||
|
}
|
||||||
|
return Result.ReSuccess();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -101,6 +146,9 @@ namespace WMS.Web.Domain.Services
|
|||||||
if (dtoDatas == null || dtoDatas.Count == 0)
|
if (dtoDatas == null || dtoDatas.Count == 0)
|
||||||
return Result.ReFailure(ResultCodes.InventoryNoSourceError);
|
return Result.ReFailure(ResultCodes.InventoryNoSourceError);
|
||||||
|
|
||||||
|
//物料收发明细dtos
|
||||||
|
var InventoryInOutDetailsGenerateDtoList = new List<InventoryInOutDetailsGenerateDto>();
|
||||||
|
|
||||||
//2.箱库存集合
|
//2.箱库存集合
|
||||||
var boxIds = dtoDatas.Where(x => x.BoxId != 0 && x.Type == MoveBoxType.Down).GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
var boxIds = dtoDatas.Where(x => x.BoxId != 0 && x.Type == MoveBoxType.Down).GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||||
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
|
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
|
||||||
@@ -112,6 +160,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
var generateDtoList = new List<BoxInventoryMoveGenerateDto>();
|
var generateDtoList = new List<BoxInventoryMoveGenerateDto>();
|
||||||
foreach (var item in dtoDatas)
|
foreach (var item in dtoDatas)
|
||||||
{
|
{
|
||||||
|
//2.2.1箱库存dto-组装
|
||||||
var generateDto = new BoxInventoryMoveGenerateDto();
|
var generateDto = new BoxInventoryMoveGenerateDto();
|
||||||
generateDto.BoxId = item.BoxId;
|
generateDto.BoxId = item.BoxId;
|
||||||
generateDto.OrgCode = item.OrgCode;
|
generateDto.OrgCode = item.OrgCode;
|
||||||
@@ -120,9 +169,43 @@ namespace WMS.Web.Domain.Services
|
|||||||
generateDto.InventoryInOutType = item.Type == MoveBoxType.Down ? (int)InventoryInOutType.Out : (int)InventoryInOutType.In;
|
generateDto.InventoryInOutType = item.Type == MoveBoxType.Down ? (int)InventoryInOutType.Out : (int)InventoryInOutType.In;
|
||||||
generateDtoList.Add(generateDto);
|
generateDtoList.Add(generateDto);
|
||||||
|
|
||||||
|
//2.2.2物料收发明dto-组装
|
||||||
|
var SubStockId = item.Type == MoveBoxType.Up ? item.DestSubStockId : item.SrcSubStockId;
|
||||||
|
InventoryInOutType InOutType = item.Type == MoveBoxType.Down ? InventoryInOutType.Out : InventoryInOutType.In;
|
||||||
|
var ishave = boxInventorys.Where(x => x.BoxId == item.BoxId).Any();
|
||||||
|
//上架-箱是不存在库存的情况下,生成物料收发明细
|
||||||
|
//或者
|
||||||
|
//下架-箱库存是存在的情况下,生成物料收发明细
|
||||||
|
if ((!ishave && item.Type == MoveBoxType.Up) || (ishave && item.Type == MoveBoxType.Down))
|
||||||
|
{
|
||||||
|
//5.1.1取箱信息
|
||||||
|
var box = boxs.Where(x => x.Id == item.BoxId).FirstOrDefault();
|
||||||
|
foreach (var boxDet in box.Details)
|
||||||
|
{
|
||||||
|
var inventoryInOutDet = _inventoryInOutDetailsService.GenerateDto(
|
||||||
|
item.BoxId, boxDet.MaterialId,
|
||||||
|
item.OrgCode, item.StockCode,
|
||||||
|
SubStockId, OrderType.MoveBox,
|
||||||
|
item.BillNo, item.Qty, InOutType);
|
||||||
|
InventoryInOutDetailsGenerateDtoList.Add(inventoryInOutDet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//4.开始处理
|
//4.开始处理
|
||||||
return await this.ExeMoveBox(generateDtoList, isTransaction);
|
var result= await this.ExeMoveBox(generateDtoList, boxInventorys, boxs, isTransaction);
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
//5.提交物料收发明细:新增
|
||||||
|
if (InventoryInOutDetailsGenerateDtoList.Count != 0)
|
||||||
|
{
|
||||||
|
var inout_result = await _inventoryInOutDetailsService.GenerateInOrOutDetails(InventoryInOutDetailsGenerateDtoList, isTransaction);
|
||||||
|
if (!inout_result.IsSuccess)
|
||||||
|
return inout_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.ReSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -425,13 +508,16 @@ namespace WMS.Web.Domain.Services
|
|||||||
//提交处理
|
//提交处理
|
||||||
return await this.ExeOutStockBox(generateDtoList, isTransaction);
|
return await this.ExeOutStockBox(generateDtoList, isTransaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 改箱-箱库存的变更
|
/// 改箱-箱库存的变更
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dtoDatas"></param>
|
/// <param name="dtoDatas"></param>
|
||||||
|
/// <param name="sourceBoxInventorys"></param>
|
||||||
|
/// <param name="targetBoxInventorys"></param>
|
||||||
/// <param name="isTransaction"></param>
|
/// <param name="isTransaction"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task<Result> ExeChangeBox(List<BoxInventoryChangeGenerateDto> dtoDatas, bool isTransaction)
|
private async Task<Result> ExeChangeBox(List<BoxInventoryChangeGenerateDto> dtoDatas,List<BoxInventory> sourceBoxInventorys, List<BoxInventory> targetBoxInventorys, bool isTransaction)
|
||||||
{
|
{
|
||||||
//1.判断来源数据是否存在
|
//1.判断来源数据是否存在
|
||||||
if (dtoDatas == null || dtoDatas.Count == 0)
|
if (dtoDatas == null || dtoDatas.Count == 0)
|
||||||
@@ -441,16 +527,6 @@ namespace WMS.Web.Domain.Services
|
|||||||
var add_entitys = new List<BoxInventory>();
|
var add_entitys = new List<BoxInventory>();
|
||||||
var InventoryDetailsGenerateDto = new List<InventoryDetailsGenerateDto>();
|
var InventoryDetailsGenerateDto = new List<InventoryDetailsGenerateDto>();
|
||||||
|
|
||||||
var boxIds = dtoDatas.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
|
||||||
var targetBoxIds = dtoDatas.GroupBy(x => x.TargetBoxId).Select(x => x.Key).ToList();
|
|
||||||
|
|
||||||
//2.原来箱库存集合
|
|
||||||
var sourceBoxInventorys = await _boxInventoryRepositories.GetList(boxIds);
|
|
||||||
|
|
||||||
//2.1目标箱库存集合
|
|
||||||
var targetBoxInventorys = await _boxInventoryRepositories.GetList(targetBoxIds);
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var dto in dtoDatas)
|
foreach (var dto in dtoDatas)
|
||||||
{
|
{
|
||||||
#region 原箱库存-库存处理
|
#region 原箱库存-库存处理
|
||||||
@@ -487,7 +563,6 @@ namespace WMS.Web.Domain.Services
|
|||||||
inventoryDet.InventoryInOutType = (int)InventoryInOutType.Out;
|
inventoryDet.InventoryInOutType = (int)InventoryInOutType.Out;
|
||||||
//2.2.2即时库存:修改箱库存的集合
|
//2.2.2即时库存:修改箱库存的集合
|
||||||
InventoryDetailsGenerateDto.Add(inventoryDet);
|
InventoryDetailsGenerateDto.Add(inventoryDet);
|
||||||
|
|
||||||
}
|
}
|
||||||
//2.2.1箱库存:修改箱库存的集合
|
//2.2.1箱库存:修改箱库存的集合
|
||||||
update_entitys.Add(sour_update_entity);
|
update_entitys.Add(sour_update_entity);
|
||||||
@@ -573,9 +648,11 @@ namespace WMS.Web.Domain.Services
|
|||||||
/// 移箱-箱库存的变更
|
/// 移箱-箱库存的变更
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dtoDatas"></param>
|
/// <param name="dtoDatas"></param>
|
||||||
|
/// <param name="boxInventorys"></param>
|
||||||
|
/// <param name="boxs"></param>
|
||||||
/// <param name="isTransaction"></param>
|
/// <param name="isTransaction"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task<Result> ExeMoveBox(List<BoxInventoryMoveGenerateDto> dtoDatas, bool isTransaction)
|
private async Task<Result> ExeMoveBox(List<BoxInventoryMoveGenerateDto> dtoDatas, List<BoxInventory> boxInventorys,List<Box> boxs, bool isTransaction)
|
||||||
{
|
{
|
||||||
//1.判断来源数据是否存在
|
//1.判断来源数据是否存在
|
||||||
if (dtoDatas == null || dtoDatas.Count == 0)
|
if (dtoDatas == null || dtoDatas.Count == 0)
|
||||||
@@ -587,8 +664,6 @@ namespace WMS.Web.Domain.Services
|
|||||||
|
|
||||||
//2.获取“箱库存集合”和“箱基本信息集合”
|
//2.获取“箱库存集合”和“箱基本信息集合”
|
||||||
var boxIds = dtoDatas.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
var boxIds = dtoDatas.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
|
||||||
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
|
|
||||||
var boxs = await _boxRepositories.GetEntityList(boxIds);
|
|
||||||
var serialNumbers = await _serialNumbersRepositories.GetEntityListByBoxIds(boxIds);
|
var serialNumbers = await _serialNumbersRepositories.GetEntityListByBoxIds(boxIds);
|
||||||
|
|
||||||
//3.遍历:dto
|
//3.遍历:dto
|
||||||
|
|||||||
@@ -79,5 +79,33 @@ namespace WMS.Web.Domain.Services
|
|||||||
|
|
||||||
return Result.ReSuccess();
|
return Result.ReSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成dto
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="boxId"></param>
|
||||||
|
/// <param name="materialId"></param>
|
||||||
|
/// <param name="orgCode"></param>
|
||||||
|
/// <param name="stockCode"></param>
|
||||||
|
/// <param name="subStockId"></param>
|
||||||
|
/// <param name="orderType"></param>
|
||||||
|
/// <param name="billNo"></param>
|
||||||
|
/// <param name="qty"></param>
|
||||||
|
/// <param name="inventoryInOutType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public InventoryInOutDetailsGenerateDto GenerateDto(int boxId,int materialId,string orgCode,string stockCode,int subStockId, OrderType orderType,string billNo,decimal qty, InventoryInOutType inventoryInOutType)
|
||||||
|
{
|
||||||
|
var item = new InventoryInOutDetailsGenerateDto();
|
||||||
|
item.BoxId = boxId;
|
||||||
|
item.MaterialId = materialId;
|
||||||
|
item.OrgCode = orgCode;
|
||||||
|
item.StockCode = stockCode;
|
||||||
|
item.SubStockId = subStockId;
|
||||||
|
item.OrderType = (int)orderType;
|
||||||
|
item.OrderBillNo = billNo;
|
||||||
|
item.Qty = qty;
|
||||||
|
item.InventoryInOutType = (int)inventoryInOutType;
|
||||||
|
return item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,5 +60,25 @@ namespace WMS.Web.Domain.Values
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[EnumRemark("组装拆卸出库")]
|
[EnumRemark("组装拆卸出库")]
|
||||||
Assembled_Out = 10,
|
Assembled_Out = 10,
|
||||||
|
/// <summary>
|
||||||
|
/// 改箱
|
||||||
|
/// </summary>
|
||||||
|
[EnumRemark("改箱单")]
|
||||||
|
ChangeBox = 11,
|
||||||
|
/// <summary>
|
||||||
|
/// 移箱
|
||||||
|
/// </summary>
|
||||||
|
[EnumRemark("移箱单")]
|
||||||
|
MoveBox = 12,
|
||||||
|
/// <summary>
|
||||||
|
/// 出入库回退单
|
||||||
|
/// </summary>
|
||||||
|
[EnumRemark("出入库回退单")]
|
||||||
|
Back = 13,
|
||||||
|
/// <summary>
|
||||||
|
/// 盘点单
|
||||||
|
/// </summary>
|
||||||
|
[EnumRemark("盘点单")]
|
||||||
|
Take = 14,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user