|
|
@@ -482,11 +482,11 @@ public class StockGoodsServiceImpl extends ServiceImpl<StockGoodsMapper, StockGo
|
|
|
@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R updateByIdNew(StockGoods stockGoods) {
|
|
|
- StockGoods detail = baseMapper.selectById(stockGoods.getId());
|
|
|
+// StockGoods detail = baseMapper.selectById(stockGoods.getId());
|
|
|
int version = baseMapper.selectById(stockGoods.getId()).getVersion();
|
|
|
- stockGoods.setLockingQuantity(detail.getLockingQuantity().add(stockGoods.getThisLockingQuantity()));
|
|
|
- stockGoods.setBalanceQuantity(detail.getBalanceQuantity());
|
|
|
- stockGoods.setSurplusRouteQuantity(detail.getBalanceQuantity().subtract(stockGoods.getLockingQuantity()));
|
|
|
+// stockGoods.setLockingQuantity(detail.getLockingQuantity().add(stockGoods.getThisLockingQuantity()));
|
|
|
+// stockGoods.setBalanceQuantity(detail.getBalanceQuantity());
|
|
|
+// stockGoods.setSurplusRouteQuantity(detail.getBalanceQuantity().subtract(stockGoods.getLockingQuantity()));
|
|
|
int count = baseMapper.update(stockGoods, new LambdaQueryWrapper<StockGoods>()
|
|
|
.eq(StockGoods::getId, stockGoods.getId())
|
|
|
.eq(StockGoods::getVersion, version)
|