From bab43330bf6f48bdb7bfb258611f51bb05ef56fe Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 06 一月 2025 09:02:21 +0800
Subject: [PATCH] 动态数据长度

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/ScheduleSampleInfoConstructor.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/ScheduleSampleInfoConstructor.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/ScheduleSampleInfoConstructor.java
index bc58d7b..7ecd931 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/ScheduleSampleInfoConstructor.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/ScheduleSampleInfoConstructor.java
@@ -36,7 +36,7 @@
     }
 
     @Override
-    protected SampleInfo getColumnInfo(String modelId, Date predictTime) {
+    protected SampleInfo getColumnInfo(String modelId, Date predictTime, Map<Integer, Integer> dynamicDataLength) {
         SampleInfo sampleInfo = new SampleInfo();
         List<ColumnItemPort> resultList = new ArrayList<>();
         List<ColumnItem> columnItemList = new ArrayList<>();
@@ -49,7 +49,7 @@
         //设置当前端口号,初始值为最小端口(查询结果按端口号从小到达排列)
         int curPortOrder = modelInputParamEntityList.get(0).getModelparamportorder();
         //设置当前查询数据长度,初始值为最小端口数据长度
-        int curDataLength = modelInputParamEntityList.get(0).getDatalength();
+        int curDataLength = super.getDataLength(dynamicDataLength, curPortOrder, modelInputParamEntityList.get(0).getDatalength());
         // 统一获取测点的信息
         Set<String> pointIds = modelInputParamEntityList.stream().filter(e -> ModelParamType.getEumByCode(e.getModelparamtype()).equals(ModelParamType.DATAPOINT)).map(StScheduleModelParamEntity::getModelparamid).collect(Collectors.toSet());
         List<ApiPointDTO> points = dataPointApi.getInfoByIds(pointIds);
@@ -62,7 +62,7 @@
         for (StScheduleModelParamEntity entry : modelInputParamEntityList) {
             columnInfo.setParamType(entry.getModelparamtype());
             columnInfo.setParamId(entry.getModelparamid());
-            columnInfo.setDataLength(entry.getDatalength());
+            columnInfo.setDataLength(super.getDataLength(dynamicDataLength, entry.getModelparamportorder(), entry.getDatalength()));
             columnInfo.setModelParamOrder(entry.getModelparamorder());
             columnInfo.setModelParamPortOrder(entry.getModelparamportorder());
             columnInfo.setStartTime(getStartTime(columnInfo, predictTime,pointMap,planMap));
@@ -101,4 +101,6 @@
         return null;
     }
 
+
+
 }

--
Gitblit v1.9.3