From 271fed395d4d3e4ab8cdb44ccf466859ba485e46 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 09 一月 2025 17:45:33 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java index 47c8268..32e0930 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java @@ -28,22 +28,12 @@ @Autowired private SampleFactory sampleFactory; - public List<SampleData> constructSample(String typeA, String modelId, Date runTime,String itemName, Map<Integer, Integer> dynamicDataLength) throws ModelInvokeException { + public List<SampleData> constructSample(String typeA, String modelId, Date runTime,String itemName, + Map<Integer, Integer> dynamicDataLength) throws ModelInvokeException { try { SampleInfoConstructor sampleInfoConstructor = sampleFactory.createSampleInfo(typeA, modelId); - SampleInfo sampleInfo = sampleInfoConstructor.prepareSampleInfo(modelId, runTime); - if (!CollectionUtils.isEmpty(dynamicDataLength) && sampleInfo.getColumnInfo() != null) { - for(ColumnItemPort columnInfo : sampleInfo.getColumnInfo()) { - if (!dynamicDataLength.containsKey(columnInfo.getPortOrder())) { - continue; - } - columnInfo.setDataLength(dynamicDataLength.get(columnInfo.getPortOrder())); - columnInfo.getColumnItemList().forEach(columnItem -> { - columnItem.setDataLength(columnInfo.getDataLength()); - }); - } - } - SampleDataConstructor sampleDataConstructor = sampleFactory.createSampelData(typeA); + SampleInfo sampleInfo = sampleInfoConstructor.prepareSampleInfo(modelId, runTime, dynamicDataLength); + SampleDataConstructor sampleDataConstructor = sampleFactory.createSampleData(typeA); return sampleDataConstructor.prepareSampleData(sampleInfo); } catch (Exception e) { e.printStackTrace(); -- Gitblit v1.9.3