From 50084de4a140dece61019b64fd91df041d242e47 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 23 十二月 2024 15:28:53 +0800
Subject: [PATCH] getInfoByIds(Set<String> pointIds) 模型输入计划数据获取、补全 模型输入mergeitem存默认生成的outputid sampleInfo.setPointMap 避免重复查询point

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleConstructor.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 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 ce7dd8b..19d75fd 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
@@ -1,6 +1,7 @@
 package com.iailab.module.model.mdk.sample;
 
 import com.iailab.module.model.mdk.common.exceptions.DataAccessException;
+import com.iailab.module.model.mdk.common.exceptions.ModelInvokeException;
 import com.iailab.module.model.mdk.sample.dto.SampleData;
 import com.iailab.module.model.mdk.sample.dto.SampleInfo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -24,18 +25,15 @@
     @Autowired
     private SampleFactory sampleFactory;
 
-    public List<SampleData> constructSample(String typeA, String modelId, Date runTime) {
+    public List<SampleData> constructSample(String typeA, String modelId, Date runTime,String itemName) throws ModelInvokeException {
         try {
             SampleInfoConstructor sampleInfoConstructor = sampleFactory.createSampleInfo(typeA, modelId);
             SampleInfo sampleInfo = sampleInfoConstructor.prepareSampleInfo(modelId, runTime);
             SampleDataConstructor sampleDataConstructor = sampleFactory.createSampelData(typeA);
             return sampleDataConstructor.prepareSampleData(sampleInfo);
         } catch (Exception e) {
-            DataAccessException exception = new DataAccessException(MessageFormat.format("{0},类名为{1}",
-                    DataAccessException.errorDataAccess, Thread.currentThread().getStackTrace()[1].getClassName()));
-            System.out.println(exception);
-            e.printStackTrace();
-            return null;
+            throw new ModelInvokeException(MessageFormat.format("{0},Name:{1}",
+                    ModelInvokeException.errorGetModelArithParam, itemName));
         }
 
 

--
Gitblit v1.9.3