Browse Source

货代 1.amend报表打印抓取数据不对

纪新园 7 months ago
parent
commit
542d90c02e

+ 4 - 220
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -1718,51 +1718,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						} else
 							ro = new BigDecimal(BigInteger.ZERO);
 						item.setOverFeeLimit(ro.setScale(2, BigDecimal.ROUND_HALF_UP));
-
-						/*
-						if (ObjectUtils.isNotNull(profitMargin)) {
-							BigDecimal margin = new BigDecimal(profitMargin).divide(new BigDecimal(MagicValues.HUNDRED), 2, RoundingMode.HALF_UP);
-							if (margin.compareTo(item.getGrossMargin()) > 0) {
-								item.setProfitMargin("Profit was low and unfair(DC)!");
-								BigDecimal amountD = feeCenterReports.stream().filter(e -> e.getFeeCnName().equals("海运费"))
-									.map(FeeCenterReports::getAmountD).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-								BigDecimal amountC = feeCenterReports.stream().filter(e -> e.getFeeCnName().equals("海运费"))
-									.map(FeeCenterReports::getAmountC).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-								if (new BigDecimal("0.00").compareTo((amountD.add(amountC))) == 0) {
-									item.setText("(应收/应付)存在RMB海运费");
-								}
-								String status = sysClient.getParamServiceNew("is.profit.margin");
-								if ("1".equals(status)) {
-									BigDecimal amountHYD = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("海运费") && "D".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdD).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountHYC = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("海运费") && "C".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdC).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountPSD = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("PS") && "D".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdD).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountPSC = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("PS") && "C".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdC).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BCorps bCorps = bCorpsService.getById(item.getCorpId());
-									BigDecimal PSAmount = amountPSC.subtract(amountPSD);
-									BigDecimal HYAmount = amountHYD.subtract(amountHYC);
-									BigDecimal rate = new BigDecimal("0.00");
-									if (PSAmount.compareTo(new BigDecimal("0.00")) != 0 && HYAmount.compareTo(new BigDecimal("0.00")) != 0) {
-										rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
-										if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) > 0) {
-											item.setSharingRatio("公司实际分成比例:" + rate + "(" + bCorps.getPsRate() + ")");
-										}
-									}
-								}
-							} else {
-								item.setProfitMargin("");
-							}
-						} else {
-							item.setProfitMargin("");
-						}
-						*/
 						item.setFeeCenterList(feeCenterReports);
 						item.setDept(dept);
 					}
@@ -3715,51 +3670,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						} else
 							ro = new BigDecimal(BigInteger.ZERO);
 						item.setOverFeeLimit(ro.setScale(2, BigDecimal.ROUND_HALF_UP));
-
-						/*
-						if (ObjectUtils.isNotNull(profitMargin)) {
-							BigDecimal margin = new BigDecimal(profitMargin).divide(new BigDecimal(MagicValues.HUNDRED), 2, RoundingMode.HALF_UP);
-							if (margin.compareTo(item.getGrossMargin()) > 0) {
-								item.setProfitMargin("Profit was low and unfair(DC)!");
-								BigDecimal amountD = feeCenterReports.stream().filter(e -> e.getFeeCnName().equals("海运费"))
-									.map(FeeCenterReports::getAmountD).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-								BigDecimal amountC = feeCenterReports.stream().filter(e -> e.getFeeCnName().equals("海运费"))
-									.map(FeeCenterReports::getAmountC).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-								if (new BigDecimal("0.00").compareTo((amountD.add(amountC))) == 0) {
-									item.setText("(应收/应付)存在RMB海运费");
-								}
-								String status = sysClient.getParamServiceNew("is.profit.margin");
-								if ("1".equals(status)) {
-									BigDecimal amountHYD = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("海运费") && "D".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdD).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountHYC = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("海运费") && "C".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdC).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountPSD = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("PS") && "D".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdD).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BigDecimal amountPSC = item.getFeeCenterList().stream()
-										.filter(e -> e.getFeeCnName().equals("PS") && "C".equals(e.getDc()))
-										.map(FeeCenterReports::getAmountUsdC).reduce(BigDecimal.ZERO, BigDecimal::add);
-									BCorps bCorps = bCorpsService.getById(item.getCorpId());
-									BigDecimal PSAmount = amountPSC.subtract(amountPSD);
-									BigDecimal HYAmount = amountHYD.subtract(amountHYC);
-									BigDecimal rate = new BigDecimal("0.00");
-									if (PSAmount.compareTo(new BigDecimal("0.00")) != 0 && HYAmount.compareTo(new BigDecimal("0.00")) != 0) {
-										rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
-										if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) > 0) {
-											item.setSharingRatio("公司实际分成比例:" + rate + "(" + bCorps.getPsRate() + ")");
-										}
-									}
-								}
-							} else {
-								item.setProfitMargin("");
-							}
-						} else {
-							item.setProfitMargin("");
-						}
-						*/
 						item.setFeeCenterList(feeCenterReports);
 						item.setDept(dept);
 					}
