liujie
2023-06-12 c8638bb17163cc95e9063c358eb92cada1474102
src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyServiceImpl.java
@@ -155,11 +155,19 @@
                tCompanyResp.setPrice(price.getCarPrice());
                tCompanyRespList.add(tCompanyResp);
            }
            BigDecimal bigDecimal = tCompanyRespList.stream().map(TCompanyResp::getPrice).reduce(BigDecimal::add).orElse(new BigDecimal(0.00));
            BigDecimal bigDecimal = tCompanyRespList.stream().map(e->e.getPrice()==null?new BigDecimal(0):e.getPrice()).reduce(BigDecimal::add).orElse(new BigDecimal(0.00));
            tCompanyCalculationResp.setAllTotal(bigDecimal);
            tCompanyCalculationResp.setList(tCompanyRespList);
            // 过滤订单
            List<TOrder> orderList = orders.stream().filter(o -> o.getCompanyId().equals(company.getId())).collect(Collectors.toList());
            for (TOrder tOrder2 : orderList) {
                Integer port2 = tOrder2.getPort();
                TPort tPort2 = tPortMapper.selectById(port2);
                TCountry tCountry3 = tCountryMapper.selectById(tPort2.getCity());
                tOrder2.setCity(tCountry3.getId());
                TCountry tCountry4 = tCountryMapper.selectById(tCountry3.getParentId());
                tOrder2.setState(tCountry4.getId());
            }
            tCompanyCalculationResp.setOrderList(orderList);
            companyInfos.add(tCompanyCalculationResp);