|
@@ -385,7 +385,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
|
|
|
if (defectiveQuantity.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
throw new ServiceException("库存不足,无法转换");
|
|
|
}
|
|
|
- json.put("quantity", quantity.add(stock.getQuantity()));
|
|
|
+ stock1.setQuantity(quantity.add(stock.getQuantity()));
|
|
|
json.put("defectiveQuantity", defectiveQuantity.subtract(stock.getQuantity()));
|
|
|
stock1.setVictoriatouristJson(json.toJSONString());
|
|
|
updateById(stock1);
|
|
@@ -424,8 +424,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
|
|
|
if (quantity.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
throw new ServiceException("库存不足,无法转换");
|
|
|
}
|
|
|
-
|
|
|
- json.put("quantity", quantity.subtract(stock.getQuantity()));
|
|
|
+ stock1.setQuantity(quantity.subtract(stock.getQuantity()));
|
|
|
json.put("defectiveQuantity", defectiveQuantity.add(stock.getQuantity()));
|
|
|
stock1.setVictoriatouristJson(json.toJSONString());
|
|
|
updateById(stock1);
|