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

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

import org.springframework.stereotype.Component;

import com.google.common.collect.Lists;
import com.huatek.busi.common.CacMonitorTypeCode;
import com.huatek.busi.common.SiteConstants.SiteTreeEnum;
import com.huatek.busi.service.impl.dataoutput.helper.OptExecutor;
import com.huatek.busi.vo.dataoutput.OutputEquipmentVo;

/**
 * 油色谱
 * 
 * @author anker_cheng
 * @date 2019/10/14
 */
@Component
@OptExecutor(mainEquipmentType = "111", subEquipmentType = "071")
@OptExecutor(mainEquipmentType = "211", subEquipmentType = "041")
@OptExecutor(mainEquipmentType = "411", subEquipmentType = "041")
public class TransformerMeteorologicalExecutor extends AbstractDataOutputExecutor {
    @Override
    protected Map<String, Object> getParams(OutputEquipmentVo vo, LocalDate day) {
        Map<String, Object> params = super.getParams(vo, day);
        if (SiteTreeEnum.BYQ_EQM.getValue().equals(vo.getMainEquipmentType())) {
            params.put("cacMonitorTypeCode", CacMonitorTypeCode.TRANSFORMER_MIC.getCode());
        } else if (SiteTreeEnum.GIS_HL_EQM.getValue().equals(vo.getMainEquipmentType())) {
            params.put("cacMonitorTypeCode", CacMonitorTypeCode.GIS_METEOROLOGICAL.getCode());
        } else if (SiteTreeEnum.BLQ_HL_EQM.getValue().equals(vo.getMainEquipmentType())) {
            params.put("cacMonitorTypeCode", CacMonitorTypeCode.LIGHTNINGROD_MIC.getCode());
        }
        return params;
    }

    @Override
    protected List<String> getKeys() {
        return Lists.newArrayList("sensorId", "sensorName", "timeStamp", "phase", "precipitation", "radiationIntensity",
            "airTemperature", "humidity", "airPressure", "precipitationIntensity");
    }
}
