Browse Source

Merge branch 'dev-1.1.4' of https://172.16.32.165/hurugang/thmz_system into dev-1.1.4

hurugang 2 years ago
parent
commit
dcb4dc694f

+ 17 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/YpZdDictController.java

@@ -1,5 +1,6 @@
 package cn.hnthyy.thmz.controller.mz;
 
+import cn.hnthyy.thmz.Utils.HttpUtil;
 import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.common.Constants;
 import cn.hnthyy.thmz.entity.his.yp.YpBaseYf;
@@ -12,8 +13,10 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
+import java.net.URLEncoder;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -32,6 +35,9 @@ public class YpZdDictController {
     @Autowired
     private YpBaseYfService ypBaseYfService;
 
+    @Value("${hiDrugPostUrl}")
+    private String hiDrugPostUrl;
+
     /**
      * 根据药品编码和规格查询药品信息
      * @param code 药品编码
@@ -198,6 +204,17 @@ public class YpZdDictController {
             ypZdDictService.saveYpZdDict(ypZdDict);
             resultMap.put("code", 0);
             resultMap.put("message", "保存药品信息成功");
+            // 增加医保药品报销比例的调用
+            try {
+                YpZdDict zd = ypZdDictService.queryYpZdDictByCodeAndSerial(ypZdDict.getCode(), ypZdDict.getSerial());
+                if(null != zd.getNationalCode() && !"".equals(zd.getNationalCode())){
+                    String naCode = URLEncoder.encode(zd.getNationalCode(), "UTF-8");
+                    HttpUtil.sendHttpGet(hiDrugPostUrl + naCode, "utf-8", 3000);
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
             return resultMap;
         } catch (Exception e) {
             log.error("保存药品信息失败,错误信息{}", e);

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

@@ -164,4 +164,7 @@ webSocketServiceUrl: "http://172.16.30.22:9000/api/v1/sendMessage"
 rationalUseOfMedicineUrl: "http://172.16.32.121:8016/Audit.ashx"
 
 #智能银行接口地址
-misPossUrl:  "http://172.16.32.201:8080/ccbmis/transaction/"
+misPossUrl:  "http://172.16.32.201:8080/ccbmis/transaction/"
+
+#调用医保药品更新最新报销比例测试地址
+hiDrugPostUrl: "http://172.16.30.26:8706/nationalMatch/queryPsnPayProp?hiListCode="

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

@@ -162,4 +162,7 @@ webSocketServiceUrl: "http://172.16.32.161:9000/api/v1/sendMessage"
 rationalUseOfMedicineUrl: "http://172.16.32.121:8016/Audit.ashx"
 
 #智能银行接口地址
-misPossUrl: "http://172.16.32.201:8080/ccbmis/transaction/"
+misPossUrl: "http://172.16.32.201:8080/ccbmis/transaction/"
+
+#调用医保药品更新最新报销比例地址
+hiDrugPostUrl: "http://webhis.thyy.cn:8706/nationalMatch/queryPsnPayProp?hiListCode="