package com.njcn.mapper.user;

import com.njcn.pojo.user.*;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface TfLgAssMapper extends Mapper<TfLgAss> {
    List<TfLgAss> selectIdAll(@Param(value = "tfIndex") String tfIndex);

    //选择节点
    int updateTfLgAss(@Param(value = "tfIndex") String tfIndex, @Param(value = "userIndex") String userIndex, @Param(value = "logicBefore") int logicBefore, @Param(value = "logicNext") int logicNext);

    //insert
    int insertTfLgAss(@Param(value = "tfLgAss_Index") String tfLgAss_Index, @Param(value = "updatetime") Date updatetime, @Param(value = "tfIndex") String tfIndex, @Param(value = "userIndex") String userIndex, @Param(value = "logicBefore") int logicBefore, @Param(value = "logicNext") int logicNext, @Param(value = "state") int state);

    //上节点
    List<LogicBefore> getLogicBefore(@Param("subIndex") int subIndex, @Param(value = "tfIndex") String tfIndex);

    //下节点
    List<LogicNext> getLogicNext(@Param("subIndex") int subIndex, @Param(value = "tfIndex") String tfIndex);

    //查询母线个数
    int getSubvIndex(@Param("subIndex") int subIndex);

    //跨变电站
    List<LogicKNext> getKNext(@Param("subIndex") int subIndex);

    List<LogicBefore> getKBefore(@Param("subIndex")int subIndex);

    List<TfLgAssByMe> selectByMe(@Param(value = "tfIndex") String tfIndex);

}
