package com.huatek.busi.service;

import java.util.List;

import com.huatek.busi.entity.BusiOtherSubTree;
import com.huatek.busi.entity.BusiSiteTree;
import org.apache.ibatis.annotations.Param;

/**
 * 其他站点
 *
 * @author buck_guo
 * @date 2019/09/11
 */
public interface BusiOtherSubTreeService {
    /**
     * @param PK 主键
     * @return BusiTransfromerSubTree
     * @throws
     * @Title: findByPK
     * @Description: 根据主键获取对象
     * @createDate: Jun 27, 2019 10:31:50 AM
     */
    BusiOtherSubTree findByPK(String pk);


    /**
     * @param busiSiteTree 站点树 --> 变压器设备
     * @return Boolean
     * @throws
     * @Title: insertSubTreeForType
     * @Description: 插入外挂设备节点
     * @createDate: Jun 26, 2019 4:33:39 PM
     */
    Boolean insertSubTreeForType(BusiSiteTree busiSiteTree);


    /**
     * @param parentId 父节点id
     * @param count    设备数量
     * @return Boolean
     * @throws
     * @Title: insertEquipmentNode
     * @Description: 插入外挂设备数量
     * @createDate: Jun 26, 2019 4:32:51 PM
     */
    public Boolean insertEquipmentNode(String parentId, Integer count);


    /**
     * @param nodeId  节点ID
     * @param newName 节点新名称
     * @return Boolean
     * @throws
     * @Title: updateNode
     * @Description: 修改节点名称
     * @createDate: Jun 24, 2019 4:52:56 PM
     */
    public Boolean updateNode(String nodeId, String newName);

    /**
     * @param nodeId  节点ID
     * @param newName 节点新名称
     * @return Boolean
     * @throws
     * @Title: updateNodeBySubEquipment
     * @Description: 修改节点名称
     * @createDate: Jun 24, 2019 4:52:56 PM
     */
    public Boolean updateNodeBySubEquipment(String nodeId, String newName);

    /**
     * @param nodeId 节点ID
     * @return Boolean
     * @throws
     * @Title: deleteNode
     * @Description: 删除节点
     * @createDate: Jun 24, 2019 4:52:56 PM
     */
    public Boolean deleteNode(String nodeId);


    /**
     * @param equipmentId 主设备ID
     * @param newName     节点新名称
     * @return Boolean
     * @throws
     * @Title: updateNodeBySubEquipment
     * @Description: 修改节点名称
     * @createDate: Jun 24, 2019 4:52:56 PM
     */
    void updateNodeByMainEquipment(String id, String name);

    /**
     * @param equipmentId 主树ID
     * @return BusiTransfromerSubTree
     * @throws
     * @Title: findByPK
     * @Description: 根据主设备Id获取对象
     * @createDate: Jun 27, 2019 10:31:50 AM
     */
    List<BusiOtherSubTree> findByEquipmentId(String equipmentId);

    /**
     * 根据设备树id获取subTree
     l*
     * @param equipmentType
     */
    List<BusiOtherSubTree> getOtherSubTreeByType(@Param("equipmentType") String equipmentType);

}
