Commit bc11dd6964f54ff70142144584b6c334fa8e5fe1
1 parent
cd00cf8f8e
Exists in
dev
小程序调用-产后康复
Showing 1 changed file with 21 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/matnRehabPC/service/impl/MatnRehabServiceImpl.java
View file @
bc11dd6
| 1 | 1 | package com.lyms.platform.operate.web.matnRehabPC.service.impl; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.MatDeliverService; |
| 4 | +import com.lyms.platform.biz.service.PatientWeightService2; | |
| 4 | 5 | import com.lyms.platform.biz.service.PatientsService; |
| 5 | 6 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 6 | 7 | import com.lyms.platform.operate.web.facade.ViewFacade; |
| 7 | 8 | import com.lyms.platform.operate.web.matnRehabPC.service.MatnRehabService; |
| 8 | 9 | import com.lyms.platform.pojo.MaternalDeliverModel; |
| 10 | +import com.lyms.platform.pojo.PatientWeight; | |
| 9 | 11 | import com.lyms.platform.pojo.Patients; |
| 10 | 12 | import com.lyms.platform.query.MatDeliverQuery; |
| 11 | 13 | import com.lyms.platform.query.PatientsQuery; |
| 12 | 14 | import org.apache.commons.collections.CollectionUtils; |
| 13 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 17 | +import org.springframework.data.mongodb.core.query.Query; | |
| 14 | 18 | import org.springframework.stereotype.Service; |
| 15 | 19 | |
| 16 | 20 | import java.util.List; |
| 21 | +import java.util.Map; | |
| 17 | 22 | |
| 18 | 23 | @Service |
| 19 | 24 | public class MatnRehabServiceImpl implements MatnRehabService { |
| 20 | 25 | |
| ... | ... | @@ -27,11 +32,14 @@ |
| 27 | 32 | @Autowired |
| 28 | 33 | private MatDeliverService matDeliverService; |
| 29 | 34 | |
| 35 | + @Autowired | |
| 36 | + private PatientWeightService2 patientWeightService2; | |
| 37 | + | |
| 30 | 38 | @Override |
| 31 | 39 | public BaseObjectResponse queryInfo(String phone) { |
| 32 | 40 | BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); |
| 33 | 41 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 34 | - // | |
| 42 | + // 查建档 | |
| 35 | 43 | patientsQuery.setPhone(phone); |
| 36 | 44 | patientsQuery.setType(3); |
| 37 | 45 | patientsQuery.setYn(1); |
| ... | ... | @@ -40,6 +48,7 @@ |
| 40 | 48 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
| 41 | 49 | if (CollectionUtils.isNotEmpty(patientsList)) { |
| 42 | 50 | Patients patients = patientsList.get(0); |
| 51 | + // 查分娩和复查表 给产后报告用 | |
| 43 | 52 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
| 44 | 53 | matDeliverQuery.setYn(1); |
| 45 | 54 | matDeliverQuery.setParentId(patients.getId()); |
| ... | ... | @@ -48,6 +57,17 @@ |
| 48 | 57 | if (CollectionUtils.isNotEmpty(queryList)){ |
| 49 | 58 | MaternalDeliverModel model = queryList.get(0); |
| 50 | 59 | baseObjectResponse =viewFacade.findMatDeliverData(model.getId()); |
| 60 | + if(baseObjectResponse.getData() !=null){ | |
| 61 | + // 查体重表 给营养报告用 | |
| 62 | + List<PatientWeight> patientWeights = patientWeightService2.queryPatientWeight(Query.query(Criteria.where("patientId").is(patients.getId()))); | |
| 63 | + if(CollectionUtils.isNotEmpty(patientWeights)){ | |
| 64 | + PatientWeight patientWeight= patientWeights.get(0); | |
| 65 | + Map<String,Object> data = (Map<String, Object>) baseObjectResponse.getData(); | |
| 66 | + data.put("patientWeight",patientWeight); | |
| 67 | + baseObjectResponse.setData(data); | |
| 68 | + } | |
| 69 | + } | |
| 70 | + | |
| 51 | 71 | return baseObjectResponse; |
| 52 | 72 | } |
| 53 | 73 | } |