package com.huatek.busi.mapper;

import com.huatek.busi.entity.*;
import com.huatek.busi.vo.EquipmentOnlineRateVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface TransformerNumberMapper {

     List<EquipmentSensorNumber> findTransformerNumber(@Param("mainEquipmentId") String mainEquipmentId);

    List<EquipmentSensorNumber> findTransformerSensorCache(@Param("extEquipmentCode") String extEquipmentCode);

    List<EquipmentSensorNumber> findArresterSensorCache(@Param("extEquipmentCode") String extEquipmentCode);

    List<EquipmentSensorNumber> findGisSensorCache(@Param("extEquipmentCode") String extEquipmentCode);

    List<EquipmentSensorNumber> findCwgSensorCache();

    List<EquipmentSensorNumber> findCableSensorCache(@Param("extEquipmentCode") String extEquipmentCode);

    List<EquipmentSensorNumber> findGeneratorSensorCache(@Param("extEquipmentCode") String extEquipmentCode);

    List<TransformerStatus> findTransformerStatus();

    List<EquipmentSumNumber> findSumTransformerNumber(@Param("dTime") String dTime);

    int finSumNumber(@Param("siteId") String siteId);

    int finFaultNumber(@Param("dTime") String dTime);

    int faultNumber(@Param("tId") String tid);

    TransformerIU findIU(@Param("transformerId") String transformerId);

    TAndTransformerStatus findTransformerStype(@Param("transformerId") String transformerId);

    SiteUploadCycle getTime(String siteId);

    List<SiteData> findSiteData();


    BigDecimal findSesorCodeNumber(@Param("sensorCode") String sensorCode,@Param("mainEquipmentId") String mainEquipmentId);

    List<EquipmentSensorNumber> findSenSorCodeId(@Param("sensorCode") String sensorCode,@Param("mainEquipmentId") String mainEquipmentId);

    int addTransformerSensor(EquipmentSensorNumber equipmentTemperatureCache);

    List<EquipmentSensorCache> findSensorCache();

    void updateTransformerSensor(EquipmentSensorNumber equipmentTemperatureCache);

    List<EquipmentSensorNumber> findEquipment();


    EquipmentSumCache findCacheType(@Param("type") String type,@Param("siteId") String siteId);

    void addNumber(EquipmentSumNumber finSumNumber);

    void updateNumber(EquipmentSumNumber finSumNumber);


    EquipmentSumSensorCache findSumSensorNumber();

    List<EquipmentSumSensorCache> findSumSensorInfo(@Param("type")String type);
    List<EquipmentSensorCache> findOnlineRate(@Param("mainEquipmentId") String mainEquipmentId);

    EquipmentOnlineRateVo findOnlineRateByCode(@Param("extEquipmentCode") String extEquipmentCode);

    EquipmentSumSensorCache finSumAllNumber();

    TransformerIU findLoadRate(@Param("transformerId") String transformerId);

    List<BusiSiteTree> findMainTreeId();

    TransformerLoadRate findAllLoadRate(@Param("mainEquipmentId") String mainEquipmentId, @Param("date") String date);

    Integer selectGeneratorSensorDeviceNumber();

}
