/*
 * 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.ReadSearch;
import com.tofly.watermeter.custom.entity.quality.QualityResult;
import com.tofly.watermeter.custom.entity.quality.QualityStatis;
import com.tofly.watermeter.entity.Readmeter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 抄表数据（有本系统自己管理的）
 *
 * @author wangjieliu
 * @date Wed Nov 10 00:00:00 CST 2021
 */
@Mapper
public interface ReadmeterMapper extends BaseMapper<Readmeter> {

    List<Map> allocationInfo(@Param("search") ReadSearch search,
                              @Param("qybmList") List<String> qybmList,
                              @Param("cbbList") List<String> cbbList);

    IPage<Map> allocationInfoPage(Page page, @Param("search") ReadSearch search,
                                  @Param("qybmList") List<String> qybmList,
                                  @Param("cbbList") List<String> cbbList);


    List<QualityResult> inspectCollect(@Param("qualityStatis") QualityStatis qualityStatis , @Param("ratio") Integer ratio);

    List<QualityResult> analyzeCollect(@Param("qualityStatis")QualityStatis qualityStatis , @Param("list")List<String> qybmList);

    List<QualityResult> analyzeAbnromal(@Param("qualityStatis")QualityStatis qualityStatis , @Param("list")List<String> qybmList);

    IPage<Map> queryCollect(Page page, @Param("qualityStatis")QualityStatis qualityStatis, @Param("list") List<String> qydbmList);

    IPage<Map> queryCollectHistory(Page page, @Param("qualityStatis")QualityStatis qualityStatis,
                                   @Param("list") List<String> qydbmList, @Param("currentMonth") String currentMonth,
                                   @Param("isGeneral")String isGeneral);

    IPage<Map> queryCollectHistoryCard(Page page, @Param("qualityStatis")QualityStatis qualityStatis,
                                       @Param("list") List<String> qydbmList, @Param("currentMonth") String currentMonth,
                                       @Param("isGeneral")String isGeneral);

    IPage<Map> queryCollectHistoryCardTwo(Page page, @Param("qualityStatis")QualityStatis qualityStatis,
                                       @Param("list") List<String> qydbmList, @Param("currentMonth") String currentMonth,
                                       @Param("isGeneral")String isGeneral);
}
