|  | @ -656,8 +656,15 @@ public class ImService {
 | 
	
		
			
				|  |  | 		// 设置咨询标识
 | 
	
		
			
				|  |  | 		ct.setConsult(consult.getId());
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  | 		jsonObject.put("title", tempPatient.getName() + "申请专家咨询");
 | 
	
		
			
				|  |  | 		jsonObject.put("content",ct.getSymptoms());
 | 
	
		
			
				|  |  | 		jsonObject.put("age",DateUtil.getAgeForIdcard(tempPatient.getIdcard()));
 | 
	
		
			
				|  |  | 		jsonObject.put("sex",tempPatient.getSex());
 | 
	
		
			
				|  |  | 		jsonObject.put("name",tempPatient.getName());
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		//推送给IM去创建议题,取得成员消息
 | 
	
		
			
				|  |  | 		JSONObject messages = imUtil.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), consult.getSymptoms(), consult.getImages(), doctor);
 | 
	
		
			
				|  |  | 		JSONObject messages = imUtil.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), jsonObject.toJSONString(), consult.getImages(), doctor);
 | 
	
		
			
				|  |  | 		users.put(patient, 0);//+ " "+(tempPatient.getSex()==1?"(男 ":"(女 ") + IdCardUtil.getAgeForIdcard(tempPatient.getIdcard())+")"
 | 
	
		
			
				|  |  | 		JSONObject obj = imUtil.createTopics(patient + "_" + doctor + "_" + ct.getType(), consult.getId(), tempPatient.getName(), users, messages, imUtil.SESSION_TYPE_MUC);
 | 
	
		
			
				|  |  | 		if (obj == null) {
 | 
	
	
		
			
				|  | @ -819,6 +826,10 @@ public class ImService {
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  | 			jsonObject.put("title", p.getName() + "申请复诊");
 | 
	
		
			
				|  |  | 			jsonObject.put("content",wlyyOutpatientDO.getDescription());
 | 
	
		
			
				|  |  | 			jsonObject.put("age",DateUtil.getAgeForIdcard(p.getIdcard()));
 | 
	
		
			
				|  |  | 			jsonObject.put("sex",p.getSex());
 | 
	
		
			
				|  |  | 			jsonObject.put("name",p.getName());
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			String content = jsonObject.toString();
 | 
	
	
		
			
				|  | @ -834,6 +845,7 @@ public class ImService {
 | 
	
		
			
				|  |  | 			ct.setDoctorName(doctor.getName());
 | 
	
		
			
				|  |  | 			// 设置患者信息
 | 
	
		
			
				|  |  | 			ct.setPatient(patient);
 | 
	
		
			
				|  |  | 			ct.setSymptoms(wlyyOutpatientDO.getDescription());
 | 
	
		
			
				|  |  | //			if (1 == type) {
 | 
	
		
			
				|  |  | //				ct.setSymptoms("高血压");
 | 
	
		
			
				|  |  | //			} else if (2 == type) {
 | 
	
	
		
			
				|  | @ -868,7 +880,7 @@ public class ImService {
 | 
	
		
			
				|  |  | 			ct.setConsult(consult.getId());
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			//推送给IM去创建议题,取得成员消息
 | 
	
		
			
				|  |  | 			JSONObject messages = imUtil.getCreateTopicMessage(doctorCode, doctor.getName(), consult.getTitle(), content, consult.getImages(), patient);
 | 
	
		
			
				|  |  | 			JSONObject messages = imUtil.getCreateTopicMessage(patient, p.getName(), consult.getTitle(), content, consult.getImages(), doctorCode);
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			//5、(im创建咨询) 续方咨询的sessionid为居民code+就诊code+咨询类型(图文,视频,图文+视频)
 | 
	
		
			
				|  |  | 			String sessionId = patient + "_" + outpatientCode + "_" + ct.getType();
 | 
	
	
		
			
				|  | @ -905,6 +917,9 @@ public class ImService {
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			JSONObject result = imUtil.getSingleSessionInfo(sessionId,doctorCode);
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			wlyyOutpatientDO.setStatus("1");//修改就诊记录为就诊中
 | 
	
		
			
				|  |  | 			outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			return result;
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 	}
 |