package com.gci.boot.modules.gis.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gci.boot.modules.gis.entity.TbGisVehicleFaultAlarm;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gci.boot.modules.gis.vo.VehicleFaultVo;
import com.gci.boot.modules.statis.vo.AlarmTrendVO;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 车辆车机故障异常记录表 服务类
 * </p>
 *
 * @author 2464
 * @since 2023-09-09
 */
public interface ITbGisVehicleFaultAlarmService extends IService<TbGisVehicleFaultAlarm> {

    /**
     * 统计查询
     * @param projectId
     * @return
     */
    List<VehicleFaultVo> countFault(String projectId);

    IPage<TbGisVehicleFaultAlarm> pageBuild(Page<TbGisVehicleFaultAlarm> page, LambdaQueryWrapper<TbGisVehicleFaultAlarm> lambdaQueryWrapper);

    /**
     * 查询某地时间内的所有告警记录
     * @param startTime
     * @param endTime
     * @return
     */
    List<TbGisVehicleFaultAlarm> findListByTime(Date startTime, Date endTime);

    List<AlarmTrendVO> findTrendListByTime(Date startTime, Date endTime);

    void close(String ids, String remark);
}
