package com.nantian.cloud.dbcapp.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.metadata.BaseRowModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;

@Data
@ApiModel(value = "企业用能数据传送明细")
public class EnterpriseEnergyPOJO extends BaseRowModel {

    @ColumnWidth(5)
    @ExcelProperty(value = "序号")
    private String id;

    @ColumnWidth(15)
    @ExcelProperty(value = "企业名称")
    private String cmpName;

    @ColumnWidth(10)
    @ExcelProperty(value = "企业信用代码")
    private String enterpriseCode;

    @ExcelProperty(value = "采集点(个)")
    private String collect;

    @ExcelProperty(value = "采集点编码")
    private String collectCode;

    @ExcelProperty(value = {"一月", "未送数据采集点(个)"})
    private String month1;

    @ExcelProperty(value = {"一月", "未送数据采集点编码"})
    private String month1Code;
    
    @ExcelProperty(value = {"二月", "未送数据采集点(个)"})
    private String month2;

    @ExcelProperty(value = {"二月", "未送数据采集点编码"})
    private String month2Code;

    @ExcelProperty(value = {"三月", "未送数据采集点(个)"})
    private String month3;

    @ExcelProperty(value = {"三月", "未送数据采集点编码"})
    private String month3Code;

    @ExcelProperty(value = {"四月", "未送数据采集点(个)"})
    private String month4;

    @ExcelProperty(value = {"四月", "未送数据采集点编码"})
    private String month4Code;

    @ExcelProperty(value = {"五月", "未送数据采集点(个)"})
    private String month5;

    @ExcelProperty(value = {"五月", "未送数据采集点编码"})
    private String month5Code;

    @ExcelProperty(value = {"六月", "未送数据采集点(个)"})
    private String month6;

    @ExcelProperty(value = {"六月", "未送数据采集点编码"})
    private String month6Code;

    @ExcelProperty(value = {"七月", "未送数据采集点(个)"})
    private String month7;

    @ExcelProperty(value = {"七月", "未送数据采集点编码"})
    private String month7Code;

    @ExcelProperty(value = {"八月", "未送数据采集点(个)"})
    private String month8;

    @ExcelProperty(value = {"八月", "未送数据采集点编码"})
    private String month8Code;

    @ExcelProperty(value = {"九月", "未送数据采集点(个)"})
    private String month9;

    @ExcelProperty(value = {"九月", "未送数据采集点编码"})
    private String month9Code;

    @ExcelProperty(value = {"十月", "未送数据采集点(个)"})
    private String month10;

    @ExcelProperty(value = {"十月", "未送数据采集点编码"})
    private String month10Code;

    @ExcelProperty(value = {"十一月", "未送数据采集点(个)"})
    private String month11;

    @ExcelProperty(value = {"十一月", "未送数据采集点编码"})
    private String month11Code;

    @ExcelProperty(value = {"十二月", "未送数据采集点(个)"})
    private String month12;

    @ExcelProperty(value = {"十二月", "未送数据采集点编码"})
    private String month12Code;

    public void setMonthCode() {
        this.month1Code = this.month1 != null && !"".equals(this.month1) ? this.month1.split(";")[1] : "";
        this.month2Code = this.month2 != null && !"".equals(this.month2) ? this.month2.split(";")[1] : "";
        this.month3Code = this.month3 != null && !"".equals(this.month3) ? this.month3.split(";")[1] : "";
        this.month4Code = this.month4 != null && !"".equals(this.month4) ? this.month4.split(";")[1] : "";
        this.month5Code = this.month5 != null && !"".equals(this.month5) ? this.month5.split(";")[1] : "";
        this.month6Code = this.month6 != null && !"".equals(this.month6) ? this.month6.split(";")[1] : "";
        this.month7Code = this.month7 != null && !"".equals(this.month7) ? this.month7.split(";")[1] : "";
        this.month8Code = this.month8 != null && !"".equals(this.month8) ? this.month8.split(";")[1] : "";
        this.month9Code = this.month9 != null && !"".equals(this.month9) ? this.month9.split(";")[1] : "";
        this.month10Code = this.month10 != null && !"".equals(this.month10) ? this.month10.split(";")[1] : "";
        this.month11Code = this.month11 != null && !"".equals(this.month11) ? this.month11.split(";")[1] : "";
        this.month12Code = this.month12 != null && !"".equals(this.month12) ? this.month12.split(";")[1] : "";

        this.month1 = this.month1 != null && !"".equals(this.month1) ? this.month1.split(";")[0] : "";
        this.month2 = this.month2 != null && !"".equals(this.month2) ? this.month2.split(";")[0] : "";
        this.month3 = this.month3 != null && !"".equals(this.month3) ? this.month3.split(";")[0] : "";
        this.month4 = this.month4 != null && !"".equals(this.month4) ? this.month4.split(";")[0] : "";
        this.month5 = this.month5 != null && !"".equals(this.month5) ? this.month5.split(";")[0] : "";
        this.month6 = this.month6 != null && !"".equals(this.month6) ? this.month6.split(";")[0] : "";
        this.month7 = this.month7 != null && !"".equals(this.month7) ? this.month7.split(";")[0] : "";
        this.month8 = this.month8 != null && !"".equals(this.month8) ? this.month8.split(";")[0] : "";
        this.month9 = this.month9 != null && !"".equals(this.month9) ? this.month9.split(";")[0] : "";
        this.month10 = this.month10 != null && !"".equals(this.month10) ? this.month10.split(";")[0] : "";
        this.month11 = this.month11 != null && !"".equals(this.month11) ? this.month11.split(";")[0] : "";
        this.month12 = this.month12 != null && !"".equals(this.month12) ? this.month12.split(";")[0] : "";
    }

}
