|
|
@ -212,7 +212,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService { |
|
|
String lotBatchNo = (String) params.get("lotBatchNo"); |
|
|
String lotBatchNo = (String) params.get("lotBatchNo"); |
|
|
String wdr = (String) params.get("wdr"); |
|
|
String wdr = (String) params.get("wdr"); |
|
|
String toLocationNo = (String) params.get("toLocationNo"); |
|
|
String toLocationNo = (String) params.get("toLocationNo"); |
|
|
Integer qtyToMove = Integer.valueOf(params.get("qtyToMove").toString()); |
|
|
|
|
|
|
|
|
BigDecimal qtyToMove = new BigDecimal(params.get("qtyToMove").toString()); |
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
@SuppressWarnings("unchecked") |
|
|
List<String> handlingUnitIds = (List<String>) params.get("handlingUnitIds"); |
|
|
List<String> handlingUnitIds = (List<String>) params.get("handlingUnitIds"); |
|
|
@ -350,7 +350,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService { |
|
|
moveDto.setIfsHandlingUnitID(0); |
|
|
moveDto.setIfsHandlingUnitID(0); |
|
|
moveDto.setIfsSourceQtyToMove(qtyToMove); |
|
|
moveDto.setIfsSourceQtyToMove(qtyToMove); |
|
|
moveDto.setIfsInQtyToMove(qtyToMove); |
|
|
moveDto.setIfsInQtyToMove(qtyToMove); |
|
|
moveDto.setIfsCatchQtyToMove(0); |
|
|
|
|
|
|
|
|
moveDto.setIfsCatchQtyToMove(BigDecimal.ZERO); |
|
|
|
|
|
|
|
|
String result = ifsApiIssueAndReturnService.purchaseOrderMoveToStockOneLocation(moveDto); |
|
|
String result = ifsApiIssueAndReturnService.purchaseOrderMoveToStockOneLocation(moveDto); |
|
|
|
|
|
|
|
|
@ -371,7 +371,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService { |
|
|
/** |
|
|
/** |
|
|
* 更新库存 |
|
|
* 更新库存 |
|
|
*/ |
|
|
*/ |
|
|
private void updateInventoryStock(TransHeader transHeader, TransDetail transDetail,Integer qty, |
|
|
|
|
|
|
|
|
private void updateInventoryStock(TransHeader transHeader, TransDetail transDetail, BigDecimal qty, |
|
|
HandlingUnit firstHu) { |
|
|
HandlingUnit firstHu) { |
|
|
// 直接在此方法中实现库存创建逻辑,使用带行锁的库存操作,防止并发 |
|
|
// 直接在此方法中实现库存创建逻辑,使用带行锁的库存操作,防止并发 |
|
|
String site = transDetail.getSite(); |
|
|
String site = transDetail.getSite(); |
|
|
@ -392,7 +392,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService { |
|
|
String partNo = transDetail.getPartNo(); |
|
|
String partNo = transDetail.getPartNo(); |
|
|
String batchNo = transDetail.getBatchNo(); |
|
|
String batchNo = transDetail.getBatchNo(); |
|
|
String wdr = firstHu.getWdr() != null ? firstHu.getWdr() : "*"; |
|
|
String wdr = firstHu.getWdr() != null ? firstHu.getWdr() : "*"; |
|
|
BigDecimal transQty = BigDecimal.valueOf(qty); |
|
|
|
|
|
|
|
|
BigDecimal transQty = qty; |
|
|
|
|
|
|
|
|
// 使用行锁查询现有库存 |
|
|
// 使用行锁查询现有库存 |
|
|
InventoryStock existingStock = inventoryStockMapper.selectForUpdate(site, warehouseId, partNo, batchNo, locationId, wdr); |
|
|
InventoryStock existingStock = inventoryStockMapper.selectForUpdate(site, warehouseId, partNo, batchNo, locationId, wdr); |
|
|
|