Commit ff38027bda47d845f635aa9eadf0cfd36905182e
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 9 changed files
- platform-common/src/main/java/com/lyms/platform/common/utils/HttpClientUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.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/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
platform-common/src/main/java/com/lyms/platform/common/utils/HttpClientUtil.java
View file @
ff38027
... | ... | @@ -228,10 +228,10 @@ |
228 | 228 | Map<String,String> map = new HashMap<String, String>(); |
229 | 229 | map.put("page","1"); |
230 | 230 | map.put("limit","10"); |
231 | - map.put("patientId","5959c0a9d5402ad93418edc9"); | |
231 | + map.put("patientIds", "5ab064e9e4b087666f0621d7"); | |
232 | 232 | long start = System.currentTimeMillis(); |
233 | - String s = doGet("https://push.stage.platform.healthbaby.com.cn/biz-push-web/push", map, "utf-8","3d19960bf3e81e7d816c4f26051c49ba"); | |
234 | - | |
233 | + String s = doGet("https://area-weihai-api.healthbaby.com.cn:12356/getAppLis", map, "utf-8", "3d19960bf3e81e7d816c4f26051c49ba"); | |
234 | + System.out.println(s); | |
235 | 235 | long end = System.currentTimeMillis(); |
236 | 236 | System.out.print(end -start); |
237 | 237 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
ff38027
... | ... | @@ -355,5 +355,20 @@ |
355 | 355 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
356 | 356 | return antenatalExaminationFacade.getLastRisk(patientId, loginState.getId()); |
357 | 357 | } |
358 | + | |
359 | + | |
360 | + /** | |
361 | + * 宫高曲线图 | |
362 | + * @param patientId | |
363 | + * @param request | |
364 | + * @return | |
365 | + */ | |
366 | + @RequestMapping(method = RequestMethod.GET, value = "/getGongGaoCurve") | |
367 | + @ResponseBody | |
368 | + @TokenRequired | |
369 | + public BaseResponse getGongGaoLine(@RequestParam(required = true) String patientId,HttpServletRequest request) { | |
370 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
371 | + return antenatalExaminationFacade.getGongGaoLine(patientId, loginState.getId()); | |
372 | + } | |
358 | 373 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
ff38027
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | @ResponseBody |
70 | 70 | @TokenRequired |
71 | 71 | public BaseResponse deleteBabyBuildById(@PathVariable("id")String id,HttpServletRequest request){ |
72 | - babyCheckFacade.deleteBabyCheckById(id,getUserId(request)); | |
72 | + babyCheckFacade.deleteBabyCheckById(id, getUserId(request)); | |
73 | 73 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
74 | 74 | } |
75 | 75 | |
... | ... | @@ -152,7 +152,7 @@ |
152 | 152 | @RequestParam(required = true) Double weight, |
153 | 153 | @RequestParam(required = true) Integer sex, |
154 | 154 | @RequestParam(required = true) String birth){ |
155 | - return babyCheckFacade.queryHWByHeight(height,weight, sex,birth); | |
155 | + return babyCheckFacade.queryHWByHeight(height, weight, sex, birth); | |
156 | 156 | |
157 | 157 | } |
158 | 158 | |
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 | @RequestParam(required = true) Integer sex, |
171 | 171 | @RequestParam(required = true) Integer type, |
172 | 172 | @RequestParam(required = true) String birth){ |
173 | - return babyCheckFacade.queryBabyHealthStatus(birth,value, sex, type); | |
173 | + return babyCheckFacade.queryBabyHealthStatus(birth, value, sex, type); | |
174 | 174 | |
175 | 175 | } |
176 | 176 | |
177 | 177 | |
... | ... | @@ -208,10 +208,25 @@ |
208 | 208 | public BaseObjectResponse getBabyMonthAge( |
209 | 209 | @RequestParam(required = true) String birth, |
210 | 210 | @RequestParam(required = false) String checkDate){ |
211 | - return babyCheckFacade.getBabyMonthAge(birth,checkDate); | |
211 | + return babyCheckFacade.getBabyMonthAge(birth, checkDate); | |
212 | 212 | |
213 | 213 | } |
214 | 214 | |
215 | + | |
216 | + | |
217 | + /** | |
218 | + *儿童检查曲线图 | |
219 | + * @param babyId | |
220 | + * @param request | |
221 | + * @return | |
222 | + */ | |
223 | + @RequestMapping(method = RequestMethod.GET, value = "/getBabyCurve") | |
224 | + @ResponseBody | |
225 | + @TokenRequired | |
226 | + public BaseResponse getBabyCurve(@RequestParam(required = true) String babyId,HttpServletRequest request) { | |
227 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
228 | + return babyCheckFacade.getBabyCurve(babyId, loginState.getId()); | |
229 | + } | |
215 | 230 | |
216 | 231 | |
217 | 232 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
ff38027
... | ... | @@ -1487,6 +1487,7 @@ |
1487 | 1487 | } |
1488 | 1488 | |
1489 | 1489 | |
1490 | + | |
1490 | 1491 | public class SortIn { |
1491 | 1492 | |
1492 | 1493 | public SortIn(Patients patients) { |
... | ... | @@ -2537,5 +2538,69 @@ |
2537 | 2538 | } |
2538 | 2539 | return doctors; |
2539 | 2540 | } |
2541 | + | |
2542 | + public BaseResponse getGongGaoLine(String patientId, Integer id) { | |
2543 | + | |
2544 | + Map<String,Object> map = new HashMap<>(); | |
2545 | + | |
2546 | + List<String> titles = new ArrayList<>(); | |
2547 | + List<String> values = new ArrayList<>(); | |
2548 | + | |
2549 | + | |
2550 | + List<Map<String,String>> tables = new LinkedList<>(); | |
2551 | + | |
2552 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
2553 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
2554 | + antExChuQuery.setParentId(patientId); | |
2555 | + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
2556 | + if (CollectionUtils.isNotEmpty(antExChuModels)) | |
2557 | + { | |
2558 | + AntExChuModel chumodel = antExChuModels.get(0); | |
2559 | + if (chumodel != null && StringUtils.isNotEmpty(chumodel.getGonggao())) | |
2560 | + { | |
2561 | + Map<String,String> item = new HashMap<>(); | |
2562 | + item.put("value", chumodel.getGonggao()); | |
2563 | + item.put("time", DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2564 | + if (StringUtils.isNumeric(chumodel.getGonggao())) | |
2565 | + { | |
2566 | + titles.add(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
2567 | + values.add(chumodel.getGonggao()); | |
2568 | + } | |
2569 | + tables.add(item); | |
2570 | + } | |
2571 | + } | |
2572 | + | |
2573 | + | |
2574 | + AntExQuery antExQuery = new AntExQuery(); | |
2575 | + antExQuery.setParentId(patientId); | |
2576 | + antExQuery.setYn(YnEnums.YES.getId()); | |
2577 | + List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created")); | |
2578 | + if (CollectionUtils.isNotEmpty(examinationModelList)) | |
2579 | + { | |
2580 | + for (AntenatalExaminationModel anmodel : examinationModelList) | |
2581 | + { | |
2582 | + if (anmodel != null && StringUtils.isNotEmpty(anmodel.getGongGao())) | |
2583 | + { | |
2584 | + Map<String,String> item = new HashMap<>(); | |
2585 | + item.put("value", anmodel.getGongGao()); | |
2586 | + item.put("time", DateUtil.getyyyy_MM_dd(anmodel.getCheckDate())); | |
2587 | + if (StringUtils.isNumeric(anmodel.getGongGao())) | |
2588 | + { | |
2589 | + titles.add(DateUtil.getyyyy_MM_dd(anmodel.getCheckDate())); | |
2590 | + values.add(anmodel.getGongGao()); | |
2591 | + } | |
2592 | + tables.add(item); | |
2593 | + } | |
2594 | + } | |
2595 | + } | |
2596 | + | |
2597 | + map.put("titles",titles); | |
2598 | + map.put("values",values); | |
2599 | + map.put("tables", tables); | |
2600 | + | |
2601 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
2602 | + } | |
2603 | + | |
2604 | + | |
2540 | 2605 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
ff38027
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import com.lyms.platform.common.result.BaseObjectResponse; |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.*; |
10 | +import com.lyms.platform.common.utils.StringUtils; | |
10 | 11 | import com.lyms.platform.operate.web.request.BabyCheckRequest; |
11 | 12 | import com.lyms.platform.operate.web.result.*; |
12 | 13 | import com.lyms.platform.operate.web.utils.MongoUtil; |
... | ... | @@ -19,6 +20,7 @@ |
19 | 20 | import com.lyms.platform.pojo.*; |
20 | 21 | import com.lyms.platform.query.*; |
21 | 22 | import org.apache.commons.collections.CollectionUtils; |
23 | +import org.apache.commons.lang.*; | |
22 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 25 | import org.springframework.data.domain.Sort; |
24 | 26 | import org.springframework.stereotype.Component; |
... | ... | @@ -1631,6 +1633,78 @@ |
1631 | 1633 | |
1632 | 1634 | return res; |
1633 | 1635 | |
1636 | + } | |
1637 | + | |
1638 | + public BaseResponse getBabyCurve(String babyId, Integer id) { | |
1639 | + | |
1640 | + Map<String,Object> map = new HashMap<>(); | |
1641 | + | |
1642 | + List<String> weightTitles = new LinkedList<>(); | |
1643 | + List<String> weightValues = new LinkedList<>(); | |
1644 | + | |
1645 | + List<String> heightTitles = new LinkedList<>(); | |
1646 | + List<String> heightValues = new LinkedList<>(); | |
1647 | + | |
1648 | + List<Map<String,String>> tables = new LinkedList<>(); | |
1649 | + | |
1650 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
1651 | + query.setYn(YnEnums.YES.getId()); | |
1652 | + query.setBuildId(babyId); | |
1653 | + //查询儿童的检查记录 | |
1654 | + List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(query, "checkDate", Sort.Direction.ASC); | |
1655 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
1656 | + { | |
1657 | + for (BabyCheckModel checkModel : checkModels) | |
1658 | + { | |
1659 | + if (checkModel != null) | |
1660 | + { | |
1661 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getHeight()) || org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getWeight())) | |
1662 | + { | |
1663 | + Map<String,String> heightMap = new HashMap<>(); | |
1664 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getHeight())) | |
1665 | + { | |
1666 | + if (org.apache.commons.lang.StringUtils.isNumeric(checkModel.getHeight())) | |
1667 | + { | |
1668 | + heightTitles.add(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1669 | + heightValues.add(checkModel.getHeight()); | |
1670 | + } | |
1671 | + heightMap.put("time",DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1672 | + heightMap.put("height", checkModel.getHeight()); | |
1673 | + } | |
1674 | + else | |
1675 | + { | |
1676 | + heightMap.put("height", "--"); | |
1677 | + } | |
1678 | + | |
1679 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getWeight())) | |
1680 | + { | |
1681 | + if (org.apache.commons.lang.StringUtils.isNumeric(checkModel.getWeight())) | |
1682 | + { | |
1683 | + weightTitles.add(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1684 | + weightValues.add(checkModel.getWeight()); | |
1685 | + } | |
1686 | + heightMap.put("time", DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1687 | + heightMap.put("weight",checkModel.getWeight()); | |
1688 | + } | |
1689 | + else | |
1690 | + { | |
1691 | + heightMap.put("weight", "--"); | |
1692 | + } | |
1693 | + | |
1694 | + tables.add(heightMap); | |
1695 | + } | |
1696 | + } | |
1697 | + } | |
1698 | + } | |
1699 | + map.put("weightTitles",weightTitles); | |
1700 | + map.put("weightValues",weightValues); | |
1701 | + | |
1702 | + map.put("heightTitles",heightTitles); | |
1703 | + map.put("heightValues",heightValues); | |
1704 | + | |
1705 | + map.put("tables",tables); | |
1706 | + | |
1707 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1634 | 1708 | } |
1635 | 1709 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
ff38027
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | import com.lyms.platform.common.result.BaseObjectResponse; |
15 | 15 | import com.lyms.platform.common.result.BaseResponse; |
16 | 16 | import com.lyms.platform.common.utils.*; |
17 | +import com.lyms.platform.common.utils.StringUtils; | |
17 | 18 | import com.lyms.platform.operate.web.request.BookBuildManagerQueryRequest; |
18 | 19 | import com.lyms.platform.operate.web.request.BookbuildingQueryRequest; |
19 | 20 | import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; |
... | ... | @@ -31,6 +32,7 @@ |
31 | 32 | import com.lyms.platform.pojo.*; |
32 | 33 | import com.lyms.platform.query.*; |
33 | 34 | import org.apache.commons.collections.CollectionUtils; |
35 | +import org.apache.commons.lang.*; | |
34 | 36 | import org.slf4j.Logger; |
35 | 37 | import org.slf4j.LoggerFactory; |
36 | 38 | import org.springframework.beans.factory.annotation.Autowired; |
37 | 39 | |
38 | 40 | |
... | ... | @@ -872,15 +874,39 @@ |
872 | 874 | //查询主档案 |
873 | 875 | patientsQuery.setExtEnable(false); |
874 | 876 | |
877 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
878 | + | |
875 | 879 | //如果身份证号码不为空就以身份证号码查询 |
876 | 880 | if (!StringUtils.isEmpty(bookbuildingQueryRequest.getCardNo())) { |
877 | 881 | patientsQuery.setCardNo(bookbuildingQueryRequest.getCardNo()); |
882 | + | |
883 | + | |
884 | + //线上唐山区域查询的时候只查询唐山医院的已有建档记录 | |
885 | + Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId)); | |
886 | + List<String> hids = new ArrayList<>(); | |
887 | + if (org != null && "4".equals(org.getCityId()) && "1".equals(org.getProvinceId())) | |
888 | + { | |
889 | + OrganizationQuery query = new OrganizationQuery(); | |
890 | + query.setYn(YnEnums.YES.getId()); | |
891 | + query.setCityId("4"); | |
892 | + query.setProvinceId("1"); | |
893 | + List<Organization> list = organizationService.queryOrganization(query); | |
894 | + if (CollectionUtils.isNotEmpty(list)) | |
895 | + { | |
896 | + for (Organization organization : list) { | |
897 | + hids.add(String.valueOf(organization.getId())); | |
898 | + } | |
899 | + } | |
900 | + if (CollectionUtils.isNotEmpty(hids)) | |
901 | + { | |
902 | + patientsQuery.setHospitalList(hids); | |
903 | + } | |
904 | + } | |
905 | + | |
878 | 906 | patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery, "bookbuildingDate", Sort.Direction.DESC); |
879 | 907 | } |
880 | 908 | //否则用就诊卡号 查询到这个孕妇的身份证号码 再用身份证号码查询该孕妇的所有建档 包括产妇记录 |
881 | 909 | else if (!StringUtils.isEmpty(bookbuildingQueryRequest.getVcCardNo())) { |
882 | - | |
883 | - String hospitalId = autoMatchFacade.getHospitalId(userId); | |
884 | 910 | |
885 | 911 | //德州市妇幼保健院医院通过(就诊卡号、银行卡号,社保卡号) 查询出对应的用过的卡号 add lqy |
886 | 912 | if ("1000000114".equals(hospitalId)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
ff38027
... | ... | @@ -551,8 +551,13 @@ |
551 | 551 | //承德查询lis |
552 | 552 | else if ("16".equals(HIS_VERSION)) |
553 | 553 | { |
554 | - vcCardNos.add(pat.getVcCardNo()); | |
555 | -// vcCardNos.add(cdfyHisService.getPatientIdByVcCardNo(pat.getVcCardNo())); | |
554 | +// vcCardNos.add(pat.getVcCardNo()); | |
555 | + vcCardNos.add(cdfyHisService.getIdByVcCardNo(pat.getVcCardNo())); | |
556 | + } | |
557 | + //威海市妇幼 因为威海市妇幼有些孕妇没有就诊卡直接用身份证,lis把身份证号码存在就诊卡号字段的 | |
558 | + else if ("22".equals(HIS_VERSION)) | |
559 | + { | |
560 | + vcCardNos.add(pat.getCardNo()); | |
556 | 561 | } |
557 | 562 | else |
558 | 563 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
View file @
ff38027
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | result.put("serviceStatusName", ServiceStatusEnums.getNameById(temp.getServiceStatus())); |
254 | 254 | result.put("content", temp.getContent()); |
255 | 255 | |
256 | - String str = "一次 预约短信"; | |
256 | + String str = "一次 预约"+((temp.getTemplateType() == null || temp.getTemplateType() == 0 ) ? "推送" : "短信"); | |
257 | 257 | if (temp.getSmsType() != null && temp.getSmsType() != SmsServiceEnums.CJYYTX.getId() |
258 | 258 | && temp.getSmsType() != SmsServiceEnums.CHFCYUTX.getId() && temp.getSmsType() != SmsServiceEnums.EBYYTX.getId() |
259 | 259 | && temp.getSmsType() != SmsServiceEnums.YBYYTX.getId() |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
ff38027
... | ... | @@ -1945,7 +1945,7 @@ |
1945 | 1945 | szy = chBpMap.get("szy"); |
1946 | 1946 | } |
1947 | 1947 | map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy, UnitConstants.MMHG)); |
1948 | - map.put("gongGao", UnitUtils.unitSplice(data.getGongGao(), UnitConstants.CM)); | |
1948 | + map.put("gongGao", StringUtils.isNumeric(data.getGongGao()) ? UnitUtils.unitSplice(data.getGongGao(), UnitConstants.CM) : data.getGongGao() == null ? "" : data.getGongGao()); | |
1949 | 1949 | |
1950 | 1950 | if (StringUtils.isNotEmpty(data.getGongGaoSelect())) { |
1951 | 1951 | map.put("gongGaoSelect", GongJingEnums.getGongGaoNameById(data.getGongGaoSelect())); |