This commit is contained in:
tongfei
2024-03-21 15:02:07 +08:00
parent a4a770d5a5
commit 9e71c8e463
2 changed files with 13 additions and 7 deletions

View File

@@ -4267,7 +4267,7 @@
<param name="isTransaction"></param> <param name="isTransaction"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeOutStockBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryGenerateDto},System.Collections.Generic.List{WMS.Web.Domain.Entitys.BoxInventory},System.Boolean)"> <member name="M:WMS.Web.Domain.Services.BoxInventoryService.ExeOutStockBox(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryGenerateDto},System.Collections.Generic.List{WMS.Web.Domain.Entitys.BoxInventory},System.Boolean,System.Boolean)">
<summary> <summary>
出库单-箱库存变更 出库单-箱库存变更
</summary> </summary>

View File

@@ -546,9 +546,12 @@ namespace WMS.Web.Domain.Services
} }
}); });
//是否要改箱的信息:直接调拨出库单,过来的出库就不要去改箱了
var isChangeBoxInfo = true;
if (dtoData != null && dtoData.Type == OutStockType.Stkdirecttransfers)
isChangeBoxInfo = false;
//提交处理 //提交处理
var result = await this.ExeOutStockBox(generateDtoList, boxInventorys, isTransaction); var result = await this.ExeOutStockBox(generateDtoList, boxInventorys, isChangeBoxInfo, isTransaction);
if (!result.IsSuccess) if (!result.IsSuccess)
return result; return result;
@@ -1698,7 +1701,7 @@ namespace WMS.Web.Domain.Services
/// <param name="boxInventorys"></param> /// <param name="boxInventorys"></param>
/// <param name="isTransaction"></param> /// <param name="isTransaction"></param>
/// <returns></returns> /// <returns></returns>
private async Task<Result> ExeOutStockBox(List<BoxInventoryGenerateDto> dtoDatas, List<BoxInventory> boxInventorys, bool isTransaction) private async Task<Result> ExeOutStockBox(List<BoxInventoryGenerateDto> dtoDatas, List<BoxInventory> boxInventorys, bool isChangeBoxInfo, bool isTransaction)
{ {
//1.判断来源数据是否存在 //1.判断来源数据是否存在
if (dtoDatas == null || dtoDatas.Count == 0) if (dtoDatas == null || dtoDatas.Count == 0)
@@ -1799,9 +1802,12 @@ namespace WMS.Web.Domain.Services
} }
//改箱 //改箱
var changeBox_result= await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction); if (isChangeBoxInfo)
if(!changeBox_result.IsSuccess) {
return changeBox_result; var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction);
if (!changeBox_result.IsSuccess)
return changeBox_result;
}
//4.数据库更新操作:更新和删除 //4.数据库更新操作:更新和删除
var isSuccess = true; var isSuccess = true;