longz
2026-08-03 588a3c2fe071d0e7dc096a1916f0c5bf23fcefcd
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
package com.ruoyi.chargingPile.export;
 
import com.ruoyi.chargingPile.api.dto.PageChargingPileListDTO;
import com.ruoyi.chargingPile.api.model.TChargingPile;
import com.ruoyi.chargingPile.api.vo.TChargingGunVO;
import com.ruoyi.common.core.annotation.Excel;
import lombok.Data;
 
import java.math.BigDecimal;
 
@Data
public class ChargingPileExport {
    @Excel(name = "*设备编码", width = 25)
    private String code;
    @Excel(name = "*设备名称", width = 25)
    private String name;
    @Excel(name = "*桩号", width = 10)
    private String number;
    @Excel(name = "设备类型", width = 20, readConverterExp = "0=其他,1=直流设备,2=交流设备,3=交直流一体设备,4=无线设备,5=有序,6=V2G")
    private Integer type;
    @Excel(name = "归属电站", width = 30)
    private String siteName;
    @Excel(name = "设备合作商", width = 30)
    private String partnerName;
    @Excel(name = "生产机构代码", width = 25)
    private String manufacturerCode;
    @Excel(name = "生产商名称", width = 30)
    private String manufacturer;
    @Excel(name = "设备型号", width = 25)
    private String equipmentType;
    @Excel(name = "设备生产日期", width = 15)
    private String productionDate;
    @Excel(name = "*额定功率", width = 15)
    private BigDecimal ratedPower;
    @Excel(name = "设备充电站编号", width = 25)
    private String chargingStationNumber;
    @Excel(name = "设备唯一编码", width = 25)
    private String equipmentUniqueNumber;
    @Excel(name = "*设备分类", width = 30, readConverterExp = "1=车辆充电设备,2=换电站内的电池箱充电设备")
    private Integer equipmentClassification;
    @Excel(name = "设备经度", width = 20)
    private String equipmentLng;
    @Excel(name = "设备纬度", width = 20)
    private String equipmentLat;
    @Excel(name = "设备出厂编码", width = 25)
    private String equipmentProductCode;
    @Excel(name = "设备用途", width = 25, readConverterExp = "1=公共,50=个人,100=公交专用,101=环卫专用,102=物流专用,103=出租车专用,104=分时租赁专用,106=单位专用,107=移动站点,108=居民小区公共,109=居民小区专用")
    private Integer equipmentPurpose;
    @Excel(name = "新国标", width = 15, readConverterExp = "1=是,0=否")
    private Integer newNationalStandard;
    @Excel(name = "是否支持VIN码识别", width = 22, readConverterExp = "1=是,0=否")
    private Integer vinFlag;
 
    @Excel(name = "*接口编码", width = 20)
    private String interfaceCode;
    @Excel(name = "*接口名称", width = 25)
    private String interfaceName;
    @Excel(name = "*设备接口分类", width = 30, readConverterExp = "1=车辆充电设备接口,2=换电站内的电池箱充电设备接口")
    private Integer interfaceEquipmentClassification;
    @Excel(name = "*接口类型", width = 35, readConverterExp = "0=其他,1=家用插座(模式2),2=交流接口插座(模式3,连接方式B),3=交流接口插头(带枪线,模式3,连接方式C),4=直流接口枪头(带枪线,模式4),5=无线充电座")
    private Integer interfaceType;
    @Excel(name = "*接口状态", width = 20, readConverterExp = "1=离线,2=空闲,3=占用(未充电),4=占用(充电中),5=占用(已充满),6=占用(预约锁定),7=故障")
    private Integer interfaceStatus;
    @Excel(name = "*充电方式", width = 15, readConverterExp = "1=超级快充,2=快充,3=慢充")
    private Integer chargeMode;
    @Excel(name = "计费策略", width = 30)
    private String strategyName;
    @Excel(name = "*额定电压上限", width = 18)
    private BigDecimal upperRatedVoltage;
    @Excel(name = "*额定电压下限", width = 18)
    private BigDecimal lowerLimitOfRatedVoltage;
    @Excel(name = "恒功率电压上限", width = 18)
    private BigDecimal constantVoltageUpperLimits;
    @Excel(name = "恒功率电压下限", width = 18)
    private BigDecimal constantVoltageLowerLimits;
    @Excel(name = "*额定电流", width = 15)
    private BigDecimal ratedCurrent;
    @Excel(name = "恒功率电流上限", width = 18)
    private BigDecimal constantCurrentUpperLimits;
    @Excel(name = "恒功率电流下限", width = 18)
    private BigDecimal constantCurrentLowerLimits;
    @Excel(name = "*额定功率", width = 15)
    private BigDecimal interfaceRatedPower;
    @Excel(name = "车位号", width = 15)
    private String parkingNumber;
    @Excel(name = "车位状态", width = 15, readConverterExp = "0=未知,1=空闲,2=占用")
    private Integer parkingStatus;
    @Excel(name = "地锁状态", width = 15, readConverterExp = "0=未知,1=已解锁,2=已上锁")
    private Integer parkingLockState;
    @Excel(name = "*国家标准", width = 20, readConverterExp = "1=2011,2=2015,3=兼容2011和2015")
    private String nationalStandard;
    @Excel(name = "接口说明", width = 30)
    private String remark;
    @Excel(name = "辅助电源", width = 20, readConverterExp = "1=12V,2=24V,3=兼容12V和24V")
    private Integer auxPower;
    @Excel(name = "*运营状态", width = 18, readConverterExp = "0=未知,1=建设中,5=关闭下线,6=维护中,50=正常使用")
    private Integer operateStatus;
    @Excel(name = "运营时间", width = 25)
    private String operateHours;
 
