Jelajahi Sumber

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 tahun lalu
induk
melakukan
75cea73bda

+ 8 - 4
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftBaseService.java

@ -50,6 +50,10 @@ public class ZysoftBaseService {
    private String internet;
    @Value("${zysoftApi.base}")
    private String base;
    @Value("${zysoftApi.imm}")
    private String imm;
    @Value("${zyapi.openCrypto}")
    private Boolean openCrypto;
    public String getCode() {
        return UUID.randomUUID().toString().replaceAll("-", "");
@ -146,13 +150,13 @@ public class ZysoftBaseService {
        int times = 0;
        try {
            re = ZysoftApi.getSingleton().get(baseApi, paramsList, null,true);
            re = ZysoftApi.getSingleton().get(baseApi, paramsList, null,openCrypto);
            if(needRetry)
            {
                while(retryTimes>0 && re.contains("接口调用传入的参数[msgHeader]格式不正确"))    //基卫bug预防,重调接口
                {
                    re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,true);
                    re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,openCrypto);
                    retryTimes --;
                    times++;
                }
@ -221,13 +225,13 @@ public class ZysoftBaseService {
        int times = 0;
        try {
            re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,true);
            re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,openCrypto);
            if(needRetry)
            {
                int maxTimes = retryTimes;
                while(maxTimes>0 && re.contains("接口调用传入的参数[msgHeader]格式不正确"))    //基卫bug预防,重调接口
                {
                    re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,true);
                    re = ZysoftApi.getSingleton().post(baseApi, paramsList, null,openCrypto);
                    maxTimes --;
                    times++;
                }

+ 8 - 6
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftService.java

@ -9,6 +9,7 @@ import com.yihu.wlyy.service.entity.DoctorMapping;
import com.zoe.phip.ssp.sdk.ApiException;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.PrintWriter;
@ -29,7 +30,8 @@ public class ZysoftService {
    @Autowired
    private ObjectMapper objectMapper;
    @Value("${zyapi.openCrypto}")
    private Boolean openCrypto;
    //默认重复次数
    private int retryTimes = 3;
@ -58,13 +60,13 @@ public class ZysoftService {
        int times = 0;
        try {
            re = ZysoftApi.getSingleton().get("base/CallEhrInterface", paramsList, null,true);
            re = ZysoftApi.getSingleton().get("base/CallEhrInterface", paramsList, null,openCrypto);
            if(needRetry)
            {
                while(retryTimes>0 && re.contains("接口调用传入的参数[msgHeader]格式不正确"))    //基卫bug预防,重调接口
                {
                    re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,true);
                    re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,openCrypto);
                    retryTimes --;
                    times++;
                }
@ -130,13 +132,13 @@ public class ZysoftService {
        int times = 0;
        try {
            re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,true);
            re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,openCrypto);
            if(needRetry)
            {
                int maxTimes = retryTimes;
                while(maxTimes>0 && re.contains("接口调用传入的参数[msgHeader]格式不正确"))    //基卫bug预防,重调接口
                {
                    re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,true);
                    re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,openCrypto);
                    maxTimes --;
                    times++;
                }
@ -200,7 +202,7 @@ public class ZysoftService {
        String error = "";
        try {
            re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,true);
            re = ZysoftApi.getSingleton().post("base/CallEhrInterface", paramsList, null,openCrypto);
            Map<String,String> map = objectMapper.readValue(re,Map.class);
            String code = map.get("CODE");

+ 11 - 16
patient-co-service/wlyy_service/src/main/resources/application.yml

@ -74,6 +74,9 @@ spring:
im:
  data_base_name: im_new
zyapi:
  openCrypto: false
---
spring:
  profiles: devtest
@ -92,6 +95,9 @@ spring:
#    password: jkzl_ehr
im:
  data_base_name: im_new
zyapi:
  openCrypto: false
---
spring:
  profiles: test
@ -109,6 +115,9 @@ spring:
#    password: jkzl_ehr
im:
  data_base_name: im_new
zyapi:
  openCrypto: false
---
spring:
  profiles: production
@ -126,20 +135,6 @@ spring:
    password: jkzlehr
im:
  data_base_name: im
---
spring:
  profiles: local
  datasource:
    url: jdbc:mysql://10.95.22.7:3306/wlyy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: jkzlehr@123
    driverClassName: com.mysql.jdbc.Driver
    maxTotal: 500
    maxIdle: 30
  redis:
    host: 10.95.22.142 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzlehr
im:
  data_base_name: im
zyapi:
  openCrypto: true