From 423512ff2e418bce0d7b441c80ed3f2862232c3f Mon Sep 17 00:00:00 2001 From: shiyang <316555390@qq.com> Date: Sat, 26 Feb 2022 15:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E7=A7=91=E5=AE=A4=E5=90=8E=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=87=BA=E7=A7=91=E5=AE=A4=E4=B8=8B=E6=9C=89=E5=93=AA?= =?UTF-8?q?=E4=BA=9B=E7=96=BE=E7=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PatientController.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index 515a836..cd3fa45 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -71,6 +71,9 @@ public class PatientController { @Autowired private LymsDictService lymsDictService; + @Autowired //科室所拥有的疾病 + private LymsDepartillService lymsDepartillService; + /** * 获取患者列表 * @@ -764,4 +767,31 @@ public class PatientController { return baseResponse; } + /** + * 选科室后查询出科室下有哪些疾病 + * @param 科室id + * @return + */ + @GetMapping("getDepartIllness") + public BaseResponse getDepartIllness(String did){ + BaseResponse baseResponse=new BaseResponse(); + try { + Map param=new HashMap(); + param.put("did",did); + List iLst=lymsDepartillService.listByMap(param); + List dictList=new ArrayList<>(); + for (LymsDepartill lymsDepartill : iLst) { + final LymsDict dict = lymsDictService.getById(lymsDepartill.getIid()); + if(null!=dict){ + dictList.add(dict); + } + } + baseResponse.setObject(dictList); + baseResponse.setErrormsg("成功"); + } catch (Exception e) { + baseResponse.setErrormsg("失败"); + e.printStackTrace(); + } + return baseResponse; + } } -- 1.8.3.1