|
@ -139,7 +139,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
|
|
|
/**
|
|
|
* 查詢醫生網絡諮詢列表
|
|
|
* @param type 咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部 6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
|
|
|
*
|
|
|
* @param type 咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部 6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
|
|
|
* @param id
|
|
|
* @param pagesize 每页显示数,默认为10
|
|
|
* @return
|
|
@ -751,8 +752,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
ct.setStartMsgId(obj.get("start_msg_id").toString());
|
|
|
consultTeamDao.save(ct);
|
|
|
consultDao.save(consult);
|
|
|
for(String key :users.keySet()){
|
|
|
if(patient.equals(key)){
|
|
|
for (String key : users.keySet()) {
|
|
|
if (patient.equals(key)) {
|
|
|
continue;
|
|
|
}
|
|
|
ConsultTeamDoctor cd = new ConsultTeamDoctor();
|
|
@ -1479,16 +1480,16 @@ public class ConsultTeamService extends ConsultService {
|
|
|
}
|
|
|
Doctor doctorTemp = doctorDao.findByCode(ct.getDoctor());
|
|
|
JSONObject qiuzuObj = new JSONObject();
|
|
|
qiuzuObj.put("session_id",oldConsult.getPatient()+"_consult_"+oldConsult.getType());
|
|
|
qiuzuObj.put("patient",ct.getPatient());
|
|
|
qiuzuObj.put("old_consult_code",oldConsultCode);
|
|
|
qiuzuObj.put("doctor",ct.getDoctor());
|
|
|
qiuzuObj.put("doctor_name",doctorTemp.getName());
|
|
|
ImUtill.sendTopicIM(doctor.getCode(),doctor.getName(),oldConsultCode,"5",qiuzuObj.toString());
|
|
|
qiuzuObj.put("session_id", oldConsult.getPatient() + "_consult_" + oldConsult.getType());
|
|
|
qiuzuObj.put("patient", ct.getPatient());
|
|
|
qiuzuObj.put("old_consult_code", oldConsultCode);
|
|
|
qiuzuObj.put("doctor", ct.getDoctor());
|
|
|
qiuzuObj.put("doctor_name", doctorTemp.getName());
|
|
|
ImUtill.sendTopicIM(doctor.getCode(), doctor.getName(), oldConsultCode, "5", qiuzuObj.toString());
|
|
|
}
|
|
|
|
|
|
|
|
|
ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","咨询问题:"+ ct.getSymptoms(),"1");
|
|
|
ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"), "1", "咨询问题:" + ct.getSymptoms(), "1");
|
|
|
//推送给IM图片
|
|
|
if (StringUtils.isNotEmpty(ct.getImages())) {
|
|
|
String[] images = ct.getImages().split(",");
|
|
@ -1578,7 +1579,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
qiuzuObj.put("old_consult_code", oldConsultCode);
|
|
|
qiuzuObj.put("doctor", ct.getDoctor());
|
|
|
qiuzuObj.put("doctor_name", doctor.getName());
|
|
|
ImUtill.sendTopicIM(doctorTemp.getCode(), doctorTemp.getName(), oldConsultCode, "5", qiuzuObj.toString());}
|
|
|
ImUtill.sendTopicIM(doctorTemp.getCode(), doctorTemp.getName(), oldConsultCode, "5", qiuzuObj.toString());
|
|
|
}
|
|
|
consultTeamDao.save(ct); // 保存医生咨询信息
|
|
|
consultTeamDoctorDao.save(cd);
|
|
|
consultDao.save(consult);
|
|
@ -1587,6 +1589,11 @@ public class ConsultTeamService extends ConsultService {
|
|
|
public int finishConsult(String consult, String endOperator, int endType) {
|
|
|
ConsultTeam consultTeam = consultTeamDao.findByConsult(consult);
|
|
|
Consult cons = consultDao.findByCode(consult);
|
|
|
|
|
|
if (consultTeam.getStatus() == 1) {
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
String endName = "";
|
|
|
String endId = "";
|
|
|
//推送给IM文字消息
|
|
@ -1633,8 +1640,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
public void famousConsult(ConsultTeam ct, String uid, String type) throws Exception {
|
|
|
// 设置患者信息
|
|
|
ct.setPatient(uid);
|
|
|
String senderId="";
|
|
|
String senderName="";
|
|
|
String senderId = "";
|
|
|
String senderName = "";
|
|
|
if ("1".equals(type)) {
|
|
|
// 查询患者信息
|
|
|
Patient tempPatient = patientDao.findByCode(uid);
|