package com.yeejoin.amos.boot.module.jxiop.biz.dto;

import lombok.Data;

/**
 *  指标dto-用于接收influxdb里边查询的到的数据
 */
@Data
public class IndicatorsDto {
    private String address;
    private String createdTime;
    private String dataType;
    private String equipmentIndex;
    private String equipmentIndexName;
    private String equipmentNumber;
    private String equipmentSpecificName;
    private String equipmentsIdx;
    private String equipmentsIdx_1;
    private String frontModule;
    private String gatewayId;
    private String isAlarm;
    private String systemType;
    private String traceId;
    private String unit;
    private String value;
    private String valueLabel;
    private String distinct;
    private String time;
    private String displayName;
    private String pictureName;
    private String title;
    private String state;

    public String getTime() {
        if (null != time) {
            String[] ts = time.replace(":00Z", "").split("T");
            return ts[1];
        }
        return null;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
