Commit 2442bfdc02f9a2eabde656c6b54cfc8b562e1f0d
1 parent
c841834fad
Exists in
master
and in
6 other branches
宫高曲线图
Showing 3 changed files with 79 additions and 1 deletions
- 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/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
2442bfd
| ... | ... | @@ -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 = "/getGongGaoLine") | |
| 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/facade/AntenatalExaminationFacade.java
View file @
2442bfd
| ... | ... | @@ -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,67 @@ |
| 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(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime()), chumodel.getGonggao()); | |
| 2563 | + if (StringUtils.isNumeric(chumodel.getGonggao())) | |
| 2564 | + { | |
| 2565 | + titles.add(DateUtil.getyyyy_MM_dd(chumodel.getCheckTime())); | |
| 2566 | + values.add(chumodel.getGonggao()); | |
| 2567 | + } | |
| 2568 | + tables.add(item); | |
| 2569 | + } | |
| 2570 | + } | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + AntExQuery antExQuery = new AntExQuery(); | |
| 2574 | + antExQuery.setParentId(patientId); | |
| 2575 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 2576 | + List<AntenatalExaminationModel> examinationModelList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.ASC, "created")); | |
| 2577 | + if (CollectionUtils.isNotEmpty(examinationModelList)) | |
| 2578 | + { | |
| 2579 | + for (AntenatalExaminationModel anmodel : examinationModelList) | |
| 2580 | + { | |
| 2581 | + if (anmodel != null && StringUtils.isNotEmpty(anmodel.getGongGao())) | |
| 2582 | + { | |
| 2583 | + Map<String,String> item = new HashMap<>(); | |
| 2584 | + item.put(DateUtil.getyyyy_MM_dd(anmodel.getCheckDate()), anmodel.getGongGao()); | |
| 2585 | + if (StringUtils.isNumeric(anmodel.getGongGao())) | |
| 2586 | + { | |
| 2587 | + titles.add(DateUtil.getyyyy_MM_dd(anmodel.getCheckDate())); | |
| 2588 | + values.add(anmodel.getGongGao()); | |
| 2589 | + } | |
| 2590 | + tables.add(item); | |
| 2591 | + } | |
| 2592 | + } | |
| 2593 | + } | |
| 2594 | + | |
| 2595 | + map.put("titles",titles); | |
| 2596 | + map.put("values",values); | |
| 2597 | + map.put("tables",tables); | |
| 2598 | + | |
| 2599 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 2600 | + } | |
| 2601 | + | |
| 2602 | + | |
| 2540 | 2603 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
2442bfd
| ... | ... | @@ -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())); |