package vip.xiaonuo.coldchain.modular.monitordevice.config;

import cn.hutool.core.bean.copier.CopyOptions;

import java.util.HashMap;
import java.util.Map;


public class CopyOptionsConfig {

    private static final Map<String, String> propNameMap = new HashMap<>();

    static  {
        propNameMap.put("paramId19", "dataPostInterval");
        propNameMap.put("paramId20", "targetIp");
        propNameMap.put("paramId38", "dataRecordingInterval");
        propNameMap.put("paramId40", "dataRecordingMode");
        propNameMap.put("paramId44", "dataActiveUpload");
        propNameMap.put("paramId248", "temperatureMax");
        propNameMap.put("paramId249", "temperatureMin");
        propNameMap.put("paramId259", "humidityMax");
        propNameMap.put("paramId260", "humidityMin");
        propNameMap.put("paramId273", "temperatureMax");
        propNameMap.put("paramId274", "temperatureMin");
        propNameMap.put("paramId284", "humidityMax");
        propNameMap.put("paramId285", "humidityMin");
        propNameMap.put("paramId298", "temperatureMax");
        propNameMap.put("paramId299", "temperatureMin");
        propNameMap.put("paramId309", "humidityMax");
        propNameMap.put("paramId310", "humidityMin");
        propNameMap.put("paramId323", "temperatureMax");
        propNameMap.put("paramId324", "temperatureMin");
        propNameMap.put("paramId334", "humidityMax");
        propNameMap.put("paramId335", "humidityMin");
        propNameMap.put("paramId2", "targetIp");
        propNameMap.put("paramId13", "ip");
        propNameMap.put("paramId14", "mask");
        propNameMap.put("paramId15", "gateWay");
        propNameMap.put("paramId16", "ipWay");
        propNameMap.put("paramId30", "loginInterval");
        propNameMap.put("paramId31", "heartbeatInterval");
        propNameMap.put("paramId32", "postInterval");
        propNameMap.put("paramId250", "temperatureReturn");
    }

    public static CopyOptions appParametersParamCopyOptions() {
        return CopyOptions.create().setFieldNameEditor(propNameMap::get);
    }

}