@@ -5631,10 +5541,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 								}
 							}
 							feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
-							/*List<FeeCenter> feeCenters = feeCenterList.stream()
-								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-									Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getReportType()))), ArrayList::new));
-							*/
 							List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
 							for (FeeCenter fee : feeCenterList) {
 								FeeCenterReports feeCenterReports = new FeeCenterReports();
@@ -5797,10 +5703,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									}
 								}
 								feeCenterList.stream().filter(e -> ObjectUtils.isNull(e.getReportType())).forEach(e -> e.setReportType("0"));
-								/*List<FeeCenter> feeCenters = feeCenterList.stream()
-									.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-										Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getReportType()))), ArrayList::new));
-								*/
 								List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
 								for (FeeCenter fee : feeCenterList) {
 									FeeCenterReports feeCenterReports = new FeeCenterReports();
@@ -5959,10 +5861,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									item.setBillCorpCnName("无");
 								}
 							}
-							/*List<FeeCenter> feeCenterList1 = feeCenterListMh.stream()
-								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-									Comparator.comparing(f -> f.getFeeId() + f.getCorpId() + f.getCurCode() + f.getReportType()))), ArrayList::new));
-							*/
 							List<FeeCenterReports> feeCenterReportList = new ArrayList<>();
 							for (FeeCenter fee : feeCenterListMh) {
 								FeeCenterReports feeCenterReports = new FeeCenterReports();
@@ -6100,15 +5998,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					if (!list.isEmpty()) {
 						for (Bills item : list) {
 							List<FeeCenterReports> feeCenterReports = new ArrayList<>();
-//							List<FeeCenterReports> feeCenterReportsList = item.getFeeCenterList().stream().filter(e -> !MagicValues.ONE.equals(e.getReportType()) && !MagicValues.TWO.equals(e.getReportType())).collect(Collectors.toList());
 							List<FeeCenterReports> feeCenterReportsList1 = item.getFeeCenterList().stream().filter(e -> MagicValues.ONE.equals(e.getReportType())).collect(Collectors.toList());
-//							List<FeeCenterReports> feeCenterReportsList2 = item.getFeeCenterList().stream().filter(e -> MagicValues.TWO.equals(e.getReportType())).collect(Collectors.toList());
-						/*	List<FeeCenterReports> feeCenters = feeCenterReportsList.stream()
-								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-									Comparator.comparing(FeeCenterReports::getFeeCnName))), ArrayList::new));*/
-/*							List<FeeCenterReports> feeCenters1 = feeCenterReportsList1.stream()
-								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-									Comparator.comparing(FeeCenterReports::getFeeCnName))), ArrayList::new));*/
 							BigDecimal amountDr = new BigDecimal("0.00");
 							BigDecimal amountCr = new BigDecimal("0.00");
 							BigDecimal amountDrUsd = new BigDecimal("0.00");
@@ -6125,9 +6015,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 							List<FeeCenterReports> feeCentersD = feeCenterReportsD.stream()
 								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
 									Comparator.comparing(f -> f.getFeeCnName() + f.getBillCorpCnName()))), ArrayList::new));
