From 52e71d8b89b1cf8f9b618a26b9f4052cd70bc530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=90=91=E6=96=8C?= <574110378@qq.com> Date: Sun, 15 Oct 2023 10:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ocr/controller/OcrSimulatorController.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrSimulatorController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrSimulatorController.java index 727a0f4..ea1c52b 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrSimulatorController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrSimulatorController.java @@ -24,6 +24,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -77,6 +78,15 @@ public class OcrSimulatorController{ ocrIdentifyDetail.setImageUrl(uploadFilePath + "/" + image);//图片地址 semanticRequestBody.put("img_path", uploadFilePath + "/" + image); } + if(ocrIdentify.getTaskType()!=null&&ocrIdentify.equals("1699246961812586497")){ + semanticRequestBody.put("scenes",1); + List schema=new ArrayList<>(); + schema.add("姓名");schema.add("年龄");schema.add("主要症状");schema.add("体征");schema.add("入院时主要症状和体征"); + semanticRequestBody.put("schema",schema); + }else{ + semanticRequestBody.put("scenes",0); + } + JSONObject semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, semanticRequestBody); //执行时间 调整小数点 Double nluTime = semanticResponseJson.getDouble("nlu_time");