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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.watermeter.entity.Qfcbplandetails;
import org.apache.ibatis.annotations.Param;

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

/**
 * 抄表计划详情表；
 *
 * @author wangjieliu
 * @date Fri Nov 05 00:00:00 CST 2021
 */
public interface QfcbplandetailsMapper extends BaseMapper<Qfcbplandetails> {

    String getIsStateName(@Param("isState") String isState);

    String getSinDouMonthName(@Param("sinDouMonth") String sinDouMonth);

    List<Map> getQyCollect(@Param("isGeneral")String isGeneral, @Param("cbryId")Long cbryId,
                           @Param("monthPlan") String monthPlan, @Param("day") Integer day);

    List<Map> qydPlanCollect(@Param("isGeneral")String isGeneral, @Param("cbryId")Long cbryId,
                             @Param("monthPlan") String monthPlan, @Param("qybm") String qybm,
                             @Param("day")Integer day);

    void savePlanBatch(@Param("list") List<Qfcbplandetails> detailsList);

    void savePlanCbryBatch(@Param("list") List<Qfcbplandetails> detailsList);

    Map appCollect(@Param("isGeneral") String isGeneral, @Param("yearMonth") String yearMonth, @Param("cbry") Long cbry);

    Map getQydCbInfo(@Param("isGeneral") String isGeneral, @Param("yearMonth") String yearMonth, @Param("cbry") Long cbry);

    Map qyCbInfo(@Param("isGeneral") String isGeneral, @Param("yearMonth") String yearMonth, @Param("cbry") Long cbry);

    void initCbslEveyDay(@Param("yearMonth") String yearMonth);

    Page getClientMeterReading(Page page, @Param("client") String client, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<Map> getUserZone( @Param("userId")Long userId, @Param("isGeneral")String isGeneral);

    List<Integer> countRepeatReadMater();

    /**
     * 删除抄表重复数据
     * @return boolean
     */
    boolean deleteRepeatData();
}
