Sfoglia il codice sorgente

单个上架时,总库存量小于库存数量

yujia 8 anni fa
parent
commit
580f1d1455

+ 1 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -1366,6 +1366,7 @@ public class GoodsServiceImpl implements GoodsService {
                     if (StringConstant.ERP.equals(product.getSourceApp())) {
                         List<Goods> goodses = goodsDao.findByProductId(product.getId());
                         Double reserve = productService.getGoodsReserveByErpReserve(product.getErpReserve(), goodses);
+                        reserve = NumberUtil.sub(reserve, goods.getReserve());
                         if (NumberUtil.compare(reserve, DoubleConstant.zero) < 0) {
                             throw new IllegalOperatorException("总在售库存量超过空闲库存量");
                         }