Commit 6b88f5fc6179ba45925f2786cf21b99daef4b4af
1 parent
aabacd644f
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 47 additions and 13 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/EyeExaminationEnums.java
View file @
6b88f5f
| ... | ... | @@ -12,12 +12,20 @@ |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | public enum EyeExaminationEnums { |
| 15 | - YGY(1,"建议1个月复查"), | |
| 16 | - NGY(2,"建议2个月复查"), | |
| 17 | - SGY(3,"建议3个月复查"), | |
| 18 | - LGY(4,"建议6个月复查"), | |
| 19 | - JYB(5,"建议进一步检查"), | |
| 20 | - PHJC(9,"配合检查"); | |
| 15 | +// YGY(1,"建议1个月复查"), | |
| 16 | +// NGY(2,"建议2个月复查"), | |
| 17 | +// SGY(3,"建议3个月复查"), | |
| 18 | +// LGY(4,"建议6个月复查"), | |
| 19 | +// JYB(5,"建议进一步检查"), | |
| 20 | +// PHJC(9,"配合检查"); | |
| 21 | + | |
| 22 | + ONE(70, "请于1周后复查"), | |
| 23 | + TWO(140, "请于2周后复查"), | |
| 24 | + THREE(10, "请于1月后复查"), | |
| 25 | + FOUR(20, "请于2月后复查"), | |
| 26 | + FIVE(30, "请于3月后复查"), | |
| 27 | + SIX(60, "请于6月后复查"), | |
| 28 | + SEVEN(120, "请于1年后复查"); | |
| 21 | 29 | |
| 22 | 30 | private EyeExaminationEnums(int id, String name) { |
| 23 | 31 | this.id = id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
6b88f5f
| 1 | 1 | package com.lyms.platform.operate.web.service.impl; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.BabyBookbuildingService; |
| 4 | +import com.lyms.platform.biz.service.BabyCheckService; | |
| 4 | 5 | import com.lyms.platform.biz.service.YunBookbuildingService; |
| 5 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 6 | 7 | import com.lyms.platform.common.dao.BaseQuery; |
| ... | ... | @@ -21,10 +22,7 @@ |
| 21 | 22 | import com.lyms.platform.permission.dao.master.CouponMapper; |
| 22 | 23 | import com.lyms.platform.permission.model.Organization; |
| 23 | 24 | import com.lyms.platform.permission.service.OrganizationService; |
| 24 | -import com.lyms.platform.pojo.BabyEyeCheck; | |
| 25 | -import com.lyms.platform.pojo.BabyModel; | |
| 26 | -import com.lyms.platform.pojo.FilePathModel; | |
| 27 | -import com.lyms.platform.pojo.Patients; | |
| 25 | +import com.lyms.platform.pojo.*; | |
| 28 | 26 | import com.lyms.platform.query.BabyModelQuery; |
| 29 | 27 | import org.apache.commons.collections.map.HashedMap; |
| 30 | 28 | import org.springframework.beans.factory.annotation.Autowired; |
| 31 | 29 | |
| ... | ... | @@ -63,8 +61,9 @@ |
| 63 | 61 | private OrganizationService organizationService; |
| 64 | 62 | @Autowired |
| 65 | 63 | private MongoUtil mongoUtil; |
| 66 | - | |
| 67 | 64 | @Autowired |
| 65 | + private BabyCheckService babyCheckService; | |
| 66 | + @Autowired | |
| 68 | 67 | private OrganizationGroupsFacade organizationGroupsFacade; |
| 69 | 68 | |
| 70 | 69 | @Autowired |
| 71 | 70 | |
| 72 | 71 | |
| ... | ... | @@ -344,11 +343,37 @@ |
| 344 | 343 | } else if (filePath != null) { |
| 345 | 344 | yunBookbuildingService.updateFilePath(filePath); |
| 346 | 345 | } |
| 347 | - | |
| 346 | + updateBabyCheck( babyEyeCheck); | |
| 348 | 347 | return RespBuilder.buildSuccess(babyEyeCheck.getId()); |
| 349 | 348 | } |
| 350 | 349 | |
| 350 | + | |
| 351 | 351 | /** |
| 352 | + * 眼保健检查的数据更新到儿童检查 | |
| 353 | + * @param babyEyeCheck | |
| 354 | + */ | |
| 355 | + public void updateBabyCheck(BabyEyeCheck babyEyeCheck) { | |
| 356 | + | |
| 357 | + System.out.println(babyEyeCheck.toString()); | |
| 358 | + System.out.println(babyEyeCheck.getId()); | |
| 359 | + Date firstSecond = DateUtil.getDayFirstSecond(new Date()); | |
| 360 | + Date dayLastSecond = DateUtil.getDayLastSecond(new Date()); | |
| 361 | + List<BabyCheckModel> babyCheckModels = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyEyeCheck.getBabyId()) | |
| 362 | + .and("yn").is(1).and("checkDate").gte(firstSecond).lte(dayLastSecond)) | |
| 363 | + .with(new Sort(Sort.Direction.DESC, "created")), BabyCheckModel.class); | |
| 364 | + | |
| 365 | + if (CollectionUtils.isNotEmpty(babyCheckModels)) { | |
| 366 | + BabyCheckModel checkModel = babyCheckModels.get(0); | |
| 367 | + checkModel.setEyeAppearance(babyEyeCheck.getEyeAppearance()); | |
| 368 | + checkModel.setEyeRedReflex(babyEyeCheck.getRedReflexQhd()); | |
| 369 | + checkModel.setEyeDioptroscopy(babyEyeCheck.getRefractiveScreening()); | |
| 370 | + babyCheckService.updateBabyCheck(checkModel,checkModel.getId()); | |
| 371 | + } | |
| 372 | + | |
| 373 | + } | |
| 374 | + | |
| 375 | + | |
| 376 | + /** | |
| 352 | 377 | * 眼保健检查 上传 患者签名 |
| 353 | 378 | * |
| 354 | 379 | * @Author: 武涛涛 |
| ... | ... | @@ -1816,7 +1841,8 @@ |
| 1816 | 1841 | temp.put("redReflexQhd", babyEyeCheck.getRedReflexQhd());//红光反射 |
| 1817 | 1842 | temp.put("refractiveScreening", babyEyeCheck.getRefractiveScreening());//屈光筛查 |
| 1818 | 1843 | temp.put("guidanceOpinions", babyEyeCheck.getGuidanceOpinions());//指导意见 |
| 1819 | - temp.put("handleOpinionsId", HandleOpinionsQhdEnums.getName(babyEyeCheck.getHandleOpinionsId()));//处理意见 id,历史数据不做匹配 | |
| 1844 | +// temp.put("handleOpinionsId", HandleOpinionsQhdEnums.getName(babyEyeCheck.getHandleOpinionsId()));//处理意见 id,历史数据不做匹配 | |
| 1845 | + temp.put("handleOpinionsId", babyEyeCheck.getHandleOpinionsId());//处理意见 id,历史数据不做匹配 | |
| 1820 | 1846 | |
| 1821 | 1847 | } |
| 1822 | 1848 |