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

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tofly.watermeter.custom.dto.AmountOrWaterVolumeInfoDto;
import com.tofly.watermeter.custom.entity.meterRead.InitCbByHb;
import com.tofly.watermeter.custom.entity.meterRead.readstatic.ReadCollect;
import com.tofly.watermeter.entity.Qfkhjbxx;
import com.tofly.watermeter.entity.Readmetereashis;
import com.tofly.watermeter.entity.Readmeterhis;
import com.tofly.watermeter.entity.Yhbingqy;
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
 */
public interface ReadmeterhisService extends IService<Readmeterhis> {

    List<Map> getStatisAudit(String yearMonth, String isGeneral);

    List<Readmeterhis> getInitCbData(String qydbm , String isGeneral);

    List<Readmeterhis> getInitCbDataList(List<String> qydbm , String isGeneral);

    List<Readmeterhis> getInitCbDataCard(String qydbm);

    List<InitCbByHb> initCbDataByHb(String monthPlan);

    void initCbPlanHb(List<InitCbByHb> hbInfo , String monthPlan);

    List<Readmeterhis> getInitFrontThreeData(Page page, String monthPlan);

    void initFrontThreeData(List<Readmeterhis> readmeterhisList , @Param("monthPlan") String monthPlan);

    void updateCbxh(List<Yhbingqy> resultYhList , String yearMonth , String qydbm);

    List<Yhbingqy> getNoSortYhList(String yearMonth, List<String> sortYhbhList, String qydbm);

    int getInitFrontThreeDataCount(String monthPlan);

    void updateYearCbsl1(List qfcbqfmxl1, String yearMonth, String yearOnMonth1);

    void updateYearCbsl2(List qfcbqfmxl2, String yearMonth, String yearOnMonth2);

    void updateYearCbsl3(List qfcbqfmxl3, String yearMonth, String yearOnMonth3);

    Long getMaxId();

    void updateAuditCbData(List<Readmeterhis> readmeterhisList);
    void updateAuditYcbData(List<Readmetereashis> readmeterhisList);

    String getMaxMonthPlan();

    void updateYhInfo(List<Qfkhjbxx> upts, String monthPlan);

    void updateYhWaterVolumeInfos(List<AmountOrWaterVolumeInfoDto> upts, String monthPlan);

    void updateSoleSign(List<Readmeterhis> readmeterhisArrayList, String yearMonth);

    List<ReadCollect> getOffline(String yearMonth, String isGeneral, List<String> cbryList, List<String> qybmList, List<String> qydbmList);

    boolean updateChildSort(List<Readmeterhis> readmeterhisList);

    boolean updateTaskCbxh(String qydbm, String monthPlan);

    /**
     * 处理水量与客户信息不一致的抄表用户
     * @return list
     */
    boolean handleAbnormalUser();
}
