Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
别团等shy哥发育
Yygh Parent
提交
2e043d3b
Y
Yygh Parent
项目概览
别团等shy哥发育
/
Yygh Parent
8 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
Yygh Parent
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2e043d3b
编写于
1月 05, 2022
作者:
别团等shy哥发育
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
前台用户系统:
(1)根据医院编号获取科室 (2)根据医院编号获取预约挂号详情
上级
84fbc7a0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
0 deletion
+36
-0
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/controller/api/HospApiController.java
...m/atguigu/yygu/hosp/controller/api/HospApiController.java
+19
-0
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/service/HospitalService.java
...n/java/com/atguigu/yygu/hosp/service/HospitalService.java
+3
-0
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/service/impl/HospitalServiceImpl.java
...m/atguigu/yygu/hosp/service/impl/HospitalServiceImpl.java
+14
-0
未找到文件。
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/controller/api/HospApiController.java
浏览文件 @
2e043d3b
package
com.atguigu.yygu.hosp.controller.api
;
package
com.atguigu.yygu.hosp.controller.api
;
import
com.atguigu.yygh.model.hosp.Hospital
;
import
com.atguigu.yygh.model.hosp.Hospital
;
import
com.atguigu.yygh.vo.hosp.DepartmentVo
;
import
com.atguigu.yygh.vo.hosp.HospitalQueryVo
;
import
com.atguigu.yygh.vo.hosp.HospitalQueryVo
;
import
com.atguigu.yygu.common.result.Result
;
import
com.atguigu.yygu.common.result.Result
;
import
com.atguigu.yygu.hosp.service.DepartmentService
;
import
com.atguigu.yygu.hosp.service.HospitalService
;
import
com.atguigu.yygu.hosp.service.HospitalService
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"/api/hosp/hospital"
)
@RequestMapping
(
"/api/hosp/hospital"
)
...
@@ -20,6 +23,8 @@ public class HospApiController {
...
@@ -20,6 +23,8 @@ public class HospApiController {
@Autowired
@Autowired
private
HospitalService
hospitalService
;
private
HospitalService
hospitalService
;
@Autowired
private
DepartmentService
departmentService
;
@ApiOperation
(
value
=
"查询医院列表"
)
@ApiOperation
(
value
=
"查询医院列表"
)
@GetMapping
(
"findHospitalList/{page}/{limit}"
)
@GetMapping
(
"findHospitalList/{page}/{limit}"
)
...
@@ -37,4 +42,18 @@ public class HospApiController {
...
@@ -37,4 +42,18 @@ public class HospApiController {
return
Result
.
ok
(
list
);
return
Result
.
ok
(
list
);
}
}
@ApiOperation
(
value
=
"根据医院编号获取科室"
)
@GetMapping
(
"department/{hoscode}"
)
public
Result
index
(
@PathVariable
String
hoscode
){
List
<
DepartmentVo
>
list
=
departmentService
.
findDeptTree
(
hoscode
);
return
Result
.
ok
(
list
);
}
@ApiOperation
(
value
=
"根据医院编号获取预约挂号详情"
)
@GetMapping
(
"findHospDetail/{hoscode}"
)
public
Result
item
(
@PathVariable
String
hoscode
){
Map
<
String
,
Object
>
map
=
hospitalService
.
item
(
hoscode
);
return
Result
.
ok
(
map
);
}
}
}
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/service/HospitalService.java
浏览文件 @
2e043d3b
...
@@ -28,4 +28,7 @@ public interface HospitalService {
...
@@ -28,4 +28,7 @@ public interface HospitalService {
//根据医院名称查询
//根据医院名称查询
List
<
Hospital
>
findByHosname
(
String
hosname
);
List
<
Hospital
>
findByHosname
(
String
hosname
);
//根据医院编号获取预约挂号详情
Map
<
String
,
Object
>
item
(
String
hoscode
);
}
}
service/service_hosp/src/main/java/com/atguigu/yygu/hosp/service/impl/HospitalServiceImpl.java
浏览文件 @
2e043d3b
...
@@ -122,6 +122,20 @@ public class HospitalServiceImpl implements HospitalService {
...
@@ -122,6 +122,20 @@ public class HospitalServiceImpl implements HospitalService {
return
hospitalRepository
.
findHospitalByHosnameLike
(
hosname
);
return
hospitalRepository
.
findHospitalByHosnameLike
(
hosname
);
}
}
//根据医院编号获取预约挂号详情
@Override
public
Map
<
String
,
Object
>
item
(
String
hoscode
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
//医院详情
Hospital
hospital
=
this
.
setHospitalHosType
(
this
.
getByHoscode
(
hoscode
));
result
.
put
(
"hospital"
,
hospital
);
//预约规则
result
.
put
(
"bookingRule"
,
hospital
.
getBookingRule
());
//不需要重复返回
hospital
.
setBookingRule
(
null
);
return
result
;
}
//获取查询list集合,遍历进行医院等级封装
//获取查询list集合,遍历进行医院等级封装
private
Hospital
setHospitalHosType
(
Hospital
hospital
)
{
private
Hospital
setHospitalHosType
(
Hospital
hospital
)
{
//根据dictCode和value获取医院等级名称
//根据dictCode和value获取医院等级名称
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录