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

@@ -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)
return result;
@@ -1698,7 +1701,7 @@ namespace WMS.Web.Domain.Services
/// <param name="boxInventorys"></param>
/// <param name="isTransaction"></param>
/// <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.判断来源数据是否存在
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(!changeBox_result.IsSuccess)
return changeBox_result;
if (isChangeBoxInfo)
{
var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction);
if (!changeBox_result.IsSuccess)
return changeBox_result;
}
//4.数据库更新操作:更新和删除
var isSuccess = true;