Commit 439a0ceadb8c12e0560860440743e360fe940e54
1 parent
61c0e8886f
Exists in
master
and in
6 other branches
0-6岁儿童视觉健康档案--添加听了筛查
Showing 1 changed file with 37 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyHealthFacade.java
View file @
439a0ce
... | ... | @@ -20,10 +20,7 @@ |
20 | 20 | import com.lyms.platform.operate.web.utils.CollectionUtils; |
21 | 21 | import com.lyms.platform.operate.web.utils.MongoUtil; |
22 | 22 | import com.lyms.platform.permission.dao.master.CouponMapper; |
23 | -import com.lyms.platform.permission.model.CheckItem; | |
24 | -import com.lyms.platform.permission.model.Organization; | |
25 | -import com.lyms.platform.permission.model.PatientService; | |
26 | -import com.lyms.platform.permission.model.Users; | |
23 | +import com.lyms.platform.permission.model.*; | |
27 | 24 | import com.lyms.platform.permission.service.*; |
28 | 25 | import com.lyms.platform.pojo.*; |
29 | 26 | import com.lyms.platform.query.*; |
... | ... | @@ -35,6 +32,7 @@ |
35 | 32 | import jxl.write.WritableCellFormat; |
36 | 33 | import jxl.write.WritableSheet; |
37 | 34 | import jxl.write.WritableWorkbook; |
35 | +import org.apache.commons.beanutils.BeanMap; | |
38 | 36 | import org.springframework.beans.factory.annotation.Autowired; |
39 | 37 | import org.springframework.beans.factory.annotation.Qualifier; |
40 | 38 | import org.springframework.data.domain.Sort; |
... | ... | @@ -152,6 +150,12 @@ |
152 | 150 | |
153 | 151 | @Autowired |
154 | 152 | private OrganizationGroupsFacade organizationGroupsFacade; |
153 | + @Autowired | |
154 | + @Qualifier("commonThreadPool") | |
155 | + private ThreadPoolTaskExecutor commonThreadPool; | |
156 | + //听力筛查 | |
157 | + @Autowired | |
158 | + private BabyPatientExtendEarScreenService babyPatientExtendEarScreenService; | |
155 | 159 | |
156 | 160 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
157 | 161 | |
158 | 162 | |
... | ... | @@ -997,8 +1001,35 @@ |
997 | 1001 | Criteria criteriaCheck = Criteria.where("buildId").in(id); |
998 | 1002 | criteriaCheck.and("checkMonth").is(checkMonthAge); |
999 | 1003 | List<BabyCheckModel> babyCheckModelList = mongoTemplate.find(new Query(criteriaCheck).with(new Sort(Sort.Direction.DESC, "created")), BabyCheckModel.class); |
1004 | + List<BabyEyeCheck> babyEyeCheckList = mongoTemplate.find(new Query(criteriaCheck).with(new Sort(Sort.Direction.DESC, "created")), BabyEyeCheck.class); | |
1000 | 1005 | |
1001 | - return RespBuilder.buildSuccess(babyCheckModelList); | |
1006 | + | |
1007 | + Map<String,Object> rs=new HashMap<>(); | |
1008 | + Date birthDate=new Date(); | |
1009 | + | |
1010 | + if(babyCheckModelList.size()>0){ | |
1011 | + BabyCheckModel checkModel=babyCheckModelList.get(0); | |
1012 | + checkModel.getBirth(); | |
1013 | + | |
1014 | + rs.putAll(new BeanMap(checkModel)); | |
1015 | + } | |
1016 | + | |
1017 | + if(babyEyeCheckList.size()>0){//眼检查 | |
1018 | + BabyEyeCheck checkModel=babyEyeCheckList.get(0); | |
1019 | + | |
1020 | + rs.putAll(new BeanMap(checkModel)); | |
1021 | + } | |
1022 | + | |
1023 | + BabyPatientExtendEarScreenQuery query = new BabyPatientExtendEarScreenQuery();//耳筛 | |
1024 | + query.setScreenDate(DateUtil.addMonth(birthDate,1)); | |
1025 | + List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryBabyPatientExtendEarScreen(query); | |
1026 | + if(babyPatientExtendEarScreens.size()>0){ | |
1027 | + rs.putAll(new BeanMap(babyPatientExtendEarScreens.get(0))); | |
1028 | + } | |
1029 | + | |
1030 | + List<Map> lst=new ArrayList<>(); | |
1031 | + lst.add(rs); | |
1032 | + return RespBuilder.buildSuccess(lst); | |
1002 | 1033 | } |
1003 | 1034 | |
1004 | 1035 | |
... | ... | @@ -1133,8 +1164,6 @@ |
1133 | 1164 | return RespBuilder.buildSuccess(pageResult); |
1134 | 1165 | } |
1135 | 1166 | |
1136 | - @Autowired | |
1137 | - @Qualifier("commonThreadPool") | |
1138 | - private ThreadPoolTaskExecutor commonThreadPool; | |
1167 | + | |
1139 | 1168 | } |