java110
2021-02-25 f1627e52fa6e9fea7b34731beaa55dc0222344da
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
@@ -1,19 +1,23 @@
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.dto.fee.FeeConfigDto;
import com.java110.dto.repair.RepairUserDto;
import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO;
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;
@@ -295,11 +299,93 @@
    }
    @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;
    }
    /**
     * 查询报修信息
     *
     * @param repairUserDto
     * @return
     */
    @Override
    public List<RepairUserDto> queryRepair(RepairUserDto repairUserDto) {
        //校验是否传了 分页信息
        int page = repairUserDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            repairUserDto.setPage((page - 1) * repairUserDto.getRow());
        }
        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairUserInfo(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
        return repairUserDtoList;
    }
    /**
     * 查询报修信息
     *
     * @param repairUserDto
     * @return
     */
    @Override
    public List<RepairUserDto> queryRepairWithOutPage(RepairUserDto repairUserDto) {
        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairWithOutPage(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
        return repairUserDtoList;
    }
    /**
     * 查询员工报修表员工信息
     *
     * @param repairUserDto
     * @return
     */
    @Override
    public List<RepairUserDto> queryRepairForStaff(RepairUserDto repairUserDto) {
        //校验是否传了 分页信息
        int page = repairUserDto.getPage();
        if (page != PageDto.DEFAULT_PAGE) {
            repairUserDto.setPage((page - 1) * repairUserDto.getRow());
        }
        List<RepairUserDto> repairUserDtoList = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getRepairStaff(BeanConvertUtil.beanCovertMap(repairUserDto)), RepairUserDto.class);
        return repairUserDtoList;
    }
    public IReportFeeMonthStatisticsServiceDao getReportFeeMonthStatisticsServiceDaoImpl() {
        return reportFeeMonthStatisticsServiceDaoImpl;