Commit ab9d4219341597c9d23560c974b9e7ffa9787410
1 parent
dd7325fdaa
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 46 additions and 93 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/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 @
ab9d421
... | ... | @@ -90,15 +90,15 @@ |
90 | 90 | @TokenRequired |
91 | 91 | @RequestMapping(method = RequestMethod.GET) |
92 | 92 | public BaseResponse list(Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, HttpServletRequest request, |
93 | - Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive) { | |
94 | - return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, bookStartDate, bookEndDate, apparatusPositive, doctorPositive); | |
93 | + Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) { | |
94 | + return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin); | |
95 | 95 | } |
96 | 96 | |
97 | 97 | @ResponseBody |
98 | 98 | @TokenRequired |
99 | 99 | @RequestMapping(value = "/export", method = RequestMethod.GET) |
100 | - public void export(Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletRequest request, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive) { | |
101 | - babyEyeCheckService.export(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, response, bookStartDate, bookEndDate, apparatusPositive, doctorPositive); | |
100 | + public void export(Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletRequest request, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) { | |
101 | + babyEyeCheckService.export(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, response, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin); | |
102 | 102 | } |
103 | 103 | |
104 | 104 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
View file @
ab9d421
... | ... | @@ -19,14 +19,14 @@ |
19 | 19 | |
20 | 20 | BaseResponse edit(String id); |
21 | 21 | |
22 | - BaseResponse delete(String id,Integer userId); | |
22 | + BaseResponse delete(String id, Integer userId); | |
23 | 23 | |
24 | - BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, Date bookStartDate, Date bookEndDate,String apparatusPositive, String doctorPositive); | |
24 | + BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin); | |
25 | 25 | |
26 | 26 | BaseResponse query(Integer userId, String babyId); |
27 | 27 | |
28 | 28 | BaseResponse listInit(); |
29 | 29 | |
30 | - 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); | |
30 | + 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); | |
31 | 31 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
ab9d421
... | ... | @@ -425,7 +425,7 @@ |
425 | 425 | } |
426 | 426 | |
427 | 427 | @Override |
428 | - public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive) { | |
428 | + public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) { | |
429 | 429 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
430 | 430 | Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId); |
431 | 431 | if (startDate != null && endDate != null) { |
432 | 432 | |
... | ... | @@ -451,90 +451,9 @@ |
451 | 451 | if (StringUtils.isNotEmpty(doctorPositive)) { |
452 | 452 | criteria.and("doctorJudgement").is(doctorPositive); |
453 | 453 | } |
454 | - /* List<String> positives = CollectionUtils.asList(positiveIds, String.class); | |
455 | - if (CollectionUtils.isNotEmpty(positives)) { | |
456 | - if (positives.contains("eyePosition2")) { | |
457 | - //positive.append("眼位(医生判定)"); | |
458 | - criteria.and("eyePosition2Yang").is("2"); | |
459 | - } | |
460 | - if (positives.contains("redLeft2")) { | |
461 | - //positive.append("红光反射(医生判定)"); | |
462 | - criteria.and("redLeft2Yang").is("2"); | |
463 | - } | |
464 | - if (positives.contains("vision2")) { | |
465 | - //positive.append("视力(医生判定)"); | |
466 | - //babyEyeCheck.setVision2Yang("2"); | |
467 | - criteria.and("vision2Yang").is("2"); | |
468 | - } | |
469 | - if ("yang".equals(babyEyeCheck.getY2())) { | |
470 | - //positive.append("手持眼光仪(医生判定)"); | |
471 | - babyEyeCheck.setOptometryYnag("2"); | |
472 | - } | |
473 | - if ("yang".equals(babyEyeCheck.getRedLeft2())) { | |
474 | - //positive.append("屈光(医生判定)"); | |
475 | - babyEyeCheck.setRedLeft2Yang("2"); | |
476 | - } | |
477 | - | |
478 | - | |
479 | - if ("yang".equals(babyEyeCheck.getExtRightEyelook())) { | |
480 | - // babyEyeCheck.setEXtr("外眼观察(右) "); | |
481 | - babyEyeCheck.setExtRightEyelookYang("2"); | |
482 | - } | |
483 | - if ("yang".equals(babyEyeCheck.getExtLeftEyelook())) { | |
484 | - //positive.append("外眼观察(左) "); | |
485 | - babyEyeCheck.setExtLeftEyelookYang("2"); | |
486 | - } | |
487 | - if ("yang".equals(babyEyeCheck.getBlinkRightReflex())) { | |
488 | - //positive.append("瞬目反射(右) "); | |
489 | - babyEyeCheck.setBlinkRightReflexYang("2"); | |
490 | - } | |
491 | - if ("yang".equals(babyEyeCheck.getBlinkLefttReflex())) { | |
492 | - //positive.append("瞬目反射(左) "); | |
493 | - babyEyeCheck.setBlinkLefttReflexYang("2"); | |
494 | - } | |
495 | - if ("yang".equals(babyEyeCheck.getPupillaryRightReflex())) { | |
496 | - //positive.append("瞳孔对光反射(右) "); | |
497 | - babyEyeCheck.setPupillaryRightReflexYang("2"); | |
498 | - } | |
499 | - if ("yang".equals(babyEyeCheck.getPupillaryLeftReflex())) { | |
500 | - //positive.append("瞳孔对光反射(左) "); | |
501 | - babyEyeCheck.setPupillaryLeftReflexYang("2"); | |
502 | - } | |
503 | - if ("yang".equals(babyEyeCheck.getRedRightReflex())) { | |
504 | - // positive.append("瞳孔红光反射(右) "); | |
505 | - babyEyeCheck.setRedRightReflexYang("2"); | |
506 | - } | |
507 | - if ("yang".equals(babyEyeCheck.getRedLeftReflex())) { | |
508 | - //positive.append("瞳孔红光反射(左) "); | |
509 | - babyEyeCheck.setRedLeftReflexYang("2"); | |
510 | - } | |
511 | - if ("yang".equals(babyEyeCheck.getRedReflex())) { | |
512 | - //positive.append("红光反射 "); | |
513 | - babyEyeCheck.setRedReflexYang("2"); | |
514 | - } | |
515 | - if ("yang".equals(babyEyeCheck.getConjunctiva())) { | |
516 | - //positive.append("结膜 "); | |
517 | - babyEyeCheck.setConjunctivaYang("2"); | |
518 | - } | |
519 | - if ("yang".equals(babyEyeCheck.getCorneal())) { | |
520 | - //positive.append("角膜 "); | |
521 | - babyEyeCheck.setCornealYang("2"); | |
522 | - } | |
523 | - if ("yang".equals(babyEyeCheck.getLacrimalApparatus())) { | |
524 | - // positive.append("泪器 "); | |
525 | - babyEyeCheck.setLacrimalApparatusYang("2"); | |
526 | - } | |
527 | - | |
528 | - if ("yang".equals(babyEyeCheck.getNystagmus())) { | |
529 | - // positive.append("视动性眼震 "); | |
530 | - babyEyeCheck.setNystagmusYang("2"); | |
531 | - } | |
532 | - if ("yang".equals(babyEyeCheck.getExtEyelook())) { | |
533 | - // positive.append("外眼观察 "); | |
534 | - babyEyeCheck.setExtEyelookYang("2"); | |
535 | - } | |
454 | + if (StringUtils.isNotEmpty(yin)) { | |
455 | + criteria.and("apparatus").nin("2").and("doctorJudgement").nin("2"); | |
536 | 456 | } |
537 | -*/ | |
538 | 457 | |
539 | 458 | if (org.apache.commons.lang.StringUtils.isNotBlank(key)) { |
540 | 459 | Criteria c = new Criteria(); |
... | ... | @@ -708,6 +627,40 @@ |
708 | 627 | } |
709 | 628 | } |
710 | 629 | |
630 | + private List<BabyEyeCheck> doFilterYin(List<BabyEyeCheck> babyEyeChecks) { | |
631 | + List<BabyEyeCheck> babyEyeCheckList = new ArrayList<>(); | |
632 | + Iterator<BabyEyeCheck> iterator = babyEyeChecks.iterator(); | |
633 | + while (iterator.hasNext()) { | |
634 | + BabyEyeCheck babyEyeCheck = iterator.next(); | |
635 | + if (!"yang".equals(babyEyeCheck.getExtRightEyelook()) | |
636 | + && !"yang".equals(babyEyeCheck.getExtLeftEyelook()) | |
637 | + && !"yang".equals(babyEyeCheck.getBlinkRightReflex()) | |
638 | + && !"yang".equals(babyEyeCheck.getBlinkLefttReflex()) | |
639 | + && !"yang".equals(babyEyeCheck.getPupillaryRightReflex()) | |
640 | + && !"yang".equals(babyEyeCheck.getPupillaryLeftReflex()) | |
641 | + && !"yang".equals(babyEyeCheck.getRedRightReflex()) | |
642 | + && !"yang".equals(babyEyeCheck.getRedLeftReflex()) | |
643 | + && !"yang".equals(babyEyeCheck.getRedReflex()) | |
644 | + && !"yang".equals(babyEyeCheck.getConjunctiva()) | |
645 | + && !"yang".equals(babyEyeCheck.getCorneal()) | |
646 | + && !"yang".equals(babyEyeCheck.getExtEyelook()) | |
647 | + && !"yang".equals(babyEyeCheck.getNystagmus()) | |
648 | + && !"yang".equals(babyEyeCheck.getLacrimalApparatus()) | |
649 | + && !"yang".equals(babyEyeCheck.getEyePositionId()) | |
650 | + && !"yang".equals(babyEyeCheck.getEyePositionId2()) | |
651 | + && !"yang".equals(babyEyeCheck.getRedLeft2()) | |
652 | + && !"yang".equals(babyEyeCheck.getVision2()) | |
653 | + && !"yang".equals(babyEyeCheck.getY2()) | |
654 | + && !"yang".equals(babyEyeCheck.getRefraction2()) | |
655 | + ) { | |
656 | + babyEyeCheckList.add(iterator.next()); | |
657 | + } | |
658 | + } | |
659 | + | |
660 | + return babyEyeCheckList; | |
661 | + | |
662 | + } | |
663 | + | |
711 | 664 | @Override |
712 | 665 | public BaseResponse query(Integer userId, String babyId) { |
713 | 666 | List<String> hospitalIds = organizationGroupsFacade.findGroupHospital(userId, false); |
... | ... | @@ -843,8 +796,8 @@ |
843 | 796 | } |
844 | 797 | |
845 | 798 | @Override |
846 | - 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) { | |
847 | - BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive); | |
799 | + 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) { | |
800 | + BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin); | |
848 | 801 | PageResult pageResult = (PageResult) rest.getObject(); |
849 | 802 | List<Map<String, Object>> datas = (List<Map<String, Object>>) pageResult.getGrid(); |
850 | 803 | Map<String, String> cnames = new LinkedHashMap<>(); |