|
|
|
@ -1164,7 +1164,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfoById.getParentId()); |
|
|
|
|
|
|
|
|
|
|
|
restResponse = updateOutSplitInventoryInfo(parentSplitInfo, placeAndMaterialByMidAndPid, trueOut, surplus, splitInfo); |
|
|
|
restResponse = updateOutSplitInventoryInfo(parentSplitInfo, placeAndMaterialByMidAndPid, trueOut, (double) surplus / 100, splitInfo); |
|
|
|
|
|
|
|
// 如果成功出库
|
|
|
|
if (restResponse.getStatus() == 200) { |
|
|
|
@ -1355,11 +1355,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
// 如果拆单库存处理记录不存在
|
|
|
|
|
|
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
|
if (inventory.getQuantity() * scale >= trueOut) { |
|
|
|
if (inventory.getQuantity() * scale >= trueOut * 100) { |
|
|
|
// 如果当前库存数量满足要求
|
|
|
|
|
|
|
|
// 获取当前出库的具体数目
|
|
|
|
int residue = (int) Math.ceil(trueOut / (double) splitInfo.getQuantity()); |
|
|
|
int residue = (int) Math.ceil(trueOut / (double) scale); |
|
|
|
// 获取剩余数目
|
|
|
|
double residue_realQuantity = residue * scale - trueOut; |
|
|
|
|
|
|
|
|