package com.huatek.busi.service.impl.dataoutput.impls;

import com.google.common.collect.Lists;
import com.huatek.busi.common.CacMonitorTypeCode;
import com.huatek.busi.common.SiteConstants.SiteTreeEnum;
import com.huatek.busi.dto.SimulateResultDto;
import com.huatek.busi.service.CableNumberService;
import com.huatek.busi.service.impl.dataoutput.helper.OptExecutor;
import com.huatek.busi.service.impl.dataoutput.helper.OptSimulatExecutor;
import com.huatek.busi.vo.dataoutput.OutputEquipmentVo;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * 局放输出
 *
 * @author anker_cheng
 * @date 2019/10/14
 */
@Component
@OptSimulatExecutor( pId = "GISmec",equipmentType = "2")
@OptSimulatExecutor( pId = "assess",equipmentType = "2")
@OptSimulatExecutor( pId = "GISPD",equipmentType = "2")
@OptSimulatExecutor( pId = "switch",equipmentType = "3")
@OptSimulatExecutor( pId = "Generator",equipmentType = "6")
@OptSimulatExecutor( pId = "Cable",equipmentType = "7")
public class GisMechanicalFaultExecutor extends AbstractDataSimulateOutputExecutor {

    @Override
    protected Map<String, Object> getParams(SimulateResultDto vo, LocalDate day) {
        Map<String, Object> params = super.getParams(vo, day);
//        if (vo.getEquipmentType().equals()) {
//            params.put("cacMonitorTypeCode", CacMonitorTypeCode.TRANSFORMER_PD.getCode());
//        } else if (SiteTreeEnum.GIS_HL_EQM.getValue().equals(vo.getMainEquipmentType())) {
//            params.put("cacMonitorTypeCode", CacMonitorTypeCode.GIS_PD.getCode());
//        } else if (SiteTreeEnum.OTHER_EQM.getValue().equals(vo.getMainEquipmentType())) {
//            params.put("cacMonitorTypeCode", CacMonitorTypeCode.ELE_PD.getCode());
//        }
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationGismec.getCode());
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationAssess.getCode());
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationGISPD.getCode());
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationSwitch.getCode());
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationGenerator.getCode());
                params.put("cacMonitorTypeCode", CacMonitorTypeCode.SimulationCable.getCode());
            return params;
    }

    @Override
    protected List<String> getKeys() {
        return Lists.newArrayList("sensorId", "timeStamp", "phase", "dischargeCapacity", "dischargePosition",
            "pulseCount","dschType","paDschAlm");
    }
}
