| | |
| | | // 其余的添加到其他 |
| | | List<SupplierSalesStatisticsGoodsTypeVO> otherList = supplierSalesStatisticsGoodsTypeVOS.subList(9, supplierSalesStatisticsGoodsTypeVOS.size()); |
| | | SupplierSalesStatisticsGoodsTypeVO other = new SupplierSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(SupplierSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | supplierSalesStatisticsGoodsTypeVOS.add(other); |
| | | supplierSalesStatisticsGoodsTypeVOS = supplierSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | // 其余的添加到其他 |
| | | List<ClinicSalesStatisticsGoodsTypeVO> otherList = clinicSalesStatisticsGoodsTypeVOS.subList(9, clinicSalesStatisticsGoodsTypeVOS.size()); |
| | | ClinicSalesStatisticsGoodsTypeVO other = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVOS.add(other); |
| | | clinicSalesStatisticsGoodsTypeVOS = clinicSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |
| | |
| | | List<ClinicSalesStatisticsGoodsTypeVO> thirtyMoneyProcurementStatisticsVOS = collect2.entrySet().stream().map(entry -> { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(entry.getValue().stream().mapToInt(TErpProcurementGoods::getPurchaseCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName(entry.getValue().get(0).getGoodsName()); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName(entry.getValue().get(0).getGoodsName()); |
| | | return clinicSalesStatisticsGoodsTypeVO; |
| | | }).sorted(Comparator.comparing(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).reversed()).limit(9).collect(Collectors.toList()); |
| | | // 总数 |
| | |
| | | if (sum - sum1 > 0) { |
| | | ClinicSalesStatisticsGoodsTypeVO clinicSalesStatisticsGoodsTypeVO = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsCount(sum - sum1); |
| | | clinicSalesStatisticsGoodsTypeVO.setTypeName("其他"); |
| | | clinicSalesStatisticsGoodsTypeVO.setGoodsName("其他"); |
| | | thirtyMoneyProcurementStatisticsVOS.add(clinicSalesStatisticsGoodsTypeVO); |
| | | } |
| | | vo.setThirtyMoneyProcurementStatisticsVOS(thirtyMoneyProcurementStatisticsVOS); |