| | |
| | | TCompanyResp tCompanyResp = new TCompanyResp(); |
| | | tCompanyResp.setOrderId(order.getId()); |
| | | tCompanyResp.setName(price.getType()); |
| | | tCompanyResp.setPrice(price.getPrice()); |
| | | 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); |