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.ReadRateTodayMapper;
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 ReadRateTodayServiceImpl extends AbstractReadRateService {

    @Resource
    private ReadRateTodayMapper readRateTodayMapper;

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

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

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


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

}
