|
@ -1399,27 +1399,43 @@ public class XzzxEntranceService{
|
|
|
wlyyHttpLogDO.setName("checkPrescriptionInEntrance");
|
|
|
return res;
|
|
|
}
|
|
|
/*public List<Map<String,Object>> transXmlCommen(String xml){
|
|
|
public List<Map<String,Object>> transXmlCommen(String xml){
|
|
|
Document doc = null;
|
|
|
List<Map<String,Object>> returnMap= new ArrayList<>();
|
|
|
try {
|
|
|
doc = (new Builder()).build(new StringReader(xml));
|
|
|
Element root = doc.getRootElement();
|
|
|
Elements elements = root.getChildElements();
|
|
|
for (int i=0;i<elements.size();i++){
|
|
|
Element childElement = elements.get(i);
|
|
|
for (int j=0;j<childElement.getAttributeCount();j++){
|
|
|
Attribute attribute = childElement.getAttribute(i);
|
|
|
attribute.get
|
|
|
Map<String,Object> personInfoMap = new HashMap<>();
|
|
|
Element personInfo = elements.get(i);
|
|
|
for (int j=0;j<personInfo.getAttributeCount();j++){
|
|
|
Attribute attribute = personInfo.getAttribute(j);
|
|
|
personInfoMap.put(attribute.getLocalName(),attribute.getValue());
|
|
|
}
|
|
|
|
|
|
List<Map<String,Object>> checkInfoMapList= new ArrayList<>();
|
|
|
if (personInfo.getChildElements().size()>0){
|
|
|
Elements checkInfos = personInfo.getChildElements();
|
|
|
for(int ci=0;ci<checkInfos.size();ci++){
|
|
|
Element checkInfo = checkInfos.get(ci);
|
|
|
Map<String,Object> checkInfoMap = new HashMap<>();
|
|
|
for (int n = 0;n<checkInfo.getAttributeCount();n++){
|
|
|
Attribute attribute2 = checkInfo.getAttribute(n);
|
|
|
checkInfoMap.put(attribute2.getLocalName(),attribute2.getValue());
|
|
|
}
|
|
|
checkInfoMapList.add(checkInfoMap);
|
|
|
}
|
|
|
}
|
|
|
personInfoMap.put("checkInfoMapList",checkInfoMapList);
|
|
|
returnMap.add(personInfoMap);
|
|
|
}
|
|
|
} catch (ParsingException e) {
|
|
|
e.printStackTrace();
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
}*/
|
|
|
return returnMap;
|
|
|
}
|
|
|
public List<PersonInfoVO> transXml(String xml) throws Exception {
|
|
|
Document doc = (new Builder()).build(new StringReader(xml));
|
|
|
Element root = doc.getRootElement();
|
|
@ -2905,9 +2921,11 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
if (object.getInteger("status") == 200) {
|
|
|
wlyyHttpLogDO.setCode("200");
|
|
|
String obj = object.getString("obj");
|
|
|
System.out.println("obj:"+obj);
|
|
|
if (StringUtils.isNotBlank(obj)) {
|
|
|
List<PersonInfoVO> returnList = transXml(obj);
|
|
|
List<Map<String,Object>> returnList = transXmlCommen(obj);
|
|
|
returnJson = JSONArray.toJSONString(returnList);
|
|
|
logger.info("返回到互联网医院的解析后的结果:"+returnJson);
|
|
|
wlyyHttpLogDO.setDoctor(doctorId);
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
|
wlyyHttpLogDO.setRequest(infos + jsonObject.toString());
|