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

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.device.model.TimesStatistics;
import org.jeecg.modules.plan.modal.PlanStatistics;
import org.jeecg.modules.repair.entity.BuRepairRecord;
import org.jeecg.modules.repair.mapper.BuRepairRecordMapper;
import org.jeecg.modules.repair.model.YearFaultModel;
import org.jeecg.modules.repair.service.IBuRepairRecordService;
import org.jeecg.modules.sensor.model.TableNameStatistics;
import org.springframework.stereotype.Service;

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

/**
 * @Description: 维修记录表
 * @Author: jeecg-boot
 * @Date:   2020-12-22
 * @Version: V1.0
 */
@Service
public class BuRepairRecordServiceImpl extends ServiceImpl<BuRepairRecordMapper, BuRepairRecord> implements IBuRepairRecordService {

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

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

    @Override
    public List<PlanStatistics> workStatistics() {
        return buRepairRecordMapper.workStatistics();
    }

    @Override
    public List<PlanStatistics> gradeStatistics() {
        return buRepairRecordMapper.gradeStatistics();
    }

    @Override
    public List<PlanStatistics> systemStatistics() { return buRepairRecordMapper.systemStatistics(); }

    @Override
    public List<PlanStatistics> typeStatistics() { return buRepairRecordMapper.typeStatistics(); }

    @Override
    public List<YearFaultModel> getDeviceRepair(List<String> result) {
        return buRepairRecordMapper.getDeviceRepair(result);
    }
    @Override
    public List<TableNameStatistics> getDeviceName() {
        return buRepairRecordMapper.getDeviceName();
    }

    @Override
    public BuRepairRecord getEndTimeByDeviceId(String deviceId) {
        return buRepairRecordMapper.getEndTimeByDeviceId(deviceId);
    }

    @Override
    public int getTimesById(String deviceId) {
        return buRepairRecordMapper.getTimesById(deviceId);
    }

    @Override
    public List<TimesStatistics> getTimesByDeviceId(String deviceId) {
        return buRepairRecordMapper.getTimesByDeviceId(deviceId);
    }



}
