Procházet zdrojové kódy

1、相似匹配,传req_id问题。

guanzi před 4 roky
rodič
revize
b09d53c79c

+ 4 - 1
src/main/java/com/pavis/ai/app/fjsocrasy/service/impl/OcrServiceImpl.java

@@ -74,7 +74,8 @@ public class OcrServiceImpl implements OcrService {
 //        int countFlag = Integer.valueOf(toSelShuntByType("-1").get(0).getRemarks());
         int countFlag = Integer.valueOf(toSelShuntByType(fileType).get(0).getRemarks());
         List<Shunt> shunts = toSelShuntByType(fileType);
-        String shuntType = AipOcrUtils.checkLocalOrAli(shunts, countFlag);
+//        String shuntType = AipOcrUtils.checkLocalOrAli(shunts, countFlag);
+        String shuntType = "0";
         log.info("shuntType调取结果为:{}", shuntType);
         Map<String, Object> ocrMap = toOcrMap(reqId, fileType, url, fileName, data, startTime, shuntType);
         // todo 等于数据库存取的proportion如:100时,置为0;可从数据库获取,按照比例来。
@@ -736,6 +737,8 @@ public class OcrServiceImpl implements OcrService {
 //        matchMap.put("recommends", fileType.equals("3") ? JSON.toJSONString(recommendInfoService.findRecomInfo()) : "[]");
 //        matchMap.put("req_id", reqId);
         matchMap = uploadService.link(bo, ocr, fileType);
+        matchMap.remove("req_id");
+        matchMap.put("req_id",reqId);
         return matchMap;
     }
 

+ 3 - 2
src/main/resources/application-dev.yml

@@ -50,9 +50,10 @@ logging:
     com.pavis.ai.app.fjsocrasy.mapper: debug
 alg-client:
   # 测试时使用,与测试环境保持一致.
-  internal: http://180.76.146.227:8099
+#  internal: http://180.76.146.227:8099
 #  internal: http://180.76.146.227:8089
 #  internal: http://47.104.109.52:8099
   # 使用场景: 生产环境部署时,调试后再上线.
-#  internal: http://47.104.109.52:8089
+  internal: http://47.104.109.52:8089
+  # 先上回调。
   eternal: http://192.168.1.27:8000

+ 4 - 4
src/main/resources/application.yml

@@ -1,15 +1,15 @@
 server:
 #  测试环境
-#  port: 8000
+  port: 8000
 #  生产环境
-  port: 18000
+#  port: 18000
 spring:
   application:
     name: fujisu-ocr-server
   profiles:
-#    active: dev
+    active: dev
 #    active: test
-    active: prod
+#    active: prod
   servlet:
     multipart:
       max-file-size: 50MB

+ 2 - 2
target/classes/application-dev.yml

@@ -50,9 +50,9 @@ logging:
     com.pavis.ai.app.fjsocrasy.mapper: debug
 alg-client:
   # 测试时使用,与测试环境保持一致.
-  internal: http://180.76.146.227:8099
+#  internal: http://180.76.146.227:8099
 #  internal: http://180.76.146.227:8089
 #  internal: http://47.104.109.52:8099
   # 使用场景: 生产环境部署时,调试后再上线.
-#  internal: http://47.104.109.52:8089
+  internal: http://47.104.109.52:8089
   eternal: http://192.168.1.27:8000

+ 4 - 4
target/classes/application.yml

@@ -1,15 +1,15 @@
 server:
 #  测试环境
-#  port: 8000
+  port: 8000
 #  生产环境
-  port: 18000
+#  port: 18000
 spring:
   application:
     name: fujisu-ocr-server
   profiles:
-#    active: dev
+    active: dev
 #    active: test
-    active: prod
+#    active: prod
   servlet:
     multipart:
       max-file-size: 50MB

binární
target/classes/com/pavis/ai/app/fjsocrasy/service/impl/OcrServiceImpl.class


binární
target/fjs-ocr-asy-1.0.0.jar


binární
target/fjs-ocr-asy-1.0.0.jar.original