|  | @ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON;
 | 
												
													
														
															|  | import com.alibaba.fastjson.JSONArray;
 |  | import com.alibaba.fastjson.JSONArray;
 | 
												
													
														
															|  | import com.alibaba.fastjson.JSONObject;
 |  | import com.alibaba.fastjson.JSONObject;
 | 
												
													
														
															|  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
												
													
														
															|  | 
 |  | import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
												
													
														
															|  | 
 |  | import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.im.ConsultDo;
 |  | import com.yihu.jw.entity.base.im.ConsultDo;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 |  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.im.ConsultTeamDoctorDo;
 |  | import com.yihu.jw.entity.base.im.ConsultTeamDoctorDo;
 | 
												
											
												
													
														
															|  | @ -145,6 +147,9 @@ public class ImService {
 | 
												
													
														
															|  | 	@Autowired
 |  | 	@Autowired
 | 
												
													
														
															|  | 	private WlyyHttpLogDao wlyyHttpLogDao;
 |  | 	private WlyyHttpLogDao wlyyHttpLogDao;
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 
 |  | 	@Autowired
 | 
												
													
														
															|  | 
 |  | 	private BaseDoctorRoleDao baseDoctorRoleDao;
 | 
												
													
														
															|  | 
 |  | 	
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 	/**
 |  | 	/**
 | 
												
											
												
													
														
															|  | @ -1069,6 +1074,8 @@ public class ImService {
 | 
												
													
														
															|  | 				object.put("socket_sms_type",5);
 |  | 				object.put("socket_sms_type",5);
 | 
												
													
														
															|  | 				object.put("relation_code",wlyyOutpatientDO.getId());
 |  | 				object.put("relation_code",wlyyOutpatientDO.getId());
 | 
												
													
														
															|  | 				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getPatient(),"1",object.toString());
 |  | 				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getPatient(),"1",object.toString());
 | 
												
													
														
															|  | 
 |  | 				//医生接诊发送导诊护士外层消息
 | 
												
													
														
															|  | 
 |  | 				this.sendOutpatientGuaidanceMessage(wlyyOutpatientDO);
 | 
												
													
														
															|  | 			}else if("2".equals(wlyyOutpatientDO.getOutpatientType())){
 |  | 			}else if("2".equals(wlyyOutpatientDO.getOutpatientType())){
 | 
												
													
														
															|  | 				//协同门诊
 |  | 				//协同门诊
 | 
												
													
														
															|  | 				System.out.println("发送外层SOCKET消息:协同门诊");
 |  | 				System.out.println("发送外层SOCKET消息:协同门诊");
 | 
												
											
												
													
														
															|  | @ -1076,12 +1083,39 @@ public class ImService {
 | 
												
													
														
															|  | 				object.put("socket_sms_type",5);
 |  | 				object.put("socket_sms_type",5);
 | 
												
													
														
															|  | 				object.put("relation_code",wlyyOutpatientDO.getId());
 |  | 				object.put("relation_code",wlyyOutpatientDO.getId());
 | 
												
													
														
															|  | 				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getGeneralDoctor(),"1",object.toString());
 |  | 				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getGeneralDoctor(),"1",object.toString());
 | 
												
													
														
															|  | 
 |  | 				//医生接诊发送导诊护士外层消息
 | 
												
													
														
															|  | 
 |  | 				this.sendOutpatientGuaidanceMessage(wlyyOutpatientDO);
 | 
												
													
														
															|  | 			}
 |  | 			}
 | 
												
													
														
															|  | 			
 |  | 			
 | 
												
													
														
															|  | 			return result;
 |  | 			return result;
 | 
												
													
														
															|  | 		}
 |  | 		}
 | 
												
													
														
															|  | 	}
 |  | 	}
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 
 |  | 	/**
 | 
												
													
														
															|  | 
 |  | 	 * 医生接诊发送导诊护士外层消息
 | 
												
													
														
															|  | 
 |  | 	 * @param wlyyOutpatientDO
 | 
												
													
														
															|  | 
 |  | 	 */
 | 
												
													
														
															|  | 
 |  | 	private void sendOutpatientGuaidanceMessage(WlyyOutpatientDO wlyyOutpatientDO ){
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		System.out.println("发送导诊护士外层SOCKET消息:医生接诊");
 | 
												
													
														
															|  | 
 |  | 		JSONObject object = new JSONObject();
 | 
												
													
														
															|  | 
 |  | 		object.put("socket_sms_type",7);
 | 
												
													
														
															|  | 
 |  | 		object.put("relation_code","");
 | 
												
													
														
															|  | 
 |  | 		object.put("msg_time",DateUtil.dateToStrLong(new Date()));
 | 
												
													
														
															|  | 
 |  | 		String msgStr = wlyyOutpatientDO.getDoctorName()+"医生诊室 "+wlyyOutpatientDO.getPatientName();
 | 
												
													
														
															|  | 
 |  | 		if("1".equals(wlyyOutpatientDO.getOutpatientType())){
 | 
												
													
														
															|  | 
 |  | 			msgStr = msgStr + "  已开始复诊";
 | 
												
													
														
															|  | 
 |  | 		}else if("2".equals(wlyyOutpatientDO.getOutpatientType())){
 | 
												
													
														
															|  | 
 |  | 			msgStr = msgStr + "  已开始协同门诊";
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 		object.put("msg",msgStr);
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		List<BaseDoctorRoleDO> assistantList =  baseDoctorRoleDao.findByRoleCode("assistant");
 | 
												
													
														
															|  | 
 |  | 		for (BaseDoctorRoleDO baseDoctorRoleDO:assistantList){
 | 
												
													
														
															|  | 
 |  | 			imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),baseDoctorRoleDO.getDoctorCode(),"1",object.toString());
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 	}
 | 
												
													
														
															|  | 
 |  | 	
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 	/**
 |  | 	/**
 | 
												
													
														
															|  | 	 * 居民结束咨询
 |  | 	 * 居民结束咨询
 |