package com.ho.business.service.impl;

import com.ho.business.entity.YcValue;
import com.ho.business.mapper.YcValueMapper;
import com.ho.business.service.YcValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

/**
 * @Description 针对yc_value表操作
 * Author yule
 * Date 2022/9/13 16:56
 */
@Service
public class YcValueServiceImpl implements YcValueService{

    @Autowired
    YcValueMapper ycValueMapper;


    @Override
    public List<YcValue> selectByType(Integer stationId,String first,String current) {
        List<YcValue> ycValues = ycValueMapper.selectByStationAndCreateTime(stationId,first,current);
        return ycValues;
    }

    //按条件查询
    @Override
    public List<YcValue> selectListByCondition(Integer stationId, String beginDay, String endDay, List<Integer> typeList) {
        List<YcValue> ycValues = ycValueMapper.selectByStationAndDay(stationId, beginDay, endDay, typeList);
        return ycValues;
    }

    //年充电
    @Override
    public BigDecimal selectYearChargeE(Integer StationId, Integer type, String beginTime, String endTime) {
        BigDecimal bigDecimal = ycValueMapper.selectYearChargeE(StationId, type, beginTime, endTime);
        return  bigDecimal;
    }

    @Override
    public List<YcValue> getListByCondition(Map<String, Object> map) {
        return ycValueMapper.getListByCondition(map);
    }

    @Override
    public BigDecimal getCommandsNum(Map<String, Object> map) {
        BigDecimal bigDecimal = ycValueMapper.selectCommandsNum(map);
        return bigDecimal;
    }




}
