|
@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by Administrator on 2018/4/4 0004.
|
|
|
* Created by Administrator on 2018/4/4 0004
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/patient/concern")
|
|
@ -83,16 +83,39 @@ public class PatientConcernController extends BaseController {
|
|
|
JSONArray array = new JSONArray();
|
|
|
List<Doctor> doctors=concernService.listDoctorsByPatientCode(patient);
|
|
|
for (Doctor doctor : doctors) {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("code", doctor.getCode());
|
|
|
jsonObject.put("name", doctor.getName());
|
|
|
jsonObject.put("photo", doctor.getPhoto());
|
|
|
jsonObject.put("mobile", doctor.getMobile());
|
|
|
jsonObject.put("sex", doctor.getSex());
|
|
|
jsonObject.put("age", IdCardUtil.getAgeForIdcard(doctor.getIdcard()));
|
|
|
|
|
|
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 ||
|
|
|
org.apache.commons.lang3.StringUtils.isEmpty(doctor.getDeptName().toString())) ? " " : doctor.getDeptName());
|
|
|
// 职称名称
|
|
|
json.put("job_name", (doctor.getJobName() == null ||
|
|
|
org.apache.commons.lang3.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.add(jsonObject);
|
|
|
array.add(json);
|
|
|
}
|
|
|
return write(200, "查询成功", "data", array);
|
|
|
} catch (Exception e) {
|