整箱移动-就不要改箱的操作了

This commit is contained in:
tongfei
2024-03-06 16:29:17 +08:00
parent 9263e25230
commit bab923ad2b

View File

@@ -817,8 +817,8 @@ 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);
//这个实体给改箱的服务进行处理 ////这个实体给改箱的服务进行处理
var changeBox_inventoryList = new List<BoxInventory>(); //var changeBox_inventoryList = new List<BoxInventory>();
var delete_entitys = new List<BoxInventory>(); var delete_entitys = new List<BoxInventory>();
var add_entitys = new List<BoxInventory>(); var add_entitys = new List<BoxInventory>();
@@ -842,8 +842,8 @@ namespace WMS.Web.Domain.Services
//3.4箱库存:要新增的集合 //3.4箱库存:要新增的集合
add_entitys.Add(addEntity); add_entitys.Add(addEntity);
//给改箱服务用 ////给改箱服务用--整箱移动就不要处理了
changeBox_inventoryList.Add(addEntity.Clone()); //changeBox_inventoryList.Add(addEntity.Clone());
//4.1即时库存:组装入库 //4.1即时库存:组装入库
foreach (var item in dto.Details) foreach (var item in dto.Details)
@@ -874,8 +874,8 @@ namespace WMS.Web.Domain.Services
var box_inventory = boxInventorys.Where(x => x.BoxId == dto.BoxId).FirstOrDefault(); var box_inventory = boxInventorys.Where(x => x.BoxId == dto.BoxId).FirstOrDefault();
delete_entitys.Add(box_inventory); delete_entitys.Add(box_inventory);
//给改箱服务用按箱的话就要把明细里的数量修改为0 //给改箱服务用按箱的话就要把明细里的数量修改为0--整箱移动就不要处理了
changeBox_inventoryList.Add(GenerateBoxInventory(box_inventory.Clone())); //changeBox_inventoryList.Add(GenerateBoxInventory(box_inventory.Clone()));
//4.1即时库存:组装出库 //4.1即时库存:组装出库
foreach (var item in box_inventory.Details) foreach (var item in box_inventory.Details)
@@ -894,10 +894,10 @@ namespace WMS.Web.Domain.Services
} }
} }
//改箱 ////改箱
var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction); //var changeBox_result = await _boxService.BoxInventorySync(changeBox_inventoryList, isTransaction);
if (!changeBox_result.IsSuccess) //if (!changeBox_result.IsSuccess)
return changeBox_result; // return changeBox_result;
var isSuccess = true; var isSuccess = true;
//4.数据库操作处理 //4.数据库操作处理