java110
2023-07-18 34e5049d0d7a44a6b27d6fff118775d8d1894cc2
service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java
@@ -3,13 +3,12 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.smo.IComputeFeeSMO;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.dto.fee.FeeDetailDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.owner.OwnerDto;
import com.java110.dto.owner.OwnerRoomRelDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsTotalDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsTotalDto;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
import com.java110.intf.report.IQueryPayFeeDetailInnerServiceSMO;
@@ -29,10 +28,9 @@
/**
 * 查询缴费明细
 *
 */
@RestController
public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailInnerServiceSMO{
public class QueryPayFeeDetailInnerServiceSMOImpl implements IQueryPayFeeDetailInnerServiceSMO {
    private int MAX_ROWS = 500;  // 最大行数
@@ -63,10 +61,6 @@
        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
        ReportFeeMonthStatisticsTotalDto reportFeeMonthStatisticsTotalDto = new ReportFeeMonthStatisticsTotalDto();
        List<ReportFeeMonthStatisticsDto> reportList = new ArrayList<>();
        //查询该小区下的费用项目
        FeeConfigDto feeConfigDto = new FeeConfigDto();
        feeConfigDto.setCommunityId(reportFeeMonthStatisticsDto.getCommunityId());
        List<FeeConfigDto> feeConfigDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
        //应收总金额(大计)
        Double allReceivableAmount = 0.0;
        //实收金额(大计)
@@ -88,14 +82,6 @@
        if (count > 0) {
            //查询缴费明细
            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto);
            //吴学文 注释 感觉和上面的369 功能重复
//            if (reportFeeMonthStatisticsDtos != null && reportFeeMonthStatisticsDtos.size() > 0) {
//                //查询所有缴费明细记录
//                ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 = BeanConvertUtil.covertBean(reportFeeMonthStatisticsDto, ReportFeeMonthStatisticsDto.class);
//                reportFeeMonthStatisticsDto1.setPage(PageDto.DEFAULT_PAGE);
//                List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos1 = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto1);
//                size = reportFeeMonthStatisticsDtos1.size();
//            }
            //查询应收、实收总金额(大计)
            List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryAllPayFeeDetail(reportFeeMonthStatisticsDto);
            //查询(优惠、减免、滞纳金、空置房打折、空置房减免金额等)大计总金额
@@ -107,27 +93,39 @@
                String discountPrice = reportFeeMonthStatistics.getDiscountPrice();
                //优惠金额(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("1")) {
                    allPreferentialAmount = Double.valueOf(discountPrice);
//                    allPreferentialAmount = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allPreferentialAmount = allPreferentialAmount + aDouble;
                }
                //减免金额(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("2")) {
                    allDeductionAmount = Double.valueOf(discountPrice);
                    //allDeductionAmount = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allDeductionAmount = allDeductionAmount + aDouble;
                }
                //滞纳金(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("3")) {
                    allLateFee = Double.valueOf(discountPrice);
//                    allLateFee = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allLateFee = allLateFee + aDouble;
                }
                //空置房打折金额(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("4")) {
                    allVacantHousingDiscount = Double.valueOf(discountPrice);
//                    allVacantHousingDiscount = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allVacantHousingDiscount = allVacantHousingDiscount + aDouble;
                }
                //空置房减免金额(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("5")) {
                    allVacantHousingReduction = Double.valueOf(discountPrice);
//                    allVacantHousingReduction = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allVacantHousingReduction = allVacantHousingReduction + aDouble;
                }
                //赠送金额(大计)
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getDiscountSmallType()) && reportFeeMonthStatistics.getDiscountSmallType().equals("6")) {
                    allGiftAmount = Double.valueOf(discountPrice);
//                    allGiftAmount = Double.valueOf(discountPrice);
                    Double aDouble = Double.valueOf(discountPrice);
                    allGiftAmount = allGiftAmount + aDouble;
                }
            }
            //应收总金额(小计)
@@ -148,12 +146,6 @@
            Double totalLateFee = 0.0;
            List<String> ownerIds = new ArrayList<>();
            for (ReportFeeMonthStatisticsDto reportFeeMonthStatistics : reportFeeMonthStatisticsDtos) {
                FeeDetailDto feeDetailDto = new FeeDetailDto();
                feeDetailDto.setDetailId(reportFeeMonthStatistics.getDetailId());
                List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(feeDetailDto);
                Assert.listOnlyOne(feeDetailDtos, "查询费用明细表错误");
                reportFeeMonthStatistics.setReceivableAmount(feeDetailDtos.get(0).getReceivableAmount());
                reportFeeMonthStatistics.setPayableAmount(feeDetailDtos.get(0).getPayableAmount());
                //应收金额
                Double receivableAmount = Double.valueOf(reportFeeMonthStatistics.getReceivableAmount());
                //实收金额
@@ -245,8 +237,6 @@
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getImportFeeName())) {
                    reportFeeMonthStatistics.setFeeName(reportFeeMonthStatistics.getImportFeeName());
                }
                //费用项目
                reportFeeMonthStatistics.setFeeConfigDtos(feeConfigDtos);
                if (!StringUtil.isEmpty(reportFeeMonthStatistics.getRepairId())) {
                    RepairDto repairDto = new RepairDto();
                    repairDto.setRepairId(reportFeeMonthStatistics.getRepairId());