package com.hdkj.lt.mq.mapper.fault;

import com.hdkj.lt.core.bizms.modle.po.fault.*;
import com.hdkj.lt.mq.entity.po.FhzgFaultPowerCut;
import com.hdkj.lt.mq.entity.vo.FeederDeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 计算推演平台数据处理
 *
 * @author zhuzhe
 * @since 2025-05-23
 */
@Mapper
public interface FhzgFaultAnalyzeCalculateDecudeMapper {
    /**
     * 查询线路名
     * @param faultId
     * @return
     */
    FhzgFaultPowerCut getLineNameByFaultId(@Param("faultId") Long faultId);

    /**
     * 查询开关段
     * @param feeder
     * @param psrId
     * @param kgPsrType
     * @return
     */
    List<FaultAwaitTransferSwitchSection> getSwitchSection(@Param("feeder") String feeder,
                                                           @Param("psrId") String psrId,
                                                           @Param("kgPsrType") List<String> kgPsrType);

    /**
     * 保存开关段
     * @param switchSectionList
     * @return
     */
    void saveSwitchSectionBatch(@Param("switchSectionList") List<FaultAwaitTransferSwitchSection> switchSectionList);

    /**
     * 根据 psrId 查询开关段
     * @param psyIdList
     * @param kgPsrType
     * @return
     */
    List<FaultAwaitTransferSwitchSection> getSwitchSectionList(@Param("feeder") String feeder, @Param("psyIdList") List<String> psyIdList,
                                                               @Param("kgPsrType") List<String> kgPsrType, @Param("faultId") Long faultId);

    /**
     * 更新开关段负荷
     */
    void updateSwitchSectionSwitchLoads(@Param("faultId") Long faultId);

    void deleteTransferUserByFaultId(@Param("faultId") Long faultId);

    void deleteSwitchSectionByFaultId(@Param("faultId") Long faultId);

    Long saveSwitchingSequence(FaultTransferSchemeSwitchingSequence switchingSequence);

    Long saveSwitchingLoopCheck(FaultTransferSchemeSwitchingLoopCheck switchingLoopCheck);

    void saveSwitchingFinalCheck(FaultTransferSchemeSwitchingFinalCheck switchingFinalCheck);

    void deleteTransferSchemeAndLinkInfoByFaultId(@Param("faultId") Long faultId);

    void saveConcatSwitchList(@Param("concatSwitchList") List<FaultOppositeLineConcatSwitch> concatSwitchList);

    List<FeederDeviceVO> getLineVoltageByLineId(@Param("lineIds") List<String> lineIds);

    void updateSwitchingSequenceIsConnect(@Param("faultId") Long faultId);

    void deleteSwitchSectionByConnect(@Param("faultId") Long faultId);

    void deleteSwitchingLoopCheckByFaultId(Long faultId);

    void deleteSwitchingFinalCheckByFaultId(Long faultId);

    void deleteLoopSwCurrentDetailByFaultId(Long faultId);

    void deleteLoopSegCurrentDetailByFaultId(Long faultId);

    void deleteFinalSwCurrentDetailByFaultId(Long faultId);

    void deleteFinalSegCurrentDetailByFaultId(Long faultId);

    void deleteSwitchingSequenceByFaultId(Long faultId);

    void deleteBreakerSvgAfterByFaultId(Long faultId);

    void deletePathDetailByFaultId(Long faultId);

    void deleteOppositeLineLoadFactorByFaultId(Long faultId);

    void deleteSchemeUsersByFaultId(Long faultId);

    void deleteTransferableSchemeUsersByFaultId(Long faultId);

    void deleteOppositeLineConcatSwitchByFaultId(Long faultId);

    void deleteEvaluationIndexByFaultId(Long faultId);

    void deleteStrategyScoreByFaultId(Long faultId);

    void deleteCarryCapacityByFaultId(Long faultId);

    void deleteAwaitTransferUsersByFaultId(Long faultId);

    void deleteTransferSchemeByFaultId(Long faultId);

}
