| 
					
				 | 
			
			
				@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.im.ConsultTeamDo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.patient.BasePatientDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.dao.OutpatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.PrescriptionService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -19,7 +18,6 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.sms.service.ZhongShanSMSService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wlyy.service.WlyyBusinessService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -184,7 +182,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						ConsultTeamDo consult = new ConsultTeamDo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						consult.setType(15);//家医咨询求助互联网医院专科医生:全科医生-专科医生-咨询聊天 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						JSONObject result = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						String result = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						synchronized (patient_code.intern()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							result = imService.generalAddExpertConsult(patient_code, general_doctor,special_doctor,when,symptoms,images,consult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -526,13 +524,13 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          @ApiParam(name = "general_doctor", value = "全科医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          @RequestParam(value = "general_doctor", required = true)String general_doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          @ApiParam(name = "special_doctor", value = "专科医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          @RequestParam(value = "special_doctor", required = true)String special_doctor 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          @RequestParam(value = "special_doctor", required = false)String special_doctor 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                          ) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						if(org.apache.axis.utils.StringUtils.isEmpty(patient_code)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							patient_code= getUID(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						String consultCode = imService.getUnfinishedConsultByActualSender(general_doctor, special_doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						String consultCode = imService.getUnfinishedConsultByActualSender(patient_code,general_doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						return success("请求成功",consultCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -626,4 +624,36 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.getMessageForward) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@ApiOperation(value = "(健康咨询)请求转发的消息内容", notes = "(健康咨询)请求转发的消息内容") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					public Envelop getMessageForward( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "messageids", value = "消息ID,英文逗号连接", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                  @RequestParam(value = "messageids", required = true) String messageids, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "title", value = "会话标题", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                  @RequestParam(value = "title", required = true) String title, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "sessionType", value = "原会话的会话类型", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                                  @RequestParam(value = "sessionType", required = true) String sessionType 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						return success("请求成功",imService.getMessageById(sessionType,messageids,title)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.postMessageForward) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					@ApiOperation(value = "(健康咨询)转发消息", notes = "(健康咨询)转发消息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					public Envelop messageForward(@ApiParam(name = "senderIdcard", value = "发送者身份证", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @RequestParam(value = "senderIdcard", required = true) String senderIdcard, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "reciverIdcard", value = "发送者身份证", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @RequestParam(value = "reciverIdcard", required = true) String reciverIdcard, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "messageids", value = "消息ID,英文逗号连接", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @RequestParam(value = "messageids", required = true) String messageids, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "title", value = "会话标题", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @RequestParam(value = "title", required = true) String title, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @ApiParam(name = "sessionType", value = "原会话的会话类型", defaultValue = "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					                              @RequestParam(value = "sessionType", required = true) String sessionType 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 * todo 请求i健康接口发送转发的聊天消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						return success("请求成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |