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


import com.nantian.cloud.dbcapp.dto.ExceptionByAreaBo;
import com.nantian.cloud.dbcapp.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

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

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

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

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

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

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

    //根据企业id查询企业
    MobileInfoVO getCompanyByCode(@Param("enterpriseCode")String enterpriseCode);

    List<CoalVo> getTce2020(@Param("enterpriseCode") String enterpriseCode,@Param("startTime") String startTime,@Param("endTime") String endTime);

    List<CoalVo> getNameAndPhone(@Param("enterpriseCode") String enterpriseCode);

    Integer getCollectionByCode(@Param("enterpriseCode") String enterpriseCode);

    Integer getEntId(@Param("enterpriseCode") String enterpriseCode);


    //19年
    MobileInfoVO getCompanyByCode2019(@Param("entID") Integer entID);

    List<CoalVo> getEnterpriceTce2019(@Param("entID") Integer entID,@Param("startTime")String startTime,@Param("endTime")String endTime);

    Integer getCollectionByCode2019(@Param("entID") Integer entID);
    //======================计量人员==================================

    Map<Integer,Integer> getMeasureTol(String areaCode);

    List<String> getComList(@Param("cmpName") String cmpName,@Param("substring") String substring, @Param("industry") String industry);

    List<MobileMeasureVO> getMeasureList(@Param("compList") List<String> compList);

    List<InstrumentVO> selectInstrumentsNum(String areaCode);

    List<InstrumentsInfo> getInstrumentsInfo(@Param("compList") List<String> compList, @Param("level")String level);


    Integer getSumTask(String areaCode);

    List<MobileTaskVO> getTaskList(@Param("name") String name,@Param("type") String type);

    List<MobileCompVO> getCompListByPlanId(@Param("id") String id);

    List<MobileUpdateInfoBo> countAllLogs(@Param("list") List<String> companyList2020, @Param("s") String s, @Param("index") String index);

    List<MobileUpdateInfoBo> sumAllElectricityValue(@Param("list")List<String> electricityCompanyList2020, @Param("s")String s,@Param("electricityIndex") String electricityIndex);

    List<MobileUpdateInfoBo> selectUpdateInfoCollect(@Param("areaName") String areaName,@Param("industryName") String industryName,@Param("time") String time, @Param("s")String s, @Param("o")String o,@Param("index") String index);

    List<MobileUpdateInfoBo> selectUpdateInfoElectricity(@Param("areaName") String areaName,@Param("industryName") String industryName,@Param("time") String time, @Param("s")String s, @Param("o")String o,@Param("index") String index);

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

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


    List<MobileEnterpriseVo> selectEnterpriseCollectInfo();

    List<MobileEnterpriseVo> selectEnterpriseElectricityInfo();


    List<MobileEnterpriseVo> selectEnterpriseUpdateInfo(@Param("s")String s,@Param("o")String o);

    List<MobileEnterpriseVo> selectEnterpriseUpdateInfo1(String s, String s1);

    List<MobileEnterpriseVo> selectEnterpriseUpdateInfo2(String s, String s1);

    List<UpdateEnterpriseInfo> selectUpdateInfo(@Param("list")List strings, @Param("time") String time);

    List<MobileUpdateInfoBo> selectAllInfos( @Param("time")String s, @Param("index")String index,@Param("electricityIndex") String elecgtricityIndex,@Param("area")String area,@Param("industry")String industry);

    List<MobileUpdateInfoBo> selectUpdateAll(@Param("areaName")String s, @Param("industryName")String industryName, @Param("time")String s1,@Param("index") String index);

    List<Integer> selectUpdateCountryByDay(@Param("areaName")String areaName,  @Param("industryName")String industryName, @Param("time")String statDate);

    String selectMaxTime();

    String selectNameByCode(String code);

    List<ExceptionByDay> selectExceptionByDay(@Param("time") String time,@Param("areaCode") String areaCode);

    List<ExceptionInfoVo> selectExceptionInfos(@Param("areaCode")String areaCode,@Param("time") String time);

    String selectIndustryByName(String industry);

    List<ExceptionByAreaBo>  selectExceptionByArea(@Param("pre") String pre,@Param("end") String end,@Param("areaCode") String code);

    List<InstrumentsByArea> selectCountByArea(@Param("areaCode") String area, @Param("sub") String sub);

    List<InstrumentsByArea> selectCountNumByArea(@Param("areaCode") String area, @Param("sub") String sub);

    List<Integer> selectEpcInfo(@Param("areaCode")String areaName, @Param("industryCode")String industryName);

    List<ExceptionInfoVo> selectExceptionInfosByarea(@Param("areaCode") String areaRegionCode,@Param("pre")String pre, @Param("end")String end);

    List<Integer> getEnterpriseNum(@Param("industry")String industry, @Param("area")String area);
}
