From 4be7d863a161b64f8592a789d699e807545e7dc6 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 15 十一月 2024 16:46:12 +0800 Subject: [PATCH] 计划数据 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java index efc7dce..e4d79db 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java @@ -1,6 +1,5 @@ package com.iailab.module.data.point.controller.admin; -import com.fasterxml.jackson.annotation.JsonFormat; import com.iailab.framework.apilog.core.annotation.ApiAccessLog; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageParam; @@ -8,11 +7,12 @@ import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.framework.excel.core.util.ExcelUtils; import com.iailab.module.data.api.dto.ApiPointValueQueryDTO; -import com.iailab.module.data.channel.common.service.ChannelSourceService; import com.iailab.module.data.common.enums.DataSourceType; +import com.iailab.module.data.common.enums.DataTypeEnum; +import com.iailab.module.data.common.enums.MeasureValueType; import com.iailab.module.data.influxdb.service.InfluxDBService; +import com.iailab.module.data.point.common.PointTypeEnum; import com.iailab.module.data.point.dto.DaPointDTO; -import com.iailab.module.data.point.entity.DaPointEntity; import com.iailab.module.data.point.service.DaPointService; import com.iailab.module.data.point.vo.*; import io.swagger.v3.oas.annotations.Operation; @@ -34,8 +34,8 @@ import java.text.SimpleDateFormat; import java.util.*; -import static com.iailab.framework.common.pojo.CommonResult.success; import static com.iailab.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static com.iailab.framework.common.pojo.CommonResult.success; /** @@ -180,14 +180,14 @@ public void importTemplate(HttpServletResponse response) throws IOException { // 手动创建导出 demo List<PointImportExcelVO> list = Arrays.asList( - PointImportExcelVO.builder().pointName("测点1").pointType("MEASURE").dataType("float").valueType("SIMULATE") + PointImportExcelVO.builder().pointName("测点1").pointType(PointTypeEnum.MEASURE_POINT.getCode()).dataType(DataTypeEnum.FLOAT.getCode()).valueType(MeasureValueType.SIMULATE.getCode()) .storeType(null).unit("t(非必填)").unittransfactor(new BigDecimal(1)).defaultValue(new BigDecimal(0)).maxValue(new BigDecimal(10000000.000000)).minValue(new BigDecimal(0)) .minfreqid("1min").remark("备注(非必填)").sourceType(DataSourceType.HTTP.getCode()) .sourceName("").tagNo("SARD1200G00102RC001") .build() ); // 输出 - ExcelUtils.write(response, "测点导入模板.xlsx", "测点列表", PointImportExcelVO.class, list); + ExcelUtils.write(response, "测点导入模板.xlsx", "测点列表", PointImportExcelVO.class, list,true); } @PostMapping("/import") -- Gitblit v1.9.3