|
|
|
@ -1040,7 +1040,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
restResponse.setStatusInfo(new StatusInfo("出库失败", "当前位置未发现该物料")); |
|
|
|
return restResponse; |
|
|
|
} |
|
|
|
} else { // 如果是默认库位
|
|
|
|
} |
|
|
|
else { // 如果是默认库位
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("mid", inventory.getId()); |
|
|
|
params.put("pid", 0); |
|
|
|
@ -1125,7 +1126,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
restResponse.setData(""); |
|
|
|
restResponse.setStatusInfo(new StatusInfo("出库失败", "出库失败,库存不足")); |
|
|
|
} |
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
// 如果是拆单后的出库
|
|
|
|
|
|
|
|
// 用于获取对应的拆单记录
|
|
|
|
@ -1795,8 +1797,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
// 用于获取映射关系
|
|
|
|
Map<String, Object> paramForPlaceAndMaterial = new HashMap<>(); |
|
|
|
paramForPlaceAndMaterial.put("mid", placeById.getId()); |
|
|
|
paramForPlaceAndMaterial.put("iid", inventoryById.getId()); |
|
|
|
paramForPlaceAndMaterial.put("iid", placeById.getId()); |
|
|
|
paramForPlaceAndMaterial.put("mid", inventoryById.getId()); |
|
|
|
// 获取库存与库存之间的映射
|
|
|
|
MaterialAndPlace placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(paramForPlaceAndMaterial); |
|
|
|
|
|
|
|
@ -1815,7 +1817,8 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
materialMapper.updateInventory(inventoryById); |
|
|
|
placeMapper.updateMaterialAndPlace(placeAndMaterialByMidAndPid); |
|
|
|
placeMapper.UpdatePlace(placeById); |
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
// 如果是拆单
|
|
|
|
|
|
|
|
Map<String, Object> paramForSplitInfo = new HashMap<>(); |
|
|
|
@ -1836,7 +1839,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
paramForUpdateSplitInventory.put("quantity", returnQuantity); |
|
|
|
paramForUpdateSplitInventory.put("mid", inventoryById.getMid()); |
|
|
|
paramForUpdateSplitInventory.put("unit", unit); |
|
|
|
result = splitUnitService.realInInventoryToDepository(returnQuantity, splitInventory, paramForUpdateSplitInventory, splitInfo, placeAndMaterialByMidAndPid, false); |
|
|
|
result = splitUnitService.realInInventoryToDepository(returnQuantity, splitInventory, paramForUpdateSplitInventory, splitInfo, placeAndMaterialByMidAndPid, true); |
|
|
|
if (paramForUpdateSplitInventory.containsKey("applicationInId")) { |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForUpdateSplitInventory.get("applicationInId"))); |
|
|
|
} |
|
|
|
@ -1931,6 +1934,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
// 修改当前已经出库的数量
|
|
|
|
applicationOutMinById.setTrueOut((int) ((trueOut * 100) + applicationOutMinById.getTrueOut())); |
|
|
|
if (applicationOutMinById.getQuantity() - applicationOutMinById.getTrueOut() > 0) { |
|
|
|
applicationOutMinById.setPlaceId(placeId); |
|
|
|
// 如果当前子订单中的物料并未完全出库
|
|
|
|
depositoryRecordMapper.updateApplicationOutRecordMin(applicationOutMinById); |
|
|
|
} else { |
|
|
|
|