From bc11dd6964f54ff70142144584b6c334fa8e5fe1 Mon Sep 17 00:00:00 2001 From: haorp <754760654@qq.com> Date: Sat, 17 May 2025 20:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=B0=83=E7=94=A8-?= =?UTF-8?q?=E4=BA=A7=E5=90=8E=E5=BA=B7=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/MatnRehabServiceImpl.java | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java index a716bc3..74f2c58 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java @@ -1,19 +1,24 @@ package com.lyms.platform.operate.web.matnRehabPC.service.impl; import com.lyms.platform.biz.service.MatDeliverService; +import com.lyms.platform.biz.service.PatientWeightService2; import com.lyms.platform.biz.service.PatientsService; import com.lyms.platform.common.result.BaseObjectResponse; import com.lyms.platform.operate.web.facade.ViewFacade; import com.lyms.platform.operate.web.matnRehabPC.service.MatnRehabService; import com.lyms.platform.pojo.MaternalDeliverModel; +import com.lyms.platform.pojo.PatientWeight; import com.lyms.platform.pojo.Patients; import com.lyms.platform.query.MatDeliverQuery; import com.lyms.platform.query.PatientsQuery; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Map; @Service public class MatnRehabServiceImpl implements MatnRehabService { @@ -27,11 +32,14 @@ public class MatnRehabServiceImpl implements MatnRehabService { @Autowired private MatDeliverService matDeliverService; + @Autowired + private PatientWeightService2 patientWeightService2; + @Override public BaseObjectResponse queryInfo(String phone) { BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); PatientsQuery patientsQuery = new PatientsQuery(); - // + // 查建档 patientsQuery.setPhone(phone); patientsQuery.setType(3); patientsQuery.setYn(1); @@ -40,6 +48,7 @@ public class MatnRehabServiceImpl implements MatnRehabService { List patientsList = patientsService.queryPatient(patientsQuery); if (CollectionUtils.isNotEmpty(patientsList)) { Patients patients = patientsList.get(0); + // 查分娩和复查表 给产后报告用 MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); matDeliverQuery.setYn(1); matDeliverQuery.setParentId(patients.getId()); @@ -48,6 +57,17 @@ public class MatnRehabServiceImpl implements MatnRehabService { if (CollectionUtils.isNotEmpty(queryList)){ MaternalDeliverModel model = queryList.get(0); baseObjectResponse =viewFacade.findMatDeliverData(model.getId()); + if(baseObjectResponse.getData() !=null){ + // 查体重表 给营养报告用 + List patientWeights = patientWeightService2.queryPatientWeight(Query.query(Criteria.where("patientId").is(patients.getId()))); + if(CollectionUtils.isNotEmpty(patientWeights)){ + PatientWeight patientWeight= patientWeights.get(0); + Map data = (Map) baseObjectResponse.getData(); + data.put("patientWeight",patientWeight); + baseObjectResponse.setData(data); + } + } + return baseObjectResponse; } } -- 1.8.3.1