Browse Source

冠状问诊配置添加

rengb 5 years ago
parent
commit
9aa54b395e

+ 6 - 1
config-server/src/main/resources/shared/znwz-service-local.yml

@@ -102,4 +102,9 @@ imageUrl:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 12
+
+nali:
+  apiUrl: http://116.62.170.131:8096/openapi-devtest/gateway
+  appKey: ngari5e34e52511dc394f
+  appSecret: 11dc394fc05518c1

+ 6 - 1
config-server/src/main/resources/shared/znwz-service-pre.yml

@@ -102,4 +102,9 @@ imageUrl:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 12
+
+nali:
+  apiUrl: https://openapi.ngarihealth.com/openapi/gateway
+  appKey: ngari5e3517480e980e6e
+  appSecret: 0e980e6e502ab074

+ 6 - 1
config-server/src/main/resources/shared/znwz-service-pro.yml

@@ -102,4 +102,9 @@ imageUrl:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 12
+
+nali:
+  apiUrl: https://openapi.ngarihealth.com/openapi/gateway
+  appKey: ngari5e3517480e980e6e
+  appSecret: 0e980e6e502ab074

+ 6 - 1
config-server/src/main/resources/shared/znwz-service-test.yml

@@ -102,4 +102,9 @@ imageUrl:
 
 io.github.lvyahui8.spring:
   base-packages: com.diagbot.aggregate
-  thread-number: 12
+  thread-number: 12
+
+nali:
+  apiUrl: http://116.62.170.131:8096/openapi-devtest/gateway
+  appKey: ngari5e34e52511dc394f
+  appSecret: 11dc394fc05518c1

+ 10 - 5
znwz-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java

@@ -17,6 +17,7 @@ import com.diagbot.util.StringUtil;
 import com.diagbot.vo.SaveInquiryVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -37,6 +38,12 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
     @Autowired
     @Qualifier("inquiryDetailServiceImpl")
     private InquiryDetailServiceImpl inquiryDetailService;
+    @Value("${nali.apiUrl}")
+    private String apiUrl;
+    @Value("${nali.appKey}")
+    private String appKey;
+    @Value("${nali.appSecret}")
+    private String appSecret;
 
     public SaveInquiryDTO saveInquiry(SaveInquiryVO saveInquiryVO) {
         SaveInquiryDTO saveInquiryDTO = new SaveInquiryDTO();
@@ -65,9 +72,6 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
     private String getUrl(SaveInquiryVO saveInquiryVO) {
         String retUrl = null;
         try {
-            String apiUrl = "http://116.62.170.131:8096/openapi-devtest/gateway";
-            String appKey = "ngari5e34e52511dc394f";
-            String appSecret = "11dc394fc05518c1";
             String encodingAesKey = "";
             Client client = new Client(apiUrl, appKey, appSecret, encodingAesKey);
             Response response = client.execute(getltcs(saveInquiryVO));
@@ -99,8 +103,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
         body.put("doctorId", Integer.parseInt(saveInquiryVO.getDoctorId()));
         body.put("mpiId", saveInquiryVO.getMpiId());
         body.put("appId", saveInquiryVO.getAppId());
-        body.put("diagnosis", saveInquiryVO.getDiagnosis());
-
+        if (saveInquiryVO.getDepartment().equals("全科")){
+            body.put("diagnosis", saveInquiryVO.getDiagnosis());
+        }
         bodyList.add(body);
 
         //X-Service-Id对应的值