package com.hdkj.lt.bf.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hdkj.lt.bf.entity.dto.FaultTransferSchemeSwitchingSequenceAndPathDTO;
import com.hdkj.lt.core.bizms.modle.dto.FhzgFaultTransferSchemePathDetailDTO;
import com.hdkj.lt.core.bizms.modle.po.fault.FaultTransferScheme;
import com.hdkj.lt.core.bizms.modle.po.fault.FaultTransferSchemePathDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 故障停电转供方案路径明细信息表(联络开关) Mapper 接口
 * </p>
 *
 * @author luorui
 * @since 2025-05-29
 */
@Mapper
public interface FaultTransferSchemePathDetailMapper extends BaseMapper<FaultTransferSchemePathDetail> {

    Page<FhzgFaultTransferSchemePathDetailDTO> getTransferSchemePathDetailBySchemeId(Page<FaultTransferScheme> page, @Param("params") FaultTransferScheme fhzgFaultTransferScheme);

    Page<FaultTransferSchemeSwitchingSequenceAndPathDTO> getTransferSchemePathAndSwitchById(Page<FaultTransferScheme> page, @Param("params") FaultTransferScheme faultTransferScheme);

    /**
     * 根据组合方案id查询全部转供路径
     */
    List<FhzgFaultTransferSchemePathDetailDTO> getTransferSchemePathDetailByCombinationSchemeId(FaultTransferScheme fhzgFaultTransferScheme);


    FhzgFaultTransferSchemePathDetailDTO getTotalSwitchSectionLoads(FaultTransferScheme fhzgFaultTransferScheme);

    FhzgFaultTransferSchemePathDetailDTO getTotalSwitchSectionTransfer(FaultTransferScheme fhzgFaultTransferScheme);

    /**
     * 根据方案ID查询母线信息
     */
    List<JSONObject> getFeederBusbarBySchemeId(Long schemeId, List<String> kgPsrTypes);
}
