|
|
@ -83,7 +83,13 @@ public class LabelSplitMergeServiceImpl extends ServiceImpl<LabelSplitMergeMappe |
|
|
String locationId = (String) params.get("locationId"); |
|
|
String locationId = (String) params.get("locationId"); |
|
|
String operator = (String) params.get("operator"); |
|
|
String operator = (String) params.get("operator"); |
|
|
|
|
|
|
|
|
Float originalQuantity = Float.parseFloat(params.get("originalQuantity").toString()); |
|
|
|
|
|
|
|
|
// 1. 获取当前库存信息,防止前端数据过期或重复提交 |
|
|
|
|
|
Map<String, Object> currentStock = labelSplitMergeMapper.getStockInfoByLabelCode(originalLabelCode, site, warehouseId); |
|
|
|
|
|
if (currentStock == null) { |
|
|
|
|
|
throw new RuntimeException("未找到原标签库存信息"); |
|
|
|
|
|
} |
|
|
|
|
|
Float originalQuantity = Float.parseFloat(currentStock.get("qtyOnHand").toString()); |
|
|
|
|
|
|
|
|
// 获取拆分张数,默认为1(兼容旧版本) |
|
|
// 获取拆分张数,默认为1(兼容旧版本) |
|
|
Integer splitCount = params.get("splitCount") != null ? Integer.parseInt(params.get("splitCount").toString()) : 1; |
|
|
Integer splitCount = params.get("splitCount") != null ? Integer.parseInt(params.get("splitCount").toString()) : 1; |
|
|
Float splitQuantity = Float.parseFloat(params.get("splitQuantity").toString()); |
|
|
Float splitQuantity = Float.parseFloat(params.get("splitQuantity").toString()); |
|
|
|