Kaynağa Gözat

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java
wangzhinan 4 yıl önce
ebeveyn
işleme
b1cd30e6d0

+ 10 - 0
business/im-service/src/main/java/com/yihu/jw/im/util/ImUtil.java

@ -451,6 +451,16 @@ public class ImUtil {
		try {
			obj = JSON.parseObject(ret);
			if(obj.getInteger("status") ==200&&sessionId.equals(obj.getString("sessionId"))){
				String sessionStatus = obj.getString("status");
				if (sessionStatus.equalsIgnoreCase("1")){
					String sessionStatusUrl = im_host + "api/v2/sessions/isExist?session_id="+sessionId;
					JSONObject object = new JSONObject();
					String rs = HttpClientUtil.postBody(sessionStatusUrl, object);
					JSONObject jsonObject = JSONObject.parseObject(rs);
					if (jsonObject.getString("status").equalsIgnoreCase("200")){
						System.out.println("session状态更新成功!"+rs);
					}
				}
				re = true;
			}
		} catch (Exception e) {

+ 5 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -721,7 +721,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@ApiOperation(value = "导诊的咨询对话", notes = "导诊的咨询对话")
	public Envelop getPatientGuaidenceConsult(@ApiParam(name = "patientCode", value = "居民CODE")
	                       @RequestParam(value = "patientCode", required = true)String patientCode) throws Exception {
		String session_id = session_id = patientCode+"_guidance_14";
		String session_id = patientCode+"_guidance_14";
		session_id = imService.getPatientGuaidenceConsult(patientCode,session_id,null);
		return success(session_id);
	}
@ -767,9 +767,11 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "content_type", value = "内容类型", defaultValue = "")
			@RequestParam(value = "content_type", required = true) String content_type,
			@ApiParam(name = "content", value = "消息内容", defaultValue = "")
			@RequestParam(value = "content", required = true) String content
			@RequestParam(value = "content", required = true) String content,
			@ApiParam(name = "type", value = "咨询type", defaultValue = "")
			@RequestParam(value = "type", required = false) String type
	)throws Exception{
		session_id = imService.getPatientGuaidenceConsult(sender_id,session_id,content_type);
		session_id = imService.getPatientGuaidenceConsult(sender_id,session_id,type);
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1");
		return success(result);
	}