Commit b4ff2d22c5b83700d7ba0adaba177ec1b3513fb5
1 parent
16f0b334ff
Exists in
master
and in
8 other branches
1
Showing 1 changed file with 17 additions and 12 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
b4ff2d2
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.biz.service.AntenatalExaminationService; | |
| 4 | -import com.lyms.platform.biz.service.BabyService; | |
| 5 | -import com.lyms.platform.biz.service.MatDeliverService; | |
| 6 | -import com.lyms.platform.biz.service.PatientsService; | |
| 3 | +import com.lyms.platform.biz.service.*; | |
| 7 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 8 | 5 | import com.lyms.platform.common.enums.*; |
| 9 | 6 | import com.lyms.platform.common.result.BaseObjectResponse; |
| ... | ... | @@ -18,10 +15,7 @@ |
| 18 | 15 | import com.lyms.platform.operate.web.result.MaternalDeliverResult; |
| 19 | 16 | import com.lyms.platform.permission.model.Organization; |
| 20 | 17 | import com.lyms.platform.permission.service.OrganizationService; |
| 21 | -import com.lyms.platform.pojo.AntenatalExaminationModel; | |
| 22 | -import com.lyms.platform.pojo.BabyModel; | |
| 23 | -import com.lyms.platform.pojo.MaternalDeliverModel; | |
| 24 | -import com.lyms.platform.pojo.Patients; | |
| 18 | +import com.lyms.platform.pojo.*; | |
| 25 | 19 | import com.lyms.platform.query.AntExQuery; |
| 26 | 20 | import com.lyms.platform.query.MatDeliverQuery; |
| 27 | 21 | import com.lyms.platform.query.PatientsQuery; |
| ... | ... | @@ -51,6 +45,8 @@ |
| 51 | 45 | private OrganizationService organizationService; |
| 52 | 46 | @Autowired |
| 53 | 47 | private AntenatalExaminationService antenatalExaminationService; |
| 48 | + @Autowired | |
| 49 | + private BasicConfigService basicConfigService; | |
| 54 | 50 | |
| 55 | 51 | |
| 56 | 52 | /** |
| 57 | 53 | |
| 58 | 54 | |
| ... | ... | @@ -153,13 +149,22 @@ |
| 153 | 149 | antExQuery.setYn(YnEnums.YES.getId()); |
| 154 | 150 | List<AntenatalExaminationModel> examinationModel = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
| 155 | 151 | try { |
| 156 | - List list1= new ArrayList(); | |
| 157 | 152 | if(CollectionUtils.isNotEmpty(examinationModel)){ |
| 158 | - String s = examinationModel.get(0).getRiskFactor(); | |
| 159 | - list1 = JsonUtil.toList(s, List.class); | |
| 153 | + List data = new ArrayList(); | |
| 154 | + if(null!=examinationModel&&StringUtils.isNotEmpty(examinationModel.get(0).getRiskFactor())){ | |
| 155 | + List l = JsonUtil.toList(examinationModel.get(0).getRiskFactor(),List.class); | |
| 156 | + for(int i=0;i<l.size();i++){ | |
| 157 | + String key = (String)l.get(i); | |
| 158 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(key); | |
| 159 | + if(null!=basicConfig){ | |
| 160 | + data.add(basicConfig.getName()); | |
| 161 | + } | |
| 162 | + } | |
| 163 | + } | |
| 164 | + matDeliverListResult.setRiskFactor(data); | |
| 160 | 165 | } |
| 161 | 166 | |
| 162 | - matDeliverListResult.setRiskFactor(list1); | |
| 167 | + | |
| 163 | 168 | }catch (Exception e){} |
| 164 | 169 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(matDeliverListResult); |
| 165 | 170 | } |