package com.ho.business.service;

import com.ho.business.entity.ElecMeterValue;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.carbin.ElecMeterReq;
import com.ho.business.vo.resp.profit.DayProfitType;

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

/**
 * @Description 耗能电表数据操作
 * Author yule
 * Date 2022/11/1 18:52
 */
public interface ElecMeterValueService {

    BigDecimal selectSumByType(Integer stationId, Integer type, String beginTime, String endTime,Integer srcId);

    //删除相同day和相同type
    int deleteByDay(String transDayStr, List<Integer> typeList);

    int deleteByStationAndDay(Integer stationId,String transDayStr, List<Integer> typeList);

    //碳足迹所有日冻结值设备入库
    int insertBatch(List<ElecMeterValue> emList);

    //电表冻结数据单个入库
    int insert(ElecMeterValue elecMeterValue);

    //查列表,用户后续集合处理
    List<ElecMeterValue> selectList(Integer stationId, List<Integer> typeList, String beginTime, String endTime);

    //查列表,用户后续集合处理(增肌srcIdlist)
    List<ElecMeterValue> selectAllList(Integer stationId, List<Integer> typeList, String beginTime, String endTime,List<Integer> deviceTypeList);

    //按站设备日期等查询
    List<ElecMeterValue> selectListByStationAndSrcId(ElecMeterReq elecMeterReq);

    BigDecimal selectSumValue(Integer stationId, Integer type,Integer srcId);

    //查列表,用户后续集合处理
    List<ElecMeterValue> selectListByStationIds(List<Integer> stationIds, Integer type, String beginTime, String endTime);

    //根据电站集合查某段时间的和并按照type分类
    List<ElecMeterValue> selectByStationIdsAndTime(List<Integer> stationIds, String beginTime, String endTime,Integer srcId);

    /**
     * 根据类型,电站id,时间分组 查询冻结值
     * @param req
     * @return
     */
    List<ElecMeterValue> selectGroupByDay(CommonBigScreenReq req);

    List<DayProfitType> getElec(String begin, String end, Integer groupId, Integer type,List<Integer> stationIds);
}
