java110
2020-10-20 b825d6887ea8ca29c880ba95f6de909140a379f6
加入缴费明细表
8个文件已修改
234 ■■■■■ 已修改文件
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
@@ -765,6 +765,118 @@
            limit #{page}, #{row}
        </if>
    </select>
    <select id="queryPayFeeDetailCount" parameterType="Map" resultType="Map">
        select count(1) count
        from (
        select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum,
        pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime,
        t.receivable_amount receivableAmount,t.received_amount receivedAmount
        from pay_fee_detail t
        INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
        inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0'
        left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
        left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
        where t.status_cd = '0'
        <if test="roomNum !=null and roomNum != ''">
            and br.room_num= #{roomNum}
        </if>
        <if test="unitId !=null and unitId != ''">
            and bu.unit_id= #{unitId}
        </if>
        <if test="floorId !=null and floorId != ''">
            and f.floor_id = #{floorId}
        </if>
        <if test="objName !=null and objName != ''">
            and t.obj_name= #{objName}
        </if>
        <if test="feeYear !=null and feeYear != ''">
            and t.fee_year= #{feeYear}
        </if>
        <if test="feeMonth !=null and feeMonth != ''">
            and t.fee_month= #{feeMonth}
        </if>
        <if test="feeId !=null and feeId != ''">
            and t.fee_id= #{feeId}
        </if>
        <if test="configId !=null and configId != ''">
            and t.config_id= #{configId}
        </if>
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </if>
        <if test="feeName !=null and feeName != ''">
            and t.fee_name= #{feeName}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="startTime !=null">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null">
            and t.create_time &lt;= #{endTime}
        </if>
        ) t
    </select>
    <!-- 查询费用月统计信息 add by wuxw 2018-07-03 -->
    <select id="queryPayFeeDetail" parameterType="Map" resultType="Map">
        select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum,
        pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime,
        t.receivable_amount receivableAmount,t.received_amount receivedAmount
        from pay_fee_detail t
        INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
        inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0'
        left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
        left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
        left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
        where t.status_cd = '0'
        <if test="roomNum !=null and roomNum != ''">
            and br.room_num= #{roomNum}
        </if>
        <if test="unitId !=null and unitId != ''">
            and bu.unit_id= #{unitId}
        </if>
        <if test="floorId !=null and floorId != ''">
            and f.floor_id = #{floorId}
        </if>
        <if test="objName !=null and objName != ''">
            and t.obj_name= #{objName}
        </if>
        <if test="feeYear !=null and feeYear != ''">
            and t.fee_year= #{feeYear}
        </if>
        <if test="feeMonth !=null and feeMonth != ''">
            and t.fee_month= #{feeMonth}
        </if>
        <if test="feeId !=null and feeId != ''">
            and t.fee_id= #{feeId}
        </if>
        <if test="configId !=null and configId != ''">
            and t.config_id= #{configId}
        </if>
        <if test="objId !=null and objId != ''">
            and t.obj_id= #{objId}
        </if>
        <if test="feeName !=null and feeName != ''">
            and t.fee_name= #{feeName}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="startTime !=null">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null">
            and t.create_time &lt;= #{endTime}
        </if>
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <select id="queryDeadlineFeeCount" parameterType="Map" resultType="Map">
        select count(1) count
        from (
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java
@@ -163,6 +163,23 @@
     * @param reportFeeMonthStatisticsDto
     * @return
     */
    @RequestMapping(value = "/queryPayFeeDetailCount", method = RequestMethod.POST)
    int queryPayFeeDetailCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    /**
     * 查询费用汇总表
     *
     * @param reportFeeMonthStatisticsDto
     * @return
     */
    @RequestMapping(value = "/queryPayFeeDetail", method = RequestMethod.POST)
    List<ReportFeeMonthStatisticsDto> queryPayFeeDetail(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    /**
     * 查询费用汇总表个数
     *
     * @param reportFeeMonthStatisticsDto
     * @return
     */
    @RequestMapping(value = "/queryDeadlineFeeCount", method = RequestMethod.POST)
    int queryDeadlineFeeCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
@@ -281,6 +281,40 @@
        reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01");
        return getReportFeeMonthStatisticsBMOImpl.queryOweFeeDetail(reportFeeMonthStatisticsDto);
    }
    /**
     * 缴费明细表
     *
     * @param communityId 小区ID
     * @return
     * @serviceCode /reportFeeMonthStatistics/queryPayFeeDetail
     * @path /app/reportFeeMonthStatistics/queryPayFeeDetail
     */
    @RequestMapping(value = "/queryPayFeeDetail", method = RequestMethod.GET)
    public ResponseEntity<String> queryPayFeeDetail(@RequestParam(value = "communityId") String communityId,
                                                    @RequestParam(value = "floorId", required = false) String floorId,
                                                    @RequestParam(value = "floorNum", required = false) String floorNum,
                                                    @RequestParam(value = "unitNum", required = false) String unitNum,
                                                    @RequestParam(value = "unitId", required = false) String unitId,
                                                    @RequestParam(value = "roomId", required = false) String roomId,
                                                    @RequestParam(value = "roomNum", required = false) String roomNum,
                                                    @RequestParam(value = "startTime", required = false) String startTime,
                                                    @RequestParam(value = "endTime", required = false) String endTime,
                                                    @RequestParam(value = "page") int page,
                                                    @RequestParam(value = "row") int row) {
        ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto();
        reportFeeMonthStatisticsDto.setPage(page);
        reportFeeMonthStatisticsDto.setRow(row);
        reportFeeMonthStatisticsDto.setCommunityId(communityId);
        reportFeeMonthStatisticsDto.setFloorId(floorId);
        reportFeeMonthStatisticsDto.setFloorNum(floorNum);
        reportFeeMonthStatisticsDto.setUnitId(unitId);
        reportFeeMonthStatisticsDto.setUnitNum(unitNum);
        reportFeeMonthStatisticsDto.setRoomId(roomId);
        reportFeeMonthStatisticsDto.setRoomNum(roomNum);
        reportFeeMonthStatisticsDto.setStartTime(StringUtil.isEmpty(startTime) ? null : startTime + "-01");
        reportFeeMonthStatisticsDto.setEndTime(StringUtil.isEmpty(endTime) ? null : endTime + "-01");
        return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto);
    }
    /**
     * 查询费用分项表
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java
@@ -32,6 +32,7 @@
    ResponseEntity<String> queryFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    ResponseEntity<String> queryOweFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    ResponseEntity<String> queryDeadlineFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
    ResponseEntity<String> queryPrePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
@@ -142,6 +142,34 @@
    }
    @Override
    public ResponseEntity<String> queryPayFeeDetail(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
        int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetailCount(reportFeeMonthStatisticsDto);
        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
        if (count > 0) {
            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto);
            for (ReportFeeMonthStatisticsDto tmpReportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) {
                if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(tmpReportFeeMonthStatisticsDto.getPayerObjType())) {
                    tmpReportFeeMonthStatisticsDto.setObjName(tmpReportFeeMonthStatisticsDto.getFloorNum()
                            + "栋" + tmpReportFeeMonthStatisticsDto.getUnitNum()
                            + "单元" + tmpReportFeeMonthStatisticsDto.getRoomNum() + "室");
                } else {
                    tmpReportFeeMonthStatisticsDto.setObjName(tmpReportFeeMonthStatisticsDto.getCarNum());
                }
            }
        } else {
            reportFeeMonthStatisticsDtos = new ArrayList<>();
        }
        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
        return responseEntity;
    }
    @Override
    public ResponseEntity<String> queryDeadlineFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
        int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlineFeeCount(reportFeeMonthStatisticsDto);
service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java
@@ -147,6 +147,7 @@
     * @return 费用月统计数量
     */
    int queryOweFeeDetailCount(Map info);
    int queryPayFeeDetailCount(Map info);
    int queryDeadlineFeeCount(Map info);
    /**
     * 查询费用月统计信息(instance过程)
@@ -177,6 +178,7 @@
     * @throws DAOException DAO异常
     */
    List<Map> queryOweFeeDetail(Map info) throws DAOException;
    List<Map> queryPayFeeDetail(Map info) throws DAOException;
    List<Map> queryDeadlineFee(Map info) throws DAOException;
    /**
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java
@@ -212,6 +212,26 @@
        return businessReportFeeMonthStatisticsInfos;
    }
    @Override
    public int queryPayFeeDetailCount(Map info) {
        logger.debug("查询费用月统计数据 入参 info : {}", info);
        List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDetailCount", info);
        if (businessReportFeeMonthStatisticsInfos.size() < 1) {
            return 0;
        }
        return Integer.parseInt(businessReportFeeMonthStatisticsInfos.get(0).get("count").toString());
    }
    @Override
    public List<Map> queryPayFeeDetail(Map info) throws DAOException {
        logger.debug("查询费用月统计信息 入参 info : {}", info);
        List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDetail", info);
        return businessReportFeeMonthStatisticsInfos;
    }
    @Override
    public int queryDeadlineFeeCount(Map info) {
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -191,6 +191,26 @@
        return reportFeeMonthStatisticss;
    }
    @Override
    public int queryPayFeeDetailCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
        return reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDetailCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
    }
    @Override
    public List<ReportFeeMonthStatisticsDto> queryPayFeeDetail(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
        //校验是否传了 分页信息
        int page = reportFeeMonthStatisticsDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            reportFeeMonthStatisticsDto.setPage((page - 1) * reportFeeMonthStatisticsDto.getRow());
        }
        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticss = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDetail(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)), ReportFeeMonthStatisticsDto.class);
        return reportFeeMonthStatisticss;
    }
    @Override
    public int queryDeadlineFeeCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
        return reportFeeMonthStatisticsServiceDaoImpl.queryDeadlineFeeCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));