Commit 2650913fc9a812ccf228ccb7418e3b716ef18334
1 parent
88922d3f87
Exists in
master
and in
6 other branches
update
Showing 5 changed files with 124 additions and 32 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
View file @
2650913
... | ... | @@ -54,6 +54,21 @@ |
54 | 54 | public BaseResponse queryQhd(@PathVariable String id, HttpServletRequest request) { |
55 | 55 | return babyEyeCheckService.queryQhd(getUserId(request), id); |
56 | 56 | } |
57 | + | |
58 | + /** | |
59 | + * 儿保检查获取眼保健检查结果信息 | |
60 | + * | |
61 | + * @param babyId | |
62 | + * @param request | |
63 | + * @Author: 武涛涛 | |
64 | + * @Date: 2020/7/22 9:31 | |
65 | + */ | |
66 | + @ResponseBody | |
67 | + @TokenRequired | |
68 | + @RequestMapping(value = "/queryShowQhd/{babyId}", method = RequestMethod.GET) | |
69 | + public BaseResponse queryShowQhd(@PathVariable String babyId, HttpServletRequest request) { | |
70 | + return babyEyeCheckService.queryShowQhd(babyId); | |
71 | + } | |
57 | 72 | /** |
58 | 73 | * 保存之后查看的数据 |
59 | 74 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
2650913
... | ... | @@ -1106,7 +1106,20 @@ |
1106 | 1106 | } |
1107 | 1107 | } |
1108 | 1108 | |
1109 | - | |
1109 | + private String getBasicConfig(String id) { | |
1110 | + try { | |
1111 | + if (StringUtils.isEmpty(id)) { | |
1112 | + return ""; | |
1113 | + } | |
1114 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
1115 | + if (null != basicConfig) { | |
1116 | + return basicConfig.getName(); | |
1117 | + } | |
1118 | + } catch (Exception e) { | |
1119 | + e.printStackTrace(); | |
1120 | + } | |
1121 | + return ""; | |
1122 | + } | |
1110 | 1123 | public BabyModel getBabyModel(String id, BabyBasicResult base) { |
1111 | 1124 | BabyModel model = null; |
1112 | 1125 | if (!StringUtils.isEmpty(id)) { |
... | ... | @@ -1118,6 +1131,15 @@ |
1118 | 1131 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
1119 | 1132 | if (models != null && models.size() > 0) { |
1120 | 1133 | model = models.get(0); |
1134 | + /** | |
1135 | + * start | |
1136 | + * 秦皇岛眼保健打印使用 | |
1137 | + * @Author: 武涛涛 | |
1138 | + * @Date: 2020/7/22 10:08 | |
1139 | + */ | |
1140 | + base.setEncoded(model.getEncoded()); | |
1141 | + base.setBnationId(model.getBnationId() == null ? "" : getBasicConfig(model.getBnationId())); | |
1142 | + /*end*/ | |
1121 | 1143 | base.setYn(model.getYn()); |
1122 | 1144 | base.setDataStatus(model.getDataStatus()); |
1123 | 1145 | base.setmHighRiskReason(mongoUtil.findColor(model.getmHighRiskReason())); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java
View file @
2650913
... | ... | @@ -17,6 +17,10 @@ |
17 | 17 | public void setmHighRiskReason(List<Map<String, Object>> mHighRiskReason) { |
18 | 18 | this.mHighRiskReason = mHighRiskReason; |
19 | 19 | } |
20 | + // 编码唯一,通过编码获取档案信息,编码格式20200721001 | |
21 | + private String encoded; | |
22 | + //新生儿民族Id | |
23 | + private String bnationId; | |
20 | 24 | |
21 | 25 | private String id; |
22 | 26 | |
... | ... | @@ -88,6 +92,22 @@ |
88 | 92 | |
89 | 93 | public String getBabyHeight() { |
90 | 94 | return babyHeight; |
95 | + } | |
96 | + | |
97 | + public String getEncoded() { | |
98 | + return encoded; | |
99 | + } | |
100 | + | |
101 | + public void setEncoded(String encoded) { | |
102 | + this.encoded = encoded; | |
103 | + } | |
104 | + | |
105 | + public String getBnationId() { | |
106 | + return bnationId; | |
107 | + } | |
108 | + | |
109 | + public void setBnationId(String bnationId) { | |
110 | + this.bnationId = bnationId; | |
91 | 111 | } |
92 | 112 | |
93 | 113 | public void setBabyHeight(String babyHeight) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
View file @
2650913
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
2650913
1 | 1 | package com.lyms.platform.operate.web.service.impl; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.BabyBookbuildingService; | |
3 | 4 | import com.lyms.platform.biz.service.BasicConfigService; |
4 | 5 | import com.lyms.platform.biz.service.YunBookbuildingService; |
5 | 6 | import com.lyms.platform.common.dao.BaseQuery; |
... | ... | @@ -21,6 +22,7 @@ |
21 | 22 | import com.lyms.platform.permission.dao.master.BabyEyeCheckMapper; |
22 | 23 | import com.lyms.platform.permission.dao.master.CouponMapper; |
23 | 24 | import com.lyms.platform.pojo.*; |
25 | +import com.lyms.platform.query.BabyModelQuery; | |
24 | 26 | import org.apache.commons.collections.map.HashedMap; |
25 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
26 | 28 | import org.springframework.data.domain.Sort; |
27 | 29 | |
... | ... | @@ -44,8 +46,11 @@ |
44 | 46 | public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeCheckService { |
45 | 47 | @Autowired |
46 | 48 | private BabyEyeCheckMapper babyEyeCheckMapper; |
47 | - | |
48 | 49 | @Autowired |
50 | + private OrganizationGroupsFacade groupsFacade; | |
51 | + @Autowired | |
52 | + private BabyBookbuildingService babyBookbuildingService; | |
53 | + @Autowired | |
49 | 54 | private AutoMatchFacade autoMatchFacade; |
50 | 55 | |
51 | 56 | @Autowired |
... | ... | @@ -409,6 +414,7 @@ |
409 | 414 | CollectionUtils.removeNullValue(map); |
410 | 415 | return RespBuilder.buildSuccess(map); |
411 | 416 | } |
417 | + | |
412 | 418 | /** |
413 | 419 | * 秦皇岛(定制)保存之后查看的数据 |
414 | 420 | * |
415 | 421 | |
416 | 422 | |
... | ... | @@ -539,11 +545,11 @@ |
539 | 545 | |
540 | 546 | map.put("riskFactorId", riskFactorNames); |
541 | 547 | //处理老数据 |
542 | - if("0".equals(babyEyeCheck.getCheckMonthId())){ | |
548 | + if ("0".equals(babyEyeCheck.getCheckMonthId())) { | |
543 | 549 | babyEyeCheck.setCheckMonthId("1"); |
544 | - }else if("9".equals(babyEyeCheck.getCheckMonthId())){ | |
550 | + } else if ("9".equals(babyEyeCheck.getCheckMonthId())) { | |
545 | 551 | babyEyeCheck.setCheckMonthId("12"); |
546 | - }else if("18".equals(babyEyeCheck.getCheckMonthId())){ | |
552 | + } else if ("18".equals(babyEyeCheck.getCheckMonthId())) { | |
547 | 553 | babyEyeCheck.setCheckMonthId("24"); |
548 | 554 | } |
549 | 555 | map.put("checkMonthId", CheckMonthQhdEnums.getName(babyEyeCheck.getCheckMonthId())); |
... | ... | @@ -641,6 +647,7 @@ |
641 | 647 | } |
642 | 648 | return RespBuilder.buildSuccess(map); |
643 | 649 | } |
650 | + | |
644 | 651 | @Override |
645 | 652 | public BaseResponse editQhd(String id) { |
646 | 653 | BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class); |
647 | 654 | |
648 | 655 | |
... | ... | @@ -649,11 +656,11 @@ |
649 | 656 | map.put("uncooperative", babyEyeCheck.isUncooperative()); |
650 | 657 | if (StringUtils.isNotEmpty(babyEyeCheck.getCheckMonthId())) { |
651 | 658 | //处理老数据 |
652 | - if("0".equals(babyEyeCheck.getCheckMonthId())){ | |
659 | + if ("0".equals(babyEyeCheck.getCheckMonthId())) { | |
653 | 660 | babyEyeCheck.setCheckMonthId("1"); |
654 | - }else if("9".equals(babyEyeCheck.getCheckMonthId())){ | |
661 | + } else if ("9".equals(babyEyeCheck.getCheckMonthId())) { | |
655 | 662 | babyEyeCheck.setCheckMonthId("12"); |
656 | - }else if("18".equals(babyEyeCheck.getCheckMonthId())){ | |
663 | + } else if ("18".equals(babyEyeCheck.getCheckMonthId())) { | |
657 | 664 | babyEyeCheck.setCheckMonthId("24"); |
658 | 665 | } |
659 | 666 | map.put("checkMonthId", babyEyeCheck.getCheckMonthId() + ""); |
... | ... | @@ -697,7 +704,7 @@ |
697 | 704 | public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, |
698 | 705 | Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, |
699 | 706 | Integer page, Integer limit, Date bookStartDate, Date bookEndDate, |
700 | - String apparatusPositive, String doctorPositive, String yin,String noPassIds) { | |
707 | + String apparatusPositive, String doctorPositive, String yin, String noPassIds) { | |
701 | 708 | boolean b = true; |
702 | 709 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
703 | 710 | Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId); |
704 | 711 | |
705 | 712 | |
... | ... | @@ -711,12 +718,12 @@ |
711 | 718 | criteria.and("doctor").is(doctor); |
712 | 719 | } |
713 | 720 | |
714 | - if(b && StringUtils.isNotEmpty(chechMonth)){ | |
715 | - if("0".equals(chechMonth)){ | |
721 | + if (b && StringUtils.isNotEmpty(chechMonth)) { | |
722 | + if ("0".equals(chechMonth)) { | |
716 | 723 | chechMonth = "1"; |
717 | - }else if("9".equals(chechMonth)){ | |
724 | + } else if ("9".equals(chechMonth)) { | |
718 | 725 | chechMonth = "12"; |
719 | - }else if("18".equals(chechMonth)){ | |
726 | + } else if ("18".equals(chechMonth)) { | |
720 | 727 | chechMonth = "24"; |
721 | 728 | } |
722 | 729 | } |
723 | 730 | |
724 | 731 | |
725 | 732 | |
726 | 733 | |
727 | 734 | |
728 | 735 | |
729 | 736 | |
... | ... | @@ -754,21 +761,21 @@ |
754 | 761 | if (StringUtils.isNotEmpty(noPassIds)) { |
755 | 762 | List<String> ids = CollectionUtils.asList(noPassIds, String.class); |
756 | 763 | for (String id : ids) { |
757 | - if("eyeAppearance".equals(id)){ | |
764 | + if ("eyeAppearance".equals(id)) { | |
758 | 765 | criteria.and("eyeAppearance").is("2"); |
759 | - }else if("redReflexQhd".equals(id)){ | |
766 | + } else if ("redReflexQhd".equals(id)) { | |
760 | 767 | criteria.and("redReflexQhd").is("2"); |
761 | - }else if("blinkReflex".equals(id)){ | |
768 | + } else if ("blinkReflex".equals(id)) { | |
762 | 769 | criteria.and("blinkReflex").is("2"); |
763 | - }else if("redBallTest".equals(id)){ | |
770 | + } else if ("redBallTest".equals(id)) { | |
764 | 771 | criteria.and("redBallTest").is("2"); |
765 | - }else if("behaviorObservation".equals(id)){ | |
772 | + } else if ("behaviorObservation".equals(id)) { | |
766 | 773 | criteria.and("behaviorObservation").is("2"); |
767 | - }else if("refractiveScreening".equals(id)){ | |
774 | + } else if ("refractiveScreening".equals(id)) { | |
768 | 775 | criteria.and("refractiveScreening").is("2"); |
769 | - }else if("eyePositionExamination".equals(id)){ | |
776 | + } else if ("eyePositionExamination".equals(id)) { | |
770 | 777 | criteria.and("eyePositionExamination").is("2"); |
771 | - }else if("eyeMovement".equals(id)){ | |
778 | + } else if ("eyeMovement".equals(id)) { | |
772 | 779 | criteria.and("eyeMovement").is("2"); |
773 | 780 | } |
774 | 781 | } |
775 | 782 | |
776 | 783 | |
777 | 784 | |
778 | 785 | |
... | ... | @@ -852,17 +859,17 @@ |
852 | 859 | temp.put("birth", DateUtil.getYyyyMmDd(babyModel.getBirth())); |
853 | 860 | } |
854 | 861 | if (StringUtils.isNotEmpty(babyEyeCheck.getCheckMonthId())) { |
855 | - if(StringUtils.isNotEmpty(babyEyeCheck.getEdition())){ | |
862 | + if (StringUtils.isNotEmpty(babyEyeCheck.getEdition())) { | |
856 | 863 | //处理老数据 |
857 | - if("0".equals(babyEyeCheck.getCheckMonthId())){ | |
864 | + if ("0".equals(babyEyeCheck.getCheckMonthId())) { | |
858 | 865 | babyEyeCheck.setCheckMonthId("1"); |
859 | - }else if("9".equals(babyEyeCheck.getCheckMonthId())){ | |
866 | + } else if ("9".equals(babyEyeCheck.getCheckMonthId())) { | |
860 | 867 | babyEyeCheck.setCheckMonthId("12"); |
861 | - }else if("18".equals(babyEyeCheck.getCheckMonthId())){ | |
868 | + } else if ("18".equals(babyEyeCheck.getCheckMonthId())) { | |
862 | 869 | babyEyeCheck.setCheckMonthId("24"); |
863 | 870 | } |
864 | 871 | temp.put("checkMonth", CheckMonthQhdEnums.getName(babyEyeCheck.getCheckMonthId())); |
865 | - }else { | |
872 | + } else { | |
866 | 873 | temp.put("checkMonth", CheckMonthEnums.getName(babyEyeCheck.getCheckMonthId())); /** 检查月龄 */; |
867 | 874 | } |
868 | 875 | } |
... | ... | @@ -1043,6 +1050,7 @@ |
1043 | 1050 | } |
1044 | 1051 | return RespBuilder.buildSuccess(rest); |
1045 | 1052 | } |
1053 | + | |
1046 | 1054 | @Override |
1047 | 1055 | public BaseResponse queryQhd(Integer userId, String babyId) { |
1048 | 1056 | List<String> hospitalIds = organizationGroupsFacade.findGroupHospital(userId, false); |
1049 | 1057 | |
1050 | 1058 | |
1051 | 1059 | |
1052 | 1060 | |
... | ... | @@ -1058,17 +1066,17 @@ |
1058 | 1066 | temp.put("hospitalId", babyEyeCheck.getHospitalId()); |
1059 | 1067 | temp.put("edition", babyEyeCheck.getEdition()); |
1060 | 1068 | temp.put("pid", babyEyeCheck.getPid()); |
1061 | - if(StringUtils.isNotEmpty(babyEyeCheck.getEdition())){ | |
1069 | + if (StringUtils.isNotEmpty(babyEyeCheck.getEdition())) { | |
1062 | 1070 | //处理老数据 |
1063 | - if("0".equals(babyEyeCheck.getCheckMonthId())){ | |
1071 | + if ("0".equals(babyEyeCheck.getCheckMonthId())) { | |
1064 | 1072 | babyEyeCheck.setCheckMonthId("1"); |
1065 | - }else if("9".equals(babyEyeCheck.getCheckMonthId())){ | |
1073 | + } else if ("9".equals(babyEyeCheck.getCheckMonthId())) { | |
1066 | 1074 | babyEyeCheck.setCheckMonthId("12"); |
1067 | - }else if("18".equals(babyEyeCheck.getCheckMonthId())){ | |
1075 | + } else if ("18".equals(babyEyeCheck.getCheckMonthId())) { | |
1068 | 1076 | babyEyeCheck.setCheckMonthId("24"); |
1069 | 1077 | } |
1070 | 1078 | temp.put("checkMonth", CheckMonthQhdEnums.getName(babyEyeCheck.getCheckMonthId())); |
1071 | - }else { | |
1079 | + } else { | |
1072 | 1080 | temp.put("checkMonth", CheckMonthEnums.getName(babyEyeCheck.getCheckMonthId())); |
1073 | 1081 | } |
1074 | 1082 | BabyModel babyModel = mongoTemplate.findById(babyEyeCheck.getBabyId(), BabyModel.class); |
... | ... | @@ -1086,6 +1094,32 @@ |
1086 | 1094 | } |
1087 | 1095 | |
1088 | 1096 | @Override |
1097 | + public BaseResponse queryShowQhd( String babyId) { | |
1098 | + Date firstSecond = DateUtil.getDayFirstSecond(new Date()); | |
1099 | + Date dayLastSecond = DateUtil.getDayLastSecond(new Date()); | |
1100 | + Map<String, Object> temp = new HashMap<>(); | |
1101 | + List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId) | |
1102 | + .and("yn").ne("0").and("checkTime").gte(firstSecond).lte(dayLastSecond)) | |
1103 | + .with(new Sort(Sort.Direction.DESC, "created")), BabyEyeCheck.class); | |
1104 | + | |
1105 | + if (CollectionUtils.isNotEmpty(babyEyeChecks)) { | |
1106 | + BabyEyeCheck babyEyeCheck = babyEyeChecks.get(0); | |
1107 | + temp.put("id", babyEyeCheck.getId()); | |
1108 | + temp.put("hospitalId", babyEyeCheck.getHospitalId()); | |
1109 | + temp.put("edition", babyEyeCheck.getEdition()); | |
1110 | + temp.put("pid", babyEyeCheck.getPid()); | |
1111 | + temp.put("checkTime", babyEyeCheck.getCheckTime() == null ? null : DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime())); | |
1112 | + temp.put("uncooperative", babyEyeCheck.isUncooperative()); // false不合作 | |
1113 | + temp.put("eyeAppearance", babyEyeCheck.getEyeAppearance()); // 眼外观 | |
1114 | + temp.put("redReflexQhd", babyEyeCheck.getRedReflexQhd());//红光反射 | |
1115 | + temp.put("refractiveScreening", babyEyeCheck.getRefractiveScreening());//屈光筛查 | |
1116 | + temp.put("guidanceOpinions", babyEyeCheck.getGuidanceOpinions());//指导意见 | |
1117 | + } | |
1118 | + | |
1119 | + return RespBuilder.buildSuccess(temp); | |
1120 | + } | |
1121 | + | |
1122 | + @Override | |
1089 | 1123 | public BaseResponse listInit(Integer userId) { |
1090 | 1124 | |
1091 | 1125 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
... | ... | @@ -1283,7 +1317,7 @@ |
1283 | 1317 | |
1284 | 1318 | @Override |
1285 | 1319 | public void export(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) { |
1286 | - BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin,null); | |
1320 | + BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, null); | |
1287 | 1321 | PageResult pageResult = (PageResult) rest.getObject(); |
1288 | 1322 | List<Map<String, Object>> datas = (List<Map<String, Object>>) pageResult.getGrid(); |
1289 | 1323 | Map<String, String> cnames = new LinkedHashMap<>(); |