package com.hdkj.lt.job.service.impl;

import com.hdkj.lt.job.mapper.DealPsrDeviceMapper;
import com.hdkj.lt.job.service.IPsrDeviceSaveService;
import com.hdkj.lt.modle.po.DistDeviceJoinEcPO;
import com.hdkj.lt.modle.po.JoinEcTransformerPO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Author wcx
 * @Date 2025/9/5 9:41
 * @Version 1.0
 */
@Service
@RequiredArgsConstructor
public class PsrDeviceSaveServiceImpl implements IPsrDeviceSaveService {

    private final DealPsrDeviceMapper dealPsrDeviceMapper;

    @Override
    public List<String> getDistJoinEcBaseInfo() {
        return dealPsrDeviceMapper.getDistJoinEcBaseInfo();
    }

    @Override
    public List<String> getConfigCityInfo(List<String> cityShortlist) {
        return dealPsrDeviceMapper.getConfigCityInfo(cityShortlist);
    }

    @Override

    public int saveDistDeviceJoinEc(List<DistDeviceJoinEcPO> joinEcList) {
        // 保存更新中压接入点的台账信息
        return dealPsrDeviceMapper.saveDistDeviceJoinEc(joinEcList);
    }

    @Override

    public int saveDistJoinEcTransformer(List<JoinEcTransformerPO> deviceList) {
        // 保存更新中压接入点和专变的台账信息
        return dealPsrDeviceMapper.saveDistJoinEcTransformer(deviceList);
    }

    @Override

    public int savePsrDeviceDIBeforeBak() {
        // 先删后增DI同步之前的馈线和档距段台账信息
        return dealPsrDeviceMapper.savePsrDeviceDIBeforeBak();
    }

    @Override

    public int updateFeederDIAfter() {
        // 更新DI同步后丢失的馈线台账信息转义字段信息
        return dealPsrDeviceMapper.updateFeederDIAfter();
    }

    @Override

    public int updateFeederPsrDevice() {
        // 更新T_PSR_DS_FEEDER拓扑解析需要的线段信息
        return dealPsrDeviceMapper.updateFeederPsrDevice();
    }

    @Override

    public int updateSpanSegmentDIAfter() {
        // 更新DI同步后丢失的档距段台账信息转义字段信息
        return dealPsrDeviceMapper.updateSpanSegmentDIAfter();
    }

    @Override

    public int saveDistConductorSegment(List<Map<String, Object>> deviceList) {
        // 保存更新导线设备台账信息
        return dealPsrDeviceMapper.saveDistConductorSegment(deviceList);
    }

    @Override

    public int saveDistCableSegment(List<Map<String, Object>> deviceList) {
        // 保存更新电缆段设备台账信息
        return dealPsrDeviceMapper.saveDistCableSegment(deviceList);
    }

    @Override

    public int updateSegmentPsrDevice() {
        // 更新T_PSR_DS_DX拓扑解析需要的线段信息
        return dealPsrDeviceMapper.updateSegmentPsrDevice();
    }
}
