From c0ba7363a0ad804dbafe73736619b26be9322956 Mon Sep 17 00:00:00 2001 From: haorp <754760654@qq.com> Date: Fri, 30 May 2025 14:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E9=87=8D=E7=AE=A1=E7=90=86=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=95=B0=E6=8D=AE=E4=B8=8D=E4=B8=80=E8=87=B4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/platform/operate/web/facade/PatientFacade.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java index b2999d7..9cb573d 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java @@ -3915,16 +3915,20 @@ public class PatientFacade extends BaseServiceImpl { if (p != null) { AntExChuModel chuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid()).and("yn").ne("0")).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); if (chuModel != null) { + // 营养报告体重优先取后填的,其他逻辑不动 + PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(p.getId())), PatientWeight.class); + if(patientWeight.getModified().compareTo(chuModel.getModified())>0){ + patientBaseResult.setWeight(StringUtils.isNotEmpty(patientWeight.getNowWeight()) ? patientWeight.getNowWeight() : ""); + }else{ + patientBaseResult.setWeight(StringUtils.isNotEmpty(chuModel.getWeight()) ? chuModel.getWeight() : ""); + } patientBaseResult.setBeforWeight(StringUtils.isNotEmpty(chuModel.getYqWeight()) ? chuModel.getYqWeight() : ""); patientBaseResult.setHeight(StringUtils.isNotEmpty(chuModel.getHeight()) ? chuModel.getHeight() : ""); if (StringUtils.isNotEmpty(chuModel.getHeight()) && StringUtils.isNotEmpty(chuModel.getWeight())) { - patientBaseResult.setWeight(StringUtils.isNotEmpty(chuModel.getWeight()) ? chuModel.getWeight() : ""); patientBaseResult.setBmi(patientWeightService.getBmi(chuModel.getYqWeight(), chuModel.getHeight())); } else { - PatientWeight patientWeight = mongoTemplate.findOne(Query.query(Criteria.where("patientId").is(p.getId())), PatientWeight.class); if (patientWeight != null) { patientBaseResult.setHeight(StringUtils.isNotEmpty(patientWeight.getBeforeHeight()) ? patientWeight.getBeforeHeight() : ""); - patientBaseResult.setWeight(StringUtils.isNotEmpty(patientWeight.getNowWeight()) ? patientWeight.getNowWeight() : ""); patientBaseResult.setBeforWeight(StringUtils.isNotEmpty(patientWeight.getBeforeWeight()) ? patientWeight.getBeforeWeight() : ""); patientBaseResult.setBmi(patientWeight.getBmi()); List > dayWeights2 = patientWeight.getDayWeights2(); -- 1.8.3.1