/*
 * Author: wangjian
 * 生成mapper
 */
package com.tofly.watermeter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.watermeter.custom.entity.meterRead.YhbhAndSl;
import com.tofly.watermeter.entity.Qfcbqfmxls;
import org.apache.ibatis.annotations.Param;


import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 业务抄表欠费明细历史表
 *
 * @author wangjieliu
 * @date Wed Apr 14 00:00:00 CST 2021
 */
public interface QfcbqfmxlsMapper extends BaseMapper<Qfcbqfmxls> {
    boolean insertBatch(@Param("qflsList") List<Qfcbqfmxls> qflsList);
    String cbFsName(Long cbfsId);

    Long getWaterYieldByTime(@Param("yhbh") String yhbh, @Param("readTime") String readTime);

    /**
     * 获取前几月的历史数据
     * @return
     */
    List<YhbhAndSl> getBeforeReadData(@Param("month") Integer month);

    List<YhbhAndSl> selectYhbhAdYsl(Date date);


    /**
     * 区域段
     * @return
     */
    List<Map> getReadQYDNum(@Param("qydbmList") List<String> qydbmList , @Param("cwyf") String cwyf);

    /**
     * 抄表人员
     * @return
     */
    List<Map> getReadRYNum(@Param("cbryList") List<String> cbryList, @Param("cwyf") String cwyf);

    boolean insertQfcbqfmxls(@Param("list") List<Qfcbqfmxls> lists, @Param("yearonmonth1") Date yearonmonth1,
                             @Param("yearonmonth2") Date yearonmonth2, @Param("yearonmonth3") Date yearonmonth3, @Param("column")String column);

    int truncateQfcbqfmxlsTable();

    IPage<Qfcbqfmxls> getReadHistory(Page page , @Param("yhbh") String yhbh , @Param("dateTime")Date dateTime);
}
