package com.nantian.cloud.jljc.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.text.NumberFormat;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 报表1-1财务信息
 *
 * @author stz
 * @since 2020-09-17
 */
@Data
@TableName("t_report_financial")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "报表1-1财务信息")
public class TReportFinancial extends Model<TReportFinancial> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id")
    @ApiModelProperty(value = "id")
    private Long id;

    /**
     * 报表信息表id
     */
    @ApiModelProperty(value = "报表信息表id")
    private Long reportId;

    /**
     * 工业总产值(万元)(按基期可比价计算)
     */
    @ApiModelProperty(value = "工业总产值(万元)")
    private Double industrialYield;

    @TableField(exist = false)
    @ApiModelProperty(value = "工业总产值(万元)(按现价计算)，目前仅企业能耗精确性分析用到")
    private Double industrialYieldNow;

    /**
     * 销售收入（万元）
     */
    @ApiModelProperty(value = "销售收入（万元）")
    private Double salesRevenue;

    /**
     * 上缴利税
     */
    @ApiModelProperty(value = "上缴利税")
    private Double taxesPayment;

    /**
     * 从业人员
     */
    @ApiModelProperty(value = "从业人员")
    private Integer employeesNum;

    /**
     * 能源管理师
     */
    @ApiModelProperty(value = "能源管理师")
    private Integer icsemNum;

    /**
     * 综合能源消费量
     */
    @ApiModelProperty(value = "综合能源消费量")
    private Double energyConsumption;

    //@TableField(exist = false)
    @ApiModelProperty(value = "综合能源消费量（等价值），目前仅企业能耗精确性分析用到")
    private Double energyConsumptionEqu;

    @ApiModelProperty(value = "综合能源消费量（折标系数异常的，采用参考折标计算），用于汇总")
    private Double energyConsumptionRef;

    /**
     * 生产总成本
     */
    @ApiModelProperty(value = "生产总成本")
    private Double productionCost;

    /**
     * 能源消费成本
     */
    @ApiModelProperty(value = "能源消费成本")
    private Double energyConsumptionCost;

    /**
     * 能源消费占生产成本比例
     */
    @ApiModelProperty(value = "能源消费占生产成本比例")
    private Double energyConsumptionCostRatio;

    /**
     * 单位产值综合能耗
     */
    @ApiModelProperty(value = "单位产值综合能耗")
    private Double unitEnergyConsumption;

    //@TableField(exist = false)
    @ApiModelProperty(value = "单位产值综合能耗（等价值），目前仅企业能耗精确性分析用到")
    private Double unitEnergyConsumptionEqu;

    @ApiModelProperty(value = "单位产值综合能耗（折标系数异常的，采用参考折标计算），用于汇总")
    private Double unitEnergyConsumptionRef;

    /**
     * 工业总产值同比变化率
     */
    @ApiModelProperty(value = "工业总产值同比变化率")
    private Double industrialYieldRate;

    @TableField(exist = false)
    @ApiModelProperty(value = "工业总产值同比变化率(按现价计算)，目前仅企业能耗精确性分析用到")
    private Double industrialYieldRateNow;

    /**
     * 销售收入同比变化率
     */
    @ApiModelProperty(value = "销售收入同比变化率")
    private Double salesRevenueRate;

    /**
     * 上缴利税同比变化率
     */
    @ApiModelProperty(value = "上缴利税同比变化率")
    private Double taxesPaymentRate;

    /**
     * 从业人员同比变化率
     */
    @ApiModelProperty(value = "从业人员同比变化率")
    private Double employeesNumRate;

    /**
     * 能源管理师同比变化率
     */
    @ApiModelProperty(value = "能源管理师同比变化率")
    private Double icsemNumRate;

    /**
     * 综合能源消费量同比变化率
     */
    @ApiModelProperty(value = "综合能源消费量同比变化率")
    private Double energyConsumptionRate;

    @TableField(exist = false)
    @ApiModelProperty(value = "综合能源消费量同比变化率（等价值），目前仅企业能耗精确性分析用到")
    private Double energyConsumptionRateEqu;

    /**
     * 生产总成本同比变化率
     */
    @ApiModelProperty(value = "生产总成本同比变化率")
    private Double productionCostRate;

    /**
     * 能源消费成本同比变化率
     */
    @ApiModelProperty(value = "能源消费成本同比变化率")
    private Double energyConsumptionCostRate;

    /**
     * 能源消费占生产成本比例同比变化率
     */
    @ApiModelProperty(value = "能源消费占生产成本比例同比变化率")
    private Double energyConsumptionCostRatioRate;

    /**
     * 单位产值综合能耗同比变化率
     */
    @ApiModelProperty(value = "单位产值综合能耗同比变化率")
    private Double unitEnergyConsumptionRate;

    @TableField(exist = false)
    @ApiModelProperty(value = "单位产值综合能耗同比变化率（等价值），目前仅企业能耗精确性分析用到")
    private Double unitEnergyConsumptionRateEqu;

    /**
     * 产值及能源消费变化情况说明1
     */
    @ApiModelProperty(value = "产值及能源消费变化情况说明1")
    private String explainOne;

    /**
     * 产值及能源消费变化情况说明2
     */
    @ApiModelProperty(value = "产值及能源消费变化情况说明2")
    private String explainTwo;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Integer userid;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 注销状态（1：未删除，4：已删除）
     */
    @ApiModelProperty(value = "注销状态（1：未删除，4：已删除）")
    private String delFlag;

    /**
     * 部门id
     */
    @ApiModelProperty(value = "部门id")
    private Integer deptId;

