lyhzzz 8 ay önce
ebeveyn
işleme
951c5aac7c

+ 1 - 0
src/main/java/com/fdkankan/manage/mq/common/MqQueueUtil.java

@@ -14,4 +14,5 @@ public class MqQueueUtil {
     public static String RECOVER_SCENE = "recover-scene";
     public static String PANO_RECOVER_SCENE = "pano-recover-scene";
     public static String laserDeleteScene = "laser-delete-scene";
+    public static String AIRecognitionQueue = "queue-ai-recognition";
 }

+ 22 - 0
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -991,6 +991,28 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         updateWrapper3.eq(Scene::getNum,param.getNum());
         updateWrapper3.set(Scene::getFeedbackOptionId,param.getFeedbackOptionId());
         sceneService.update(updateWrapper3);
+
+        FeedbackOption feedbackOption = feedbackOptionService.getById(param.getFeedbackOptionId());
+        JSONArray aiOption = feedbackOption.getAiOption();
+        if(aiOption == null || aiOption.isEmpty()){
+            return;
+        }
+        HashMap<Object, Object> map = new HashMap<>();
+        map.put("num",param.getNum());
+        List<HashMap<String,Object>> list = new ArrayList<>();
+        for (Object object : aiOption) {
+            Integer id  = (Integer) object;
+            FeedbackOption feedbackOption1 = feedbackOptionService.getById(id);
+            if(feedbackOption1 != null && StringUtils.isNotBlank(feedbackOption1.getModelApi())){
+                HashMap<String, Object> map2 = new HashMap<>();
+                map2.put("name",feedbackOption1.getNameCn());
+                map2.put("url",feedbackOption1.getModelApi());
+                list.add(map2);
+            }
+        }
+        map.put("models",list);
+        rabbitMqProducer.sendByWorkQueue(MqQueueUtil.AIRecognitionQueue,map);
+
     }
 
     @Autowired