package com.huatek.busi.mapper;

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.BusiOfflineOtherRepairDto;
import com.huatek.busi.vo.BusiOfflineOtherRepairVo;

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

	/**
	 * 分页查询 Other检修记录
     *
	 * @param busiOfflineOtherRepairDto Other检修记录Dto
	 * @return Page Other检修记录List
	 */
	Page<BusiOfflineOtherRepairVo> selectBusiOfflineOtherRepairPage(BusiOfflineOtherRepairDto busiOfflineOtherRepairDto);
	/**
	 *
	 * @param id
	 * @return
	 */
	BusiOfflineOtherRepairVo getBusiOfflineOtherRepairVo(String id);
	/**
	 *
	 * @param idList
	 * @return
	 */
	int deleteBusiOfflineOtherRepair(@Param("idList")List<String> idList);

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

    Integer getRepairCount(Map<String, Object> params);


    BusiOfflineOtherRepairVo findBusiOfflineOtherRepair(@Param("mainTreeId") String mainTreeId, @Param("siteId") String siteId);

    List<BusiOfflineOtherRepairVo> findBusiOfflineOtherRepairList(BusiOfflineOtherRepairDto busiOfflineOtherRepairDto);

    BusiOfflineOtherRepairVo isFinishedOverhaul(@Param("malfunctionId") String malfunctionId);
}
