From 6f7dc909abdb275d6450d4fa13b00dd6cf4eeced Mon Sep 17 00:00:00 2001 From: wtt Date: Mon, 11 Nov 2019 08:41:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=A3=E6=88=90=E5=85=AC=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lyms/hospitalapi/rcfy/ws/RcGwInterface.java | 78 ++++++++++++++-------- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/ws/RcGwInterface.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/ws/RcGwInterface.java index c2815a2..e3374ca 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/ws/RcGwInterface.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/rcfy/ws/RcGwInterface.java @@ -129,14 +129,15 @@ public class RcGwInterface { //4 调用webservice客户端。 String operate = "ca65a3ac7b9fe63e31a841f6aeac5011";//第一次随访接口 String webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); } catch (Exception e) { e.printStackTrace(); - ExceptionUtils.catchException("6 异常: "+antExChuModel.getId()); + ExceptionUtils.catchException("6 异常: " + antExChuModel.getId()); continue; } } + System.out.println("第一次随访,执行完"); } else { br.setErrorcode(ErrorCodeConstants.NO_DATA); br.setErrormsg("没有初诊数据"); @@ -216,7 +217,7 @@ public class RcGwInterface { xmlString = getFuZhenXMLStr(fu, basicInfoMap, patients); operate = basicInfoMap.get("operate"); webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); break; case 1://第三随访 @@ -226,7 +227,7 @@ public class RcGwInterface { xmlString = getFuZhen3XMLStr(fu, basicInfoMap, patients); operate = basicInfoMap.get("operate"); webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); break; case 2://第四随访 basicInfoMap.put("suiFangB", "T_FB_CQJCJLSIC"); @@ -235,7 +236,7 @@ public class RcGwInterface { xmlString = getFuZhen3XMLStr(fu, basicInfoMap, patients); operate = basicInfoMap.get("operate"); webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); break; case 3://第五随访 basicInfoMap.put("suiFangB", "T_FB_CQJCJLWUC"); @@ -244,7 +245,7 @@ public class RcGwInterface { xmlString = getFuZhen3XMLStr(fu, basicInfoMap, patients); operate = basicInfoMap.get("operate"); webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); break; } @@ -252,11 +253,13 @@ public class RcGwInterface { } catch (Exception e) { - ExceptionUtils.catchException("6 异常: "+list.get(i).getParentId()); + ExceptionUtils.catchException("6 异常: " + list.get(i).getParentId()); continue; } } + + System.out.println("第2 3 4 5次随访,执行完"); } else { br.setErrorcode(ErrorCodeConstants.NO_DATA); br.setErrormsg("没有复诊数据"); @@ -318,13 +321,15 @@ public class RcGwInterface { //4 调用webservice客户端。 String operate = "62f6653bf6eb40b4b38a01efd11aa27a";//产后访视接口 String webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); } catch (Exception e) { - ExceptionUtils.catchException("6 异常: "+matdeliverFollowModel.getId()); + ExceptionUtils.catchException("6 异常: " + matdeliverFollowModel.getId()); continue; } } + System.out.println("访视,执行完"); + } else { br.setErrorcode(ErrorCodeConstants.NO_DATA); br.setErrormsg("没有访视数据"); @@ -386,14 +391,15 @@ public class RcGwInterface { //4 调用webservice客户端。 String operate = "9b360fa937d34960ba5c214fa55fad1b";//产后42天接口 String webServiceStr = getWebServiceStr(key, operate, xmlString); - ExceptionUtils.catchException("5 调用webservice客户端: "+webServiceStr); + ExceptionUtils.catchException("5 调用webservice客户端: " + webServiceStr); } catch (Exception e) { - ExceptionUtils.catchException("6 异常: "+postReviewModel.getId()); + ExceptionUtils.catchException("6 异常: " + postReviewModel.getId()); continue; } } + System.out.println("产后42天,执行完"); } else { br.setErrorcode(ErrorCodeConstants.NO_DATA); br.setErrormsg("没有产后42天数据"); @@ -440,9 +446,13 @@ public class RcGwInterface { String dueDate = chu.getDueDate() != null ? sdf.format(chu.getDueDate()) : ""; String FMcyj = chu.getLastMenses() != null ? sdf.format(patients.getLastMenses()) : ""; //血压 - Map maps = (Map) JSON.parse(chu.getBp()); - String ssy = maps.get("ssy").toString(); - String szy = maps.get("szy").toString(); + String ssy = ""; + String szy = ""; + if (StringUtils.isNotEmpty(chu.getBp())) { + Map maps = (Map) JSON.parse(chu.getBp()); + ssy = maps.get("ssy").toString(); + szy = maps.get("szy").toString(); + } xmlString = "" + "" @@ -580,9 +590,13 @@ public class RcGwInterface { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String getCheckDate = fu.getCheckDate() != null ? sdf.format(fu.getCheckDate()) : ""; //血压 - Map maps = (Map) JSON.parse(fu.getBp()); - String ssy = maps.get("ssy").toString(); - String szy = maps.get("szy").toString(); + String ssy = ""; + String szy = ""; + if (StringUtils.isNotEmpty(fu.getBp())) { + Map maps = (Map) JSON.parse(fu.getBp()); + ssy = maps.get("ssy").toString(); + szy = maps.get("szy").toString(); + } //胎心率 String heartRate = getTxlStr(fu); @@ -663,9 +677,13 @@ public class RcGwInterface { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String getCheckDate = fu.getCheckDate() != null ? sdf.format(fu.getCheckDate()) : ""; //血压 - Map maps = (Map) JSON.parse(fu.getBp()); - String ssy = maps.get("ssy").toString(); - String szy = maps.get("szy").toString(); + String ssy = ""; + String szy = ""; + if (StringUtils.isNotEmpty(fu.getBp())) { + Map maps = (Map) JSON.parse(fu.getBp()); + ssy = maps.get("ssy").toString(); + szy = maps.get("szy").toString(); + } //胎心率 String heartRate = getTxlStr(fu); @@ -744,9 +762,13 @@ public class RcGwInterface { String getUpdateDate = fs.getUpdateDate() != null ? sdf.format(fs.getUpdateDate()) : ""; String getNextVisitDate = fs.getNextVisitDate() != null ? sdf.format(fs.getNextVisitDate()) : ""; //血压 - Map maps = (Map) JSON.parse(fs.getBp()); - String ssy = maps.get("ssy").toString(); - String szy = maps.get("szy").toString(); + String ssy = ""; + String szy = ""; + if (StringUtils.isNotEmpty(fs.getBp())) { + Map maps = (Map) JSON.parse(fs.getBp()); + ssy = maps.get("ssy").toString(); + szy = maps.get("szy").toString(); + } String getBreast = fs.getBreast() == 1 ? "1" : ""; String getLochia = fs.getLochia() == 1 ? "1" : ""; String getWound = fs.getWound() == 1 ? "1" : ""; @@ -828,9 +850,13 @@ public class RcGwInterface { String getCreated = fc.getCreated() != null ? sdf.format(fc.getCreated()) : ""; String getCheckTime = fc.getCheckTime() != null ? sdf.format(fc.getCheckTime()) : ""; //血压 - Map maps = (Map) JSON.parse(fc.getBp()); - String ssy = maps.get("ssy").toString(); - String szy = maps.get("szy").toString(); + String ssy = ""; + String szy = ""; + if (StringUtils.isNotEmpty(fc.getBp())) { + Map maps = (Map) JSON.parse(fc.getBp()); + ssy = maps.get("ssy").toString(); + szy = maps.get("szy").toString(); + } String getBreast = fc.getBreast() == "未见异常" ? "1" : "99"; String getBreastStr = getBreast == "99" ? fc.getBreast() : ""; String getMatrix = fc.getMatrix() == "未见异常" ? "1" : "99"; -- 1.8.3.1