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; ...@@ -10,10 +10,23 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
* 级联写入处理程序
*
* @author ZWT
* @date 2024/05/07
*/
public class CascadeWriteHandler implements SheetWriteHandler { 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) { public CascadeWriteHandler(List<String> largeList, Map<String, List<String>> siteMap) {
this.largeList = largeList; this.largeList = largeList;
...@@ -22,7 +35,6 @@ public class CascadeWriteHandler implements SheetWriteHandler { ...@@ -22,7 +35,6 @@ public class CascadeWriteHandler implements SheetWriteHandler {
@Override @Override
public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) { public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
} }
@Override @Override
......
package pps.core.base.service.data.base_excel; package pps.core.base.service.data.base_excel;
import com.alibaba.excel.annotation.ExcelProperty; 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 lombok.Data;
import pps.core.base.config.excel.ExcelSelected; import pps.core.base.config.excel.ExcelSelected;
import pps.core.base.service.OilExtractionPlantImpl; import pps.core.base.service.OilExtractionPlantImpl;
...@@ -17,72 +15,80 @@ import java.math.BigDecimal; ...@@ -17,72 +15,80 @@ import java.math.BigDecimal;
* @date 2024/05/07 * @date 2024/05/07
*/ */
@Data @Data
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ExcelPhotovoltaicPlantTemplate implements Serializable { public class ExcelPhotovoltaicPlantTemplate implements Serializable {
private static final long serialVersionUID = -9069694443646671657L; private static final long serialVersionUID = -9069694443646671657L;
/**
* 所在省
*/
@ExcelProperty(index = 0, value = "所在省")
private String province;
/**
* 所在市
*/
@ExcelProperty(index = 1, value = "所在市")
private String city;
/** /**
* 采油厂名称 * 采油厂名称
*/ */
@ExcelSelected(sourceClass = OilExtractionPlantImpl.class) @ExcelSelected(sourceClass = OilExtractionPlantImpl.class)
@ExcelProperty(index = 0, value = "采油厂名称") @ExcelProperty(index = 2, value = "采油厂名称")
private String ouName; private String ouName;
/** /**
* 电站名称 * 电站名称
*/ */
@ExcelProperty(index = 1, value = "电站名称") @ExcelProperty(index = 3, value = "电站名称")
private String stationName; private String stationName;
/** /**
* 逆变器出厂编号 * 逆变器出厂编号
*/ */
@ExcelProperty(index = 2, value = "逆变器出厂编号") @ExcelProperty(index = 4, value = "逆变器出厂编号")
private String makerNumber; private String makerNumber;
/** /**
* 逆变器规格型号 * 逆变器规格型号
*/ */
@ExcelProperty(index = 3, value = "逆变器规格型号") @ExcelProperty(index = 5, value = "逆变器规格型号")
private String photovoltaicModelName; private String photovoltaicModelName;
/** /**
* 安装倾角(°) * 安装倾角(°)
*/ */
@ExcelProperty(index = 4, value = "安装倾角(°)") @ExcelProperty(index = 6, value = "安装倾角(°)")
private BigDecimal mountingAngle; private BigDecimal mountingAngle;
/** /**
* 装机总量(KWP) * 装机总量(KWP)
*/ */
@ExcelProperty(index = 5, value = "装机总量(KWP)") @ExcelProperty(index = 7, value = "装机总量(KWP)")
private BigDecimal totalPower; private BigDecimal totalPower;
/** /**
* 阵列朝向 * 阵列朝向
*/ */
@ExcelProperty(index = 6, value = "阵列朝向") @ExcelProperty(index = 8, value = "阵列朝向")
private BigDecimal arrayOrientation; private BigDecimal arrayOrientation;
/** /**
* 经度(°) * 经度(°)
*/ */
@ExcelProperty(index = 7, value = "经度(°)") @ExcelProperty(index = 9, value = "经度(°)")
private BigDecimal longitude; private BigDecimal longitude;
/** /**
* 纬度(°) * 纬度(°)
*/ */
@ExcelProperty(index = 8, value = "纬度(°)") @ExcelProperty(index = 10, value = "纬度(°)")
private BigDecimal latitude; private BigDecimal latitude;
/** /**
* 高程(m) * 高程(m)
*/ */
@ExcelProperty(index = 9, value = "高程(m)") @ExcelProperty(index = 11, value = "高程(m)")
private BigDecimal elevation; 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