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

import com.hdkj.lt.core.bizms.modle.po.*;
import com.hdkj.lt.core.bizms.modle.po.plan.*;
import com.hdkj.lt.mq.entity.po.FhzgPlanPowerCut;
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 FhzgPlanAnalyzeCalculateDecudeMapper {

    /**
     * 查询线路名
     * @param planId
     * @return
     */
    FhzgPlanPowerCut getLineNameByPlanId(@Param("planId") Long planId);

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

    /**
     * 保存开关段(变更成保存负荷段开关段)
     * @param switchSectionList
     * @return
     */
    void saveSwitchSectionBatch(@Param("switchSectionList") List<FhzgPlanAwaitTransferSwitchSection> switchSectionList);

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

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

    void deleteTransferUserByPlanId(@Param("planId") Long planId);

    void deleteSwitchSectionByPlanId(@Param("planId") Long planId);

    Long saveSwitchingSequence(FhzgPlanTransferSchemeSwitchingSequence switchingSequence);

    Long saveSwitchingLoopCheck(FhzgPlanTransferSchemeSwitchingLoopCheck switchingLoopCheck);

    void saveSwitchingFinalCheck(FhzgPlanTransferSchemeSwitchingFinalCheck switchingFinalCheck);

    void deleteTransferSchemeAndLinkInfoByPlanId(@Param("planId") Long planId);

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

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

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

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

    void deleteSwitchingLoopCheckByPlanId(Long planId);

    void deleteSwitchingFinalCheckByPlanId(Long planId);

    void deleteLoopSwCurrentDetailByPlanId(Long planId);

    void deleteLoopSegCurrentDetailByPlanId(Long planId);

    void deleteFinalSwCurrentDetailByPlanId(Long planId);

    void deleteFinalSegCurrentDetailByPlanId(Long planId);

    void deleteSwitchingSequenceByPlanId(Long planId);

    void deleteBreakerSvgAfterByPlanId(Long planId);

    void deletePathDetailByPlanId(Long planId);

    void deleteOppositeLineLoadFactorByPlanId(Long planId);

    void deleteSchemeUsersByPlanId(Long planId);

    void deleteTransferableSchemeUsersByPlanId(Long planId);

    void deleteOppositeLineConcatSwitchByPlanId(Long planId);

    void deleteEvaluationIndexByPlanId(Long planId);

    void deleteStrategyScoreByPlanId(Long planId);

    void deleteCarryCapacityByPlanId(Long planId);

    void deleteAwaitTransferUsersByPlanId(Long planId);

    void deleteTransferSchemeByPlanId(Long planId);
}
