Commit aaf5403d authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.添加easy excel配置,增加转换器,增加全局excel导出样式,增加场站下拉选解析器;
2.开发光伏电站模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
3.间开制度管理模块新增设为基础制度开关接口,添加线上接口文档并完成接口冒烟测试;
4.开发井口配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
5.开发第三方有功功率历史数据导入接口,增加模板配置类,添加线上接口文档并完成接口冒烟测试;
6.开发给长庆使用的获取第三方认证token接口,验证获取token后是否能正常跳转指定页面,创建长庆用演示用户及角色;
7.开发柴发设备配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
8.开发储能设备配置模板导出接口,增加模板导出类,并完成接口冒烟测试及接口文档;
9.开发柴发设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
10.开发井口设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
11.开发光伏电站设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
12.开发储能设备配置导入接口,增加字段校验功能,并完成接口冒烟测试及接口文档;
13.基础信息配置模块,修改光伏电站分页查询列表接口,增加排序逻辑,按照组织机构名称和电站名称升序排序;
14.基础信息配置模块,修改光伏电站模板导出接口,修改导出逻辑,不只是导出模板,增加查询条件,按条件及模板格式导出当前页电站数据;
15.基础信息配置模块,修改井口配置分页查询列表接口,增加按井号模糊搜索逻辑,增加排序逻辑,按照组织机构名称和井号升序排序;
16.基础信息配置模块,修改井口模板导出接口,修改导出逻辑,不只是导出模板,增加查询条件,按条件及模板格式导出当前页井口数据;
17.基础信息配置模块,修改柴发设备分页查询列表接口,增加排序逻辑,按照组织机构名称和设备名称升序排序;
18.基础信息配置模块,修改柴发设备模板导出接口,修改导出逻辑,不只是导出模板,增加查询条件,按条件及模板格式导出当前页柴发设备数据;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 9f5ac4d7
......@@ -13,6 +13,8 @@ import pps.cloud.system.service.data.sys_organization.GetSysOrganizationViewOutp
import pps.core.base.entity.*;
import pps.core.base.enums.BusinessError;
import pps.core.base.mapper.*;
import pps.core.base.service.data.base_diesel_generator.QueryBaseDieselGeneratorInput;
import pps.core.base.service.data.base_diesel_generator.QueryBaseDieselGeneratorOutput;
import pps.core.base.service.data.base_excel.ExcelDieselGeneratorTemplate;
import pps.core.base.service.data.base_excel.ExcelEnergyStorageDeviceTemplate;
import pps.core.base.service.data.base_excel.ExcelPhotovoltaicPlantTemplate;
......@@ -64,7 +66,8 @@ public class ExcelService {
* 光伏电站配置导出
*
* @param context 上下文
* @return {@link XFileResult}
* @param input 输入
* @return {@link XFileResult }
*/
@XText("光伏电站配置导出")
@XApiGet
......@@ -134,7 +137,8 @@ public class ExcelService {
* 井口配置导出
*
* @param context 上下文
* @return {@link XFileResult}
* @param input 输入
* @return {@link XFileResult }
*/
@XText("井口配置导出")
@XApiGet
......@@ -179,11 +183,36 @@ public class ExcelService {
* 柴发设备配置导出
*
* @param context 上下文
* @return {@link XFileResult}
* @param input 输入
* @return {@link XFileResult }
*/
@XText("柴发设备配置导出")
@XApiGet(anonymous = true)
public XFileResult exportDieselGenerator(XContext context) {
@XApiGet
public XFileResult exportDieselGenerator(XContext context, QueryBaseDieselGeneratorInput input) {
//分页条件查询柴发设备列表
List<ExcelDieselGeneratorTemplate> list;
List<QueryBaseDieselGeneratorOutput> items = context.getBean(BaseDieselGeneratorService.class)
.queryBaseDieselGenerator(context, input)
.getResult()
.getItems();
if (CollUtil.isNotEmpty(items)) {
list = new ArrayList<>(items.size());
//封装并填充数据
for (QueryBaseDieselGeneratorOutput item : items) {
list.add(
ExcelDieselGeneratorTemplate.builder()
.ouName(item.getOuName())
.deviceName(item.getDeviceName())
.makerNumber(item.getMakerNumber())
.unitTypeName(item.getUnitTypeName())
.normalPower(item.getNormalPower().toString())
.standbyPower(item.getStandbyPower().toString())
.build()
);
}
} else {
list = Collections.emptyList();
}
String fileSavePath = XStorageTool.getAbsolutePath("/temp/excel/柴发设备配置模板.xlsx");
//生成模板
EasyExcelFactory.write(FileUtil.touch(fileSavePath))
......@@ -191,7 +220,7 @@ public class ExcelService {
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
.autoCloseStream(Boolean.TRUE)
.build()
.write(Collections.emptyList(),
.write(list,
EasyExcelUtil.writeSelectedSheet(ExcelDieselGeneratorTemplate.class, 0, "柴发设备配置")
).finish();
return XFileResult.success(XFileType.APPLICATION_XLSX, fileSavePath);
......
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