|
@ -660,6 +660,52 @@ public class XzzxEntranceService{
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* 发送短信验证码
|
|
|
*
|
|
|
* @param json
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String SendSms(String json)throws Exception{
|
|
|
String api = "SendSms";
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
"<root> " +
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
" <format>xml</format>" +
|
|
|
" <callOperator></callOperator> " +
|
|
|
" <certificate>"+"bvvsf3JA0mUXMU+mVnMaOQ=="+"</certificate> " +
|
|
|
"</root>";
|
|
|
String condition ="";
|
|
|
if (!StringUtils.isEmpty(json)){
|
|
|
condition = "<content>"+json+"</content>";
|
|
|
}
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
"<root>"+condition+"</root>";
|
|
|
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
params.put("msgBody",msgBody);
|
|
|
wlyyHttpLogDO.setRequest(params.toString());
|
|
|
logger.info("SendSms params:"+params.toString());
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,"http://192.168.102.195:1906/services/WSInterface?wsdl");
|
|
|
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String jsonObject = xmlSerializer.read(xml).toString();
|
|
|
wlyyHttpLogDO.setResponse(jsonObject);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
|
wlyyHttpLogDO.setName("短信验证码发送");
|
|
|
wlyyHttpLogDao.save(wlyyHttpLogDO);
|
|
|
logger.info("SendSms json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取单条门诊就诊记录
|
|
|
* @param patient 居民id
|