package com.huatek.busi.mapper;

import java.util.List;

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

import com.huatek.busi.entity.BusiEquipmentRelationship;
import com.huatek.busi.vo.TransformerTmpVo;

/**
 * @ClassName: BusiEquipmentRelationshipMapper
 * @FullClassPath: com.huatek.busi.mapper.BusiEquipmentRelationshipMapper
 * @Description:
 * @author: Arno
 * @date: Aug 21, 2019 3:22:00 PM
 * @version: 1.0
 */

@Repository
public interface BusiEquipmentRelationshipMapper {

    /**
     * @param equipmentId ---> GIS/ 测温柜 /避雷器 站点树ID
     * @return BusiEquipmentRelationship
     * @Title: findByEquipmentId
     * @Description: 根据站点树ID获取
     * @createDate: Aug 21, 2019 3:12:49 PM
     */
    public BusiEquipmentRelationship selectByEquipmentId(@Param("equipmentId") String equipmentId);

    /**
     * @param equipmentId
     * @return TransformerTmpVo
     * @Title: selectCurrentTransformerInfo
     * @Description: 获取当前所属变压器信息
     * @createDate: Aug 21, 2019 4:42:10 PM
     */
    public List<TransformerTmpVo> selectCurrentTransformerInfo(@Param("equipmentId") String equipmentId);

    public List<TransformerTmpVo> selectCurrentTransformerInfo2(@Param("equipmentId") String equipmentId);

    /**
     * @param entity
     * @return void
     * @Title: insertRelationship
     * @Description: 插入关系
     * @createDate: Aug 21, 2019 5:35:26 PM
     */
    public void insertRelationship(BusiEquipmentRelationship entity);


    /**
     * @param entity
     * @return void
     * @Title: insertRelationship
     * @Description: 取消绑定关系
     * @createDate: Aug 21, 2019 5:35:26 PM
     */
    public int cancelRelationship(BusiEquipmentRelationship entity);


    /**
     * @param entity
     * @return void
     * @Title: updateRelationship
     * @Description: 更新关系
     * @createDate: Aug 21, 2019 5:35:28 PM
     */
    public void updateRelationship(BusiEquipmentRelationship entity);

}
