潘志宝
2024-10-31 01d6f8f32113137b83dffa888fdd80e293457646
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java
@@ -8,6 +8,8 @@
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.influxdb.service.InfluxDBService;
import com.iailab.module.data.point.dto.DaPointDTO;
import com.iailab.module.data.point.entity.DaPointEntity;
@@ -180,11 +182,12 @@
        List<PointImportExcelVO> list = Arrays.asList(
                PointImportExcelVO.builder().pointName("测点1").pointType("MEASURE").dataType("float").valueType("SIMULATE")
                        .storeType(null).unit("t(非必填)").unittransfactor(new BigDecimal(1)).defaultValue(new BigDecimal(0)).maxValue(new BigDecimal(10000000.000000)).minValue(new BigDecimal(0))
                        .minfreqid("NET10").remark("备注(非必填)").sourceType("HTTP").sourceId("b9d0f670-2135-458f-9494-0cda4f35ec09").tagNo("SARD1200G00102RC001")
                        .minfreqid("1min").remark("备注(非必填)").sourceType(DataSourceType.HTTP.getCode())
                        .sourceName("").tagNo("SARD1200G00102RC001")
                        .build()
        );
        // 输出
        ExcelUtils.write(response, "测点导入模板.xls", "测点列表", PointImportExcelVO.class, list);
        ExcelUtils.write(response, "测点导入模板.xlsx", "测点列表", PointImportExcelVO.class, list);
    }
    @PostMapping("/import")