From db02e302f21f6f8946abedcd9231acb1861a5fd7 Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Tue, 26 Sep 2017 18:31:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operate/web/service/impl/PatientWeightServiceImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 f3f6fef..74a273c 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 @@ -67,6 +67,16 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient if(pw != null && StringUtils.isNotEmpty(patientWeight.getBeforeWeight())) { return RespBuilder.buildErro(ResponseCode.PATIENT_WEIGHT_IS_EXIST); } + + if(patients != null && !hospitalId.equals(patients.getHospitalId())) {// 隐藏建档 + patients.setId(null); + patients.setHospitalId(hospitalId); + patients.setEnable("2"); + patients.setSource(patientWeight.getPatientId()); + patients.setCreated(new Date()); + mongoTemplate.save(patients); + patientWeight.setPatientId(patients.getId()); + } Map dayWeights = new HashMap<>(); if(pw != null) { if(MapUtils.isNotEmpty(pw.getDayWeights())) { @@ -82,7 +92,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } if(StringUtils.isEmpty(patientWeight.getId()) && patients != null) { - antenatalExaminationFacade.handHideBuild(patients.getPid(), patients.getId(), userId, 1); +// antenatalExaminationFacade.handHideBuild(patients.getPid(), patients.getId(), userId, 1); dayWeights.put(DateUtil.getyyyy_MM_dd(new Date()), nowWeight); patientWeight.setPid(patients.getPid()); -- 1.8.3.1