liujie
20 小时以前 6e0375b25aacdfd69a516d6f351ad993f8e85801
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
@@ -457,7 +457,7 @@
            if(tErpGoodsUnit!=null){
                tErpClinicWarehousingBatch.setUnitName(tErpGoodsUnit.getUnitName());
            }
            tErpClinicWarehousingBatch.setPurchaseCount(tErpClinicWarehousingBatch.getWarehousingNumber());
        }
        warehouseGoodsDetailVo.setList(tErpClinicWarehousingBatches);
@@ -502,10 +502,13 @@
            List<TErpClinicOutboundGoods> tErpClinicOutboundGoods2 = erpClinicOutboundGoodsMapper.selectList(new LambdaQueryWrapper<TErpClinicOutboundGoods>().eq(TErpClinicOutboundGoods::getWarehousingBatchId, outboundGoods.getWarehousingBatchId()));
            int sum = tErpClinicOutboundGoods2.stream().mapToInt(TErpClinicOutboundGoods::getOutboundCount).sum();
            int count = tErpClinicWarehousingBatch.getPurchaseCount() - sum;
            int count = tErpClinicWarehousingBatch.getWarehousingNumber() - sum;
            outboundGoodsDetailNextVo.setSurplusCount(count);
            outboundGoodsDetailNextVo.setUnitAmount(tErpClinicWarehousingBatch.getUnitAmount());
            if(outboundGoodsDetailNextVo.getUnitAmount()==null){
                outboundGoodsDetailNextVo.setUnitAmount(tErpClinicWarehousingBatch.getSalesAmount());
            }
            outboundGoodsDetailNextVo.setOutboundCount(outboundGoods.getOutboundCount());
            outboundGoodsDetailNextVo.setExpiryDate(tErpClinicWarehousingBatch.getExpiryDate());
            outboundGoodsDetailNextVo.setTotalAmount(outboundGoodsDetailNextVo.getUnitAmount().multiply(new BigDecimal(outboundGoods.getOutboundCount())));