Commit b603ae05 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.添加easy excel配置,增加转换器,增加全局excel导出样式,增加场站下拉选解析器;
2.开发光伏电站模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 4f70c75b
......@@ -10,10 +10,23 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* 级联写入处理程序
*
* @author ZWT
* @date 2024/05/07
*/
public class CascadeWriteHandler implements SheetWriteHandler {
private List<String> largeList; // 大类的字符串集合
Map<String, List<String>> siteMap; // 大类和小类的对应关系的map集合
/**
* 大类的字符串集合
*/
private List<String> largeList;
/**
* 大类和小类的对应关系的map集合
*/
private Map<String, List<String>> siteMap;
public CascadeWriteHandler(List<String> largeList, Map<String, List<String>> siteMap) {
this.largeList = largeList;
......@@ -22,7 +35,6 @@ public class CascadeWriteHandler implements SheetWriteHandler {
@Override
public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
}
@Override
......
package pps.core.base.service.data.base_excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import pps.core.base.config.excel.ExcelSelected;
import pps.core.base.service.OilExtractionPlantImpl;
......@@ -17,72 +15,80 @@ import java.math.BigDecimal;
* @date 2024/05/07
*/
@Data
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ExcelPhotovoltaicPlantTemplate implements Serializable {
private static final long serialVersionUID = -9069694443646671657L;
/**
* 所在省
*/
@ExcelProperty(index = 0, value = "所在省")
private String province;
/**
* 所在市
*/
@ExcelProperty(index = 1, value = "所在市")
private String city;
/**
* 采油厂名称
*/
@ExcelSelected(sourceClass = OilExtractionPlantImpl.class)
@ExcelProperty(index = 0, value = "采油厂名称")
@ExcelProperty(index = 2, value = "采油厂名称")
private String ouName;
/**
* 电站名称
*/
@ExcelProperty(index = 1, value = "电站名称")
@ExcelProperty(index = 3, value = "电站名称")
private String stationName;
/**
* 逆变器出厂编号
*/
@ExcelProperty(index = 2, value = "逆变器出厂编号")
@ExcelProperty(index = 4, value = "逆变器出厂编号")
private String makerNumber;
/**
* 逆变器规格型号
*/
@ExcelProperty(index = 3, value = "逆变器规格型号")
@ExcelProperty(index = 5, value = "逆变器规格型号")
private String photovoltaicModelName;
/**
* 安装倾角(°)
*/
@ExcelProperty(index = 4, value = "安装倾角(°)")
@ExcelProperty(index = 6, value = "安装倾角(°)")
private BigDecimal mountingAngle;
/**
* 装机总量(KWP)
*/
@ExcelProperty(index = 5, value = "装机总量(KWP)")
@ExcelProperty(index = 7, value = "装机总量(KWP)")
private BigDecimal totalPower;
/**
* 阵列朝向
*/
@ExcelProperty(index = 6, value = "阵列朝向")
@ExcelProperty(index = 8, value = "阵列朝向")
private BigDecimal arrayOrientation;
/**
* 经度(°)
*/
@ExcelProperty(index = 7, value = "经度(°)")
@ExcelProperty(index = 9, value = "经度(°)")
private BigDecimal longitude;
/**
* 纬度(°)
*/
@ExcelProperty(index = 8, value = "纬度(°)")
@ExcelProperty(index = 10, value = "纬度(°)")
private BigDecimal latitude;
/**
* 高程(m)
*/
@ExcelProperty(index = 9, value = "高程(m)")
@ExcelProperty(index = 11, value = "高程(m)")
private BigDecimal elevation;
// private Integer areaCode;
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment