| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getReceivableInformation" parameterType="Map" resultType="Map"> |
| | | select sum(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) |
| | | oweAmount |
| | | from report_fee_month_statistics t |
| | | where t.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getFloorReceivableInformation" parameterType="Map" resultType="Map"> |
| | | select f.floor_num floorNum,f.`name`,sum(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount |
| | | from report_fee_month_statistics t |
| | | inner join building_room br on br.room_id = t.obj_id and t.obj_type = '3333' and br.community_id = t.community_id and br.status_cd = '0' |
| | | inner join building_unit bu on bu.unit_id = br.unit_id and bu.status_cd = '0' |
| | | inner join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0' |
| | | where t.community_id = #{communityId} |
| | | group by f.floor_num ,f.`name` |
| | | </select> |
| | | |
| | | <select id="getFeeConfigReceivableInformation" parameterType="Map" resultType="Map"> |
| | | select t.fee_name feeName,sum(t.receivable_amount) receivableAmount,SUM(t.received_amount) receivedAmount,SUM(t.owe_amount) oweAmount |
| | | from report_fee_month_statistics t |
| | | where t.community_id = #{communityId} |
| | | group by t.fee_name |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @RequestMapping(value = "/queryAllPaymentCount", method = RequestMethod.POST) |
| | | List<ReportFeeMonthStatisticsDto> queryAllPaymentCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | |
| | | @RequestMapping(value = "/queryReportProficientCount", method = RequestMethod.POST) |
| | | JSONObject queryReportProficientCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | |
| | | return getReportFeeMonthStatisticsBMOImpl.queryOwePaymentCount(reportFeeMonthStatisticsDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询费用分项表 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /reportFeeMonthStatistics/queryReportProficientCount |
| | | * @path /app/reportFeeMonthStatistics/queryReportProficientCount |
| | | */ |
| | | @RequestMapping(value = "/queryReportProficientCount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryReportProficientCount(@RequestParam(value = "communityId") String communityId) { |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto(); |
| | | reportFeeMonthStatisticsDto.setCommunityId(communityId); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryReportProficientCount(reportFeeMonthStatisticsDto); |
| | | } |
| | | |
| | | } |
| | |
| | | ResponseEntity<String> queryOwePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | |
| | | /** |
| | | * 查询报表专家 |
| | | * @param reportFeeMonthStatisticsDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> queryReportProficientCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto); |
| | | |
| | | /** |
| | | * 查询报修信息 |
| | | * |
| | | * @param repairUserDto |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询报表专家 统计信息 |
| | | * @param reportFeeMonthStatisticsDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResponseEntity<String> queryReportProficientCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | JSONObject result = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportProficientCount(reportFeeMonthStatisticsDto); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(result.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | /** |
| | | * 查询报修信息 |
| | | * |
| | | * @param repairUserDto |
| | |
| | | * @return |
| | | */ |
| | | List<Map> getRepairStaff(Map info); |
| | | |
| | | /** |
| | | * 计算应收 信息 |
| | | * @param beanCovertMap |
| | | * @return |
| | | */ |
| | | Map getReceivableInformation(Map beanCovertMap); |
| | | |
| | | /** |
| | | * 计算应收 信息 |
| | | * @param beanCovertMap |
| | | * @return |
| | | */ |
| | | List<Map> getFloorReceivableInformation(Map beanCovertMap); |
| | | |
| | | /** |
| | | * 计算应收 信息 |
| | | * @param beanCovertMap |
| | | * @return |
| | | */ |
| | | List<Map> getFeeConfigReceivableInformation(Map beanCovertMap); |
| | | } |
| | |
| | | return businessRepairUserInfos; |
| | | } |
| | | |
| | | @Override |
| | | public Map getReceivableInformation(Map beanCovertMap) { |
| | | List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getReceivableInformation", beanCovertMap); |
| | | if (businessReportFeeMonthStatisticsInfos.size() < 1) { |
| | | return null; |
| | | } |
| | | |
| | | return businessReportFeeMonthStatisticsInfos.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> getFloorReceivableInformation(Map beanCovertMap) { |
| | | List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getFloorReceivableInformation", beanCovertMap); |
| | | return businessReportFeeMonthStatisticsInfos; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> getFeeConfigReceivableInformation(Map beanCovertMap) { |
| | | List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getFeeConfigReceivableInformation", beanCovertMap); |
| | | return businessReportFeeMonthStatisticsInfos; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | Date targetEndDate = (Date) targetEndDateAndOweMonth.get("targetEndDate"); |
| | | tmpReportFeeDto.setDeadlineTime(targetEndDate); |
| | | double receivableAmount = getReceivableAmountByCar(tmpReportFeeDto, null, tmpReportCarDto); //应收 |
| | | double oweAmount = getOweAmountByCar(tmpReportFeeDto, null, tmpReportCarDto); //应收 |
| | | |
| | | dealBeforeUploadCarFee(tmpReportFeeDto, tmpReportCarDto); |
| | | double oweAmount = getOweAmount(tmpReportFeeDto, receivableAmount, receivedAmount); //欠费 |
| | | double receivableAmount = getReceivableAmount(tmpReportFeeDto,receivedAmount); //欠费 |
| | | |
| | | |
| | | ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo = new ReportFeeMonthStatisticsPo(); |
| | |
| | | |
| | | Date targetEndDate = (Date) targetEndDateAndOweMonth.get("targetEndDate"); |
| | | tmpReportFeeDto.setDeadlineTime(targetEndDate); |
| | | double receivableAmount = getReceivableAmount(tmpReportFeeDto, reportRoomDto, null); //应收 |
| | | double oweAmount = getOweAmount(tmpReportFeeDto, reportRoomDto, null); //欠费 |
| | | |
| | | double receivableAmount = getReceivableAmount(tmpReportFeeDto, receivedAmount); //应收 |
| | | //解决上线时 之前欠费没有刷入导致费用金额对不上问题处理 |
| | | dealBeforeUploadRoomFee(reportRoomDto, tmpReportFeeDto, receivableAmount); |
| | | |
| | | double oweAmount = getOweAmount(tmpReportFeeDto, receivableAmount, receivedAmount); //欠费 |
| | | |
| | | |
| | | ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo = new ReportFeeMonthStatisticsPo(); |
| | |
| | | * 当月欠费 |
| | | * |
| | | * @param tmpReportFeeDto |
| | | * @param receivableAmount |
| | | * @param receivedAmount |
| | | * @return |
| | | */ |
| | | private double getOweAmount(ReportFeeDto tmpReportFeeDto, double receivableAmount, double receivedAmount) { |
| | | private double getReceivableAmount(ReportFeeDto tmpReportFeeDto, double receivedAmount) { |
| | | |
| | | |
| | | return receivableAmount; |
| | | //一次性费用 除以月份 平均 |
| | | if (FeeDto.FEE_FLAG_ONCE.equals(tmpReportFeeDto.getFeeFlag())) { |
| | | return computeOnceFee(tmpReportFeeDto); |
| | | } |
| | | return tmpReportFeeDto.getFeePrice(); |
| | | |
| | | } |
| | | |
| | |
| | | * @param tmpReportFeeDto |
| | | * @return |
| | | */ |
| | | private double getReceivableAmountByCar(ReportFeeDto tmpReportFeeDto, ReportRoomDto reportRoomDto, ReportCarDto reportCarDto) { |
| | | private double getOweAmountByCar(ReportFeeDto tmpReportFeeDto, ReportRoomDto reportRoomDto, ReportCarDto reportCarDto) { |
| | | |
| | | double feePrice = computeFeeSMOImpl.getReportFeePrice(tmpReportFeeDto, reportRoomDto, reportCarDto); |
| | | tmpReportFeeDto.setFeePrice(feePrice); |
| | |
| | | * @param tmpReportFeeDto |
| | | * @return |
| | | */ |
| | | private double getReceivableAmount(ReportFeeDto tmpReportFeeDto, ReportRoomDto reportRoomDto, ReportCarDto reportCarDto) { |
| | | private double getOweAmount(ReportFeeDto tmpReportFeeDto, ReportRoomDto reportRoomDto, ReportCarDto reportCarDto) { |
| | | |
| | | double feePrice = computeFeeSMOImpl.getReportFeePrice(tmpReportFeeDto, reportRoomDto, reportCarDto); |
| | | tmpReportFeeDto.setFeePrice(feePrice); |
| | |
| | | package com.java110.report.smo.impl; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | |
| | | import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo; |
| | | import com.java110.report.dao.IReportFeeMonthStatisticsServiceDao; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public JSONObject queryReportProficientCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | JSONObject result = new JSONObject(); |
| | | Map info = reportFeeMonthStatisticsServiceDaoImpl.getReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | result.put("receivableInformation", info); |
| | | |
| | | List<Map> infos = reportFeeMonthStatisticsServiceDaoImpl.getFloorReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | result.put("floorReceivableInformations", JSONArray.parseArray(JSONArray.toJSONString(infos))); |
| | | |
| | | List<Map> tempInfos = reportFeeMonthStatisticsServiceDaoImpl.getFeeConfigReceivableInformation(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | result.put("feeConfigReceivableInformations", JSONArray.parseArray(JSONArray.toJSONString(tempInfos))); |
| | | |
| | | |
| | | reportFeeMonthStatisticsDto.setStartTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_MONTH, 7); |
| | | reportFeeMonthStatisticsDto.setEndTime(DateUtil.getFormatTimeString(calendar.getTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | |
| | | int deadlineFeeCount = reportFeeMonthStatisticsServiceDaoImpl.queryDeadlineFeeCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | int prePaymentCount = reportFeeMonthStatisticsServiceDaoImpl.queryPrePaymentNewCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)); |
| | | |
| | | |
| | | JSONObject remindInfomation = new JSONObject(); |
| | | remindInfomation.put("deadlineFeeCount", deadlineFeeCount); |
| | | remindInfomation.put("prePaymentCount", prePaymentCount); |
| | | |
| | | result.put("remindInfomation", remindInfomation); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<FeeConfigDto> queryFeeConfigs(FeeConfigDto feeConfigDto) { |
| | | List<FeeConfigDto> feeConfigs = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getFeeConfigInfo(BeanConvertUtil.beanCovertMap(feeConfigDto)), FeeConfigDto.class); |
| | | return feeConfigs; |