优化
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user