Browse Source

完成物料出库功能修改

lwx_dev
erdanergou 3 years ago
parent
commit
d6a9e252e9
  1. 6
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java

6
src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java

@ -1164,7 +1164,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfoById.getParentId()); 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) { if (restResponse.getStatus() == 200) {
@ -1355,11 +1355,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
// 如果拆单库存处理记录不存在 // 如果拆单库存处理记录不存在
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); 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; double residue_realQuantity = residue * scale - trueOut;

Loading…
Cancel
Save