package com.ho.business.mapper;

import com.ho.business.entity.ElecRateMeterValue;
import com.ho.business.entity.ElecTemplateSub;
import com.ho.business.vo.req.pcsStation.PcsStationReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
* @author yule
* @description 针对表【elec_template_sub】的数据库操作Mapper
* @createDate 2023-04-19 13:58:32
* @Entity com.ho.business.entity.ElecTemplateSub
*/
@Mapper
public interface ElecTemplateSubMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(ElecTemplateSub record);

    int insertSelective(ElecTemplateSub record);

    ElecTemplateSub selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ElecTemplateSub record);

    int updateByPrimaryKey(ElecTemplateSub record);

    void insertList(List<ElecTemplateSub> list);

    void deletedByPid(Integer id);

    List<ElecTemplateSub> selectByPid(Integer id);

    List<ElecTemplateSub> selectByPids(List<Integer> pIds);

    void deletedByPids(List<Integer> pIds);

    /* 根据电站id查询费率详情 */
    List<ElecTemplateSub> selectByStationId(Integer stationId);

    int insertRateMeterValue(@Param("values")List<ElecRateMeterValue> values);

    List<Map<String,Object>> getPcsIncomeData(@Param("req")PcsStationReq req,@Param("beginTime")String beginTime,@Param("endTime")String endTime);

    int deleteRateMeterValue(@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("type")int type);

    List<ElecRateMeterValue> queryRealTimePcsIncomeData(@Param("stationId")Integer stationId,@Param("dateTime")String dateTime);

}
