oms预约单新增报错修改;

This commit is contained in:
王奎兴
2026-05-13 11:17:16 +08:00
parent 29f0f55c73
commit 7cc77eff09
@@ -100,7 +100,7 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
List<ReservationMaterialInventory> list = new ArrayList<>(); List<ReservationMaterialInventory> list = new ArrayList<>();
for (Long id : materialInventoryIds) { for (Long id : materialInventoryIds) {
ReservationMaterialInventory materialInventory = new ReservationMaterialInventory(); ReservationMaterialInventory materialInventory = new ReservationMaterialInventory();
materialInventory.setReservationMaterialInventoryId(id); materialInventory.setMaterialInventoryId(id);
materialInventory.setDelFlag(2); materialInventory.setDelFlag(2);
list.add(materialInventory); list.add(materialInventory);
} }
@@ -133,7 +133,7 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
.eq(ReservationMaterialInventory::getWarehouseId, warehouseId)); .eq(ReservationMaterialInventory::getWarehouseId, warehouseId));
if (reservationMaterialInventories != null && reservationMaterialInventories.size() > 0) { if (reservationMaterialInventories != null && reservationMaterialInventories.size() > 0) {
ReservationMaterialInventory reservationMaterialInventory = reservationMaterialInventories.get(0); ReservationMaterialInventory reservationMaterialInventory = reservationMaterialInventories.get(0);
Long materialInventoryId = reservationMaterialInventory.getReservationMaterialInventoryId(); Long materialInventoryId = reservationMaterialInventory.getMaterialInventoryId();
materialInventoryOmsParamDO.setMaterialInventoryId(materialInventoryId); materialInventoryOmsParamDO.setMaterialInventoryId(materialInventoryId);
} }
kctzjl(materialInventoryOmsParamDO, materialInventoryOmsParamDO.getKctzType(), materialInventoryOmsParamDO.getLoginUser()); kctzjl(materialInventoryOmsParamDO, materialInventoryOmsParamDO.getKctzType(), materialInventoryOmsParamDO.getLoginUser());
@@ -211,7 +211,7 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
//库存调整记录(在 xgkc 更新库存前调用,materialInventory 为调整前快照) //库存调整记录(在 xgkc 更新库存前调用,materialInventory 为调整前快照)
Long materialInventoryId = materialInventoryParamDO.getMaterialInventoryId(); Long materialInventoryId = materialInventoryParamDO.getMaterialInventoryId();
ReservationMaterialInventory materialInventory = materialInventoryMapper.selectOne(new QueryWrapper<ReservationMaterialInventory>().lambda() ReservationMaterialInventory materialInventory = materialInventoryMapper.selectOne(new QueryWrapper<ReservationMaterialInventory>().lambda()
.eq(ReservationMaterialInventory::getReservationMaterialInventoryId, materialInventoryId)); .eq(ReservationMaterialInventory::getMaterialInventoryId, materialInventoryId));
if (materialInventory == null) { if (materialInventory == null) {
throw new ServiceException("物料库存不存在,无法生成库存调整记录"); throw new ServiceException("物料库存不存在,无法生成库存调整记录");
} }
@@ -258,7 +258,7 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
inventoryAdjustmentRecord.setStorageLocationId(materialInventory.getStorageLocationId()); inventoryAdjustmentRecord.setStorageLocationId(materialInventory.getStorageLocationId());
inventoryAdjustmentRecord.setStorageLocationCode(materialInventory.getStorageLocationCode()); inventoryAdjustmentRecord.setStorageLocationCode(materialInventory.getStorageLocationCode());
inventoryAdjustmentRecord.setStorageLocationName(materialInventory.getStorageLocationName()); inventoryAdjustmentRecord.setStorageLocationName(materialInventory.getStorageLocationName());
inventoryAdjustmentRecord.setMaterialInventoryId(materialInventory.getReservationMaterialInventoryId()); inventoryAdjustmentRecord.setMaterialInventoryId(materialInventory.getMaterialInventoryId());
inventoryAdjustmentRecord.setMaterialBaseInfoId(materialInventory.getMaterialBaseInfoId()); inventoryAdjustmentRecord.setMaterialBaseInfoId(materialInventory.getMaterialBaseInfoId());
inventoryAdjustmentRecord.setStorageSectionId(materialInventory.getStorageSectionId()); inventoryAdjustmentRecord.setStorageSectionId(materialInventory.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventory.getStorageLocationId()); inventoryAdjustmentRecord.setStorageLocationId(materialInventory.getStorageLocationId());
@@ -484,7 +484,7 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
materialInventory.setBatchNumber((materialInventoryParamDO.getBatchNumber())); materialInventory.setBatchNumber((materialInventoryParamDO.getBatchNumber()));
materialInventory.setInOrderNumber((materialInventoryParamDO.getInOrderNumber())); materialInventory.setInOrderNumber((materialInventoryParamDO.getInOrderNumber()));
materialInventoryMapper.insert(materialInventory); materialInventoryMapper.insert(materialInventory);
materialInventoryParamDO.setMaterialInventoryId(materialInventory.getReservationMaterialInventoryId()); materialInventoryParamDO.setMaterialInventoryId(materialInventory.getMaterialInventoryId());
} else { } else {
ReservationMaterialInventory materialInventoryPO = materialInventoryMapper.selectById(materialInventoryId); ReservationMaterialInventory materialInventoryPO = materialInventoryMapper.selectById(materialInventoryId);
if (materialInventoryPO != null) { if (materialInventoryPO != null) {