From 7fce3006ecd0b670e33c2d3ba123778e79e2e943 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 06 一月 2025 09:18:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/PredictItemFactory.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/PredictItemFactory.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/PredictItemFactory.java
index 1290ff6..8cd3320 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/PredictItemFactory.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/PredictItemFactory.java
@@ -1,6 +1,8 @@
 package com.iailab.module.model.mdk.factory;
 
 import com.iailab.module.model.mcs.pre.entity.MmItemTypeEntity;
+import com.iailab.module.model.mcs.pre.service.MmItemTypeService;
+import com.iailab.module.model.mdk.predict.PredictItemHandler;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
@@ -17,7 +19,7 @@
     private ApplicationContext applicationContext;
 
     @Autowired
-    private ItemEntityFactory itemEntityFactory;
+    private MmItemTypeService mmItemTypeService;
 
     /**
      * 根据预测项实体创建对应的预测项对象
@@ -25,16 +27,16 @@
      * @param itemId
      * @return
      */
-    public Object create(String itemId) {
-        MmItemTypeEntity itemTypeEntity = itemEntityFactory.getMmItemTypeEntity(itemId);
+    public PredictItemHandler create(String itemId) {
+        MmItemTypeEntity itemTypeEntity = mmItemTypeService.getItemTypeByItemId(itemId);
         //获取预测项的预测程序的类
         Object itemObject = null;
         try {
-            Class clazz = Class.forName(itemTypeEntity.getItemclasstype());
+            Class<?> clazz = Class.forName(itemTypeEntity.getItemclasstype());
             itemObject = applicationContext.getBean(clazz);
         } catch (Exception e) {
             log.error("exception message : {}", e.getMessage());
         }
-        return itemObject;
+        return (PredictItemHandler) itemObject;
     }
 }

--
Gitblit v1.9.3