package com.nantian.cloud.dbcapp.pojo;

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

import java.text.DecimalFormat;

@Data
@ApiModel(value = "企业规定时间后传数据名单")
public class EnergyTcePOJO extends BaseRowModel {

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

    @ExcelProperty(value = "地区名称")
    private String tname;

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

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

    @ExcelProperty(value = "企业接入在线采集系统时间")
    private String applyDate;

    @ExcelProperty(value = "传第一条月数据时间")
    private String collectDate;

    @ExcelProperty(value = {"一月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month1;

    @ExcelProperty(value = {"一月","补传数据"}) //1补传,0没有补传
    private String month1BC;

    @ExcelProperty(value = {"二月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month2;

    @ExcelProperty(value = {"二月","补传数据"}) //1补传,0没有补传
    private String month2BC;

    @ExcelProperty(value = {"三月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month3;

    @ExcelProperty(value = {"三月","补传数据"}) //1补传,0没有补传
    private String month3BC;

    @ExcelProperty(value = {"四月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month4;

    @ExcelProperty(value = {"四月","补传数据"}) //1补传,0没有补传
    private String month4BC;

    @ExcelProperty(value = {"五月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month5;

    @ExcelProperty(value = {"五月","补传数据"}) //1补传,0没有补传
    private String month5BC;

    @ExcelProperty(value = {"六月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month6;

    @ExcelProperty(value = {"六月","补传数据"}) //1补传,0没有补传
    private String month6BC;

    @ExcelProperty(value = {"七月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month7;

    @ExcelProperty(value = {"七月","补传数据"}) //1补传,0没有补传
    private String month7BC;

    @ExcelProperty(value = {"八月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month8;

    @ExcelProperty(value = {"八月","补传数据"}) //1补传,0没有补传
    private String month8BC;

    @ExcelProperty(value = {"九月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month9;

    @ExcelProperty(value = {"九月","补传数据"}) //1补传,0没有补传
    private String month9BC;

    @ExcelProperty(value = {"十月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month10;

    @ExcelProperty(value = {"十月","补传数据"}) //1补传,0没有补传
    private String month10BC;

    @ExcelProperty(value = {"十一月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month11;

    @ExcelProperty(value = {"十一月","补传数据"}) //1补传,0没有补传
    private String month11BC;

    @ExcelProperty(value = {"十二月","按时传数据"}) //1延时传数据,0按规定传数据
    private String month12;

    @ExcelProperty(value = {"十二月","补传数据"}) //1补传,0没有补传
    private String month12BC;

    @ExcelProperty(value = "应传次数")
    private Integer sumYC;

    @ExcelProperty(value = {"合计","不按时传次数"})
    private Integer sumBAS;

    @ExcelProperty(value = {"合计","补传数据次数"})
    private Integer sumBC;

    @ExcelProperty(value = "按规定时间传数据报送率（%）")
    private Float rate;

    DecimalFormat df2 = new DecimalFormat(".00"); //保留2位小数

    public void setSumYC(Integer sumYC) {

        this.sumYC = sumYC;
    }

    public void setRate() {
        this.rate = Float.parseFloat(df2.format((sumYC-sumBAS)*100/sumYC));
    }

    /* public void setMonth1(String month1) {
        if (month1.equals("1")) { 
            this.month1 = "是";
        } else{
            this.month1 = "否";
        }
    }

    public void setMonth2(String month2) {
        if (month2.equals("1")) { 
            this.month2 = "是";
        } else{
            this.month2 = "否";
        }
    }

    public void setMonth3(String month3) {
        if (month3.equals("1")) { 
            this.month3 = "是";
        } else{
            this.month3 = "否";
        }
    }

    public void setMonth4(String month4) {
        if (month4.equals("1")) { 
            this.month4 = "是";
        } else{
            this.month4 = "否";
        }
    }

    public void setMonth5(String month5) {
        if (month5.equals("1")) { 
            this.month5 = "是";
        } else{
            this.month5 = "否";
        }
    }

    public void setMonth6(String month6) {
        if (month6.equals("1")) { 
            this.month6 = "是";
        } else{
            this.month6 = "否";
        }
    }

    public void setMonth7(String month7) {
        if (month7.equals("1")) { 
            this.month7 = "是";
        } else{ 
            this.month7 = "否";
        }
    }

    public void setMonth8(String month8) {
        if (month8.equals("1")) { 
            this.month8 = "是";
        } else{
            this.month8 = "否";
        }
    }

    public void setMonth9(String month9) {
        if (month9.equals("1")) {
            this.month9 = "是";
        } else{
            this.month9 = "否";
        }
    }

    public void setMonth10(String month10) {
        if (month10.equals("1")) {
            this.month10 = "是";
        } else{
            this.month10 = "否";
        }
    }

    public void setMonth11(String month11) {
        if (month11.equals("1")) { 
            this.month11 = "是";
        } else{ 
            this.month11 = "否";
        }
    }

    public void setMonth12(String month12) {
        if (month12.equals("1")) { 
            this.month12 = "是";
        } else{ 
            this.month12 = "否";
        }
    }*/
}
