Commit 69a8b27ccff32f12bea7c33b08dd0da6cf93f674
1 parent
ca7d26d4f5
Exists in
master
and in
1 other branch
添加医院和护士接口
Showing 2 changed files with 48 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java
View file @
69a8b27
... | ... | @@ -48,6 +48,40 @@ |
48 | 48 | return baseResponse; |
49 | 49 | } |
50 | 50 | |
51 | + /** | |
52 | + * 获取所有医院列表 | |
53 | + * @param hospital | |
54 | + * @return | |
55 | + */ | |
56 | + @GetMapping("getAllHospLst") | |
57 | + public BaseResponse getAllHospLst(LymsHospital hospital){ | |
58 | + BaseResponse baseResponse=new BaseResponse(); | |
59 | + List<LymsHospital> hospPage=lymsHospitalService.list( Wrappers.query(hospital).orderByDesc("updatedtime","createdtime")); | |
60 | + | |
61 | + LymsDict dict=new LymsDict(); | |
62 | + dict.setVtype(1); | |
63 | + List<LymsDict> lvlList=lymsDictService.list(Wrappers.query(dict)); | |
64 | + dict.setVtype(2); | |
65 | + List<LymsDict> tList=lymsDictService.list(Wrappers.query(dict)); | |
66 | + | |
67 | + hospPage.forEach(r->{ | |
68 | + for(LymsDict d:lvlList){ | |
69 | + if(d.getCode()==r.getHlevel()){ | |
70 | + r.setLvlname(d.getValue()); | |
71 | + } | |
72 | + } | |
73 | + for(LymsDict d:tList){ | |
74 | + if(d.getCode()==r.getHtype()){ | |
75 | + r.setTname(d.getValue()); | |
76 | + } | |
77 | + } | |
78 | + }); | |
79 | + | |
80 | + baseResponse.setObject(hospPage); | |
81 | + | |
82 | + return baseResponse; | |
83 | + } | |
84 | + | |
51 | 85 | private void converDict(Page<LymsHospital> hospPage){ |
52 | 86 | LymsDict dict=new LymsDict(); |
53 | 87 | dict.setVtype(1); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsUser.java
View file @
69a8b27
... | ... | @@ -56,6 +56,20 @@ |
56 | 56 | @TableField(value = "headimg") |
57 | 57 | private String headimg; |
58 | 58 | |
59 | +// 医院ID | |
60 | + @TableField(value = "hid") | |
61 | + private int hid; | |
62 | +// 医院名称 | |
63 | + @TableField(value = "hname") | |
64 | + private String hname; | |
65 | + | |
66 | + // 科室ID | |
67 | + @TableField(value = "did") | |
68 | + private int did; | |
69 | + // 科室名称 | |
70 | + @TableField(value = "dname") | |
71 | + private String dname; | |
72 | + | |
59 | 73 | /** |
60 | 74 | * 创建人 |
61 | 75 | */ |