Просмотр исходного кода

Merge branch 'dev' of huangwenjie/patient-co-management into dev

huangwenjie 7 лет назад
Родитель
Сommit
75e6f87b6a

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -651,6 +651,7 @@ public class AdminTeamService extends BaseService {
            doctorInfo.put("code",d.getCode());
            doctorInfo.put("dept_name",d.getDeptName());
            doctorInfo.put("job_name",d.getJobName());
            doctorInfo.put("photo",d.getPhoto());
            doctors.add(doctorInfo);
        }
        result.put("members",doctors);

+ 43 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -758,5 +758,48 @@ public class SpecialistService extends BaseService {
        }
        return false;
    }
    
    public JSONArray findDoctorAndDoctorHealthBySpecialDoctor(String doctor) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("doctor", doctor);
        HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/findDoctorAndDoctorHealthBySpecialDoctor", param);
        if(StringUtils.isNotBlank(response.getContent())) {
            JSONObject rs = new JSONObject(response.getContent());
            if ("succes".equals(rs.getString("message"))) {
                return rs.getJSONArray("obj");
            }
        }
        return null;
    }
	
	public Long findSpecialistSignFamilyPatientCout(String specialdoctor, String familydoctor)throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("specialdoctor", specialdoctor);
        param.put("familydoctor", familydoctor);
        HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/findSpecialistSignFamilyPatientCout", param);
        if(StringUtils.isNotBlank(response.getContent())) {
            JSONObject rs = new JSONObject(response.getContent());
            if ("succes".equals(rs.getString("message"))) {
                return rs.getLong("obj");
            }
        }
        return 0L;
	}
    
    public JSONArray getSpecialistSignFamilyPatientByName(String specialdoctor, String familydoctor, String nameKey, Integer page, Integer size) throws Exception{
    
        Map<String, Object> param = new HashedMap();
        param.put("specialdoctor", specialdoctor);
        param.put("familydoctor", familydoctor);
        param.put("nameKey", nameKey);
        param.put("page", page);
        param.put("size", size);
        HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/getSpecialistSignFamilyPatientByName", param);
        JSONObject rs = new JSONObject(response.getContent());
        if ("succes".equals(rs.getString("message"))) {
            return rs.getJSONArray("obj");
        }
        return null;
    }
}

+ 41 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java

@ -312,5 +312,46 @@ public class SpecialistController extends WeixinBaseController {
            return error(-1, "请求失败");
        }
    }
    
    @RequestMapping(value = "/findDoctorAndDoctorHealthBySpecialDoctor", method = RequestMethod.GET)
    @ApiOperation(value = "获取当前专科医生有关联的家庭医生和健管师列表")
    public String findDoctorAndDoctorHealthBySpecialDoctor(
            @ApiParam(name = "doctor", value = "专科医生code") @RequestParam(required = true)String doctor){
        try {
            return write(200, "获取成功", "data", specialistService.findDoctorAndDoctorHealthBySpecialDoctor(doctor));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    
    @RequestMapping(value = "/findSpecialistSignFamilyPatientCout", method = RequestMethod.GET)
    @ApiOperation(value = "获取专科医生家庭医生共管居民数目")
    public String findSpecialistSignFamilyPatientCout(
            @ApiParam(name = "specialdoctor", value = "专科医生") @RequestParam(required = true)String specialdoctor,
            @ApiParam(name = "familydoctor", value = "家庭医生") @RequestParam(required = true)String familydoctor) {
        try {
            return write(200, "获取成功", "data", specialistService.findSpecialistSignFamilyPatientCout(specialdoctor,familydoctor));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    
    @RequestMapping(value = "/getSpecialistSignFamilyPatientByName", method = RequestMethod.GET)
    @ApiOperation(value = "搜索专科医生家庭医生共管居民")
    public String getSpecialistSignFamilyPatientByName(
            @ApiParam(name = "specialdoctor", value = "专科医生") @RequestParam(required = true)String specialdoctor,
            @ApiParam(name = "familydoctor", value = "家庭医生") @RequestParam(required = true)String familydoctor,
            @ApiParam(name = "nameKey", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
            @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
            @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
        try {
            return write(200, "获取成功", "data", specialistService.getSpecialistSignFamilyPatientByName(specialdoctor,familydoctor,nameKey,page,size));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}

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

@ -37,7 +37,7 @@ im:
#专病配置
specialist:
  url: http://172.19.103.33:9797/svr-wlyy-specialist
  url: http://172.19.103.33:9797/svr-wlyy-specialist/
#  url: http://localhost:10051/
#物联网配置
iot: