package com.huatek.busi.mapper;

import java.util.Date;
import java.util.List;
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.BusiOfflineTransformerRepairDto;
import com.huatek.busi.vo.BusiOfflineTransformerRepairVo;
import com.huatek.busi.vo.epa.EpaEvaluatRepairDataVo;

/**
 * 变压器检修记录 Mapper
 *
 * @author anker_cheng
 * @date Jul 4, 2019 2:00:06 PM
 */
@Repository
public interface  BusiOfflineTransformerRepairMapper {

	/**
	 * 分页查询 变压器检修记录
     *
	 * @param busiOfflineTransformerRepairDto 变压器检修记录Dto
	 * @return Page 变压器检修记录List
	 */
	Page<BusiOfflineTransformerRepairVo> selectBusiOfflineTransformerRepairPage(BusiOfflineTransformerRepairDto busiOfflineTransformerRepairDto);

	BusiOfflineTransformerRepairVo getBusiOfflineTransformerRepairVo(String id);
	
	int deleteBusiOfflineTransformerRepair(@Param("idList")List<String> idList);

    /**
     * 变压器维修次数统计</br>
     * params.subEquipmentId 设备ID</br>
     * params.sensorCode 传感器编码</br>
     * params.startTime 开始时间</br>
     * params.endTime 结束时间</br>
     * 如果参数都不传，则统计所有的数据
     * 
     * @param params
     *            参数map
     * @return 维修次数
     */
    Integer getTransformerRepairCount(Map<String, Object> params);
    
    
    /** 
    * @Title: getEvaluatRepairData 
    * @Description: 获取变压器评测维修数据 
    * @createDate: Sep 6, 2019 5:28:11 PM
    * @param   
    * @return   List<EpaEvaluatRepairDataVo>    
    */ 
    List<EpaEvaluatRepairDataVo> getEvaluatRepairData(@Param("mainEquipmentId") String mainEquipmentId, @Param("begin") Date begin,
            @Param("end") Date end);
    
    BusiOfflineTransformerRepairVo isFinishedOverhaul(@Param("malfunctionId") String malfunctionId);
}

