|  | @ -990,30 +990,43 @@ public class ImService {
 | 
	
		
			
				|  |  | 		if (obj.getInteger("status") == -1) {
 | 
	
		
			
				|  |  | 			throw new RuntimeException(String.valueOf(obj.get("message")));
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		String name = "";
 | 
	
		
			
				|  |  | 		String returnJson = "";
 | 
	
		
			
				|  |  | 		//推送给IM文字消息
 | 
	
		
			
				|  |  | 		if (endType == 1) {
 | 
	
		
			
				|  |  | 			BasePatientDO p = basePatientDao.findById(endOperator);
 | 
	
		
			
				|  |  | 			name = p.getName();
 | 
	
		
			
				|  |  | 			returnJson = imUtil.sendIM(consultTeam.getPatient(), consultTeam.getDoctor(), "7", name + "结束了本次咨询");
 | 
	
		
			
				|  |  | 		} else {
 | 
	
		
			
				|  |  | 			BaseDoctorDO d = baseDoctorDao.findById(endOperator);
 | 
	
		
			
				|  |  | 			name = d.getName();
 | 
	
		
			
				|  |  | 			returnJson = imUtil.sendIM(consultTeam.getDoctor(), consultTeam.getPatient(), "7", name + "结束了本次咨询");
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		if (org.apache.commons.lang3.StringUtils.isEmpty(returnJson)) {
 | 
	
		
			
				|  |  | 			throw new RuntimeException("send consult finished IM message failed!");
 | 
	
		
			
				|  |  | //			throw new Exception("send consult finished IM message failed");
 | 
	
		
			
				|  |  | 		} else {
 | 
	
		
			
				|  |  | 			JSONObject jo = JSON.parseObject(returnJson);            //设置消息ID
 | 
	
		
			
				|  |  | 			consultTeam.setEndMsgId(jo.getInteger("startId") + "");
 | 
	
		
			
				|  |  | 			consultTeam.setEndOperator(endOperator);
 | 
	
		
			
				|  |  | 			consultTeam.setEndType(endType);
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		BasePatientDO p = basePatientDao.findById(endOperator);
 | 
	
		
			
				|  |  | 		BaseDoctorDO d = baseDoctorDao.findById(endOperator);
 | 
	
		
			
				|  |  | 		name = d.getName();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		JSONObject evalueContent = new JSONObject();
 | 
	
		
			
				|  |  | 		evalueContent.put("patientCode",p.getId());
 | 
	
		
			
				|  |  | 		evalueContent.put("patientName",p.getName());
 | 
	
		
			
				|  |  | 		evalueContent.put("doctorCode",d.getId());
 | 
	
		
			
				|  |  | 		evalueContent.put("doctorName",d.getName());
 | 
	
		
			
				|  |  | 		evalueContent.put("consultCode",consult);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		returnJson = imUtil.sendIM(consultTeam.getDoctor(), consultTeam.getPatient(), "28", name + "结束了本次咨询");
 | 
	
		
			
				|  |  | //		//推送给IM文字消息
 | 
	
		
			
				|  |  | //		if (endType == 1) {
 | 
	
		
			
				|  |  | //			BasePatientDO p = basePatientDao.findById(endOperator);
 | 
	
		
			
				|  |  | //			name = p.getName();
 | 
	
		
			
				|  |  | //			returnJson = imUtil.sendIM(consultTeam.getPatient(), consultTeam.getDoctor(), "7", name + "结束了本次咨询");
 | 
	
		
			
				|  |  | //		} else {
 | 
	
		
			
				|  |  | //			BaseDoctorDO d = baseDoctorDao.findById(endOperator);
 | 
	
		
			
				|  |  | //			name = d.getName();
 | 
	
		
			
				|  |  | //			returnJson = imUtil.sendIM(consultTeam.getDoctor(), consultTeam.getPatient(), "7", name + "结束了本次咨询");
 | 
	
		
			
				|  |  | //		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | //		if (org.apache.commons.lang3.StringUtils.isEmpty(returnJson)) {
 | 
	
		
			
				|  |  | //			throw new RuntimeException("send consult finished IM message failed!");
 | 
	
		
			
				|  |  | ////			throw new Exception("send consult finished IM message failed");
 | 
	
		
			
				|  |  | //		} else {
 | 
	
		
			
				|  |  | //			JSONObject jo = JSON.parseObject(returnJson);            //设置消息ID
 | 
	
		
			
				|  |  | //			consultTeam.setEndMsgId(jo.getInteger("startId") + "");
 | 
	
		
			
				|  |  | //			consultTeam.setEndOperator(endOperator);
 | 
	
		
			
				|  |  | //			consultTeam.setEndType(endType);
 | 
	
		
			
				|  |  | //		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | //		org.json.JSONObject group = talkGroupService.findConsultTalkGroup(consultTeam.getConsult());
 | 
	
		
			
				|  |  | //
 | 
	
	
		
			
				|  | @ -1050,7 +1063,13 @@ public class ImService {
 | 
	
		
			
				|  |  | 	 */
 | 
	
		
			
				|  |  | 	public JSONObject getTopic(String consult) throws Exception {
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return imUtil.getTopic(consult);
 | 
	
		
			
				|  |  | 		JSONObject object = imUtil.getTopic(consult);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		ConsultTeamDo consultTeamDo = consultTeamDao.findOne(consult);
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		object.put("doctorCode",consultTeamDo.getDoctor());
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return object;
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 |