diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java index 4c774f4..ca72b2f 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java @@ -48,6 +48,40 @@ public class HospitalController { return baseResponse; } + /** + * 获取所有医院列表 + * @param hospital + * @return + */ + @GetMapping("getAllHospLst") + public BaseResponse getAllHospLst(LymsHospital hospital){ + BaseResponse baseResponse=new BaseResponse(); + List hospPage=lymsHospitalService.list( Wrappers.query(hospital).orderByDesc("updatedtime","createdtime")); + + LymsDict dict=new LymsDict(); + dict.setVtype(1); + List lvlList=lymsDictService.list(Wrappers.query(dict)); + dict.setVtype(2); + List tList=lymsDictService.list(Wrappers.query(dict)); + + hospPage.forEach(r->{ + for(LymsDict d:lvlList){ + if(d.getCode()==r.getHlevel()){ + r.setLvlname(d.getValue()); + } + } + for(LymsDict d:tList){ + if(d.getCode()==r.getHtype()){ + r.setTname(d.getValue()); + } + } + }); + + baseResponse.setObject(hospPage); + + return baseResponse; + } + private void converDict(Page hospPage){ LymsDict dict=new LymsDict(); dict.setVtype(1); diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsUser.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsUser.java index 3e93f98..e24c201 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsUser.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsUser.java @@ -56,6 +56,20 @@ public class LymsUser implements Serializable { @TableField(value = "headimg") private String headimg; +// 医院ID + @TableField(value = "hid") + private int hid; +// 医院名称 + @TableField(value = "hname") + private String hname; + + // 科室ID + @TableField(value = "did") + private int did; + // 科室名称 + @TableField(value = "dname") + private String dname; + /** * 创建人 */