package org.jeecg.modules.plan.service.impl;

import org.jeecg.modules.device.model.TimesStatistics;
import org.jeecg.modules.plan.entity.BuCheckRecord;
import org.jeecg.modules.plan.mapper.BuCheckRecordMapper;
import org.jeecg.modules.plan.modal.PlanStatistics;
import org.jeecg.modules.plan.service.IBuCheckRecordService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

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

/**
 * @Description: 检查记录表
 * @Author: jeecg-boot
 * @Date:   2020-12-14
 * @Version: V1.0
 */
@Service
public class BuCheckRecordServiceImpl extends ServiceImpl<BuCheckRecordMapper, BuCheckRecord> implements IBuCheckRecordService {

    @Resource
    private BuCheckRecordMapper buCheckRecordMapper;
    @Override
    public List<PlanStatistics> yearStatistics() {
        return buCheckRecordMapper.yearStatistics();
    }

    @Override
    public List<PlanStatistics> monthStatistics(String queryYear) {
        return buCheckRecordMapper.monthStatistics(queryYear);
    }

    @Override
    public List<PlanStatistics> workStatistics() {
        return buCheckRecordMapper.workStatistics();
    }
    // 查询当前设备id巡检点检次数
    @Override
    public List<TimesStatistics> getTimesByDeviceId(String deviceId) {
        return buCheckRecordMapper.getTimesByDeviceId(deviceId);
    }

    @Override
    public BuCheckRecord getDataByDate(String startDate,String endDate) {
        return buCheckRecordMapper.getDataByDate(startDate,endDate);
    }


}
