| | |
| | | private String feeName; |
| | | private String configId; |
| | | |
| | | private String deadlineTime; |
| | | |
| | | |
| | | public String getDetailMonth() { |
| | | return detailMonth; |
| | |
| | | public void setConfigId(String configId) { |
| | | this.configId = configId; |
| | | } |
| | | |
| | | public String getDeadlineTime() { |
| | | return deadlineTime; |
| | | } |
| | | |
| | | public void setDeadlineTime(String deadlineTime) { |
| | | this.deadlineTime = deadlineTime; |
| | | } |
| | | } |
| | |
| | | insert into pay_fee_detail_month( |
| | | detail_month,detail_year,detail_id,receivable_amount,discount_amount,remark,received_amount,community_id,fee_id,month_id, |
| | | obj_name,obj_id,owner_name,owner_id,link,state,pay_fee_time,cur_month_time, |
| | | fee_name,config_id |
| | | fee_name,config_id,deadline_time |
| | | ) values |
| | | <foreach collection="payFeeDetailMonthPos" item="item" index="index" separator=","> |
| | | ( |
| | | #{item.detailMonth},#{item.detailYear},#{item.detailId},#{item.receivableAmount},#{item.discountAmount}, |
| | | #{item.remark},#{item.receivedAmount},#{item.communityId},#{item.feeId},#{item.monthId}, |
| | | #{item.objName},#{item.objId},#{item.ownerName},#{item.ownerId},#{item.link},#{item.state},#{item.payFeeTime},#{item.curMonthTime}, |
| | | #{item.feeName},#{item.configId} |
| | | #{item.feeName},#{item.configId},#{item.deadlineTime} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | receivedAmount,t.community_id,t.community_id communityId,t.fee_id,t.fee_id feeId,t.month_id,t.month_id monthId, |
| | | t.obj_name objName,t.obj_id objId,t.owner_name ownerName,t.owner_id ownerId,t.link,t.state,t.pay_fee_time |
| | | payFeeTime, |
| | | t.cur_month_time curMonthTime |
| | | t.cur_month_time curMonthTime,t.deadline_time deadlineTime |
| | | from pay_fee_detail_month t |
| | | where 1 =1 |
| | | <if test="detailMonth !=null and detailMonth != ''"> |
| | |
| | | |
| | | <select id="queryDeadlineFeeCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | SELECT |
| | | t.obj_name objName, |
| | | t.fee_name feeName, |
| | | t.deadline_time deadlineTime |
| | | FROM |
| | | report_fee_month_statistics t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on t.obj_id = br.room_id and t.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' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.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} |
| | | from pay_fee_detail_month t |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | and t.detail_id = '-1' |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id = #{configId} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | and t.obj_name like CONCAT('%',#{objName},'%') |
| | | </if> |
| | | <if test="objNameNum != null and objNameNum != ''"> |
| | | and t.obj_name_num= #{objNameNum} |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name like CONCAT('%',#{ownerName},'%') |
| | | </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 test="link !=null and link != ''"> |
| | | and t.link = #{link} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | <if test="startTime !=null and startTime !=''"> |
| | | and t.deadline_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.deadline_time <= #{endTime} |
| | | </if> |
| | | ) t |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryDeadlineFee" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | |
| | | select |
| | | t.obj_name objName, |
| | | t.obj_name_num objNameNum, |
| | | t.obj_type objType, |
| | | pf.payer_obj_type objType, |
| | | t.fee_name feeName, |
| | | t.deadline_time deadlineTime, |
| | | t.update_time updateTime |
| | | FROM |
| | | report_fee_month_statistics t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on t.obj_id = br.room_id and t.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' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.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} |
| | | t.deadline_time deadlineTime |
| | | from pay_fee_detail_month t |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1=1 |
| | | and t.detail_id = '-1' |
| | | <if test="configId !=null and configId != ''"> |
| | | and t.config_id = #{configId} |
| | | </if> |
| | | <if test="objName !=null and objName != ''"> |
| | | and t.obj_name= #{objName} |
| | | and t.obj_name like CONCAT('%',#{objName},'%') |
| | | </if> |
| | | <if test="objNameNum != null and objNameNum != ''"> |
| | | and t.obj_name_num= #{objNameNum} |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name like CONCAT('%',#{ownerName},'%') |
| | | </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 test="link !=null and link != ''"> |
| | | and t.link = #{link} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryPrePayment" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryPrePayment" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | |
| | | curMonthReceivableAmount = new BigDecimal(curDay).multiply(dayReceivableAmount).setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | |
| | | // todo 保存数据到pay_fee_detail_month |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime); |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime,deadlineTime); |
| | | |
| | | // todo 将startTime 修改为 下月1日时间 |
| | | startMonthDayTime = firstMonthDayTime; |
| | |
| | | curMonthReceivableAmount = new BigDecimal(curDay).multiply(dayReceivableAmount).setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | |
| | | // todo 保存数据到pay_fee_detail_month |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime); |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), 0, null, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime,deadlineTime); |
| | | payFeeDetailMonthInnerServiceSMOImpl.savePayFeeDetailMonths(payFeeDetailMonthPos); |
| | | |
| | | } |
| | |
| | | curMonthReceivedAmount = new BigDecimal(curDay).multiply(dayReceivedAmount).setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | |
| | | // todo 保存数据到pay_fee_detail_month |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), curMonthReceivedAmount.doubleValue(), feeDetailDto, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime); |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), curMonthReceivedAmount.doubleValue(), feeDetailDto, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime,endTime); |
| | | |
| | | // todo 将startTime 修改为 下月1日时间 |
| | | startMonthDayTime = firstMonthDayTime; |
| | |
| | | curMonthReceivedAmount = new BigDecimal(curDay).multiply(dayReceivedAmount).setScale(4, BigDecimal.ROUND_HALF_UP); |
| | | |
| | | // todo 保存数据到pay_fee_detail_month |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), curMonthReceivedAmount.doubleValue(), feeDetailDto, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime); |
| | | toSavePayFeeDetailMonth(curMonthReceivableAmount.doubleValue(), curMonthReceivedAmount.doubleValue(), feeDetailDto, feeDto, payFeeMonthOwnerDto, payFeeDetailMonthPos, startMonthDayTime,endTime); |
| | | payFeeDetailMonthInnerServiceSMOImpl.savePayFeeDetailMonths(payFeeDetailMonthPos); |
| | | |
| | | } |
| | |
| | | FeeDto feeDto, |
| | | PayFeeMonthOwnerDto payFeeMonthOwnerDto, |
| | | List<PayFeeDetailMonthPo> payFeeDetailMonthPos, |
| | | Date curTime) { |
| | | Date curTime, |
| | | Date deadlineTime) { |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(curTime); |
| | |
| | | tmpPayFeeDetailMonthPo.setOwnerName(payFeeMonthOwnerDto.getOwnerName()); |
| | | tmpPayFeeDetailMonthPo.setLink(payFeeMonthOwnerDto.getLink()); |
| | | tmpPayFeeDetailMonthPo.setCurMonthTime(DateUtil.getFormatTimeStringB(calendar.getTime())); |
| | | tmpPayFeeDetailMonthPo.setDeadlineTime(DateUtil.getFormatTimeStringA(deadlineTime)); |
| | | if (feeDetailDto == null) { |
| | | tmpPayFeeDetailMonthPo.setPayFeeTime(null); |
| | | } else { // todo 交费记录 保存时 |
| | |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /reportFeeMonthStatistics/queryPrePayment |
| | | * @path /app/reportFeeMonthStatistics/queryPrePayment |
| | | */ |
| | | @RequestMapping(value = "/queryPrePayment", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryPrePayment(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto(); |
| | | reportFeeMonthStatisticsDto.setCommunityId(communityId); |
| | | reportFeeMonthStatisticsDto.setPage(page); |
| | | reportFeeMonthStatisticsDto.setRow(row); |
| | | 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)); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryPrePayment(reportFeeMonthStatisticsDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询费用分项表 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /reportFeeMonthStatistics/queryOwePaymentCount |
| | | * @path /app/reportFeeMonthStatistics/queryOwePaymentCount |
| | | */ |
| New file |
| | |
| | | package com.java110.report.cmd.reportFeeMonthStatistics; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO; |
| | | import com.java110.report.bmo.reportFeeMonthStatistics.impl.GetReportFeeMonthStatisticsBMOImpl; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Java110Cmd(serviceCode = "reportFeeMonthStatistics.queryDeadlineFee") |
| | | public class QueryDeadlineFeeCmd extends Cmd { |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(GetReportFeeMonthStatisticsBMOImpl.class); |
| | | |
| | | @Autowired |
| | | private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsDto.class); |
| | | 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 count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlineFeeCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlineFee(reportFeeMonthStatisticsDto); |
| | | |
| | | freshReportDeadlineDay(reportFeeMonthStatisticsDtos); |
| | | } 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); |
| | | |
| | | } |
| | | |
| | | private void freshReportDeadlineDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | |
| | | Date nowDate = DateUtil.getCurrentDate(); |
| | | |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) { |
| | | try { |
| | | int day = DateUtil.daysBetween(DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getDeadlineTime(), |
| | | DateUtil.DATE_FORMATE_STRING_A), nowDate); |
| | | reportFeeMonthStatisticsDto.setOweDay(day); |
| | | } catch (Exception e) { |
| | | logger.error("计算欠费天数失败", e); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.report.cmd.reportFeeMonthStatistics; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO; |
| | | import com.java110.report.bmo.reportFeeMonthStatistics.impl.GetReportFeeMonthStatisticsBMOImpl; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 查询预交费 |
| | | */ |
| | | @Java110Cmd(serviceCode = "reportFeeMonthStatistics.queryPrePayment") |
| | | public class QueryPrePaymentCmd extends Cmd { |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(GetReportFeeMonthStatisticsBMOImpl.class); |
| | | |
| | | @Autowired |
| | | private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsDto.class); |
| | | 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 count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePaymentNewCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePayment(reportFeeMonthStatisticsDto); |
| | | //todo 刷入对象名称 |
| | | doObjNames(reportFeeMonthStatisticsDtos); |
| | | } 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); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | /** |
| | | * 刷新 对象名称 |
| | | * |
| | | * @param reportFeeMonthStatisticsDtos |
| | | */ |
| | | private static void doObjNames(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | 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()); |
| | | } |
| | | |
| | | try { |
| | | tmpReportFeeMonthStatisticsDto.setOweDay(DateUtil.daysBetween(DateUtil.getDateFromString(tmpReportFeeMonthStatisticsDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A), DateUtil.getCurrentDate())); |
| | | } catch (ParseException e) { |
| | | logger.error("费用结束时间错误" + tmpReportFeeMonthStatisticsDto.getEndTime(), e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryPrePayment" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryPrePayment" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = "/reportFeeMonthStatistics/queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | apiUrl = "/reportFeeMonthStatistics.queryDeadlineFee" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |