Browse Source

Merge branch 'dev' of huangwenjie/wlyy2.0 into dev

huangwenjie 5 years ago
parent
commit
eadfa3f76c

+ 17 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1783,7 +1783,7 @@ public class ImService {
		String sessionId = "";
		messages = imUtil.getCreateTopicMessage(generalDoctor.getId(),generalDoctor.getName(), consult.getTitle(), content, consult.getImages(), special_doctor);
		//5、(im创建咨询) 续方咨询的sessionid为居民code+就诊code+12(图文,视频,图文+视频)
		sessionId = general_doctor + "_" + special_doctor + "_" + ct.getType();
		sessionId = patient_code+"_"+general_doctor + "_" + special_doctor + "_" + ct.getType();
		obj = imUtil.createTopics(sessionId, consult.getId(), p.getName(), users, messages, imUtil.SESSION_TYPE_GENERAL_EXPERT);
		
		if (obj == null) {
@ -1827,4 +1827,20 @@ public class ImService {
		
		return result;
	}
	
	/**
	 * 查询全科医生与专科医生是否存在未结束的咨询
	 * @param session_id
	 * @return
	 */
	public String isExistsUnfinishedConsult(String session_id) throws Exception{
		
		Boolean re = false;
		re = imUtil.sessionIsExist(session_id);
		if(re){
			return session_id;
		}else{
			return null;
		}
	}
}

+ 14 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -513,5 +513,19 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		return success("操作成功");
	}
	
	@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.isExistsUnfinishedConsult)
	@ApiOperation(value = "查询全科医生与专科医生是否存在未结束的咨询", notes = "查询全科医生与专科医生是否存在未结束的咨询")
	public Envelop isExistsUnfinishedConsult(@ApiParam(name = "patient_code", value = "居民CODE")
	                                          @RequestParam(value = "patient_code", required = true)String patient_code,
	                                          @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
	                                          ) throws Exception {
		String session_id = patient_code+"_"+general_doctor+"_"+special_doctor+"_15";
		session_id = imService.isExistsUnfinishedConsult(session_id);
		return success(session_id);
	}
	
	
}