Pārlūkot izejas kodu

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

trick9191 7 gadi atpakaļ
vecāks
revīzija
c81d39b80c

+ 6 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -93,14 +93,15 @@ public class SpecialistService extends BaseService {
        List<Map<String,Object>> list = findHealthAssistant(doctor);
        if(list!=null&&list.size()>0){
            for(Map<String,Object> map:list){
                map.put("count",getAssistantPatientCount(map.get("code").toString()));
                map.put("count",getAssistantPatientCount(doctor,map.get("code").toString()));
            }
        }
        return list;
    }
    public Long getAssistantPatientCount(String doctor)throws Exception{
    public Long getAssistantPatientCount(String doctor,String assistant)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("doctor",doctor);
        param.put("assistant",assistant);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"svr-specialist/getAssistantPatientCount",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
@ -200,8 +201,9 @@ public class SpecialistService extends BaseService {
        return null;
    }
    public JSONArray findPatientRelatioByAssistant(String assistant,Integer page,Integer size)throws Exception{
    public JSONArray findPatientRelatioByAssistant(String doctor,String assistant,Integer page,Integer size)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("doctor",doctor);
        param.put("assistant",assistant);
        param.put("page",page);
        param.put("size",size);
@ -295,8 +297,7 @@ public class SpecialistService extends BaseService {
                "   wlyy_doctor dd " +
                "  WHERE " +
                "   dd. CODE = '"+doctor+"' " +
                " ) " +
                " AND d.`level` = 4 ";
                " ) " ;
        if(StringUtils.isNotBlank(name)){
            sql = sql +" AND d.`name` LIKE '%"+name+"%'";
        }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/applets/AppletsService.java

@ -131,6 +131,7 @@ public class AppletsService extends BaseService {
            patientAimSports.setPatientcode(patient);
            patientAimSportsDao.save(patientAimSports);
        }
        return true;
    }

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

@ -110,11 +110,12 @@ public class SpecialistController extends BaseController {
    @RequestMapping(value = "findPatientRelatioByAssistant", method = RequestMethod.GET)
    @ApiOperation("获取计管师下未分配标签居民")
    public String findPatientRelatioByAssistant(@ApiParam(name = "assistant", value = "计管师") @RequestParam(required = true) String assistant,
    public String findPatientRelatioByAssistant(@ApiParam(name = "doctor", value = "医生") @RequestParam(required = true)String doctor,
                                                @ApiParam(name = "assistant", value = "计管师") @RequestParam(required = true) String assistant,
                                                @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true) Integer page,
                                                @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true) Integer size) throws Exception {
        try {
            return write(200, "获取成功", "data", specialistService.findPatientRelatioByAssistant(assistant, page, size));
            return write(200, "获取成功", "data", specialistService.findPatientRelatioByAssistant(doctor,assistant, page, size));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");