Browse Source

Merge remote-tracking branch 'origin/master' into prod_test

lrj 3 weeks ago
parent
commit
f8114051fc

+ 2 - 2
src/main/java/cn/cslg/pas/service/dify/OADifyService.java

@@ -265,7 +265,7 @@ public class OADifyService {
                 jsonObject1.put("nearNo", dataObject.get("nearNo"));
                 jsonObject1.put("near_index", dataObject.get("nearIndex"));
                 jsonObject1.put("novelty_innovative", dataObject.get("novelty_innovative"));
-                jsonObject1.put("changeClaim", dataObject.get("claimChange"));
+                jsonObject1.put("changeClaim", dataObject.get("changeClaim"));
                 jsonObject1.put("claim", oaParamDTO.getClaim());
                 jsonObject1.put("claimChangeSuggestion", oaParamDTO.getClaimChangeSuggestion());
             } else if (operateType.equals("3")) {
@@ -287,7 +287,7 @@ public class OADifyService {
                     jsonObject.put("claimChange", new JSONObject());
                 }
                 JSONObject jsonObject1 = (JSONObject) jsonObject.get("claimChange");
-                jsonObject1.put("claimChange", reMessage);
+                jsonObject1.put("claim", reMessage);
             } else if (operateType.equals("5")) {
                 if (obj.get("query") == null) {
                     obj.put("query", new JSONObject());

+ 1 - 0
src/main/resources/application-testNetIn.yml

@@ -87,3 +87,4 @@ DIFY:
   discoveryResultKey: app-ekzGTtvRnSq2aSqwZqKG5EH3
   aiPatentResultKey: app-75tyEOkdvARTTaAjFm3K9sKn
   url: https://ai.xsip.cn/v1/
+  OAApiKey2: app-NvKwdHvEK2UmJdmjTGDR0xu6

+ 4 - 4
src/test/java/cn/cslg/pas/DifyTest.java

@@ -14,8 +14,8 @@ import cn.cslg.pas.domain.dify.GetInstructAnswerDTO;
 import cn.cslg.pas.service.common.DifyService;
 import cn.cslg.pas.service.dify.GenerateDiscoveryResultService;
 import cn.cslg.pas.service.dify.GenerateInstructionService;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson2.JSON;
 import jakarta.json.Json;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
@@ -277,9 +277,9 @@ public class DifyTest {
 
     @Test
     public void test3() {
-        String reMessage="张三{\"aa\":123,\"b\":{}}";
-        String allText = reMessage.replaceAll("\\{[^}]*\\}", "").replaceAll("\\[[^]]*\\]", "");
-System.out.println(allText);
+        String reMessage="{\"code\":203,\"data\":{\"app_file\":{\"appNo\":\"202210142766.8\",\"guid\":\"8f996c637fcf4ee49548486958193c22\"},\"modify_file\":{\"guid\":\"\"},\"contrast_file\":[{\"index\":1,\"publicNo\":\"CN112818020A\",\"guid\":\"10556774b810428f8593aa5554a0b854\"},{\"index\":2,\"publicNo\":\"CN109542591A\",\"guid\":\"5ef5eac1fa9847e18283edef6db624be\"}]}}";
+        JSONObject dataObject = JSON.parseObject(reMessage);
+System.out.println(dataObject);
     }
 
 }