package org.jeecg.modules.repair.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
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.model.YearFaultModel;
import org.jeecg.modules.sensor.model.TableNameStatistics;

import java.util.List;

/**
 * @Description: 维修记录表
 * @Author: jeecg-boot
 * @Date:   2020-12-22
 * @Version: V1.0
 */
public interface BuRepairRecordMapper extends BaseMapper<BuRepairRecord> {
//    public List<YearFaultModel> getFaultNumberByYear(@Param("startYear") String startYear,@Param("endYear") String endYear);

    List<PlanStatistics> yearStatistics();
    List<PlanStatistics> monthStatistics(@Param("queryYear") String queryYear);
    List<PlanStatistics> workStatistics();

    List<PlanStatistics> gradeStatistics();
    List<PlanStatistics> systemStatistics();
    List<PlanStatistics> typeStatistics();

    List<YearFaultModel> getDeviceRepair(@Param("result") List<String> result);
    List<TableNameStatistics> getDeviceName();

    public BuRepairRecord getEndTimeByDeviceId(@Param("deviceId") String deviceId);

    public int getTimesById(@Param("deviceId") String deviceId);

    public List<TimesStatistics> getTimesByDeviceId(@Param("deviceId") String deviceId);


}
