Ver código fonte

1.3.2咨询改造

8 anos atrás
pai
commit
1143bf19fd

+ 6 - 6
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -744,7 +744,7 @@ public class ConsultTeamService extends ConsultService {
        //推送给IM去创建议题,取得成员消息
        JSONObject messages = ImUtill.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), "咨询问题:"+consult.getSymptoms(), consult.getImages());
        users.put(patient, 0);
        JSONObject obj = ImUtill.createTopics(patient + "_consult_" + ct.getType(), consult.getCode(), tempPatient.getName() + " " + IdCardUtil.getAgeForIdcard(tempPatient.getIdcard()), users, messages, "1");
        JSONObject obj = ImUtill.createTopics(patient + "_consult_" + ct.getType(), consult.getCode(), tempPatient.getName() + " " + IdCardUtil.getAgeForIdcard(tempPatient.getIdcard()), users, messages, ImUtill.SESSION_TYPE_MUC);
        if (obj == null) {
            throw new RuntimeException("IM消息发送异常!");
        }
@ -1457,7 +1457,7 @@ public class ConsultTeamService extends ConsultService {
        participants.put(ct.getPatient(), 0);
        participants.put(ct.getDoctor(), 0);
        Doctor doctor = doctorService.findDoctorByCode(uid);
        JSONObject sessionJson = ImUtill.createSession(participants, "2", doctor.getName() + "发起求助!", "");
        JSONObject sessionJson = ImUtill.createSession(participants, ImUtill.SESSION_TYPE_P2P, doctor.getName() + "发起求助!", "");
        if (sessionJson.getInt("status") == -1) {
            throw new RuntimeException(sessionJson.getString("message"));
        }
@ -1546,7 +1546,7 @@ public class ConsultTeamService extends ConsultService {
            jsonObject.put(ct.getPatient(), 0);
            jsonObject.put(ct.getDoctor(), 0);
            //设置消息ID
            JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, "2");
            JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, ImUtill.SESSION_TYPE_P2P);
            if (obj == null || obj.getInt("status") == -1) {
                throw new RuntimeException("im消息创建异常!" + obj == null ? "" : obj.getString("message"));
            }
@ -1560,7 +1560,7 @@ public class ConsultTeamService extends ConsultService {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put(ct.getPatient(), 0);
                jsonObject.put(ct.getDoctor(), 0);
                JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, "2");
                JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, ImUtill.SESSION_TYPE_P2P);
                if (obj == null || obj.getInt("status") == -1) {
                    throw new RuntimeException("im消息创建异常!" + obj == null ? "" : obj.getString("message"));
                }
@ -1576,7 +1576,7 @@ public class ConsultTeamService extends ConsultService {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put(ct.getPatient(), 0);
                jsonObject.put(ct.getDoctor(), 0);
                JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, "2");
                JSONObject obj = ImUtill.createTopics(null, consult.getCode(), doctorTemp.getName(), jsonObject, messages, ImUtill.SESSION_TYPE_P2P);
                if (obj == null || obj.getInt("status") == -1) {
                    throw new RuntimeException("im消息创建异常!" + obj == null ? "" : obj.getString("message"));
                }
@ -1707,7 +1707,7 @@ public class ConsultTeamService extends ConsultService {
        JSONObject messages = ImUtill.getCreateTopicMessage(senderId, senderName, senderName + "发起咨询", content, ct.getImages());
        JSONObject obj = ImUtill.createTopics(null, consult.getCode(), consult.getSymptoms(), jsonObject, messages, "2");
        JSONObject obj = ImUtill.createTopics(null, consult.getCode(), consult.getSymptoms(), jsonObject, messages, ImUtill.SESSION_TYPE_P2P);
        if (obj == null) {
            throw new RuntimeException("im消息创建异常!");
        }