|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.service.service.guahao;
|
|
|
|
|
|
import cn.com.zoe.crypto.jna.CryptoKey;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
@ -1179,10 +1180,11 @@ public class GuahaoService {
|
|
|
String re = "";
|
|
|
|
|
|
ZysoftApi api = ZysoftApi.getSingleton();
|
|
|
CryptoKey key = api.buildCryptoKey();
|
|
|
if(!params.containsKey("Credential")&&!params.containsKey("Key")) {
|
|
|
//strCredential和strKey设置
|
|
|
params.put("Credential", api.getCryptoCredential());
|
|
|
params.put("Key", api.getCryptoKey());
|
|
|
params.put("Credential", api.encodeParam(key,"<root><org code=\"jtqy\" /><visitor type=\"0\" code=\"jtqy\" key=\"jtqy\" /></root>"));
|
|
|
params.put("Key", key.getKey());
|
|
|
}
|
|
|
|
|
|
String msgBody = net.sf.json.JSONObject.fromObject(params).toString();
|
|
@ -1194,14 +1196,14 @@ public class GuahaoService {
|
|
|
|
|
|
int times = 0;
|
|
|
try {
|
|
|
re = api.post("imm/"+apistr, params, null,false);
|
|
|
re = api.post("jhmy/"+apistr, params, null,false);
|
|
|
|
|
|
//---结果验证,并保存日志 ---START
|
|
|
if (StringUtils.isEmpty(re)) {
|
|
|
// 请求失败
|
|
|
//保存http日志
|
|
|
logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
|
|
|
throw new Exception(error);
|
|
|
logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,"接口返回的结果为空");
|
|
|
throw new Exception("接口返回的结果为空");
|
|
|
} else if (StringUtils.startsWith(re, "System-Error")) {
|
|
|
// 调用失败
|
|
|
//保存http日志
|
|
@ -1308,9 +1310,12 @@ public class GuahaoService {
|
|
|
String condition = "<root><zone>350203</zone><zone>350206</zone><zone>350205</zone><zone>350211</zone><zone>350212</zone><zone>350213</zone></root>";
|
|
|
String[] values = SOAPUtil.getCredential(condition, true);
|
|
|
// System.out.println(condition);
|
|
|
params.put("Condition", values[0]);
|
|
|
params.put("Credential", values[1]);
|
|
|
params.put("Key", values[2]);
|
|
|
|
|
|
ZysoftApi api = ZysoftApi.getSingleton();
|
|
|
CryptoKey key = api.buildCryptoKey();
|
|
|
params.put("Condition", api.encodeParam(key,condition));
|
|
|
params.put("Credential", api.encodeParam(key,"<root><org code=\"jtqy\" /><visitor type=\"0\" code=\"jtqy\" key=\"jtqy\" /></root>"));
|
|
|
params.put("Key", key.getKey());
|
|
|
return immPostSecond("GetOrgImmuneList","计免预约-获取免疫接种机构列表",params);
|
|
|
}
|
|
|
|