wuxw
2025-03-06 bdddbb193b562b20a291bb3ce6286f27705ff721
service-report/src/main/java/com/java110/report/smo/impl/QueryPayFeeDetailInnerServiceSMOImpl.java
@@ -2,31 +2,27 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.dto.PageDto;
import com.java110.dto.ReportFeeMonthStatisticsPrepaymentDto.ReportFeeMonthStatisticsPrepaymentDto;
import com.java110.dto.ReportFeeMonthStatisticsPrepaymentDto.ReportFeeMonthStatisticsPrepaymentTotalDto;
import com.java110.dto.fee.FeeAccountDetailDto;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.dto.fee.FeeDto;
import com.java110.dto.owner.OwnerCarDto;
import com.java110.dto.owner.OwnerDto;
import com.java110.dto.owner.OwnerRoomRelDto;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.repair.RepairDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsPrepaymentDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsPrepaymentTotalDto;
import com.java110.dto.fee.FeeConfigDto;
import com.java110.dto.owner.OwnerCarDto;
import com.java110.dto.owner.OwnerRoomRelDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsDto;
import com.java110.dto.reportFee.ReportFeeMonthStatisticsTotalDto;
import com.java110.dto.room.RoomDto;
import com.java110.intf.community.IParkingSpaceV1InnerServiceSMO;
import com.java110.intf.community.ICommunityV1InnerServiceSMO;
import com.java110.intf.community.IRepairInnerServiceSMO;
import com.java110.intf.community.IRoomInnerServiceSMO;
import com.java110.intf.community.IRoomV1InnerServiceSMO;
import com.java110.intf.fee.IFeeAccountDetailServiceSMO;
import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
import com.java110.intf.report.IQueryPayFeeDetailInnerServiceSMO;
import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
import com.java110.intf.report.IReportFeeMonthStatisticsPrepaymentInnerServiceSMO;
import com.java110.intf.user.IOwnerCarInnerServiceSMO;
import com.java110.intf.user.IOwnerInnerServiceSMO;
import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.ListUtil;
import com.java110.utils.util.StringUtil;
@@ -35,7 +31,6 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -74,6 +69,9 @@
    @Autowired
    private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
    @Autowired
    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
    /**
     * 查询缴费明细
@@ -118,12 +116,42 @@
        //todo 计算房屋面积 和车位信息
        computeRoomAndParkingSpace(reportFeeMonthStatisticsDtos);
        refreshCommunityName(reportFeeMonthStatisticsDtos);
        resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos, reportFeeMonthStatisticsTotalDto);
        return resultVo;
    }
    private void refreshCommunityName(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
        if(ListUtil.isNull(reportFeeMonthStatisticsDtos)){
            return;
        }
        List<String> communityIds = new ArrayList<>();
        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
            communityIds.add(reportFeeMonthStatisticsDto.getCommunityId());
        }
        if(ListUtil.isNull(communityIds)){
            return ;
        }
        CommunityDto communityDto = new CommunityDto();
        communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()]));
        List<CommunityDto> communityDtos = communityV1InnerServiceSMOImpl.queryCommunitys(communityDto);
        if(ListUtil.isNull(communityDtos)){
            return;
        }
        for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
            for (CommunityDto tCommunityDto : communityDtos) {
                if (!reportFeeMonthStatisticsDto.getCommunityId().equals(tCommunityDto.getCommunityId())) {
                    continue;
                }
                reportFeeMonthStatisticsDto.setCommunityName(tCommunityDto.getName());
            }
        }
    }
    private void computeRoomAndParkingSpace(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) {
        List<String> payerObjIds = new ArrayList<>();