package com.nantian.cloud.dbcapp.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class EnterpriseEnergyDataVo {
    private Long id;
    private String enterpriseCode;
    private String dataCode;
    private String dataValue;
    private String convertRation;
    private String valid;
    private String scope; //范围 1:全厂;2:生产工序;3:生产工序单元;4:重点耗能设备
    private String inputType; //数据采集来源 1:管理信息系统;2:生产监控管理系统;3:工业控制系统;4:现场仪表;5:手工填报;6:能源供应单位;7:其他
    private String statType; //采集频率 0:实时;1:日;2:月;3:年
    private String statDate;
    private String uploadDate;
    private String addDate;
    private String digest;
    private String storeDate;
    private String uploadedCountry;
    private String remark;
    private Integer analysedTimes;
    private Integer deleteFlag;
    private String collectName;
    private String collectCode;
    private String collectStatType;
    private String inputTypeName;
    private String statTypeName;
    private String scopeName;
    private String isAdditional;
    private Map<String,Double> markingRange;

    public void setColumnName(){
        switch (this.statType){
            case "0": this.statType = "实时上传"; break;
            case "1": this.statType = "按天上传"; break;
            case "2": this.statType = "按月上传"; break;
            case "3": this.statType = "按年上传"; break;
            default: break;
        }
        switch (this.scopeName){
            case "1": this.scopeName = "全厂"; break;
            case "2": this.scopeName = "生产工序"; break;
            case "3": this.scopeName = "生产工序单元"; break;
            case "4": this.scopeName = "重点耗能设备"; break;
            default: break;
        }
        switch (this.inputTypeName){
            case "1": this.inputTypeName = "管理信息系统"; break;
            case "2": this.inputTypeName = "生产监控管理系统"; break;
            case "3": this.inputTypeName = "工业控制系统"; break;
            case "4": this.inputTypeName = "现场仪表"; break;
            case "5": this.inputTypeName = "手工填报"; break;
            case "6": this.inputTypeName = "能源供应单位"; break;
            case "7": this.inputTypeName = "其他"; break;
            default: break;
        }
    }
}
