puzhibing
4 天以前 a0e03b646f2c444b0f09687d24e9995112b99017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.ruoyi.other.vo;
 
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
 
import java.math.BigDecimal;
import java.util.Objects;
 
@Data
public class StationEarnExportVO {
    @Excel(name = "平台", width = 15) private String platformName;
    @Excel(name = "电站ID", width = 24) private String stationId;
    @Excel(name = "电站名称", width = 25) private String stationName;
    @Excel(name = "统计日期", width = 18) private String saveTime;
    @Excel(name = "总发电量(度)", width = 20) private BigDecimal elecTotal;
    @Excel(name = "总收益(元)", width = 20) private BigDecimal earnTotal;
 
    public void buildPlatformName(Long platformId) {
       // 0科士达,1华为,2阳光,3古瑞瓦特
        if(Objects.nonNull(platformId)) {
            if(platformId == 0) {
                this.setPlatformName("科士达");
            }else if(platformId == 1) {
                this.setPlatformName("华为");
            }else if(platformId == 2) {
                this.setPlatformName("阳光");
            }else if(platformId == 3) {
                this.setPlatformName("古瑞瓦特");
            }
        }
    }
}