소스 검색

类名修改

yeshijie 7 년 전
부모
커밋
ef65b6e91e

+ 25 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/DoctorService.java

@ -98,6 +98,31 @@ public class DoctorService extends TokenService {
        }
    }
    /**
     * 分页查找已关注医生列表
     * @param hospitalCode
     * @param patient
     * @param page
     * @param pagesize
     * @return
     */
    public List<Doctor> findConcernDoctorLists(String hospitalCode,String patient, Integer page, Integer pagesize) {
        String sql = "SELECT d.* from wlyy_doctor d,wlyy_concern c WHERE c.patient = ? and c.`status` = 1 and c.concern_doctor_code = d.`code` and  d.del=1 and d.status=1 ";
        List<Object> args = new ArrayList<>();
        args.add(patient);
        if (!org.springframework.util.StringUtils.isEmpty(hospitalCode)) {
            sql += " and d.hospital = ? ";
            args.add(hospitalCode);
        }
        sql += " limit " + (page * pagesize) + "," + pagesize;
        List<Doctor> doctorList = jdbcTemplate.query(sql, args.toArray(), new BeanPropertyRowMapper(Doctor.class));
        return doctorList;
    }
    /**
     * 分页查找医生列表
     * @param hospitalCode

+ 76 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -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);
                }
            }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -28,7 +28,7 @@ doctorAssistant:
  target_url: home/html/unreadMessageStatistic.html
wlyy:
  hospital: 3502030400 # 默认医院code
  hospital: 3502050100 # 默认医院code
im:
  im_list_get: http://172.19.103.88:3000/

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -34,7 +34,7 @@ im:
  data_base_name: im_new
wlyy:
  hospital: 3502030400 # 默认医院code
  hospital: 3502050100 # 默认医院code
#物联网配置
iot:

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -25,7 +25,7 @@ doctorAssistant:
  target_url: home/html/unreadMessageStatistic.html
wlyy:
  hospital: 3502030400 # 默认医院code
  hospital: 3502050100 # 默认医院code
im:
  im_list_get: http://172.19.103.88:3000/