This commit is contained in:
tongfei
2024-03-21 15:51:00 +08:00
parent 39c8540a06
commit 0197180005

View File

@@ -548,7 +548,7 @@ namespace WMS.Web.Domain.Services
}); });
//是否要改箱的信息:直接调拨出库单,过来的出库就不要去改箱了 //是否要改箱的信息:直接调拨出库单,过来的出库就不要去改箱了
var isChangeBoxInfo = true; var isChangeBoxInfo = true;
if (dtoData != null && (dtoData.Type == OutStockType.Stkdirecttransfers || dtoData.Type== OutStockType.StktransferInst)) if (dtoData != null && (dtoData.Type == OutStockType.Stkdirecttransfers || dtoData.Type == OutStockType.StktransferInst))
isChangeBoxInfo = false; isChangeBoxInfo = false;
//提交处理 //提交处理
var result = await this.ExeOutStockBox(generateDtoList, boxInventorys, isChangeBoxInfo, isTransaction); var result = await this.ExeOutStockBox(generateDtoList, boxInventorys, isChangeBoxInfo, isTransaction);
@@ -1730,7 +1730,8 @@ namespace WMS.Web.Domain.Services
delete_ids.Add(boxInventory.Id); delete_ids.Add(boxInventory.Id);
//给改箱服务用按箱的话就要把明细里的数量修改为0 //给改箱服务用按箱的话就要把明细里的数量修改为0
changeBox_inventoryList.Add(GenerateBoxInventory(boxInventory.Clone())); if (isChangeBoxInfo)
changeBox_inventoryList.Add(GenerateBoxInventory(boxInventory.Clone()));
//4.组装即时库存 //4.组装即时库存
foreach (var detItem in dto.Details) foreach (var detItem in dto.Details)
@@ -1787,7 +1788,8 @@ namespace WMS.Web.Domain.Services
if (isAllNoInventory) if (isAllNoInventory)
{ {
//给改箱服务用按箱的话就要把明细里的数量修改为0 //给改箱服务用按箱的话就要把明细里的数量修改为0
changeBox_inventoryList.Add(GenerateBoxInventory(update_entity.Clone())); if (isChangeBoxInfo)
changeBox_inventoryList.Add(GenerateBoxInventory(update_entity.Clone()));
delete_ids.Add(update_entity.Id); delete_ids.Add(update_entity.Id);
} }
else else
@@ -1802,12 +1804,10 @@ namespace WMS.Web.Domain.Services
} }
//改箱 //改箱
if (isChangeBoxInfo) var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction);
{ if (!changeBox_result.IsSuccess)
var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction); return changeBox_result;
if (!changeBox_result.IsSuccess)
return changeBox_result;
}
//4.数据库更新操作:更新和删除 //4.数据库更新操作:更新和删除
var isSuccess = true; var isSuccess = true;