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());