ソースを参照

计免内网接口修改

huangwenjie 7 年 前
コミット
1da793bbae

+ 0 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/common/SystemConfig.java

@ -70,8 +70,6 @@ public class SystemConfig {
    }
    public String getPublicKey() { return  getSystemProperties().getProperty("gateway_public_key"); }
    
    public String getImmPublicKey() { return  getSystemProperties().getProperty("imm_public_key"); }
    public String getJwHospital()
    {

+ 1 - 13
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftApi.java

@ -23,19 +23,7 @@ public class ZysoftApi extends AbstractApiExecuter {
    private static byte[]  publicKey;
    private static byte[]  zkzlPublicKey;
    private static byte[]  zkzlPrivateKey;
    private static byte[]  immPublicKey;
    
    
    /**
     * 获取计免预约参数加密的公钥
     */
    private static byte[]  getImmPublicKey() throws Exception{
    
        if(immPublicKey == null){
            publicKey =  sehrCrypto.sehrCrypto.ReadFileBytes(ZysoftApi.class.getClassLoader().getResource(SystemConfig.getInstance().getPublicKey()).toURI().getPath());
        }
        return immPublicKey;
    }
    
    /**
     * 智业公钥

+ 2 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/guahao/GuahaoService.java

@ -3,7 +3,6 @@ package com.yihu.wlyy.service.service.guahao;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.service.common.SystemConfig;
import com.yihu.wlyy.service.common.http.HttpApiException;
import com.yihu.wlyy.service.common.util.DateUtil;
import com.yihu.wlyy.service.common.util.SOAPUtil;
@ -19,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.hibernate.validator.internal.util.privilegedactions.GetResource;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -1300,7 +1300,7 @@ public class GuahaoService {
        ZysoftApi api = ZysoftApi.getSingleton();
    
        Cipher cipher = Cipher.getInstance("RSA");
        RSAPublicKey pubKey = (RSAPublicKey) this.immPublicKeyget(SystemConfig.getInstance().getImmPublicKey());
        RSAPublicKey pubKey = (RSAPublicKey) this.immPublicKeyget("/ImmPublicTest.key");
    
        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
        byte[] cipherText = cipher.doFinal(condition.getBytes());