java110
2023-06-12 ca8a2f9555863313d4e5a85deac214f91cbd16eb
service-report/src/main/java/com/java110/report/smo/impl/GeneratorFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -167,6 +167,7 @@
        ReportCarDto reportCarDto = new ReportCarDto();
        reportCarDto.setCommunityId(reportFeeMonthStatisticsPo.getCommunityId());
        reportCarDto.setLeaseTypes(new String[]{OwnerCarDto.LEASE_TYPE_MONTH,OwnerCarDto.LEASE_TYPE_INNER,OwnerCarDto.LEASE_TYPE_SALE,OwnerCarDto.LEASE_TYPE_NO_MONEY});
        int count = reportCommunityServiceDaoImpl.getCarCount(reportCarDto);
@@ -515,7 +516,7 @@
        reportFeeMonthStatisticsDto.setCommunityId(tmpReportFeeDto.getCommunityId());
        reportFeeMonthStatisticsDto.setConfigId(tmpReportFeeDto.getConfigId());
        reportFeeMonthStatisticsDto.setObjId(tmpReportFeeDto.getPayerObjId());
        //reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());
        reportFeeMonthStatisticsDto.setFeeId(tmpReportFeeDto.getFeeId());
        reportFeeMonthStatisticsDto.setObjType(tmpReportFeeDto.getPayerObjType());
        reportFeeMonthStatisticsDto.setFeeYear(curYear);
        reportFeeMonthStatisticsDto.setFeeMonth(curMonth);
@@ -614,6 +615,9 @@
        Date curDate = DateUtil.getFirstDate();//11月1日
        //说明没有历史欠费
        if (curDate.getTime() < tmpReportFeeDto.getEndTime().getTime()) {
            return 0.0;
        }
        if(FeeDto.STATE_FINISH.equals(tmpReportFeeDto.getState())){
            return 0.0;
        }
@@ -806,14 +810,18 @@
        if (FeeDto.FEE_FLAG_ONCE.equals(tmpReportFeeDto.getFeeFlag())) {
            return computeOnceFee(tmpReportFeeDto);
        }
        OwnerCarDto ownerCarDto = new OwnerCarDto();
        ownerCarDto.setCommunityId(tmpReportFeeDto.getCommunityId());
        ownerCarDto.setCarId(tmpReportFeeDto.getCarId());
        List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
        if (ownerCarDtos == null || ownerCarDtos.size() < 1) {
//        OwnerCarDto ownerCarDto = new OwnerCarDto();
//        ownerCarDto.setCommunityId(tmpReportFeeDto.getCommunityId());
//        ownerCarDto.setCarId(tmpReportFeeDto.getCarId());
//        List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
//        if (ownerCarDtos == null || ownerCarDtos.size() < 1) {
//            return 0.0;
//        }
        Date endTime = reportCarDto.getEndTime();
        if(endTime == null){
            return 0.0;
        }
        Date endTime = ownerCarDtos.get(0).getEndTime();
        Date maxEndDate = tmpReportFeeDto.getDeadlineTime();
        if (FeeDto.FEE_FLAG_CYCLE.equals(tmpReportFeeDto.getFeeFlag())) {