    public static ChargingPileExport from(PageChargingPileListDTO record, TChargingPile pile, TChargingGunVO gun) {
        ChargingPileExport export = new ChargingPileExport();
        if (pile != null) {
            export.setCode(pile.getCode());
            export.setName(pile.getName());
            export.setNumber(pile.getNumber() == null ? null : String.valueOf(pile.getNumber()));
            export.setType(pile.getType());
            export.setManufacturerCode(pile.getManufacturerCode());
            export.setManufacturer(pile.getManufacturer());
            export.setEquipmentType(pile.getEquipmentType());
            export.setProductionDate(pile.getProductionDate() == null ? null : pile.getProductionDate().toString());
            export.setRatedPower(pile.getRatedPower());
            export.setChargingStationNumber(pile.getChargingStationNumber());
            export.setEquipmentUniqueNumber(pile.getEquipmentUniqueNumber());
            export.setEquipmentClassification(pile.getEquipmentClassification());
            export.setEquipmentLng(pile.getEquipmentLng());
            export.setEquipmentLat(pile.getEquipmentLat());
            export.setEquipmentProductCode(pile.getEquipmentProductCode());
            export.setEquipmentPurpose(pile.getEquipmentPurpose());
            export.setNewNationalStandard(pile.getNewNationalStandard());
            export.setVinFlag(pile.getVinFlag());
        } else if (record != null) {
            export.setCode(record.getCode());
            export.setName(record.getName());
            export.setNumber(record.getNumber());
            export.setType(record.getType());
            export.setManufacturer(record.getManufacturer());
            export.setEquipmentType(record.getEquipmentType());
            export.setRatedPower(record.getRatedPower());
        }
        if (record != null) {
            export.setSiteName(record.getSiteName());
            export.setPartnerName(record.getPartnerName());
        }
        if (gun != null) {
            export.setInterfaceCode(gun.getCode());
            export.setInterfaceName(gun.getName());
            export.setInterfaceEquipmentClassification(gun.getEquipmentClassification());
            export.setInterfaceType(gun.getType());
            export.setInterfaceStatus(gun.getStatus());
            export.setChargeMode(gun.getChargeMode());
            export.setStrategyName(gun.getStrategyName());
            export.setUpperRatedVoltage(gun.getUpperRatedVoltage());
            export.setLowerLimitOfRatedVoltage(gun.getLowerLimitOfRatedVoltage());
            export.setConstantVoltageUpperLimits(gun.getConstantVoltageUpperLimits());
            export.setConstantVoltageLowerLimits(gun.getConstantVoltageLowerLimits());
            export.setRatedCurrent(gun.getRatedCurrent());
            export.setConstantCurrentUpperLimits(gun.getConstantCurrentUpperLimits());
            export.setConstantCurrentLowerLimits(gun.getConstantCurrentLowerLimits());
            export.setInterfaceRatedPower(gun.getRatedPower());
            export.setParkingNumber(gun.getParkingNumber());
            export.setParkingStatus(gun.getParkingStatus());
            export.setParkingLockState(gun.getParkingLockState());
            export.setNationalStandard(gun.getNationalStandard());
            export.setRemark(gun.getRemark());
            export.setAuxPower(gun.getAuxPower());
            export.setOperateStatus(gun.getOpreateStatus());
            export.setOperateHours(gun.getOpreateHours());
        }
        return export;
    }
}