package com.ho.business.mapper;

import com.ho.business.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IncomeMeasurementMapper {


    // 根据电站id查询费率模板下拉列表数据
    public List<RateTemplate> getRateTemplateList(@Param("stationId") Integer stationId);

    // 根据模板id查询费率下拉列表数据
    public List<IncomeRateMapping> getRateList(@Param("templateId") long templateId);

    // 根据模板id和费率id查询费率详情
    public IncomeRateMapping getRateDetails(@Param("rateId") int rateId,@Param("templateId") long templateId);



    public List<IncomeRate> selectIncomeRates(IncomeRate incomeRate);

    public int modifyIncomeRate(@Param("incomeRate")IncomeRate incomeRate,@Param("templateId")long templateId,@Param("dataDate")String dataDate);

    public int batchIncomeRates(@Param("incomeRates")List<IncomeRate> incomeRates,@Param("templateId")long templateId,@Param("dataDate")String dataDate);

    public int deleteIncomeRates(IncomeRate incaomeRate);

    public List<IncomeQRate> selectQRate(IncomeQRate surfQRate);

    public int insertSurfQRate(@Param("surfQRate")IncomeQRate surfQRate);

    public int modifySurfRate(IncomeQRate surfQRate);

    public int confirmTwo(IncomeTotal incomeTotal);

    int confirmOne(IncomeTotal incomeTotal);

    public List<IncomeRateMapping> selectRates();

    public IncomeTotal selectTotal(@Param("incomeTotal")IncomeTotal incomeTotal);

    public IncomeTotal selectTotalReal(@Param("incomeTotal")IncomeTotal incomeTotal);

    public int insertTotalFee(@Param("incomeTotal")IncomeTotal incomeTotal);

    public int modifyEleTotalFee(IncomeTotal incomeTotal);

    public IncomeTotal selectTotalFee(@Param("dataDate")String dataDate,@Param("stationId")Integer stationId);

    public IncomeRateMapping selectRate(@Param("templateId")long templateId);

    public String getIncomeFee(IncomeRate incomeRate);

    public String getEleTotalFee(IncomeQRate surfQRate);

    public IncomeRate selectIncomeDetails(IncomeRate incomeRate);

    public int excelInput(@Param("incomeRate")IncomeRate incomeRate,@Param("templateId")long templateId,@Param("dataDate")String dataDate);

    public RateTemplate getTemplateByName(@Param("stationId") Integer stationId,@Param("templateName")String templateName);

    public IncomeRateMapping getRateByName(@Param("templateId")long templateId,@Param("rateName")String rateName);

    public int ischeck(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("rateId")long rateId,@Param("stationId")Integer stationId,@Param("id")long id);

    public String queryRateTotal(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("rateId")long rateId);

    /* 根据电站id查询费率 */
    public IncomeQRate queryPriceBystationId(@Param("stationId")long stationId, @Param("time")String time);

    public int insertRealData(IncomeTotal incomeTotal);

    public List<IncomeRate> selectRealRates(IncomeRate incaomeRate);

    /* 判断企业用电模板选择是否正确 */
    public int checkTemplate(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("stationId")Integer stationId,@Param("id")long id);

    public int checkTemplateOpen(long templateId);


}