/*    @TableField(exist = false)
    @ApiModelProperty(value = "工业总产值-上年值")
    private Double industrialYield2;

    @TableField(exist = false)
    @ApiModelProperty(value = "销售收入-上年值")
    private Double salesRevenue2;

    @TableField(exist = false)
    @ApiModelProperty(value = "上缴利税-上年值")
    private Double taxesPayment2;

    @TableField(exist = false)
    @ApiModelProperty(value = "从业人员-上年值")
    private Integer employeesNum2;

    @TableField(exist = false)
    @ApiModelProperty(value = "能源管理师-上年值")
    private Integer icsemNum2;

    @TableField(exist = false)
    @ApiModelProperty(value = "综合能源消费量-上年值")
    private Double energyConsumption2;

    @TableField(exist = false)
    @ApiModelProperty(value = "生产总成本-上年值")
    private Double productionCost2;

    @TableField(exist = false)
    @ApiModelProperty(value = "能源消费成本-上年值")
    private Double energyConsumptionCost2;

    @TableField(exist = false)
    @ApiModelProperty(value = "能源消费占生产成本比例-上年值")
    private Double energyConsumptionCostRatio2;

    @TableField(exist = false)
    @ApiModelProperty(value = "单位产值综合能耗-上年值")
    private Double unitEnergyConsumption2;*/

    /**
     * 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TReportFinancial{" +
                "id=" + id +
                ", reportId=" + reportId +
                ", industrialYield=" + big(industrialYield) +
                ", salesRevenue=" + big(salesRevenue) +
                ", taxesPayment=" + big(taxesPayment) +
                ", employeesNum=" + employeesNum +
                ", icsemNum=" + icsemNum +
                ", energyConsumption=" + big(energyConsumption) +
                ", productionCost=" + big(productionCost) +
                ", energyConsumptionCost=" + big(energyConsumptionCost) +
                ", energyConsumptionCostRatio=" + big(energyConsumptionCostRatio) +
                ", unitEnergyConsumption=" + big(unitEnergyConsumption) +
                ", industrialYieldRate=" + industrialYieldRate +
                ", salesRevenueRate=" + salesRevenueRate +
                ", taxesPaymentRate=" + taxesPaymentRate +
                ", employeesNumRate=" + employeesNumRate +
                ", icsemNumRate=" + icsemNumRate +
                ", energyConsumptionRate=" + energyConsumptionRate +
                ", productionCostRate=" + productionCostRate +
                ", energyConsumptionCostRate=" + energyConsumptionCostRate +
                ", energyConsumptionCostRatioRate=" + energyConsumptionCostRatioRate +
                ", unitEnergyConsumptionRate=" + unitEnergyConsumptionRate +
                ", explainOne='" + explainOne + '\'' +
                ", explainTwo='" + explainTwo + '\'' +
                ", userid=" + userid +
                ", updateTime=" + updateTime +
                ", delFlag='" + delFlag + '\'' +
                ", deptId=" + deptId +
              /*  ", industrialYield2=" + big(industrialYield2) +
                ", salesRevenue2=" + big(salesRevenue2) +
                ", taxesPayment2=" + big(taxesPayment2) +
                ", employeesNum2=" + employeesNum2 +
                ", icsemNum2=" + icsemNum2 +
                ", energyConsumption2=" + big(energyConsumption2) +
                ", productionCost2=" + big(productionCost2) +
                ", energyConsumptionCost2=" + big(energyConsumptionCost2) +
                ", energyConsumptionCostRatio2=" + big(energyConsumptionCostRatio2) +
                ", unitEnergyConsumption2=" + big(unitEnergyConsumption2) +*/
                '}';
    }

    private static String big(double d) {
        NumberFormat nf = NumberFormat.getInstance();
        nf.setGroupingUsed(false);
        return nf.format(d);
    }
}
