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; + } }