package com.ruoyi.ems.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huashe.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 光伏产能统计视图对象
 */
@Data
@ApiModel("光伏产能统计响应模型")
public class PvSupplyVO {

    @ApiModelProperty("区域代码")
    private String areaCode;

    @ApiModelProperty("区域名称")
    @Excel(name = "区域名称")
    private String areaName;

    @ApiModelProperty("设施代码")
    private String facsCode;

    @ApiModelProperty("设施名称")
    @Excel(name = "设施名称")
    private String facsName;

    @ApiModelProperty("统计日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "统计日期", dateFormat = "yyyy-MM-dd")
    private Date statisticDate;

    @ApiModelProperty("统计年份")
    @Excel(name = "统计年份")
    private String statisticYear;

    @ApiModelProperty("统计月份")
    @Excel(name = "统计月份")
    private String statisticMonth;

    @ApiModelProperty("统计时间维度 DAY-日 MONTH-月 YEAR-年")
    private String timeDimension;

    @ApiModelProperty("总发电量(kWh)")
    @Excel(name = "总发电量(kWh)")
    private BigDecimal genElecQuantity;

    @ApiModelProperty("自用电量(kWh)")
    @Excel(name = "自用电量(kWh)")
    private BigDecimal useElecQuantity;

    @ApiModelProperty("上网电量(kWh)")
    @Excel(name = "上网电量(kWh)")
    private BigDecimal upElecQuantity;

    @ApiModelProperty("上网收益(元)")
    @Excel(name = "上网收益(元)")
    private BigDecimal upElecEarn;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("时间序列(1-24)")
    private Integer timeIndex;

    @ApiModelProperty("统计小时")
    @Excel(name = "统计小时")
    private String statisticHour;

    private Date recordTime;

    private Date date;

    private Date time;

    private Double upUnitPrice;

    public Double getGenElecQuantityValue() {
        return genElecQuantity != null ? genElecQuantity.doubleValue() : 0;
    }

    public Double getUpElecQuantityValue() {
        return upElecQuantity != null ? upElecQuantity.doubleValue() : 0;
    }
}