Commit 73b27a5c7fe6c10b86eb53bc7e552d4b9f634cc0
1 parent
7bb406a700
Exists in
master
and in
1 other branch
1
Showing 1 changed file with 22 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
73b27a5
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.AntenatalExaminationService; | |
3 | 4 | import com.lyms.platform.biz.service.BabyService; |
4 | 5 | import com.lyms.platform.biz.service.MatDeliverService; |
5 | 6 | import com.lyms.platform.biz.service.PatientsService; |
6 | 7 | |
7 | 8 | |
8 | 9 | |
9 | 10 | |
... | ... | @@ -7,16 +8,21 @@ |
7 | 8 | import com.lyms.platform.common.enums.*; |
8 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
9 | 10 | import com.lyms.platform.common.result.BaseResponse; |
11 | +import com.lyms.platform.common.utils.Assert; | |
10 | 12 | import com.lyms.platform.common.utils.DateUtil; |
13 | +import com.lyms.platform.common.utils.JsonUtil; | |
11 | 14 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
12 | 15 | import com.lyms.platform.operate.web.request.MatDeliverQueryRequest; |
16 | +import com.lyms.platform.operate.web.result.AntenatalExaminationResult; | |
13 | 17 | import com.lyms.platform.operate.web.result.MatDeliverListResult; |
14 | 18 | import com.lyms.platform.operate.web.result.MaternalDeliverResult; |
15 | 19 | import com.lyms.platform.permission.model.Organization; |
16 | 20 | import com.lyms.platform.permission.service.OrganizationService; |
21 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
17 | 22 | import com.lyms.platform.pojo.BabyModel; |
18 | 23 | import com.lyms.platform.pojo.MaternalDeliverModel; |
19 | 24 | import com.lyms.platform.pojo.Patients; |
25 | +import com.lyms.platform.query.AntExQuery; | |
20 | 26 | import com.lyms.platform.query.MatDeliverQuery; |
21 | 27 | import com.lyms.platform.query.PatientsQuery; |
22 | 28 | import org.apache.commons.collections.CollectionUtils; |
... | ... | @@ -43,6 +49,8 @@ |
43 | 49 | private PatientsService patientsService; |
44 | 50 | @Autowired |
45 | 51 | private OrganizationService organizationService; |
52 | + @Autowired | |
53 | + private AntenatalExaminationService antenatalExaminationService; | |
46 | 54 | |
47 | 55 | |
48 | 56 | /** |
... | ... | @@ -140,6 +148,20 @@ |
140 | 148 | List<MaternalDeliverModel> list = matDeliverService.query(matDeliverQuery); |
141 | 149 | MatDeliverListResult matDeliverListResult = new MatDeliverListResult(); |
142 | 150 | matDeliverListResult.convertToResult(list, patients); |
151 | + AntExQuery antExQuery=new AntExQuery(); | |
152 | + antExQuery.setParentId(patients.getId()); | |
153 | + antExQuery.setYn(YnEnums.YES.getId()); | |
154 | + List<AntenatalExaminationModel> examinationModel = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
155 | + Assert.notNull(examinationModel, "id不存在."); | |
156 | + try { | |
157 | + List list1= new ArrayList(); | |
158 | + if(CollectionUtils.isNotEmpty(examinationModel)){ | |
159 | + String s = examinationModel.get(0).getRiskFactor(); | |
160 | + list1 = JsonUtil.toList(s, List.class); | |
161 | + } | |
162 | + | |
163 | + matDeliverListResult.setRiskFactor(list1); | |
164 | + }catch (Exception e){} | |
143 | 165 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(matDeliverListResult); |
144 | 166 | } |
145 | 167 |