package com.zcxk.rmcp.web.service.impl.readrate;

import com.zcxk.core.common.pojo.UserCondition;
import com.zcxk.rmcp.api.dto.readrate.ReadRateDto;
import com.zcxk.rmcp.api.enums.ReadRateEnum;
import com.zcxk.rmcp.api.vo.ReadRateVo;
import com.zcxk.rmcp.api.vo.StatisticsReadRateVo;
import com.zcxk.rmcp.core.dao.ReadRateYesterdayMapper;
import com.zcxk.rmcp.web.service.AbstractReadRateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Andy
 * @version V1.0
 * @description: 统计昨天抄表率
 * @date 2021/7/26
 **/
@Service
public class ReadRateYesterdayServiceImpl extends AbstractReadRateService {

    @Resource
    private ReadRateYesterdayMapper readRateYesterdayMapper;

    @Override
    public List<StatisticsReadRateVo> statReadRateGroupCategory(UserCondition userCondition) {
        return readRateYesterdayMapper.statReadRateGroupCategory(userCondition);
    }

    @Override
    public List<ReadRateVo> listReadRate(ReadRateDto dto, UserCondition userCondition) {
        return readRateYesterdayMapper.listReadRate(dto, userCondition);
    }

    @Override
    public StatisticsReadRateVo countReadRate(ReadRateDto dto, UserCondition userCondition) {
        return readRateYesterdayMapper.countReadRate(dto, userCondition);
    }


    @Override
    public ReadRateEnum getStatDays() {
        return ReadRateEnum.YESTERDAY;
    }

}
