Commit 423512ff2e418bce0d7b441c80ed3f2862232c3f
1 parent
4d687eb62b
Exists in
master
选科室后查询出科室下有哪些疾病
Showing 1 changed file with 30 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
423512f
... | ... | @@ -71,6 +71,9 @@ |
71 | 71 | @Autowired |
72 | 72 | private LymsDictService lymsDictService; |
73 | 73 | |
74 | + @Autowired //科室所拥有的疾病 | |
75 | + private LymsDepartillService lymsDepartillService; | |
76 | + | |
74 | 77 | /** |
75 | 78 | * 获取患者列表 |
76 | 79 | * |
... | ... | @@ -762,6 +765,33 @@ |
762 | 765 | } |
763 | 766 | } |
764 | 767 | |
768 | + return baseResponse; | |
769 | + } | |
770 | + /** | |
771 | + * 选科室后查询出科室下有哪些疾病 | |
772 | + * @param 科室id | |
773 | + * @return | |
774 | + */ | |
775 | + @GetMapping("getDepartIllness") | |
776 | + public BaseResponse getDepartIllness(String did){ | |
777 | + BaseResponse baseResponse=new BaseResponse(); | |
778 | + try { | |
779 | + Map param=new HashMap(); | |
780 | + param.put("did",did); | |
781 | + List<LymsDepartill> iLst=lymsDepartillService.listByMap(param); | |
782 | + List<LymsDict> dictList=new ArrayList<>(); | |
783 | + for (LymsDepartill lymsDepartill : iLst) { | |
784 | + final LymsDict dict = lymsDictService.getById(lymsDepartill.getIid()); | |
785 | + if(null!=dict){ | |
786 | + dictList.add(dict); | |
787 | + } | |
788 | + } | |
789 | + baseResponse.setObject(dictList); | |
790 | + baseResponse.setErrormsg("成功"); | |
791 | + } catch (Exception e) { | |
792 | + baseResponse.setErrormsg("失败"); | |
793 | + e.printStackTrace(); | |
794 | + } | |
765 | 795 | return baseResponse; |
766 | 796 | } |
767 | 797 | } |