|
|
|
@ -1638,7 +1638,7 @@ public class MaterialServiceImpl implements MaterialService { |
|
|
|
// 如果转移后的拆单库存记录不为空
|
|
|
|
|
|
|
|
// 获取当前转移后的总数
|
|
|
|
int realQuantity = splitInventoryForAfter.getSaveQuantity() + (int) (quantity * 100); |
|
|
|
double realQuantity = splitInventoryForAfter.getSaveQuantity() / 100.0 + quantity; |
|
|
|
|
|
|
|
if (realQuantity >= splitInfo.getQuantity()) { |
|
|
|
// 如果当前转移后的总数大于进制数
|
|
|
|
@ -1648,7 +1648,7 @@ public class MaterialServiceImpl implements MaterialService { |
|
|
|
// 获取进位后当前入库的数量
|
|
|
|
realQuantity = realQuantity - dispose * splitInfo.getQuantity(); |
|
|
|
// 设置当前库存数量
|
|
|
|
splitInventoryForAfter.setSaveQuantity(realQuantity); |
|
|
|
splitInventoryForAfter.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
// 设置当前入库数量
|
|
|
|
splitInventoryForAfter.setInQuantity(splitInventoryForAfter.getInQuantity() + (int) (quantity * 100)); |
|
|
|
// 修改库存记录
|
|
|
|
@ -1675,7 +1675,7 @@ public class MaterialServiceImpl implements MaterialService { |
|
|
|
// 如果不大于进制数
|
|
|
|
|
|
|
|
// 设置转移后的库存数量
|
|
|
|
splitInventoryForAfter.setSaveQuantity(realQuantity); |
|
|
|
splitInventoryForAfter.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
// 设置转移后的入库数量
|
|
|
|
splitInventoryForAfter.setInQuantity(splitInventoryForAfter.getSaveQuantity() + (int) (quantity * 100)); |
|
|
|
// 修改库存数量
|
|
|
|
@ -1717,8 +1717,8 @@ public class MaterialServiceImpl implements MaterialService { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
insertForSplitInventory.put("saveQuantity", quantity); |
|
|
|
insertForSplitInventory.put("inQuantity", quantity); |
|
|
|
insertForSplitInventory.put("saveQuantity",(int)(quantity * 100)); |
|
|
|
insertForSplitInventory.put("inQuantity",(int)(quantity * 100)); |
|
|
|
splitUnitMapper.addSplitInventory(insertForSplitInventory); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1753,7 +1753,7 @@ public class MaterialServiceImpl implements MaterialService { |
|
|
|
if (splitInfo.getParentId() != null) { |
|
|
|
// 获取当前父级
|
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, dispose, ObjectFormatUtil.toInteger(insertForSplitInventory.get("id")), paramForNewMap, quantity, splitInfo); |
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, dispose, ObjectFormatUtil.toInteger(insertForAfter.get("id")), paramForNewMap, quantity, splitInfo); |
|
|
|
} else { |
|
|
|
if (inventoryByMid.getPrice() == null) { |
|
|
|
inventoryByMid.setPrice(0.0); |
|
|
|
|