package com.nantian.cloud.dbcapp.mapper.record;


import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.dbcapp.vo.*;
import com.nantian.sc.cloud.common.core.util.R;
import com.nantian.sc.cloud.common.data.datascope.DataScope;
import com.nantian.sc.cloud.common.security.service.ScUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

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

/**
 *
 *
 * @author zfw
 * @date 2018-09-27 15:20:44
 */
@Mapper
public interface EnergyMapper{

    Float getInfo2019 (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);

    Float getInfo2020 (@Param("companyList") List<String> companyList ,@Param("startTime")String startTime,@Param("endTime")String endTime);

    Float getInfo2019ByEntList (@Param("companyList") List<Integer> companyList ,@Param("startTime")String startTime,@Param("endTime")String endTime);

    //煤消耗
    List<CoalVo> foundCoalByMonth(@Param("list") List<Integer> list, @Param("startTime")String startTime, @Param("endTime")String endTime);

    //工业水消耗
    List<CoalVo> foundWaterByMonth(@Param("list") List<Integer> list,@Param("startTime")String startTime, @Param("endTime")String endTime);


    //查询煤
    Double getTotalMcoal (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询焦
    Double getTotalCoke (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询电力
    Double getTotalPower (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询天然气
    Double getTotalNaturalGas (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询石油制品
    Double getTotalPetroleum (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询热力
    Double getTotalHeat (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);
    //查询其他燃料
    Double getTotalOther (@Param("companyList") List<String> companyList , @Param("area")String area ,@Param("industry")String industry,@Param("startTime")String startTime,@Param("endTime")String endTime);

    List<String>  getAllCompanyList2020(@Param("code")Integer code,@Param("inde")String inde);

    List<String>  getAllCompanyList2019(@Param("code")Integer code,@Param("inde1")String inde1,@Param("cmpName")String cmpName);

    //查询所有的行业
    List<String>  findAllIndustry();

    List<String>  findAllIndustry1();

    //查询所有行业 带tid
    List<AreaVO>  findAllInd();

    //州市
    List<AreaVO>  findAllArea(@Param("code") Integer code);

    //区县
    List<AreaVO>  findAllArea1(@Param("code") Integer code);

    Float foundEnergyByInd(@Param("industry")String industry);

    // List<EnergyVo> getTotal(@Param("area")String area , @Param("industry")String industry, @Param("time")String time);

    //州市
    List<CompanyVO> getCompanyByAreaZS(@Param("area")String area , @Param("time")String time);

    List<CompanyVO> getCompanyByAreaZS2020(@Param("area")String area , @Param("time")String time);

    List<CompanyVO> getCompanyByAreaAll(@Param("area")String area , @Param("industry")String industry, @Param("time")String time);

    List<CompanyVO> getCompanyByAreaAll2020(@Param("area")String area , @Param("industry")String industry, @Param("time")String time);

    List<CompanyVO> getCompanyByAreaAllQX(@Param("code")String code , @Param("inde1")String inde1);

    List<CompanyVO> getCompanyByAreaAllQX2020(@Param("code")String code , @Param("inde1")String inde1);

    List<CompanyVO> getCompanyByArea(@Param("area")String area , @Param("industry")String industry, @Param("time")String time);

    List<CompanyVO> getCompanyByAreaQX(@Param("code")String code);

    List<CompanyVO> getCompanyByAreaQX2020(@Param("code")String code);

    float getInfo(@Param("area") String area, @Param("industry") String industry, @Param("time") String time);

    //采集数据异常
    List<ExceptionInfoVo> selectExceptionInfo(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("page")Integer page,@Param("size")Integer size,@Param("collectName")String collectName,@Param("state")String state, @Param("isForce")String isForce);

    //指标异常
    List<ExceptionInfoVo> selectExceptionIndex(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("page")Integer page,@Param("size")Integer size,@Param("collectName")String collectName,@Param("state")String state);

    Integer selectExceptionIndexCount(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("collectName") String collectName,@Param("state")String state);

    // List<EnergyVo> getTotal(@Param("area")String area , @Param("industry")String industry, @Param("time")String time);

    Float getTceByArea(@Param("code")String code , @Param("startTime")String startTime,@Param("endTime")String endTime);
    //2020年
    Float getTceByArea1(@Param("code")String code , @Param("startTime")String startTime,@Param("endTime")String endTime);


    Float getTceByIndustry(@Param("tid")String tid , @Param("startTime")String startTime,@Param("endTime")String endTime);

    Float getTceByIndustry1(@Param("tid")String tid , @Param("startTime")String startTime,@Param("endTime")String endTime);

    List<String> selectCompanyListByAreaAndIndustry(@Param("area")String area, @Param("industry") String industry, @Param("cmpName") String cmpName);
    //2019公司列表
    List<String> selectCompanyListByAreaAndIndustry2019(@Param("area")String area, @Param("industry") String industry, @Param("cmpName") String cmpName);

    Double getTotalMcoal2020(@Param("list") List<String> companyList,@Param("startTime")  String startTime, @Param("endTime") String endTime);

    Double getTotalOther2020(@Param("list") List<String> companyList,
                             @Param("startTime")  String startTime,
                             @Param("endTime") String endTime);

    Double getTotalCoke2020(@Param("list") List<String> companyList,
                            @Param("startTime")  String startTime,
                            @Param("endTime") String endTime);

    Double getTotalPower2020(@Param("list") List<String> companyList,
                             @Param("startTime")  String startTime,
                             @Param("endTime") String endTime);

    Double getTotalNaturalGas2020(@Param("list") List<String> companyList,
                                  @Param("startTime")  String startTime,
                                  @Param("endTime") String endTime);

    Double getTotalPetroleum2020(@Param("list") List<String> companyList,
                                 @Param("startTime")  String startTime,
                                 @Param("endTime") String endTime);

    Double getTotalHeat2020(@Param("list") List<String> companyList,
                            @Param("startTime")  String startTime,
                            @Param("endTime") String endTime);

    List<CoalVo> foundCoalByMonth2020(@Param("list") List<String> companyList,
                                      @Param("startTime")  String startTime,
                                      @Param("endTime") String endTime);

    List<CoalVo> foundWaterByMonth2020(@Param("list") List<String> companyList,
                                       @Param("startTime")  String startTime,
                                       @Param("endTime") String endTime);

    //根据enterpriseCode得到entID
    List<Integer> getentIdByEnterpriseCode(@Param("companyList")List<String> companyList);


    //2019年实物量查询 (折标煤)
    List<KeyValueVO> getTotalMaterialByCode(@Param("companyList1")List<Integer> companyList1, @Param("startTime")String startTime, @Param("endTime") String endTime);

    Integer selectToolByAreaAndIndustry(@Param("area")String area,@Param("industry")String industry);
    //2019年计量器具
    Integer selectToolByAreaAndIndustry2019(@Param("companyList2019")List<Integer> companyList2019);

    List<CoalVo> selectEnergyKinds(List<String> companyList2020);

    List<CoalVo> selectAllEnergyNumByKinds(@Param("area") String area,
                                           @Param("industry") String industry,
                                           @Param("kinds") String data,
                                           @Param("startTime")  String startTime,
                                           @Param("endTime") String endTime);

    //查询州市县名称
    List<KeyValueVO> getCountyName(@Param("code")Integer code);
    //查询政府端二级界面 公司列表 计量器具
    List<CompanyEnergyInfoVo> getCompanyListEnergyInfo2020(@Param("list") List<String> companyList2020,@Param("startTime") String startTime, @Param("endTime")String endTime);
    //2019年
    List<CompanyEnergyInfoVo> getCompanyListEnergyInfo2019(@Param("companyList2019") List<Integer> companyList2019,@Param("startTime") String startTime, @Param("endTime")String endTime);

    List<CoalVo> selectCollectNum(List<String> companyList2020);

    ArrayList<AreaAndIndustryVo> selectGetEnergyByAreaList(String area);

    ArrayList<AreaVO> selectAddressName(String areaName);

    List<CompanyVO> getCompanyNum00(@Param("area") String s, @Param("industry")String inde1);

    //政府端首页企业名称查询（老平台、在线监测企业、延期企业）
    List<CompanyListVo> getCompanyList(@Param("cmpName")String cmpName, DataScope dataScope);

    List<String> selectCompanyListByAreaAndIndustryElectricity(@Param("areaName")String areaName, @Param("industryName")String industryName,@Param("cmpName") String cmpName);

    Integer countAllLogs(@Param("list")List<String> electricityCompanyList2020,@Param("startTime")String startTime,@Param("endTime")String endTime);

    Integer sumAllElectricityValue(@Param("list")List<String> electricityCompanyList2020,@Param("startTime")String startTime,@Param("endTime")String endTime);

    Integer selectExceptionNum(@Param("list")List<String> electricityCompanyList2020,@Param("startTime")String startTime,@Param("endTime")String endTime);

    UpdataInfoBo selectUpdateInfoCollect(@Param("areaName")String areaName, @Param("industryName")String industryName, @Param("cmpName")String cmpName, @Param("startTime")String startTime, @Param("endTime")String endTime, @Param("s")String s, @Param("o")String o);

    UpdataInfoBo selectUpdateInfoElectricity(@Param("areaName")String areaName,@Param("industryName") String industryName, @Param("cmpName")String cmpName,@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("s")String s, @Param("o")String o);

    Integer selectupDateCountryNum(@Param("areaName")String s,@Param("industryName") String industryName, @Param("cmpName")String cmpName,@Param("statDate") String format1, @Param("s")String s1, @Param("o")String o);

    List<NameValueVO> getAllGxByCode(String enterpriseCode);

    List<ProcedureVO> getValueByProcedure(@Param("enterpriseCode")String enterpriseCode, @Param("baseCode") String value);
    List<ProcedureVO> getValueByNewProcedure(@Param("enterpriseCode") String enterpriseCode, @Param("baseCode") String baseCode);


    List<Integer> countCollectAndEle(@Param("area")String area, @Param("industry")String industry, @Param("time1")String s, @Param("time2")String s1, @Param("time3")String s2,@Param("time4") String s3);

    List<UpdataInfoBo> selectAllInfos(@Param("areaName")String s, @Param("industryName")String industryName,@Param("cmpName") String cmpName, @Param("startTime")String s1,@Param("endTime") String s2,@Param("nowTime")String s3);

    List<CoalVo> selectExceptionInfoList(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end);

    //异常按类型排名
    List<CoalVo> selectExceptionInOrder(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end);

    //异常按地区排名
    ArrayList<AreaAndIndustryVo> selectExceptionAreaOrder(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end);

    //异常按行业排名
    ArrayList<AreaAndIndustryVo> selectExceptionByIndustryOrder(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end);

    //异常按企业排名
    List<EnterpriseExceptionVo> selectExceptionEnterpriseInfo(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("orderFiled")String orderFiled);

    Integer getExceptionToal (@Param("companyList") List<String> companyList ,@Param("type")Integer type,@Param("startTime")String startTime,@Param("endTime")String endTime);

    List<CoalVo> getEpcName(List<String> companyList2020);

    Integer selectMaxSuccess(@Param("areaName")String areaName,@Param("industryName") String industryName);

    List<String> selectCompanyListByAreaAndIndustryAndCode(@Param("areaName")String areaName, @Param("industryName")String industryName,@Param("enterpriseCode") String enterpriseCode);

    CoalVo countCollectNUmsByArea(@Param("areaCode")String code, @Param("industryCode")String industryCode, @Param("preTime")String preTime, @Param("endTime")String endTime);

    ArrayList<AreaVO> selectAllIndustry();

    List<CoalVo> countByMonth(@Param("areaCode")String areaCode,@Param("industryCode") String industryCode,@Param("year")String time);

    List<CoalVo> countByDay(@Param("areaCode")String areaCode,@Param("industryCode") String industryCode,@Param("month") String time);

    CoalVo countUpCollectNUmsByArea(@Param("areaCode")String code, @Param("industryCode")String industryCode, @Param("preTime")String preTime, @Param("endTime")String endTime);

    List<CoalVo> UpCountByMonth(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("year")String time);

    List<CoalVoNew> UpCountByMonthNew(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("year")String time);



    List<CoalVo> UpCountByDay(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);

    List<CoalVoNew> UpCountByDayNew(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);


    List<CoalVo> UpCountByDayEpc(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);

    List<CoalVo> UpCountByDayEpcNormalUploadSuccess(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);
    List<CoalVo> UpCountByDayEpcNormalUploadFailed(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);
    List<CoalVo> UpCountByDayEpcRepairUploadSuccess(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);
    List<CoalVo> UpCountByDayEpcRepairUploadFailed(@Param("areaCode")String areaCode,@Param("industryCode")String industryCode, @Param("month")String time);

    List<CoalVo> selectEnergyByAreaAndIndustry(@Param("areaCode")String areaName, @Param("industryCode")String industryName, @Param("index")String s,@Param("preTime") String startTime,@Param("endTime") String endTime);

    ArrayList<AreaVO> selectIndustryList(@Param("code") String industryName);

    List<Integer> countAllInfo();

    List<AreaVO> selectCountNumByAreaAndIndustry(@Param("areaName")String area, @Param("industryName")String industry,@Param("tableName") String electric_enterprise_info, @Param("region")String regionCode, @Param("tid")String industry_code);

    List<EpcVo> selectEcpName(@Param("areaName")String areaName, @Param("industryName")String industryName,@Param("cmpName")String cmpName,@Param("tableName")String tableName,@Param("region")String regionCode,@Param("tid")String tid);

    List<AreaVO> selectCountNumByAreaAndIndustryUpLoad(@Param("areaName")String areaName,@Param("industryName") String industryName,@Param("region")String region);

    List<EpcVo> selectEcpNameUpLoad(@Param("areaName")String areaName,@Param("industryName") String industryName);

    List<AreaVO> selectCountNumByAreaAndIndustryAll(@Param("areaName")String areaName, @Param("industryName")String industryName,@Param("index") String s);

    List<EpcVo> selectEcpNameAll(@Param("areaName")String areaName, @Param("industryName")String industryName);

    List<CoalVo> getExceptionToalAll(@Param("areaName")String areaName, @Param("industryName")String industryName, @Param("cmpName")String cmpName,@Param("type") String type, @Param("startTime")String startTime,@Param("endTime") String endTime,@Param("region")String regionCode);

    List<Integer> CountAll(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")Integer type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("collectName") String collectName,@Param("state")String state);

    Integer selectExceptionInfoCount(@Param("area")String area,@Param("cmpName")String cmpName,@Param("type")String type, @Param("industry")String industry, @Param("preTime")String pre,@Param("endTime")String end,@Param("collectName") String collectName,@Param("state")String state);

    Integer updateExceptionInfo(@Param("data")ExceptionInfoVo data);

    List<CoalVo> waveExceptionList(@Param("enterpriseCode")String enterpriseCode, @Param("dataCode")String dataCode,@Param("pre") String s, @Param("end")String s1);

    void updateInfoByEpcDcSd(@Param("data")ExceptionInfoVo data);

    Integer updateExceptionInfoAll(@Param("data")ExceptionInfoVo data);

    IPage<CalculateLogsVo> getEnergyCalculateInfo(Page page, @Param("enterpriseCode")String enterpriseCode, @Param("statDate")String statDate,@Param("state") String state);

    Integer updateDataCodeState(@Param("enterpriseCode")String enterpriseCode,@Param("dataCode") String dataCode,@Param("state") Integer state);

    void updateDataCodeStateNew(@Param("enterpriseCode")String enterpriseCode,@Param("dataCode") String dataCode,@Param("state") Integer state);

    List<Integer> getEnergyTableEpc(@Param("statDate")String statDate);

    List<String> selectEpcByTime(@Param("statDate") String statDate,@Param("areaCode") String areaCode, @Param("industryCode")String industryCode);

    CoalVo selectValueByKinds(@Param("epcLists")List<String> epcLists, @Param("statDate")String statDate, @Param("kindsList")List<String> data,@Param("preTime")String preTime);

    CoalVo selectOutputValue(@Param("preTime")String preTime,@Param("statDate") String statDate, @Param("areaCode")String areaCode, @Param("industryCode")String industryCode, @Param("outputValue")String outputValue);

    List<CoalVo> selectMaxValue(@Param("list") List<String> epcLists,  @Param("enterpriseCode") String enterpriseCode, @Param("index") String desc,@Param("state")String code);

    List<CoalVo> getEffectiveAreaOrder(@Param("list")List<String> epcLists,  @Param("index")String s, @Param("state")String statDate);

    List<CoalVo> selectMaxOutValue(@Param("statDate") String statDate, @Param("areaCode")String areaCode, @Param("industryCode")String industryCode);

    List<CoalVo> getEffectiveAreaOutOrder(@Param("index")String s, @Param("statDate")String statDate, @Param("areaCode")String areaCode, @Param("industryCode")String industryCode);

    void insertExceptionRation(@Param("index")ExceptionInfoVo data);

    IPage<EnergyCalculateAddInfo> getEnergyCalculateAddInfo(Page page, @Param("enterpriseCode")String enterpriseCode, @Param("statDate")String statDate,@Param("dataCode") String dataCode);

    Integer upDateEnterpriseRegionCode(@Param("enterpriseCode")String enterpriseCode, @Param("regionCode")String regionCode);

    List<EpcVo> selectCollectEnterpriseInfo(@Param("areaCode")String areaCode, @Param("industryCode")String industryCode,@Param("cmpName")String cmpName);

    List<TreeVo> getDictRegionTree(@Param("id")String regionCode);

    List<TreeVo> getDictRegionTrees(@Param("id")String regionCode);

    Integer saveExceptionalLog(@Param("data") TExceptionHandlingLogVo data);

    //state取值 1确认无误 2波动异常处理 3补录
    Integer saveBatchExceptionalLog(@Param("data") List<ExceptionInfoVo> data, @Param("user") ScUser user, @Param("state") String state );

    Integer saveExceptionalLogByApply(@Param("data") ApplyRecord applyRecord, @Param("user") ScUser user, @Param("state") String state);

    IPage<TExceptionHandlingLogVo> getExceptionalLog(Page page, @Param("data") String epc);

    //查询企业每月综合能耗（过滤能耗小于0，大于100万的；过滤没有接入完成的企业）
    List<EnterpriseTce> getEnergyInfoByEpc(@Param("list") String[] statDateList, @Param("year") int year);
    void deleteEnergyTce(@Param("year") int year);
    void insertEnergyTce(List<EnterpriseTce> energyEpc);
    void updateEnergyTce();

    List<EnterpriseTce> getEnergyInfoByRegion(@Param("year") int year);
    List<EnterpriseTce> getEnergyInfoByTrade(@Param("year") int year, @Param("tradeStr") String tradeStr);

    //新接入企业能耗数据（接入完成企业）
    List<Map<String, Object>> getNewEnterpriseTce(@Param("statDate") String statDate, @Param("year") int year);
    //查询异常企业累计综合能耗（过滤能耗小于0，大于100万的）（去除注销企业）
    List<Map<String, Object>> getExceptionEnterpriseTce(@Param("applyDate") String applyDate,@Param("year") int year,@Param("month") int month,@Param("list") String[] epcHalt);
    //查询异常企业（只过滤能耗大于100万的）（去除注销企业）
    List<String> getExceptionEnterprise0(@Param("applyDate") String applyDate,@Param("statDate") String statDate,@Param("list") String[] epcHalt);
    //查询企业周期内累计综合能耗（只过滤能耗大于100万的）
    List<Map<String, Object>> getTceByEnterprise(@Param("startDate") String startDate, @Param("endDate") String endDate,@Param("exceptionEnterprise") String exceptionEnterprise);

    List<Map<String, Object>> getTradeTotalTce(@Param("year") int year, @Param("tradeStr") String tradeStr);
    List<Map<String, Object>> getTradeCurrentTce(@Param("year") int year, @Param("month") int month, @Param("tradeStr") String tradeStr);

    List<ExceptionEnterpriseInfos> getExceptionEnterpriseInfos(@Param("query") ExceptionEnterpriseInfos enterpriseInfos);

    int upExceptionEnterpriseInfos(@Param("query") ExceptionEnterpriseInfos enterpriseInfos);

    List<String> getExceptionEnterpriseCode(@Param("statDate") String statDate);

    List<String> getExceptionEnterpriseCodeNew(@Param("statDate") String statDate, @Param("list") String[] epcHalt);

    //获取在线监测月报告-监测企业数（接入完成企业）
    int getEnergyEnterpriseCount(@Param("statDate") String statDate);

    List<Map<String, Object>> energyMappergetEnergyWarning(@Param("area") String area,@Param("industry") String industry,@Param("startTime") String startTime,@Param("endTime") String endTime);

    //分行业 地区 统计企业数目
    List<AreaVO> getEpcInfo(@Param("area") String areaName,@Param("industry") String industryName,@Param("type") String type);
    //企业信息
    List<EpcVo> getEpcDetailInfo(@Param("area") String areaName,@Param("industry") String industryName,@Param("type") String type);
    //企业数目
    Integer getEpcDetailCount(@Param("area") String areaName,@Param("industry") String industryName,@Param("type") String type);

    //在线采集条数
    Integer getCollectNum(@Param("area") String areaName,@Param("industry") String industryName);
    //获取电网电力条数
    Integer getElectricityNum(@Param("area") String areaName,@Param("industry") String industryName);
    //获取上送国家条数
    Integer getUpdateCountryValue(@Param("area") String areaName,@Param("industry") String industryName);
    //企业数据条数
    Integer getEpcDataCount(@Param("area") String areaName,@Param("industry") String industryName,@Param("type") String type);

    //异常种类字典
    List<Map<String,String>> getExceptionDict();

    //获取地区编码或地区名称
    String getDictRegionCode(@Param("area") String area);

    //按地区获取企业采集数据条数
    ArrayList<CoalVo> getCollectByArea(@Param("area")String area, @Param("industry")String industry, @Param("preTime")String preTime, @Param("endTime")String endTime, @Param("length")Integer length);
    //按行业获取企业采集数据条数
    ArrayList<CoalVo> getCollectByIndustry(@Param("area")String area, @Param("industry")String industry, @Param("preTime")String preTime, @Param("endTime")String endTime);
    //按年度获取企业采集数据条数
    ArrayList<CoalVo> getCollectByMonth(@Param("area")String area, @Param("industry")String industry, @Param("list")ArrayList<CoalVo> resultList, @Param("year")String year);
    //按天获取企业采集数据条数
    ArrayList<CoalVo> getCollectByDay(@Param("area")String area, @Param("industry")String industry, @Param("list")ArrayList<CoalVo> resultList, @Param("month")String month);

    IPage<QualityCalculateLogVo> getPageLogList(Page page, @Param("query") QualityCalculateLogVo calculateLogVo);

    //operate_type in ('2','3') 避免补算遗漏，需查询手动结算是否补救成功
    IPage<QualityCalculateLogVo> getPageInfoList(Page page, @Param("query") QualityCalculateLogVo calculateLogVo);

    List<ExceptionInfoNumVo> getExceptionNum(@Param("epc")String epc, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("dataCode") String dataCode, @Param("collectItemName") String collectItemName);

    Map<String, String> getDetail(@Param("areaCode") String areaCode, @Param("industryCode") String industryCode, @Param("date") String date);

    Map<String, String> getDetailOld(@Param("areaCode") String areaCode, @Param("industryCode") String industryCode, @Param("date") String date);

    IPage<Map<String, String>> getEpcDetail(Page page, @Param("areaCode") String areaCode, @Param("industryCode") String industryCode, @Param("date") String date);

    IPage<Map<String, String>> getEpcDetailOld(Page page, @Param("areaCode") String areaCode, @Param("industryCode") String industryCode, @Param("date") String date);

    Integer getComprehensiveExTotal(@Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getUnitComprehensiveExTotal(@Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getElectricExTotal(@Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getDataCollectExTotal(@Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getDataValueExTotal(@Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<ExceptionIndexVo> getComprehensiveExDetail(Page page, @Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<ExceptionIndexVo> getUnitComprehensiveExDetail(Page page, @Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<ExceptionIndexVo> getElectricExDetail(Page page,  @Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    IPage<ExceptionDataVo> getDataValueExDetail(Page page, @Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime,@Param("dataCode") String dataCode);

    IPage<ExceptionDataVo> getDataCollectExDetail(Page page, @Param("epc") String epc, @Param("startTime") String startTime, @Param("endTime") String endTime);

    //获取公式配置企业
    List<AreaVO> getEpcListByFormul(@Param("list") List<String> epcList, @Param("formul") String formul);

    //根据公式反推全省能耗消费结构（单位：万tce）
    List<CoalVo> selectAllEnergyNumByForuml(@Param("list") List<String> dataCodeList, @Param("startTime") String startTime, @Param("endTime") String endTime);
    List<CoalVo> selectAllEnergyNumByConsumption(@Param("list") List<String> companyList, @Param("startTime") String startTime, @Param("endTime") String endTime);

    //根据公式反推全省各企业各月各能源消耗量（单位：tce）
    void renewEnergyConsumptionByForuml(@Param("list") List<String> dataCodeList, @Param("startTime") String startTime, @Param("endTime") String endTime);

    //根据公式反推各月各能源实物量
    List<CoalVo> selectEnergyByFormul(@Param("list") List<String> dataCodeList, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ratio") String ratio);
    List<CoalVo> selectEnergyByConsumption(@Param("list") List<String> companyList2020, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("energyCategory") String energyCategory, @Param("ratio") String ratio);

    //获取通俗行业信息
    List<AreaVO> industryList();

    //获取16个州市信息
    List<AreaVO> areaList(@Param("pcode") String pcode);

    String getExceptionTotal(@Param("epc") String epc, @Param("preTime") String preTime, @Param("endTime") String endTime);

    Double getEnterpriseFurnaceGradeValue(@Param("enterpriseCode") String enterpriseCode, @Param("startTime") String startTime, @Param("endTime") String endTime);
    //获取所有企业的自动结算情况
    IPage<QualityCalculateLogVo> getPageLogListA(Page page, @Param("query") QualityCalculateLogVo calculateLogVo);
    //获取所有需要补算的情况
    IPage<QualityCalculateLogVo> getPageLogListB(Page page, @Param("query") QualityCalculateLogVo calculateLogVo);
    //获取结算成功或失败的情况
    IPage<QualityCalculateLogVo> getPageLogListC(Page page, @Param("query") QualityCalculateLogVo calculateLogVo);
}
