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.ReadRate7DayMapper;
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 ReadRate7DayServiceImpl extends AbstractReadRateService {

    @Resource
    private ReadRate7DayMapper readRate7DayMapper;

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

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

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

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

}
