Quellcode durchsuchen

医保参数加入配置文件

lighter vor 4 Jahren
Ursprung
Commit
00c585e5fc

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiZyDao.java

@@ -127,7 +127,7 @@ public interface SiZyDao {
      * @return 费用明细
      */
     @Select("select detail_sn as feedetlSn, " +
-            "order_no as drordNo, " +
+            "order_no as drordNo, ori_detail_sn as initFeedetlSn, " +
             "charge_date as feeOcurTime, " +
             "charge_code_mx as medinsListCodg, " +
             "charge_fee as detItemFeeSumamt, " +

+ 2 - 2
src/main/java/thyyxxk/webserver/service/medicalinsurance/ExecService.java

@@ -113,9 +113,9 @@ public class ExecService {
         JSONObject header = new JSONObject();
         JSONObject input = new JSONObject();
         header.put("msgid", SiUtil.makeMsgId());
-        header.put("mdtrtarea_admvs", SiUtil.INSTUTUTION_AREA);
+        header.put("mdtrtarea_admvs", SiUtil.INSTITUTION_AREA);
         header.put("insuplc_admdvs", insureArea);
-        header.put("recer_sys_code", SiUtil.INSTUTUTION_AREA);
+        header.put("recer_sys_code", SiUtil.INSTITUTION_AREA);
         header.put("dev_no", "");
         header.put("dev_safe_info", "");
         header.put("cainfo", "");

+ 1 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiDownloadService.java

@@ -624,7 +624,7 @@ public class SiDownloadService {
         JSONObject input = exec.makeTradeHeader(SiFunction.DOWNLOAD_DICTIONARY_LIST);
         DldDictList data = new DldDictList();
         data.setDate(DateUtil.formatDatetime(new Date(), "yyyy-MM-dd"));
-        data.setAdmdvs(SiUtil.INSTUTUTION_AREA);
+        data.setAdmdvs(SiUtil.INSTITUTION_AREA);
         data.setParentValue(prm.getParentValue());
         data.setType(prm.getType());
         data.setValiFlag(prm.getValiFlag());

+ 17 - 13
src/main/java/thyyxxk/webserver/utils/SiUtil.java

@@ -2,7 +2,10 @@ package thyyxxk.webserver.utils;
 
 import com.alibaba.fastjson.JSONObject;
 import org.apache.commons.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
 import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Component;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.sidicts.SiFunction;
 import thyyxxk.webserver.entity.ResultVo;
@@ -19,25 +22,26 @@ import java.util.*;
  * @author: DingJie
  * @create: 2021-05-14 16:41:21
  **/
+@Component
 public class SiUtil {
     private static int serial = 1000;
     private static final int MIN_VAL = 1000;
     private static final int MAX_VAL = 9999;
     private static final String REQ_HEADER_PREFIX = "yfb-";
-    public static final String INSTUTUTION_AREA = "430105";
+    public static final String INSTITUTION_AREA = "430105";
     public static final String INSTITUTION_ID = "H43010500370";
     public static final String INSTITUTION_NAME = "长沙泰和医院";
-    public static final String API_ACCESS_KEY = "OvwSdUUS3E9c9DtcEZ87jDTbKiw3k6dEZ9oeS1";
-    public static final String API_SECRET_KEY = "SKQ42Wj9RTnlFzl53jAgkPyCTeNGeof9lwP36FN4";
-
-//    public static final String INSTUTUTION_AREA = "431122";
-//    public static final String INSTITUTION_ID = "H43112200226";
-//    public static final String INSTITUTION_NAME = "东安县人民医院";
-//    public static final String API_ACCESS_KEY = "OvwSdUUS3E9c9DtcEZ87jDTbKiw3k6dEZ9oeS1";
-//    public static final String API_SECRET_KEY = "SKQ42Wj9RTnlFzl53jAgkPyCTeNGeof9lwP36FN4";
+    private static String apiAccessKey;
+    private static String apiSecretKey;
 
     public static final String API_VERSION = "1.0.0";
 
+    @Autowired
+    public SiUtil(Environment environment) {
+        apiAccessKey = environment.getProperty("si-access-key");
+        apiSecretKey = environment.getProperty("si-secret-key");
+    }
+
     private static String timestamp() {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
         return sdf.format(new Date());
@@ -54,8 +58,8 @@ public class SiUtil {
     public static HttpHeaders getHttpHeaders(SiFunction function) {
         String timestamp = String.valueOf(System.currentTimeMillis());
         HttpHeaders headers = new HttpHeaders();
-        headers.add("_api_access_key", API_ACCESS_KEY);
-        headers.add("_api_secreKey", API_SECRET_KEY);
+        headers.add("_api_access_key", apiAccessKey);
+        headers.add("_api_secreKey", apiSecretKey);
         headers.add("_api_name", REQ_HEADER_PREFIX + function.getCode());
         headers.add("_api_version", API_VERSION);
         headers.add("_api_timestamp", timestamp);
@@ -65,7 +69,7 @@ public class SiUtil {
 
     public static String getSignature(String timestamp, String function) {
         String source =
-                "_api_access_key=" + API_ACCESS_KEY +
+                "_api_access_key=" + apiAccessKey +
                 "&_api_name=" + REQ_HEADER_PREFIX + function +
                 "&_api_timestamp=" + timestamp +
                 "&_api_version=" + API_VERSION;
@@ -75,7 +79,7 @@ public class SiUtil {
     private static String hmacSha1(String src) {
         byte[] result = null;
         try {
-            SecretKeySpec signInKey = new SecretKeySpec(API_SECRET_KEY.getBytes(), "HmacSHA1");
+            SecretKeySpec signInKey = new SecretKeySpec(apiSecretKey.getBytes(), "HmacSHA1");
             Mac mac = Mac.getInstance("HmacSHA1");
             mac.init(signInKey);
             byte[] rawHmac = mac.doFinal(src.getBytes());

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

@@ -89,6 +89,16 @@
       "name": "jmbb-url",
       "type": "java.lang.String",
       "description": "Description for jmbb-url."
+    },
+    {
+      "name": "si-access-key",
+      "type": "java.lang.String",
+      "description": "Description for si-access-key."
+    },
+    {
+      "name": "si-secret-key",
+      "type": "java.lang.String",
+      "description": "Description for si-secret-key."
     }
   ]
 }

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

@@ -1,68 +0,0 @@
-server:
-  port: 8707
-spring:
-  thymeleaf:
-    cache: false
-  datasource:
-    dynamic:
-      primary: his
-      strict: false
-      datasource:
-        his:
-          url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
-          username: "sa"
-          password:
-          type: "com.zaxxer.hikari.HikariDataSource"
-          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-        lis:
-          url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
-          username: "sa"
-          password: "hnthxyyy"
-          type: "com.zaxxer.hikari.HikariDataSource"
-          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-    hikari:
-      minimum-idle: 10
-      idle-timeout: 180000
-      maximum-pool-size: 30
-      auto-commit: true
-      pool-name: lisDbPool
-      connection-timeout: 30000
-      connection-test-query: select 1
-  rabbitmq:
-    host: 192.168.200.3
-    port: 5672
-    username: dj
-    password: 123456
-  jackson:
-    time-zone: GMT+8
-    date-format: yyyy-MM-dd HH:mm:ss
-  mvc:
-    format:
-      date: yyyy-MM-dd
-      date-time: yyyy-MM-dd HH:mm:ss
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-
-UPLOAD_BASE:
-  http://172.16.30.26
-CSSYB_BASE:
-  http://172.16.30.26:1000/cssyb/
-HNSYB_BASE:
-  http://172.16.30.26:2000/hnsyb/
-XNHYB_BASE:
-  http://172.16.30.26:3000/xnhyb/
-HNSYB_MT_INFO:
-  http://172.16.30.26:2000/shengyb/mt/getPersonInfo
-CSSYB_READ_MZ_PATIENT:
-  http://172.16.30.26:1000/mzsyb/readPatient
-CSSYB_MT_INFO:
-  http://172.16.30.26:1000/mzsyb/queryApplyInfo
-CSSYB_MT_PRE_CAL:
-  http://172.16.30.26:1000/mzsyb/mzPreCalculate
-PROOFREAD:
-  http://172.16.30.26:1111/proofread/start
-
-si-api-url: http://10.90.0.11:8081/isp/powercsb/1101
-hrg-api-url: http://172.16.30.33:8089/thmz/api/v1
-powersi-api-url: http://172.16.32.183:8916/mmg-gateway

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

@@ -20,12 +20,6 @@ spring:
           password: "hnthxyyy"
           type: "com.zaxxer.hikari.HikariDataSource"
           driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-        jimu:
-          url: "jdbc:postgresql://172.16.32.185:5432/bdp_db"
-          username: "bdp"
-          password: "Powersi$123"
-          type: "com.zaxxer.hikari.HikariDataSource"
-          driver-class-name: "org.postgresql.Driver"
     hikari:
       minimum-idle: 10
       idle-timeout: 180000
@@ -64,8 +58,10 @@ CSSYB_MT_INFO: http://172.16.32.159:1000/mzsyb/queryApplyInfo
 CSSYB_MT_PRE_CAL: http://172.16.32.159:1000/mzsyb/mzPreCalculate
 PROOFREAD: http://172.16.32.163:1111/proofread/start
 
-si-api-url: http://10.90.0.11:8081/isp/powercsb/1101
 hrg-api-url: http://webhis.thyy.cn:81/thmz/api/v1
 powersi-api-url: http://172.16.32.183:8916/mmg-gateway
 triage-notify-url: http://webhis.thyy.cn:8082/triage/roomScreen/pushMsg
-si-tj-url: http://jkglcsx.server.zhongmeihealth.com/openInter
+si-tj-url: http://jkglcsx.server.zhongmeihealth.com/openInter
+si-api-url: http://10.90.129.31:20001/isp-api/powercsb/1101
+si-access-key: 9snmKvEVZJBrAkcpgZ9075QCshQ49GH1EnB3wc
+si-secret-key: SKNEbk3E0efsrmJ3PGbClqABprNHcQZFKldR2QNP

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

@@ -8,7 +8,7 @@ spring:
     cache: false
   datasource:
     dynamic:
-      primary: his
+      primary: dev
       strict: false
       datasource:
         his:
@@ -29,12 +29,6 @@ spring:
           password:
           type: "com.zaxxer.hikari.HikariDataSource"
           driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-        jimu:
-          url: "jdbc:postgresql://172.16.32.185:5432/bdp_db"
-          username: "bdp"
-          password: "Powersi$123"
-          type: "com.zaxxer.hikari.HikariDataSource"
-          driver-class-name: "org.postgresql.Driver"
     hikari:
       minimum-idle: 10
       idle-timeout: 180000
@@ -69,30 +63,11 @@ CSSYB_READ_MZ_PATIENT: http://172.16.30.26:1000/mzsyb/readPatient
 CSSYB_MT_INFO: http://172.16.30.26:1000/mzsyb/queryApplyInfo
 CSSYB_MT_PRE_CAL: http://172.16.30.26:1000/mzsyb/mzPreCalculate
 PROOFREAD: http://172.16.30.26:1111/proofread/start
-#UPLOAD_BASE: http://172.16.32.163
-#CSSYB_UPLOAD_BASE: http://172.16.32.159
-#CSSYB_BASE: http://172.16.32.159:1000/cssyb/
-#HNSYB_BASE: http://172.16.32.163:2000/hnsyb/
-#XNHYB_BASE: http://172.16.32.163:3000/xnhyb/
-#HNSYB_MT_INFO: http://172.16.32.163:2000/shengyb/mt/getPersonInfo
-#CSSYB_READ_MZ_PATIENT: http://172.16.32.159:1000/mzsyb/readPatient
-#CSSYB_MT_INFO: http://172.16.32.159:1000/mzsyb/queryApplyInfo
-#CSSYB_MT_PRE_CAL: http://172.16.32.159:1000/mzsyb/mzPreCalculate
-#PROOFREAD: http://172.16.32.163:1111/proofread/start
-
-#si-api-url: http://10.90.0.11:8081/isp/powercsb/1101
-#si-readcard-url: http://10.90.0.23:8085/hsa-hgs-adapt/api/card/ initDll
-#si-qrcode-url: http://10.136.2.127:20004/localcfc/api/hsecfc/localQrCodeQuery
-si-api-url: http://10.90.129.31:20001/isp-api/powercsb/1101
-si-readcard-url: http://10.90.129.18:20001/hsa-hgs-adapt/api/card/initDll
-si-qrcode-url: http://10.136.2.127:9800/localcfc/api/hsecfc/localQrCodeQuery
 
-#hrg-api-url: http://webhis.thyy.cn:81/thmz/api/v1
 hrg-api-url: http://172.16.30.33:8089/thmz/api/v1
 powersi-api-url: http://172.16.32.183:8916/mmg-gateway
 triage-notify-url: http://localhost:8083/triage/roomScreen/pushMsg
 si-tj-url: http://jkglcsx.server.zhongmeihealth.com/openInter
-#logging:
-#  level:
-#    thyyxxk.webserver.dao: debug
-
+si-api-url: http://10.90.129.31:20001/isp-api/powercsb/1101
+si-access-key: OvwSdUUS3E9c9DtcEZ87jDTbKiw3k6dEZ9oeS1
+si-secret-key: SKQ42Wj9RTnlFzl53jAgkPyCTeNGeof9lwP36FN4