package com.zcxk.rmcp.core.dao;

import com.zcxk.core.common.pojo.UserCondition;
import com.zcxk.rmcp.api.vo.MeterReadWaterRecordVo;
import com.zcxk.rmcp.api.vo.StatisticsReadRateVo;
import com.zcxk.rmcp.core.entity.MeterReadWaterRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Andy
 * @version V1.0
 * @description: 统计7天的抄表率
 * @date 2021/7/26
 **/
@Mapper
public interface MeterReadWaterRecordMapper {

    /**
     * 添加数据
     *
     * @param meterReadWaterRecord:
     * @return void
     * @author Andy
     * @date 14:54 2021/8/3
     **/
    void insertMeterReadWaterRecord(MeterReadWaterRecord meterReadWaterRecord);

    /**
     * 批量操作
     *
     * @param meterReadWaterRecord:
     * @return void
     * @author Andy
     * @date 14:54 2021/8/3
     **/
    void batchInsert(@Param("waterRecordList") List<MeterReadWaterRecord> meterReadWaterRecord);

    /**
     * 查询小区用水量
     *
     * @param beginDate:
     * @param endDate:
     * @param condition:
     * @return java.util.List<com.zcxk.rmcp.api.vo.MeterReadWaterRecordVo>
     * @author Andy
     * @date 14:54 2021/8/3
     **/
    List<MeterReadWaterRecordVo> listWaterRecord(@Param("beginDate") int beginDate, @Param("endDate") int endDate, @Param("userCondition") UserCondition condition);

    /**
     * @param planId
     * @return
     * @description 统计计划抄表率
     * @author linqingwei
     **/
    StatisticsReadRateVo totalReadRate(@Param("planId") Integer planId);
}
