From 69a8b27ccff32f12bea7c33b08dd0da6cf93f674 Mon Sep 17 00:00:00 2001 From: changpengfei Date: Tue, 7 Sep 2021 10:53:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8C=BB=E9=99=A2=E5=92=8C?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HospitalController.java | 34 ++++++++++++++++++++++ .../com/lyms/talkonlineweb/domain/LymsUser.java | 14 +++++++++ 2 files changed, 48 insertions(+) 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; + /** * 创建人 */ -- 1.8.3.1