浏览代码

Merge branch 'dev' of wujunjie/patient-management into dev

trick9191 8 年之前
父节点
当前提交
45739895dd

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/DoctorAdminTeamDao.java

@ -93,7 +93,7 @@ public interface DoctorAdminTeamDao extends
    List<AdminTeam> findByOrgCode(String orgCode);
    //  查询当前医生是否为团队长
    @Query("SELECT count(1) from AdminTeam t WHERE t.available = true  AND t.leaderCode = ?1 ")
    @Query("SELECT t.id from AdminTeam t WHERE t.available = true  AND t.leaderCode = ?1 ")
    int findLeader(String leaderCode);
}

+ 138 - 98
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImUtill.java

@ -15,16 +15,20 @@ public class ImUtill {
     * status reply 为空值是是该医生总咨询量
     *
     * @param user   团队就把团队的医生合并起来用,隔开(医生编码)
     * @param adminTeamCode
     * @param status
     * @param reply
     * @return
     */
    public static String getConsultData(String user, Integer status, Integer reply) {
    public static String getConsultData(String user,Integer adminTeamCode, Integer status, Integer reply) {
        String imAddr = im_host + "api/v2/sessions/topics/count/reply";
        imAddr = imAddr + "?user=" + user;
        if (status != null) {
            imAddr += ("&status=" + status);
        }
        if (adminTeamCode != null) {
            imAddr += ("&adminTeamCode=" + adminTeamCode);
        }
        if (reply != null) {
            imAddr += ("&reply=" + reply);
        }
@ -32,14 +36,43 @@ public class ImUtill {
        return response;
    }
    public static void updateTopics(String topicId,String jsonValue){
        String imAddr = im_host + "api/v2/sessions/"+topicId+"/topics";
    public static void updateTopics(String topicId, String jsonValue) {
        String imAddr = im_host + "api/v2/sessions/" + topicId + "/topics";
        JSONObject params = new JSONObject();
        params.put("topic_id",topicId);
        params.put("data",jsonValue);
        params.put("topic_id", topicId);
        params.put("data", jsonValue);
        HttpClientUtil.putBody(imAddr, params);
    }
    /**
     * 当前医生下当前团队列表接口
     * 获取团队内医生的健康咨询状况
     * status = 10 已结束的咨询,status=0,reply = 1 已回复 ,status=0,reply=0未回复
     *
     * @param user     团队就把团队的医生合并起来用,隔开(医生编码)
     * @param adminTeamCode  行政团队code
     * @param page
     * @param pagesize
     * @param status
     * @param reply
     * @return
     */
    public static String getTeamConsultByStatus(String user,Integer adminTeamCode, Integer status, Integer reply, int page, int pagesize) {
        String imAddr = im_host + "api/v2/sessions/healthTeamTopics";
        imAddr = imAddr + "?user=" + user + "&page=" + page + "&pagesize=" + pagesize;
        if (adminTeamCode != null) {
            imAddr += ("&adminTeamCode=" + adminTeamCode);
        }
        if (status != null) {
            imAddr += ("&status=" + status);
        }
        if (reply != null) {
            imAddr += ("&reply=" + reply);
        }
        String response = HttpClientUtil.get(imAddr, "UTF-8");
        return response;
    }
    /**
     * 列表接口
     * 获取团队内医生的健康咨询状况
@ -72,8 +105,8 @@ public class ImUtill {
     * @param contentType 1文字 2图片消息
     * @param content     内容
     */
    public static String sendImMsg(String from,String fromName, String sessionId, String contentType, String content,String businessType) {
        String imAddr = im_host + "api/v2/sessions/"+sessionId+"/messages";
    public static String sendImMsg(String from, String fromName, String sessionId, String contentType, String content, String businessType) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/messages";
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("sender_name", fromName);
@ -88,11 +121,11 @@ public class ImUtill {
    /**
     * 更新会话状态
     *
     * @param sessionId       会话ID
     * @param status 状态
     * @param sessionId 会话ID
     * @param status    状态
     */
    public static String updateSessionStatus(String sessionId,String status) {
        String imAddr = im_host + "api/v2/sessions/"+sessionId+"/status?status="+status+"&sessionId="+sessionId;
    public static String updateSessionStatus(String sessionId, String status) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/status?status=" + status + "&sessionId=" + sessionId;
        JSONObject params = new JSONObject();
        String response = HttpClientUtil.postBody(imAddr, params);
        return response;
@ -101,11 +134,11 @@ public class ImUtill {
    /**
     * 更新会话状态
     *
     * @param sessionId       会话ID
     * @param status 状态
     * @param sessionId 会话ID
     * @param status    状态
     */
    public static String updateTopicEvaluate(String sessionId,String status) {
        String imAddr = im_host + "api/v2/sessions/"+sessionId+"/status?status="+status+"&sessionId="+sessionId;
    public static String updateTopicEvaluate(String sessionId, String status) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/status?status=" + status + "&sessionId=" + sessionId;
        JSONObject params = new JSONObject();
        String response = HttpClientUtil.postBody(imAddr, params);
        return response;
@ -119,8 +152,8 @@ public class ImUtill {
     * @param contentType 1文字 2图片消息
     * @param content     内容
     */
    public static String sendTopicIM(String from,String fromName, String topicId, String contentType, String content,String agent) {
        String url = im_host + "api/v2/sessions/topic/"+topicId+"/messages";
    public static String sendTopicIM(String from, String fromName, String topicId, String contentType, String content, String agent) {
        String url = im_host + "api/v2/sessions/topic/" + topicId + "/messages";
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("sender_name", fromName);
@ -134,13 +167,14 @@ public class ImUtill {
    /**
     * 发送进入im消息
     *
     * @param from
     * @param sessionId
     * @param topicId
     * @return
     */
    public static String sendIntoTopicIM(String from,String sessionId,String topicId,String content,String intoUser,String intoUserName){
        String url = im_host + "api/v2/sessions/"+sessionId+"/topics/"+topicId+"/into";
    public static String sendIntoTopicIM(String from, String sessionId, String topicId, String content, String intoUser, String intoUserName) {
        String url = im_host + "api/v2/sessions/" + sessionId + "/topics/" + topicId + "/into";
        JSONObject params = new JSONObject();
        params.put("sender_id", from);
        params.put("topic_id", topicId);
@ -154,23 +188,23 @@ public class ImUtill {
    /**
     * 结束议题
     *
     * @param topicId  议题ID
     * @param endUser  结束人
     * @param topicId     议题ID
     * @param endUser     结束人
     * @param endUserName 结束人名字
     * @param sessionId 会话ID
     * @param sessionId   会话ID
     */
    public static JSONObject endTopics(String sessionId,String endUser, String endUserName,String topicId) {
        String imAddr = im_host + "api/v2/sessions/"+sessionId+"/topics/"+topicId+"/ended";
    public static JSONObject endTopics(String sessionId, String endUser, String endUserName, String topicId) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/topics/" + topicId + "/ended";
        JSONObject params = new JSONObject();
        params.put("session_id", sessionId);
        params.put("end_user", endUser);
        params.put("end_user_name",endUserName);
        params.put("end_user_name", endUserName);
        params.put("topic_id", topicId);
        String ret = HttpClientUtil.postBody(imAddr,params);
        JSONObject obj  = null;
        try{
        String ret = HttpClientUtil.postBody(imAddr, params);
        JSONObject obj = null;
        try {
            obj = new JSONObject(ret);
        }catch (Exception e){
        } catch (Exception e) {
            return null;
        }
        return obj;
@ -179,25 +213,26 @@ public class ImUtill {
    /**
     * 议题邀请人员
     * @param user 结束人名字
     *
     * @param user      结束人名字
     * @param sessionId 会话ID
     */
    public static void updateTopicUser(String sessionId,String user) {
        String imAddr = im_host + "api/v2/sessions/"+sessionId+"/participants/"+user;
    public static void updateTopicUser(String sessionId, String user) {
        String imAddr = im_host + "api/v2/sessions/" + sessionId + "/participants/" + user;
        JSONObject params = new JSONObject();
        params.put("user", user+":"+0);
        HttpClientUtil.putBody(imAddr,params);
        params.put("user", user + ":" + 0);
        HttpClientUtil.putBody(imAddr, params);
    }
    /**
     * 创建议题
     *
     * @param topicId  议题ID
     * @param topicName  议题名称
     * @param topicId      议题ID
     * @param topicName    议题名称
     * @param participants 成员
     */
    public static JSONObject createTopics(String sessionId, String topicId, String topicName, JSONObject participants, JSONObject messages, String sessionType) {
        String imAddr = im_host + "api/v2/sessions/"+topicId+"/topics";
        String imAddr = im_host + "api/v2/sessions/" + topicId + "/topics";
        JSONObject params = new JSONObject();
        params.put("topic_id", topicId);
        params.put("topic_name", topicName);
@ -205,11 +240,11 @@ public class ImUtill {
        params.put("messages", messages.toString());
        params.put("session_id", sessionId);
        params.put("session_type", sessionType);
        String ret = HttpClientUtil.postBody(imAddr,params);
        JSONObject obj  = null;
        try{
        String ret = HttpClientUtil.postBody(imAddr, params);
        JSONObject obj = null;
        try {
            obj = new JSONObject(ret);
        }catch (Exception e){
        } catch (Exception e) {
            return null;
        }
        return obj;
@ -217,20 +252,19 @@ public class ImUtill {
    /**
     * 创建会话(system)
     *
     */
    public static JSONObject createSession(JSONObject participants,String sessionType,String sessionName,String sessionId) {
    public static JSONObject createSession(JSONObject participants, String sessionType, String sessionName, String sessionId) {
        String imAddr = im_host + "api/v2/sessions";
        JSONObject params = new JSONObject();
        params.put("participants", participants.toString());
        params.put("session_name", sessionName);
        params.put("session_type", sessionType);
        params.put("session_id", sessionId);
        String ret = HttpClientUtil.postBody(imAddr,params);
        JSONObject obj  = null;
        try{
        String ret = HttpClientUtil.postBody(imAddr, params);
        JSONObject obj = null;
        try {
            obj = new JSONObject(ret);
        }catch (Exception e){
        } catch (Exception e) {
            return null;
        }
        return obj;
@ -238,6 +272,7 @@ public class ImUtill {
    /**
     * 获取会话实例的消息对象
     *
     * @param senderId
     * @param senderName
     * @param title
@ -246,68 +281,70 @@ public class ImUtill {
     * @param agent
     * @return
     */
    public static JSONObject getCreateTopicMessage(String senderId,String senderName,String title,String description,String images,String agent){
    public static JSONObject getCreateTopicMessage(String senderId, String senderName, String title, String description, String images, String agent) {
        JSONObject messages = new JSONObject();
        messages.put("description",description);
        messages.put("title",title);
        messages.put("img",images);
        messages.put("sender_id",senderId);
        messages.put("sender_name",senderName);
        messages.put("agent",agent);
        messages.put("description", description);
        messages.put("title", title);
        messages.put("img", images);
        messages.put("sender_id", senderId);
        messages.put("sender_name", senderName);
        messages.put("agent", agent);
        return messages;
    }
    public static JSONObject getTopicMessage(String topicId,String startMsgId,String endMsgId,int page,int pagesize,String uid){
        String url =  im_host
                + "api/v2/sessions/topic/"+topicId+"/messages?topic_id="+topicId+"&end="+startMsgId
                +"&start="+(endMsgId==null?"":endMsgId)+"&page="+page+"&pagesize="+pagesize+"&user="+uid;
        try{
    public static JSONObject getTopicMessage(String topicId, String startMsgId, String endMsgId, int page, int pagesize, String uid) {
        String url = im_host
                + "api/v2/sessions/topic/" + topicId + "/messages?topic_id=" + topicId + "&end=" + startMsgId
                + "&start=" + (endMsgId == null ? "" : endMsgId) + "&page=" + page + "&pagesize=" + pagesize + "&user=" + uid;
        try {
            String ret = HttpClientUtil.get(url, "UTF-8");
            JSONObject obj = new JSONObject(ret);
            if(obj.getInt("status")==-1){
            if (obj.getInt("status") == -1) {
                throw new RuntimeException(obj.getString("message"));
            }else{
                return  obj.getJSONObject("data");
            } else {
                return obj.getJSONObject("data");
            }
        }catch (Exception e){
        } catch (Exception e) {
            return null;
        }
    }
    public static JSONArray getSessionMessage(String sessionId,String startMsgId,String endMsgId,int page,int pagesize,String uid){
        String url =  im_host+ "api/v2/sessions/"+sessionId+"/messages?session_id="+sessionId+"&user="+uid+"&start_message_id="+startMsgId+"&end_message_id="+endMsgId+"&page="+page+"&pagesize="+pagesize;
        try{
    public static JSONArray getSessionMessage(String sessionId, String startMsgId, String endMsgId, int page, int pagesize, String uid) {
        String url = im_host + "api/v2/sessions/" + sessionId + "/messages?session_id=" + sessionId + "&user=" + uid + "&start_message_id=" + startMsgId + "&end_message_id=" + endMsgId + "&page=" + page + "&pagesize=" + pagesize;
        try {
            String ret = HttpClientUtil.get(url, "UTF-8");
            JSONArray obj = new JSONArray(ret);
            return obj;
        }catch (Exception e){
        } catch (Exception e) {
            return null;
        }
    }
    /**
     * 删除对应的成员信息在MUC模式中
     *
     * @param userId
     * @param oldUserId
     * @param sessionId
     * @return
     */
    public static JSONObject deleteMucUser(String userId,String oldUserId,String sessionId) throws  Exception{
        String url =  im_host+ "api/v2/sessions/"+sessionId+"/participant/update";
        try{
    public static JSONObject deleteMucUser(String userId, String oldUserId, String sessionId) throws Exception {
        String url = im_host + "api/v2/sessions/" + sessionId + "/participant/update";
        try {
            JSONObject params = new JSONObject();
            params.put("user_id", userId);
            params.put("old_user_id", oldUserId);
            params.put("session_id", sessionId);
            String ret = HttpClientUtil.postBody(url,params);
            String ret = HttpClientUtil.postBody(url, params);
            JSONObject obj = new JSONObject(ret);
            if(obj.getInt("status")==-1){
            if (obj.getInt("status") == -1) {
                throw new RuntimeException("人员更换失败!");
            }else{
            } else {
                return obj;
            }
        }catch (Exception e){
        } catch (Exception e) {
            throw new RuntimeException("人员更换失败!");
        }
    }
@ -315,62 +352,65 @@ public class ImUtill {
    /**
     * 获取议题
     *
     * @param topicId
     * @return
     */
    public static JSONObject getTopic(String topicId) throws  Exception{
        String url =  im_host + "api/v2/sessions/topics/"+topicId+"?topic_id="+topicId;
        try{
            String ret = HttpClientUtil.get(url,"utf-8");
    public static JSONObject getTopic(String topicId) throws Exception {
        String url = im_host + "api/v2/sessions/topics/" + topicId + "?topic_id=" + topicId;
        try {
            String ret = HttpClientUtil.get(url, "utf-8");
            JSONObject obj = new JSONObject(ret);
            if(obj.getInt("status")==-1){
            if (obj.getInt("status") == -1) {
                throw new RuntimeException("获取议题失败!");
            }else{
            } else {
                return obj;
            }
        }catch (Exception e){
        } catch (Exception e) {
            throw new RuntimeException("获取议题失败!");
        }
    }
    /**
     * 获取会话成员
     *
     * @param sessionId
     * @return
     * @throws Exception
     */
    public static JSONArray getParticipants(String sessionId){
        String url =  im_host + "api/v2/sessions/"+sessionId+"/participants?session_id="+sessionId;
        try{
            String ret = HttpClientUtil.get(url,"utf-8");
    public static JSONArray getParticipants(String sessionId) {
        String url = im_host + "api/v2/sessions/" + sessionId + "/participants?session_id=" + sessionId;
        try {
            String ret = HttpClientUtil.get(url, "utf-8");
            return new JSONArray(ret);
        }catch (Exception e){
        } catch (Exception e) {
            throw new RuntimeException("获取议题失败!");
        }
    }
    /**
     * 获取会话成员
     *
     * @param sessionId
     * @return
     * @throws Exception
     */
    public static JSONArray getSessions(String sessionId){
        String url =  im_host+ "api/v2/sessions/"+sessionId+"/participants?session_id="+sessionId;
        try{
            String ret = HttpClientUtil.get(url,"utf-8");
    public static JSONArray getSessions(String sessionId) {
        String url = im_host + "api/v2/sessions/" + sessionId + "/participants?session_id=" + sessionId;
        try {
            String ret = HttpClientUtil.get(url, "utf-8");
            return new JSONArray(ret);
        }catch (Exception e){
        } catch (Exception e) {
            throw new RuntimeException("获取议题失败!");
        }
    }
    public  static final String SESSION_TYPE_MUC = "1";
    public  static final String SESSION_TYPE_P2P = "2";
    public  static final String SESSION_TYPE_GROUP = "3";
    public  static final String SESSION_TYPE_SYSTEM = "0";
    public  static final String SESSION_STATUS_PROCEEDINGS= "0";
    public  static final String SESSION_STATUS_END= "1";
    public static final String SESSION_TYPE_MUC = "1";
    public static final String SESSION_TYPE_P2P = "2";
    public static final String SESSION_TYPE_GROUP = "3";
    public static final String SESSION_TYPE_SYSTEM = "0";
    public static final String SESSION_STATUS_PROCEEDINGS = "0";
    public static final String SESSION_STATUS_END = "1";
    public  static final String CONTENT_TYPE_TEXT= "1";
    public static final String CONTENT_TYPE_TEXT = "1";
}

+ 91 - 24
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/im/imController.java

@ -38,16 +38,84 @@ public class imController extends BaseController {
    /**
     * 获取单个咨询
     *
     * @param consult
     * @return
     */
    @RequestMapping(value = "/getTopic")
    @ResponseBody
    public String getTopic(String consult){
        try{
    public String getTopic(String consult) {
        try {
            return success(ImUtill.getTopic(consult).get("data").toString());
        }catch (Exception e){
            return error(-1,e.getMessage());
        } catch (Exception e) {
            return error(-1, e.getMessage());
        }
    }
    /**
     * 获取当前团队的咨询列表
     * status = 10 已结束的咨询,status=0,reply = 1 已回复 ,status=0,reply=0未回复
     * 第一次列表为当前医生(很可能团队长)待回复列表 传参:doctor有后台获取 status=0,reply=0未回复
     * 后 取团队内单个医生的咨询情况 doctor、status、reply均有前端传入
     *
     * @return
     */
    @RequestMapping(value = "/consult/getTeamList", method = RequestMethod.GET)
    @ResponseBody
    public String getTeamConsultByStatus(
            @RequestParam(required = false) String doctor,
            @RequestParam int adminTeamCode,
            @RequestParam Integer status,
            @RequestParam(required = false) Integer reply,
            @RequestParam int page,
            @RequestParam int pagesize) {
        try {
            if (StringUtils.isEmpty(doctor)) {
                doctor = getUID();
            }
            String consult = ImUtill.getTeamConsultByStatus(doctor,adminTeamCode, status, reply, page, pagesize);
            JSONArray jsonArray = new JSONArray(consult);
            Iterator<Object> it = jsonArray.iterator();
            List list = new ArrayList();
            while (it.hasNext()) {
                Map map = new HashMap();
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                JSONObject ob = (JSONObject) it.next();
                String id = ob.get("id").toString();
                String avatar = ob.get("avatar").toString();
                String session_id = ob.get("session_id").toString();
                String name = ob.get("patient_name").toString();
                String createTime = ob.get("create_time").toString();
                String description = ob.get("description").toString();
                String sex = ob.get("sex").toString();
                String startId = ob.get("start_message_id").toString();
                String endId = ob.get("end_message_id").toString();
                Consult con = consultDao.findTypeByCode(id);
                System.out.println("consult========>" + con);
                System.out.println("consultId========>" + id);
                if (StringUtils.isNotEmpty(createTime)) {
                    Date date = sdf.parse(createTime);
                    map.put("create_time", sdf.format(date));
                }
                map.put("id", id);
                map.put("session_id", session_id);
                map.put("photo", avatar);
                map.put("patientName", name);
                map.put("patient", con.getPatient());
                map.put("sex", sex);
                map.put("description", description);
                map.put("start_message_id", startId);
                map.put("end_message_id", endId);
//                咨询类型:1三师咨询,2家庭医生咨询,3图文咨询,4公共咨询,5病友圈
                map.put("type", con.getType());
                list.add(map);
            }
            return write(200, "查询成功", "data", list);
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "查询失败!");
        }
    }
@ -89,11 +157,11 @@ public class imController extends BaseController {
                String startId = ob.get("start_message_id").toString();
                String endId = ob.get("end_message_id").toString();
                Consult con = consultDao.findTypeByCode(id);
                System.out.println("consult========>"+con);
                System.out.println("consultId========>"+id);
                if (StringUtils.isNotEmpty(createTime)){
                System.out.println("consult========>" + con);
                System.out.println("consultId========>" + id);
                if (StringUtils.isNotEmpty(createTime)) {
                    Date date = sdf.parse(createTime);
                    map.put("create_time",sdf.format(date));
                    map.put("create_time", sdf.format(date));
                }
                map.put("id", id);
@ -125,7 +193,7 @@ public class imController extends BaseController {
     */
    @RequestMapping(value = "/consult/getTeamData", method = RequestMethod.GET)
    @ResponseBody
    public String getTeamData() {
    public String getTeamData(@RequestParam int adminTeamCode) {
        try {
            String uid = getUID();
            List<Map<String, Object>> doctors = getMemberByDoctor(uid);
@ -139,22 +207,22 @@ public class imController extends BaseController {
            for (Map<String, Object> doc : doctors) {
                Map map = new HashMap();
                String doctor = doc.get("code").toString();
                map.put("photo", doc.get("photo")==null?"":doc.get("photo").toString());
                map.put("photo", doc.get("photo") == null ? "" : doc.get("photo").toString());
                map.put("name", doc.get("name").toString());
                map.put("sex", doc.get("sex").toString());
                map.put("doctor", doctor);
                map.put("type",doc.get("level")==null?"":doc.get("level").toString());
                map.put("type", doc.get("level") == null ? "" : doc.get("level").toString());
//                未回复
                String totalUnReply = ImUtill.getConsultData(doctor, 0, 0);
                String totalUnReply = ImUtill.getConsultData(doctor,adminTeamCode, 0, 0);
                int unReply = Integer.parseInt(totalUnReply);
                map.put("totalUnReply", unReply);
//                已回复
                String totalReply = ImUtill.getConsultData(doctor, 0, 1);
                String totalReply1 = ImUtill.getConsultData(doctor, 10, null);
                int reply = Integer.parseInt(totalReply)+Integer.parseInt(totalReply1);
                String totalReply = ImUtill.getConsultData(doctor,adminTeamCode, 0, 1);
                String totalReply1 = ImUtill.getConsultData(doctor,adminTeamCode, 10, null);
                int reply = Integer.parseInt(totalReply) + Integer.parseInt(totalReply1);
                map.put("totalReply", reply);
//                总咨询量
                String totalConsult = ImUtill.getConsultData(doctor, null, null);
                String totalConsult = ImUtill.getConsultData(doctor, adminTeamCode,null, null);
                int consult = Integer.parseInt(totalConsult);
                map.put("totalConsult", consult);
@ -197,29 +265,28 @@ public class imController extends BaseController {
    }
    /**
     * 提醒医生相关信息
     *
     * @param doctor 提醒的医生
     * @param doctor  提醒的医生
     * @param content 提醒的内容
     * @return
     */
    @RequestMapping(value = "/message/remain", method = RequestMethod.POST)
    @ResponseBody
    public String reaminDoctor(String doctor,String content) {
    public String reaminDoctor(String doctor, String content) {
        try {
            JSONObject participants = new JSONObject();
            participants.put(doctor, 0);
            participants.put(getUID(),0);
            participants.put(getUID(), 0);
            Doctor d = doctorDao.findByCode(getUID());
            //创建医生会话讨论组
            JSONObject sessionObj = ImUtill.createSession(participants, ImUtill.SESSION_TYPE_P2P,  d.getName()+"发来消息提醒", "");
            if(sessionObj.getInt("status")==-1){
                throw  new RuntimeException(sessionObj.getString("message"));
            JSONObject sessionObj = ImUtill.createSession(participants, ImUtill.SESSION_TYPE_P2P, d.getName() + "发来消息提醒", "");
            if (sessionObj.getInt("status") == -1) {
                throw new RuntimeException(sessionObj.getString("message"));
            }
            JSONObject session = sessionObj.getJSONObject("data");
            ImUtill.sendImMsg(getUID(),d.getName(),session.getString("id"),"1", content,"REMAIN");
            ImUtill.sendImMsg(getUID(), d.getName(), session.getString("id"), "1", content, "REMAIN");
            return success("提醒成功!");
        } catch (Exception e) {
            error(e);

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -614,6 +614,8 @@ public class DoctorController extends BaseController {
                json.put("evaluateScore", temp.getEvaluateScore());
//                是否团队长
                json.put("isLeader", leader == 0 ? "0" : "1");
//                团队长所管辖的团队code 一个团队长只管辖一个团队
                json.put("adminTeamCode", leader);
                return write(200, "医生信息查询成功!", "data", json);
            } else {
                return error(-1, "医生信息查询失败!");