不分第三方配置文件合并

debug
王绍全 2 weeks ago
parent 777e14d9e0
commit 4f46a5e256
  1. 4
      src/main/java/com/ynxbd/common/service/MiddleOfficeService.java
  2. 36
      src/main/java/com/ynxbd/wx/config/MiddleOfficeConfig.java
  3. 6
      src/main/resources/middle-office.properties
  4. 2
      src/main/resources/sms-config.xml
  5. 20
      src/main/resources/xbd-config.xml

@ -18,7 +18,7 @@ public class MiddleOfficeService {
public void req_his_JH0104(String soapUrl, String hisMedSoapMdUrl, Map<String, Object> params, String transactionCode, String result) { public void req_his_JH0104(String soapUrl, String hisMedSoapMdUrl, Map<String, Object> params, String transactionCode, String result) {
try { try {
if (HospEnum.红河州人民医院.isHosp()) { if (HospEnum.红河州人民医院.isHosp()) {
if (MiddleOfficeConfig.MIDDLE_OFFICE_URL != null) { //平台数据上传 if (MiddleOfficeConfig.URL != null) { //平台数据上传
String reqId = SnowHelper.nextStrId(); String reqId = SnowHelper.nextStrId();
MiddleOfficeConfig.run(soapUrl, "<Request>" + SoapHelper.requestParams("HIS", null, reqId, params) + "</Request>", hisMedSoapMdUrl, transactionCode, result); MiddleOfficeConfig.run(soapUrl, "<Request>" + SoapHelper.requestParams("HIS", null, reqId, params) + "</Request>", hisMedSoapMdUrl, transactionCode, result);
if ("7004".equals(transactionCode) && JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS) != null) { if ("7004".equals(transactionCode) && JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS) != null) {
@ -34,7 +34,7 @@ public class MiddleOfficeService {
public void reg_JH0105(String treatNum) { public void reg_JH0105(String treatNum) {
if (HospEnum.红河州人民医院.isHosp()) { if (HospEnum.红河州人民医院.isHosp()) {
if (MiddleOfficeConfig.MIDDLE_OFFICE_URL != null) { if (MiddleOfficeConfig.URL != null) {
MiddleOfficeConfig.uploadTreatNum("JH0105", treatNum); MiddleOfficeConfig.uploadTreatNum("JH0105", treatNum);
} }
} }

@ -1,7 +1,7 @@
package com.ynxbd.wx.config; package com.ynxbd.wx.config;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.helper.ProperHelper; import com.ynxbd.common.helper.common.XmlConfigHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import okhttp3.*; import okhttp3.*;
@ -22,20 +22,20 @@ public class MiddleOfficeConfig {
} }
// 佳禾美康数据上传链接 // 佳禾美康数据上传链接
public static final String MIDDLE_OFFICE_URL; public static final String URL;
public static final String MIDDLE_OFFICE_URL_ESB; public static final String URL_ESB;
public static final String MIDDLE_OFFICE_HOSPITAL; public static final String HOSPITAL;
public static final String MIDDLE_OFFICE_ITEM_NAME; public static final String ITEM_NAME;
public static final boolean IS_LOG_RESP; public static final boolean IS_LOG_RESP;
static { static {
ProperHelper config = new ProperHelper().read("middle-office.properties"); XmlConfigHelper config = new XmlConfigHelper().read("xbd-config.xml", "jhmk_middle_office");
MIDDLE_OFFICE_URL = config.getString("middle_office_url"); URL = config.getString("url");
MIDDLE_OFFICE_HOSPITAL = config.getString("middle_office_hospital"); URL_ESB = config.getString("url_esb");
MIDDLE_OFFICE_URL_ESB = config.getString("middle_office_url_esb"); HOSPITAL = config.getString("hospital");
MIDDLE_OFFICE_ITEM_NAME = config.getString("middle_office_item_name"); ITEM_NAME = config.getString("item_name");
IS_LOG_RESP = config.getBoolean("middle_office.is_log_resp", false); IS_LOG_RESP = config.getBoolean("is_log_resp", false);
} }
public static void run(String soapUrl, String requestData, String mdUrl, String transactionCode, String responseResult) { public static void run(String soapUrl, String requestData, String mdUrl, String transactionCode, String responseResult) {
@ -97,8 +97,8 @@ public class MiddleOfficeConfig {
JSONObject head = new JSONObject(); JSONObject head = new JSONObject();
JSONObject body = new JSONObject(); JSONObject body = new JSONObject();
head.put("hospital", MIDDLE_OFFICE_HOSPITAL); head.put("hospital", HOSPITAL);
head.put("itemName", MIDDLE_OFFICE_ITEM_NAME); head.put("itemName", ITEM_NAME);
head.put("interface", interfaceName); head.put("interface", interfaceName);
body.put("data", jsonData); body.put("data", jsonData);
json.put("head", head); json.put("head", head);
@ -111,7 +111,7 @@ public class MiddleOfficeConfig {
.build(); .build();
Request request = new Request.Builder() Request request = new Request.Builder()
.url(MIDDLE_OFFICE_URL) .url(URL)
.post(requestBody) .post(requestBody)
.headers(headers) .headers(headers)
.build(); .build();
@ -145,7 +145,7 @@ public class MiddleOfficeConfig {
JSONObject head = new JSONObject(); JSONObject head = new JSONObject();
JSONObject body = new JSONObject(); JSONObject body = new JSONObject();
head.put("hospital", MIDDLE_OFFICE_HOSPITAL); head.put("hospital", HOSPITAL);
head.put("itemName", "微信"); head.put("itemName", "微信");
head.put("interface", interfaceName); head.put("interface", interfaceName);
body.put("opc_id", treatNum); body.put("opc_id", treatNum);
@ -159,7 +159,7 @@ public class MiddleOfficeConfig {
.build(); .build();
Request request = new Request.Builder() Request request = new Request.Builder()
.url(MIDDLE_OFFICE_URL_ESB) .url(URL_ESB)
.post(requestBody) .post(requestBody)
.headers(headers) .headers(headers)
.build(); .build();
@ -169,12 +169,12 @@ public class MiddleOfficeConfig {
call.enqueue(new Callback() { call.enqueue(new Callback() {
@Override @Override
public void onFailure(Call call, IOException e) { public void onFailure(Call call, IOException e) {
log.error("[平台数据上传]上传失败,head:{},body:{},url:{}", head, body, MIDDLE_OFFICE_URL_ESB); log.error("[平台数据上传]上传失败,head:{},body:{},url:{}", head, body, URL_ESB);
} }
@Override @Override
public void onResponse(Call call, Response response) { //不在ui线程 public void onResponse(Call call, Response response) { //不在ui线程
log.info("[平台数据上传]成功 状态码:{},head:{},body:{},url:{}", response.code(), head, body, MIDDLE_OFFICE_URL_ESB); log.info("[平台数据上传]成功 状态码:{},head:{},body:{},url:{}", response.code(), head, body, URL_ESB);
} }
}); });
} catch (Exception e) { } catch (Exception e) {

@ -1,6 +0,0 @@
middle_office_url=
middle_office_url_esb=
middle_office_hospital=
middle_office_item_name=
# \u662F\u5426\u6253\u5370\u8FD4\u56DE\u6570\u636E
middle_office.is_log_resp=false

@ -3,7 +3,7 @@
<ali_sms name="阿里云短信配置"> <ali_sms name="阿里云短信配置">
<access_key_id>LTAIucQcv6BOaBQ6</access_key_id> <access_key_id>LTAIucQcv6BOaBQ6</access_key_id>
<access_key_secret>96QOyw62AgBT9BbLI8IyEkA8g43VNQ</access_key_secret> <access_key_secret>96QOyw62AgBT9BbLI8IyEkA8g43VNQ</access_key_secret>
<sign_name name="短信签名">云南新八达科技有限公司</sign_name> <sign_name name="短信签名">新八达健康通知</sign_name>
</ali_sms> </ali_sms>
<tz_sms name="天助平台短信"> <tz_sms name="天助平台短信">

@ -1,12 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config> <config>
<xbd>
<peis_url name="体检预约"></peis_url>
<pacs_cloud_url name="云胶片">http://192.168.0.183:3307/wx3307</pacs_cloud_url>
<casebook_url name="病历复印">http://192.168.0.183:3307/wx3307</casebook_url>
</xbd>
<rm_lis name="瑞美LIS"> <rm_lis name="瑞美LIS">
<url>10.20.10.36:9623</url> <url>10.20.10.36:9623</url>
<is_log_resp name="是否打印返回日志">false</is_log_resp> <is_log_resp name="是否打印返回日志">false</is_log_resp>
<is_unified_entrance>false</is_unified_entrance> <is_unified_entrance>false</is_unified_entrance>
</rm_lis> </rm_lis>
<ris_pacs name="上海岱嘉"> <ris_pacs name="上海岱嘉-pacs">
<url>192.168.1.128</url> <url>192.168.1.128</url>
<port>20</port> <port>20</port>
<!-- <user>pacs</user> --> <!-- <user>pacs</user> -->
@ -15,11 +21,13 @@
<pass>share</pass> <pass>share</pass>
</ris_pacs> </ris_pacs>
<xbd> <jhmk_middle_office name="嘉禾美康-数据中台">
<peis_url name="体检预约">http://192.168.0.183:3307/wx3307</peis_url> <!-- <url>http://10.255.248.20:9095/proxy/</url>-->
<pacs_cloud_url name="云胶片">http://192.168.0.183:3307/wx3307</pacs_cloud_url> <url_esb>http://10.255.248.20:8082/api/esb</url_esb>
<casebook_url name="病历复印">http://192.168.0.183:3307/wx3307</casebook_url> <hospital>红河州第一人民医院</hospital>
</xbd> <item_name>嘉和美康</item_name>
<is_log_resp name="是否打印返回日志">false</is_log_resp>
</jhmk_middle_office>
</config> </config>
<!-- # 云胶片地址--> <!-- # 云胶片地址-->

Loading…
Cancel
Save