-							/*List<FeeCenterReports> feeCentersD = feeCenterReportsD.stream()
-								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
-									Comparator.comparing(FeeCenterReports::getFeeCnName))), ArrayList::new));*/
 							List<FeeCenterReports> feeCenterReportsNewC = new ArrayList<>();
 							int countC = 0;
 							// 遍历应收,并与应付对应
@@ -6143,17 +6030,12 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 								List<FeeCenterReports> feeCenterD = feeCenterReportsD.stream().filter(e -> e.getFeeCnName().equals(fee.getFeeCnName())
 										&& fee.getBillCorpCnName().equals(e.getBillCorpCnName())).collect(Collectors.toList());
 								if (!feeCenterD.isEmpty()) {
-									/*feeCenterReports1.setAmountD(fee.getAmountD() == null ? BigDecimal.ZERO : fee.getAmountD());
-									feeCenterReports1.setAmountLocD(fee.getAmountLocD() == null ? BigDecimal.ZERO : fee.getAmountLocD());
-									feeCenterReports1.setAmountUsdD(fee.getAmountUsdD() == null ? BigDecimal.ZERO : fee.getAmountUsdD());*/
 									feeCenterReports1.setAmountD(feeCenterD.stream().map(FeeCenterReports::getAmountD).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
 									feeCenterReports1.setAmountLocD(feeCenterD.stream().map(FeeCenterReports::getAmountLocD).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
 									feeCenterReports1.setAmountUsdD(feeCenterD.stream().map(FeeCenterReports::getAmountUsdD).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
 									amountDr = amountDr.add(feeCenterReports1.getAmountD());
 									amountDrUsd = amountDrUsd.add(feeCenterReports1.getAmountUsdD());
 								}
-								/*List<FeeCenterReports> feeCenterC = feeCenterReportsC.stream().filter(e -> e.getFeeCnName().equals(fee.getFeeCnName())
-									&&  !"1".equals(e.getMark())).distinct().collect(Collectors.toList());*/
 								FeeCenterReports feeCenterC = feeCenterReportsC.stream().filter(e -> e.getFeeCnName().equals(fee.getFeeCnName())
 									&&  !"1".equals(e.getMark())).distinct().findFirst().orElse(null);
 								if (feeCenterC != null) {
@@ -6164,34 +6046,6 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									feeCenterReports1.setAmountUsdC(feeCenterC.getAmountUsdC() == null ? BigDecimal.ZERO : feeCenterC.getAmountUsdC());
 									countC++;
 								}
-/*								if (feeCenterC != null) {
-									for (FeeCenterReports itemC : feeCenterC){
-										itemC.setMark("1");
-										if (ObjectUtils.isNull(feeCenterReports1.getCorpCnName())){
-											feeCenterReports1.setCorpCnName(itemC.getCorpCnName());
-											feeCenterReports1.setAmountC(ObjectUtils.isNotNull(itemC.getAmountC())?itemC.getAmountC():new BigDecimal("0.00"));
-											feeCenterReports1.setAmountLocC(ObjectUtils.isNotNull(itemC.getAmountLocC())?itemC.getAmountLocC():new BigDecimal("0.00"));
-											feeCenterReports1.setAmountUsdC(ObjectUtils.isNotNull(itemC.getAmountUsdC())?itemC.getAmountUsdC():new BigDecimal("0.00"));
-											amountCr = amountCr.add(feeCenterReports1.getAmountC());
-											amountCrUsd = amountCrUsd.add(feeCenterReports1.getAmountUsdC());
-										}else{
-											FeeCenterReports feeCenterReports2 = new FeeCenterReports();
-											feeCenterReports2.setFeeCnName(fee.getFeeCnName());
-											feeCenterReports2.setHblno(fee.getHblno());
-											feeCenterReports2.setPid(fee.getPid());
-											feeCenterReports2.setReportType(fee.getReportType());
-											feeCenterReports2.setDc("C");
-											feeCenterReports2.setCorpCnName(itemC.getCorpCnName());
-											feeCenterReports2.setAmountC(ObjectUtils.isNotNull(itemC.getAmountC())?itemC.getAmountC():new BigDecimal("0.00"));
-											feeCenterReports2.setAmountLocC(ObjectUtils.isNotNull(itemC.getAmountLocC())?itemC.getAmountLocC():new BigDecimal("0.00"));
-											feeCenterReports2.setAmountUsdC(ObjectUtils.isNotNull(itemC.getAmountUsdC())?itemC.getAmountUsdC():new BigDecimal("0.00"));
-											amountCr = amountCr.add(feeCenterReports1.getAmountC());
-											amountCrUsd = amountCrUsd.add(feeCenterReports1.getAmountUsdC());
-											feeCenterReportsNewC.add(feeCenterReports2);
-										}
-										countC++;
-									}
-								}*/
 								feeCenterReports.add(feeCenterReports1);
 							}
 							if (!feeCenterReportsNewC.isEmpty()){
@@ -6213,90 +6067,20 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									feeCenterReports1.setAmountC(fee.getAmountC());
 									feeCenterReports1.setAmountLocC(fee.getAmountLocC());
 									feeCenterReports1.setAmountUsdC(fee.getAmountUsdC());
-									// amountCr = amountCr.add(ObjectUtils.isNotNull(fee.getAmountC()) ? fee.getAmountC() : new BigDecimal("0.00"));
-									// amountCrUsd = amountCrUsd.add(ObjectUtils.isNotNull(fee.getAmountUsdC()) ? fee.getAmountUsdC() : new BigDecimal("0.00"));
 									feeCenterReports.add(feeCenterReports1);
 								}
 							}
 							amountCr = feeCenterReportsC.stream().map(FeeCenterReports::getAmountC).filter(ObjectUtils::isNotNull).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
 							amountCrUsd = feeCenterReportsC.stream().map(FeeCenterReports::getAmountUsdC).filter(ObjectUtils::isNotNull).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
-							/*for (FeeCenterReports fee : feeCenters) {
-								FeeCenterReports feeReports = item.getFeeCenterList().stream()
-									.filter(e -> e.getFeeCnName().equals(fee.getFeeCnName()))
-									.findFirst().orElse(null);
-								FeeCenterReports feeCenterReports1 = new FeeCenterReports();
-								feeCenterReports1.setFeeCnName(fee.getFeeCnName());
-								feeCenterReports1.setHblno(fee.getHblno());
-								feeCenterReports1.setPid(fee.getPid());
-								feeCenterReports1.setReportType(fee.getReportType());
-								feeCenterReports1.setDc(fee.getDc());
-								if (feeReports != null) {
-									if ((ObjectUtils.isNotNull(feeReports.getAmountD()) && feeReports.getAmountD().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdD()) && feeReports.getAmountUsdD().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setBillCorpCnName(feeReports.getBillCorpCnName());
-										feeCenterReports1.setAmountD(feeReports.getAmountD());
-										feeCenterReports1.setAmountLocD(feeReports.getAmountLocD());
-										feeCenterReports1.setAmountUsdD(feeReports.getAmountUsdD());
-										amountDr = amountDr.add(ObjectUtils.isNotNull(feeReports.getAmountD()) ? feeReports.getAmountD() : new BigDecimal("0.00"));
-										amountDrUsd = amountDrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdD()) ? feeReports.getAmountUsdD() : new BigDecimal("0.00"));
-									}
-									if ((ObjectUtils.isNotNull(feeReports.getAmountC()) && feeReports.getAmountC().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdC()) && feeReports.getAmountUsdC().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setCorpCnName(feeReports.getCorpCnName());
-										feeCenterReports1.setAmountC(feeReports.getAmountC());
-										feeCenterReports1.setAmountLocC(feeReports.getAmountLocC());
-										feeCenterReports1.setAmountUsdC(feeReports.getAmountUsdC());
-										amountCr = amountCr.add(ObjectUtils.isNotNull(feeReports.getAmountC()) ? feeReports.getAmountC() : new BigDecimal("0.00"));
-										amountCrUsd = amountCrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdC()) ? feeReports.getAmountUsdC() : new BigDecimal("0.00"));
-									}
-								}
-								feeCenterReports.add(feeCenterReports1);
-							}
-							for (FeeCenterReports fee : feeCenters2) {
-								FeeCenterReports feeReports = feeCenterReportsList2.stream()
-									.filter(e -> e.getFeeCnName().equals(fee.getFeeCnName()))
-									.findFirst().orElse(null);
-								FeeCenterReports feeCenterReports1 = new FeeCenterReports();
-								feeCenterReports1.setFeeCnName(fee.getFeeCnName());
-								feeCenterReports1.setHblno(fee.getHblno());
-								feeCenterReports1.setPid(fee.getPid());
-								feeCenterReports1.setReportType(fee.getReportType());
-								feeCenterReports1.setDc(fee.getDc());
-								if (feeReports != null) {
-									if ((ObjectUtils.isNotNull(feeReports.getAmountD()) && feeReports.getAmountD().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdD()) && feeReports.getAmountUsdD().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setBillCorpCnName(feeReports.getBillCorpCnName());
-										feeCenterReports1.setAmountD(feeReports.getAmountD());
-										feeCenterReports1.setAmountLocD(feeReports.getAmountLocD());
-										feeCenterReports1.setAmountUsdD(feeReports.getAmountUsdD());
-										amountDr = amountDr.add(ObjectUtils.isNotNull(feeReports.getAmountD()) ? feeReports.getAmountD() : new BigDecimal("0.00"));
-										amountDrUsd = amountDrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdD()) ? feeReports.getAmountUsdD() : new BigDecimal("0.00"));
-									}
-									if ((ObjectUtils.isNotNull(feeReports.getAmountC()) && feeReports.getAmountC().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdC()) && feeReports.getAmountUsdC().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setCorpCnName(feeReports.getCorpCnName());
-										feeCenterReports1.setAmountC(feeReports.getAmountC());
-										feeCenterReports1.setAmountLocC(feeReports.getAmountLocC());
-										feeCenterReports1.setAmountUsdC(feeReports.getAmountUsdC());
-										amountCr = amountCr.add(ObjectUtils.isNotNull(feeReports.getAmountC()) ? feeReports.getAmountC() : new BigDecimal("0.00"));
-										amountCrUsd = amountCrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdC()) ? feeReports.getAmountUsdC() : new BigDecimal("0.00"));
-									}
-								}
-								feeCenterReports.add(feeCenterReports1);
-							}*/
 							item.setAmountProfit(amountDr.subtract(amountCr));
 							item.setAmountProfitUsd(amountDrUsd.subtract(amountCrUsd));
 							BigDecimal amountDrCny = ibCurrencyService.converterCny(MagicValues.USD, amountDrUsd, MagicValues.D, "1");
 							BigDecimal amountCrCny = ibCurrencyService.converterCny(MagicValues.USD, amountCrUsd, MagicValues.C, "1");
 							item.setAmountProfitLoc(amountDr.subtract(amountCr).add(amountDrCny.subtract(amountCrCny)));
-							for (FeeCenterReports fee : feeCenterReportsList1) {
-/*								FeeCenterReports feeReports = feeCenterReportsList1.stream()
-									.filter(e -> e.getFeeCnName().equals(fee.getFeeCnName()))
-									.findFirst().orElse(null);*/
+							List<FeeCenterReports> feeCenterReportsArrayList = feeCenterReportsList1.stream()
+								.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
+									Comparator.comparing(f -> f.getFeeCnName() + f.getBillCorpCnName() + f.getDc()))), ArrayList::new));
+							for (FeeCenterReports fee : feeCenterReportsArrayList) {
 								FeeCenterReports feeReports = fee;
 								FeeCenterReports feeCenterReports1 = new FeeCenterReports();
 								feeCenterReports1.setFeeCnName(fee.getFeeCnName());