Browse Source

修改库位之间转移时的bug

lwx_dev
erdanergou 3 years ago
parent
commit
822c05c82b
  1. 1
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  2. 5
      src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java

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

@ -741,6 +741,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
if (!flagForApproval) {
// 如果不需要审批
Integer result = updateInventoryInfoForApproval(map, quantity, materialById, placeById);
map.put("applicationInIdForOut", map.get("id"));
map.remove("id");
return result;
} else {

5
src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java

@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.*;
@ -1612,7 +1613,7 @@ public class MaterialServiceImpl implements MaterialService {
insertForSplitInventory.put("type", "in");
insertForSplitInventory.put("flagForApproval", false);
splitUnitService.addSplitInventory(insertForSplitInventory);
Integer new_id = ObjectFormatUtil.toInteger(insertForSplitInventory.get("newInMid"));
Integer new_id = ObjectFormatUtil.toInteger(insertForSplitInventory.get("applicationInIdForOut"));
depositoryRecordMapper.deleteApplicationInRecordById(new_id);
}
@ -1762,7 +1763,7 @@ public class MaterialServiceImpl implements MaterialService {
paramForNewMap.put("realQuantity", String.valueOf(dispose));
paramForNewMap.put("quantity", String.valueOf(dispose));
depositoryRecordService.applicationInPlace(paramForNewMap, false);
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForNewMap.get("id")));
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForNewMap.get("applicationInIdForOut")));
}
} else {

Loading…
Cancel
Save