package com.tofly.watermeter.custom.service;

import com.tofly.common.core.entity.ResultRespone;
import com.tofly.watermeter.custom.dto.WaterAuditDto;
import com.tofly.watermeter.custom.entity.meterRead.ReadRecord;
import com.tofly.watermeter.custom.entity.webserverbean.ReadUpload;
import com.tofly.watermeter.custom.entity.webserverbean.ReadWrite;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * @author FlashWJL
 * @date 2021/8/30 11:09
 */
public interface ReadDataCheckThreeService {

    boolean readRecord(ReadRecord record , List<MultipartFile> fileList);

    void testRead();

    StringBuilder saveFileList(List<MultipartFile> fileList, String filePathBean, String tableName);
    /**
     * 同步抄表数据到森鑫炬
     *
     * @param upload 同步森鑫炬实体
     * @param yhbh 用户编号
     * @param cbyf 抄表月份
     */
    boolean sysSXJCbData(ReadUpload upload, String yhbh, String cbyf, ReadRecord record, Integer zeroCount, Integer upCount,
                         Integer downCount, Integer equalCount, String isFirst,
                         Long yearonyear1, Long yearonyear2, Long yearonyear3);

    String readDataCheck(ReadRecord record, String isGeneral);

    ResultRespone updateCbsl(ReadRecord record);

    ResultRespone synCbsl(String yhbhS , String monthPlan , String isGeneral);

    ResultRespone cbsf(String yearMonth);

    ResultRespone soleSign(String yearMonth);

    /**
     * 通过客户编号获取用户名与上次抄表水量
     */
    List<Map<String, String>> queryInfoByCode();

    /**
     * 根据区域统计水量审核信息
     * @return list
     */
    List<Map> waterAuditCountByZone();

    /**
     * 统计各个状态审核信息
     * @param readBookCode readBookCode
     * @return list
     */
    Map waterAuditStatusCount(String readBookCode);


    /**
     * 获取水量审核信息
     * @param hasException 是否异常 0 正常 1 异常 2 复核 6 已停水
     * @param readBookCode 抄表册
     * @return list
     */
    List<Map> waterAuditInfo(Integer hasException,String readBookCode);

    /**
     * 获取水量审核人员
     * @return list
     */
    List<Map> waterAuditUser();

    /**
     * 水量审核
     * @return boolean
     */
    boolean waterAudit(WaterAuditDto dto);
}
