库存调整记录修改;
This commit is contained in:
+22
-2
@@ -619,7 +619,17 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity().add(materialInventoryParamDO.getQuantity()));//调整后 冻结-出库
|
||||
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventory.getInventoryQuantity());
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
} else if ("上架".equals(adjustAction)){
|
||||
// 调整前:库存数量(净重、毛重、体积、面积)
|
||||
inventoryAdjustmentRecord.setNetWeight(materialInventory.getNetWeight());
|
||||
inventoryAdjustmentRecord.setGrossWeight(materialInventory.getGrossWeight());
|
||||
inventoryAdjustmentRecord.setVolume(materialInventory.getVolume());
|
||||
inventoryAdjustmentRecord.setArea(materialInventory.getArea());
|
||||
// 调整后:库存数量 - 复核时填写的数量
|
||||
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventory.getNetWeight());
|
||||
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventory.getGrossWeight());
|
||||
inventoryAdjustmentRecord.setAdjustedVolume(materialInventory.getVolume());
|
||||
inventoryAdjustmentRecord.setAdjustedArea(materialInventory.getArea());
|
||||
} else if ("入库".equals(adjustAction)){
|
||||
if (materialInventory == null) {
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(BigDecimal.ZERO);
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventoryParamDO.getQuantity());
|
||||
@@ -655,7 +665,7 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
|
||||
inventoryAdjustmentRecord.setAdjustedVolume(materialInventory.getVolume().add(inventoryAdjustmentRecord.getVolume()));
|
||||
inventoryAdjustmentRecord.setAdjustedArea(materialInventory.getArea().add(inventoryAdjustmentRecord.getArea()));
|
||||
}
|
||||
} else if ("出库交接".equals(adjustAction)){
|
||||
} else if ("出库".equals(adjustAction)){
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setFreezeBeforeQuantity(materialInventory.getFreezeQuantity());
|
||||
@@ -679,6 +689,16 @@ public class MaterialInventoryImpl extends ServiceImpl<MaterialInventoryMapper,
|
||||
inventoryAdjustmentRecord.setFreezeAfterQuantity(materialInventory.getFreezeQuantity());//调整后 冻结-出库
|
||||
//inventoryAdjustmentRecord.setInventoryBeforeQuantity(oldInventoryQuantity);
|
||||
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
|
||||
// 调整前:库存数量(净重、毛重、体积、面积)
|
||||
inventoryAdjustmentRecord.setNetWeight(materialInventory.getNetWeight());
|
||||
inventoryAdjustmentRecord.setGrossWeight(materialInventory.getGrossWeight());
|
||||
inventoryAdjustmentRecord.setVolume(materialInventory.getVolume());
|
||||
inventoryAdjustmentRecord.setArea(materialInventory.getArea());
|
||||
// 调整后:库存数量 - 复核时填写的数量
|
||||
inventoryAdjustmentRecord.setAdjustedNetWeight(materialInventory.getNetWeight());
|
||||
inventoryAdjustmentRecord.setAdjustedGrossWeight(materialInventory.getGrossWeight());
|
||||
inventoryAdjustmentRecord.setAdjustedVolume(materialInventory.getVolume());
|
||||
inventoryAdjustmentRecord.setAdjustedArea(materialInventory.getArea());
|
||||
} else if ("库存冻结".equals(adjustAction)) {
|
||||
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventory.getAllocationQuantity());
|
||||
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity().subtract(materialInventoryParamDO.getQuantity()));
|
||||
|
||||
Reference in New Issue
Block a user