zhang_nuo
昨天 501aead9955b65d956f746f0ec2a480d87b4caf5
src/main/java/com/ruoyi/sales/service/impl/MetricStatisticsServiceImpl.java
@@ -69,17 +69,10 @@
                .filter(p -> p.getId() != null && p.getSalesLedgerId() != null)
                .collect(Collectors.toMap(SalesLedgerProduct::getId, SalesLedgerProduct::getSalesLedgerId, (k1, k2) -> k1));
        List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>()
                .eq(ShippingInfo::getStatus, "审核通过"));
        List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(null);
        long shippedOrderCount = shippingInfos.stream()
                .filter(info -> productIdToLedgerIdMap.containsKey(info.getSalesLedgerProductId()))
                .map(info -> {
                    if (info.getSalesLedgerId() != null) {
                        return info.getSalesLedgerId();
                    }
                    return productIdToLedgerIdMap.get(info.getSalesLedgerProductId());
                })
                .map(ShippingInfo::getSalesLedgerId)
                .filter(Objects::nonNull)
                .distinct()
                .count();