From 0f0a9c5180e13f2baf664592b0b241a41a105acb Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Thu, 26 Oct 2017 18:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E9=87=8D=E7=AE=A1=E7=90=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8E=A5=E5=8F=A3=20=20=E5=8A=A0=E4=B8=8A=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BF=AE=E6=94=B9=E4=BD=93=E9=87=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/service/impl/PatientWeightServiceImpl.java | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 5a2ffcf..eced80b 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -79,6 +79,16 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient pw = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(patients.getId()).and("hospitalId").is(hospitalId)), PatientWeight.class); } + // 绑定医生和患者的关系 + String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); + Map param = new HashMap<>(); + param.put("doctorName", couponMapper.findUserName(userId + "")); + param.put("patientId", patients.getId()); + param.put("hospitalName", couponMapper.findHospitalNameById(hospitalId)); + param.put("foreignId", userId + ""); + String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8"); + System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); + /* if(pw != null && StringUtils.isNotEmpty(patientWeight.getBeforeWeight())) { return RespBuilder.buildErro(ResponseCode.PATIENT_WEIGHT_IS_EXIST); }*/ @@ -156,16 +166,16 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient patientWeightService2.add(patientWeight); - // 绑定医生和患者的关系 + /* // 绑定医生和患者的关系 String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); Map param = new HashMap<>(); param.put("doctorName", couponMapper.findUserName(userId + "")); param.put("patientId", patients.getId()); param.put("hospitalName", couponMapper.findHospitalNameById(hospitalId)); param.put("foreignId", userId + ""); - String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8"); + String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8");*/ // String s = HttpClientUtil.doPost("http://localhost:9092/grWeContr/bindDoctorUser", param, "UTF-8"); - System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); +// System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); return RespBuilder.buildSuccess(patientWeight.getId()); } else { patientWeight.setOperaterId(userId.toString()); @@ -485,6 +495,17 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient return RespBuilder.buildSuccess("该体重未找到"); } String hospitalId = autoMatchFacade.getHospitalId(userId); + + // 绑定医生和患者的关系 + String patSerSyncUrl = Config.getItem("patSer_sync_url", "0"); + Map param = new HashMap<>(); + param.put("doctorName", couponMapper.findUserName(userId + "")); + param.put("patientId", patientWeight.getPatientId()); + param.put("hospitalName", couponMapper.findHospitalNameById(hospitalId)); + param.put("foreignId", userId + ""); + String s = HttpClientUtil.doPost(patSerSyncUrl + "/grWeContr/bindDoctorUser", param, "UTF-8"); + System.out.println("绑定医生和患者的关系>>. " + s + " param: " + param); + if(StringUtils.isNotEmpty(beforeWeight)) { patientWeight.setBeforeWeight(beforeWeight); } -- 1.8.3.1