package com.huatek.busi.mapper;

import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.github.pagehelper.Page;
import com.huatek.busi.dto.BusiOfflineArresterRepairDto;
import com.huatek.busi.vo.BusiOfflineArresterRepairVo;

/**
 * 出场线（避雷器）——检修单 Mapper
 *
 * @author anker_cheng
 * @date Jul 8, 2019 4:38:22 PM
 */
@Repository
public interface  BusiOfflineArresterRepairMapper {

	/**
	 * 分页查询 出场线（避雷器）——检修单
     *
	 * @param busiOfflineArresterRepairDto 出场线（避雷器）——检修单Dto
	 * @return Page 出场线（避雷器）——检修单List
	 */
	Page<BusiOfflineArresterRepairVo> selectBusiOfflineArresterRepairPage(BusiOfflineArresterRepairDto busiOfflineArresterRepairDto);

	BusiOfflineArresterRepairVo getBusiOfflineArresterRepairVo(String id);

	/**
     * 变压器维修次数统计</br>
     * params.subEquipmentId 设备ID</br>
     * params.sensorCode 传感器编码</br>
     * params.startTime 开始时间</br>
     * params.endTime 结束时间</br>
     * 如果参数都不传，则统计所有的数据
     * 
     * @param params
     *            参数map
     * @return 维修次数
     */
    Integer getRepairCountForArrester(Map<String, Object> params);
    
    BusiOfflineArresterRepairVo isFinishedOverhaul(@Param("malfunctionId") String malfunctionId);
}