|
@ -561,6 +561,71 @@ public class ConsultController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 已关注的医生列表
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "concernDoctorList")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("已关注的医生列表")
|
|
|
public String concernDoctorList(
|
|
|
@ApiParam(name = "hospitalCode", value = "医院code", defaultValue = "350200")
|
|
|
@RequestParam(value = "hospitalCode", required = false) String hospitalCode,
|
|
|
@ApiParam(name = "page", value = "第几页", defaultValue = "")
|
|
|
@RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "每页记录数", defaultValue = "")
|
|
|
@RequestParam(value = "pagesize", required = false) Integer pagesize) {
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
|
if(StringUtils.isEmpty(hospitalCode)){
|
|
|
hospitalCode = defaultHospital;
|
|
|
}
|
|
|
page = page == null ? 0 : page - 1;
|
|
|
pagesize = pagesize == null ? 10 : pagesize;
|
|
|
List<Doctor> list = doctorService.findConcernDoctorLists(hospitalCode,getRepUID(), page, pagesize);
|
|
|
if (list != null) {
|
|
|
for (Doctor doctor : list) {
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("id", doctor.getId());
|
|
|
// 医生标识
|
|
|
json.put("code", doctor.getCode());
|
|
|
// 医生性别
|
|
|
json.put("sex", doctor.getSex());
|
|
|
// 医生姓名
|
|
|
json.put("name", doctor.getName());
|
|
|
// 所在医院名称
|
|
|
json.put("hospital", doctor.getHospital());
|
|
|
// 所在医院名称
|
|
|
json.put("hospital_name", doctor.getHospitalName());
|
|
|
// 科室名称
|
|
|
json.put("dept_name", (doctor.getDeptName() == null ||
|
|
|
StringUtils.isEmpty(doctor.getDeptName().toString())) ? " " : doctor.getDeptName());
|
|
|
// 职称名称
|
|
|
json.put("job_name", (doctor.getJobName() == null ||
|
|
|
StringUtils.isEmpty(doctor.getJobName().toString())) ? " " : doctor.getJobName());
|
|
|
// 头像
|
|
|
json.put("photo", doctor.getPhoto());
|
|
|
// 简介
|
|
|
json.put("introduce", doctor.getIntroduce());
|
|
|
// 专长
|
|
|
json.put("expertise", doctor.getExpertise());
|
|
|
//关注数
|
|
|
json.put("concernNum", doctor.getConcernNum());
|
|
|
//咨询数
|
|
|
json.put("consultNum", doctor.getConsultNum());
|
|
|
//文章数
|
|
|
json.put("articleNum", doctor.getArticleNum());
|
|
|
array.put(json);
|
|
|
}
|
|
|
}
|
|
|
return write(200, "获取医院医生列表成功!", "list", array);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取医院医生列表失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 医生列表
|
|
|
*
|
|
@ -582,6 +647,11 @@ public class ConsultController extends WeixinBaseController {
|
|
|
@RequestParam(value = "pagesize", required = false) Integer pagesize) {
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
|
if(StringUtils.isEmpty(hospitalCode)){
|
|
|
hospitalCode = defaultHospital;
|
|
|
}
|
|
|
page = page == null ? 0 : page - 1;
|
|
|
pagesize = pagesize == null ? 10 : pagesize;
|
|
|
List<Doctor> list = doctorService.findDoctorLists(hospitalCode,name,dept, page, pagesize);
|
|
|
if (list != null) {
|
|
|
for (Doctor doctor : list) {
|
|
@ -609,6 +679,12 @@ public class ConsultController extends WeixinBaseController {
|
|
|
json.put("introduce", doctor.getIntroduce());
|
|
|
// 专长
|
|
|
json.put("expertise", doctor.getExpertise());
|
|
|
//关注数
|
|
|
json.put("concernNum", doctor.getConcernNum());
|
|
|
//咨询数
|
|
|
json.put("consultNum", doctor.getConsultNum());
|
|
|
//文章数
|
|
|
json.put("articleNum", doctor.getArticleNum());
|
|
|
array.put(json);
|
|
|
}
|
|
|
}
|