Browse Source

医保前期配置

lighter 4 years ago
parent
commit
d275906d11

+ 4 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/MedicalInsuranceService.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.service.medicalinsurance;
 
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 import thyyxxk.webserver.constants.MedicalInsuranceFunction;
@@ -17,6 +18,8 @@ import thyyxxk.webserver.utils.SiMsgIdUtil;
 @Slf4j
 @Service
 public class MedicalInsuranceService {
+    @Value("si-api-url")
+    private String siApiUrl;
 
     public ResultVo<JSONObject> obtainBasicPersonInfo(String socialNo, String name) {
         JSONObject header = makeParamHeader(MedicalInsuranceFunction.OBTAIN_BASIC_PERSON_INFO);
@@ -30,6 +33,7 @@ public class MedicalInsuranceService {
         param.put("psn_name", name);
         header.getJSONObject("input").put("data", param);
         RestTemplate template = new RestTemplate();
+        JSONObject result = template.postForObject(siApiUrl, param, JSONObject.class);
         return null;
     }
 

+ 5 - 0
src/main/resources/META-INF/additional-spring-configuration-metadata.json

@@ -49,6 +49,11 @@
       "name": "hrg-api-url",
       "type": "java.lang.String",
       "description": "Description for hrg-api-url."
+    },
+    {
+      "name": "si-api-url",
+      "type": "java.lang.String",
+      "description": "医保中心地址."
     }
   ]
 }

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

@@ -62,3 +62,6 @@ CSSYB_MT_PRE_CAL:
   http://172.16.30.26:1000/mzsyb/mzPreCalculate
 PROOFREAD:
   http://172.16.30.26:1111/proofread/start
+
+si-api-url: https://www.baidu.com
+hrg-api-url: http://172.16.30.33:8089/thmz/api/v1

+ 3 - 0
src/main/resources/application-prod.yml

@@ -65,3 +65,6 @@ CSSYB_MT_PRE_CAL:
   http://172.16.32.163:1000/mzsyb/mzPreCalculate
 PROOFREAD:
   http://172.16.32.163:1111/proofread/start
+
+si-api-url: https://www.baidu.com
+hrg-api-url: http://webhis.thyy.cn:81/thmz/api/v1

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

@@ -77,4 +77,5 @@ CSSYB_MT_PRE_CAL:
 PROOFREAD:
   http://172.16.30.26:1111/proofread/start
 
+si-api-url: https://www.baidu.com
 hrg-api-url: http://webhis.thyy.cn:81/thmz/api/v1