|  | @ -216,7 +216,7 @@ public class ImService {
 | 
												
													
														
															|  | 	 * 根据咨询CODE进入会话
 |  | 	 * 根据咨询CODE进入会话
 | 
												
													
														
															|  | 	 * @param consult 咨询CODE
 |  | 	 * @param consult 咨询CODE
 | 
												
													
														
															|  | 	 * @param currentUid 当前居民ID
 |  | 	 * @param currentUid 当前居民ID
 | 
												
													
														
															|  | 	 * @param uid 代理人ID
 |  | 
 | 
												
													
														
															|  | 
 |  | 	 * @param uid 代理人ID(目前版本废弃)
 | 
												
													
														
															|  | 	 * @return
 |  | 	 * @return
 | 
												
													
														
															|  | 	 */
 |  | 	 */
 | 
												
													
														
															|  | 	public int intoTopic(String consult, String currentUid, String uid) {
 |  | 	public int intoTopic(String consult, String currentUid, String uid) {
 | 
												
											
												
													
														
															|  | @ -226,18 +226,18 @@ public class ImService {
 | 
												
													
														
															|  | 		}
 |  | 		}
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 		String content = "进入了咨询";
 |  | 		String content = "进入了咨询";
 | 
												
													
														
															|  | 		BasePatientDO p = basePatientDao.findById(uid);
 |  | 
 | 
												
													
														
															|  | 
 |  | 		BasePatientDO p = basePatientDao.findById(currentUid);
 | 
												
													
														
															|  | 		String intoUserName = p.getName();
 |  | 		String intoUserName = p.getName();
 | 
												
													
														
															|  | 		if (currentUid.equals(uid)) {
 |  | 
 | 
												
													
														
															|  | 			content = intoUserName + content;
 |  | 
 | 
												
													
														
															|  | 		} else {
 |  | 
 | 
												
													
														
															|  | 
 |  | //		if (currentUid.equals(uid)) {
 | 
												
													
														
															|  | 
 |  | //			content = intoUserName + content;
 | 
												
													
														
															|  | 
 |  | //		} else {
 | 
												
													
														
															|  | 			BasePatientDO member = basePatientDao.findById(currentUid);
 |  | 			BasePatientDO member = basePatientDao.findById(currentUid);
 | 
												
													
														
															|  | 			content = intoUserName + content;
 |  | 			content = intoUserName + content;
 | 
												
													
														
															|  | 			//目前没有家人关系,所以家人名称的名字获取暂时注释
 |  | 			//目前没有家人关系,所以家人名称的名字获取暂时注释
 | 
												
													
														
															|  | //			content = member.getName() + "(" + relations.get(familyMember.getFamilyRelation()) + ")" + content;
 |  | //			content = member.getName() + "(" + relations.get(familyMember.getFamilyRelation()) + ")" + content;
 | 
												
													
														
															|  | 		}
 |  | 
 | 
												
													
														
															|  | 
 |  | //		}
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 		imUtil.sendIntoTopicIM(ct.getPatient(), ct.getPatient(), ct.getConsult(), content, uid, intoUserName);
 |  | 
 | 
												
													
														
															|  | 
 |  | 		imUtil.sendIntoTopicIM(ct.getPatient(), ct.getPatient(), ct.getConsult(), content, currentUid, intoUserName);
 | 
												
													
														
															|  | 		return 0;
 |  | 		return 0;
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 	}
 |  | 	}
 | 
												
											
												
													
														
															|  | @ -266,15 +266,15 @@ public class ImService {
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 		String[] arr = null;
 |  | 		String[] arr = null;
 | 
												
													
														
															|  | 		if (type == 3) {
 |  | 		if (type == 3) {
 | 
												
													
														
															|  | 			String path = fetchWxVoices(wechat_appid);
 |  | 
 | 
												
													
														
															|  | 			JSONObject obj = new JSONObject();
 |  | 
 | 
												
													
														
															|  | 			// 将临时语音拷贝到正式存储路径下
 |  | 
 | 
												
													
														
															|  | 			if (org.apache.commons.lang3.StringUtils.isNotEmpty(path)) {
 |  | 
 | 
												
													
														
															|  | 				content = fileUtil.copyTempVoice(path,fastdfs_file_url);
 |  | 
 | 
												
													
														
															|  | 				obj.put("path", content);
 |  | 
 | 
												
													
														
															|  | 				obj.put("times", times);
 |  | 
 | 
												
													
														
															|  | 				content = obj.toString();
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 
 |  | //			String path = fetchWxVoices(wechat_appid);
 | 
												
													
														
															|  | 
 |  | //			JSONObject obj = new JSONObject();
 | 
												
													
														
															|  | 
 |  | //			// 将临时语音拷贝到正式存储路径下
 | 
												
													
														
															|  | 
 |  | //			if (org.apache.commons.lang3.StringUtils.isNotEmpty(path)) {
 | 
												
													
														
															|  | 
 |  | //				content = fileUtil.copyTempVoice(path,fastdfs_file_url);
 | 
												
													
														
															|  | 
 |  | //				obj.put("path", path);
 | 
												
													
														
															|  | 
 |  | //				obj.put("times", times);
 | 
												
													
														
															|  | 
 |  | //				content = obj.toString();
 | 
												
													
														
															|  | 
 |  | //			}
 | 
												
													
														
															|  | 			ConsultTeamLogDo log = new ConsultTeamLogDo();
 |  | 			ConsultTeamLogDo log = new ConsultTeamLogDo();
 | 
												
													
														
															|  | 			log.setConsult(consult);
 |  | 			log.setConsult(consult);
 | 
												
													
														
															|  | 			log.setContent(content);
 |  | 			log.setContent(content);
 | 
												
											
												
													
														
															|  | @ -283,16 +283,16 @@ public class ImService {
 | 
												
													
														
															|  | 			log.setType(type);
 |  | 			log.setType(type);
 | 
												
													
														
															|  | 			logs.add(log);
 |  | 			logs.add(log);
 | 
												
													
														
															|  | 		} else if (type == 2) {
 |  | 		} else if (type == 2) {
 | 
												
													
														
															|  | 			// 图片消息
 |  | 
 | 
												
													
														
															|  | 			content = fetchWxImages(wechat_appid);
 |  | 
 | 
												
													
														
															|  | 			// 将临时图片拷贝到正式存储路径下
 |  | 
 | 
												
													
														
															|  | 			if (org.apache.commons.lang3.StringUtils.isNotEmpty(content)) {
 |  | 
 | 
												
													
														
															|  | 				content = fileUtil.copyTempImage(content,upload_temp_path);
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 			if (org.apache.commons.lang3.StringUtils.isEmpty(content)) {
 |  | 
 | 
												
													
														
															|  | 				throw new Exception("图片上传失败!");
 |  | 
 | 
												
													
														
															|  | //				return error(-1, "图片上传失败!");
 |  | 
 | 
												
													
														
															|  | 			}
 |  | 
 | 
												
													
														
															|  | 
 |  | //			// 图片消息
 | 
												
													
														
															|  | 
 |  | //			content = fetchWxImages(wechat_appid);
 | 
												
													
														
															|  | 
 |  | //			// 将临时图片拷贝到正式存储路径下
 | 
												
													
														
															|  | 
 |  | //			if (org.apache.commons.lang3.StringUtils.isNotEmpty(content)) {
 | 
												
													
														
															|  | 
 |  | //				content = fileUtil.copyTempImage(content,upload_temp_path);
 | 
												
													
														
															|  | 
 |  | //			}
 | 
												
													
														
															|  | 
 |  | //			if (org.apache.commons.lang3.StringUtils.isEmpty(content)) {
 | 
												
													
														
															|  | 
 |  | //				throw new Exception("图片上传失败!");
 | 
												
													
														
															|  | 
 |  | ////				return error(-1, "图片上传失败!");
 | 
												
													
														
															|  | 
 |  | //			}
 | 
												
													
														
															|  | 			String[] images = content.split(",");
 |  | 			String[] images = content.split(",");
 | 
												
													
														
															|  | 			for (String image : images) {
 |  | 			for (String image : images) {
 | 
												
													
														
															|  | 				ConsultTeamLogDo log = new ConsultTeamLogDo();
 |  | 				ConsultTeamLogDo log = new ConsultTeamLogDo();
 | 
												
											
												
													
														
															|  | @ -993,5 +993,14 @@ public class ImService {
 | 
												
													
														
															|  | 		consultTeamDao.save(consultTeam);
 |  | 		consultTeamDao.save(consultTeam);
 | 
												
													
														
															|  | 		return 1;
 |  | 		return 1;
 | 
												
													
														
															|  | 	}
 |  | 	}
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 	
 | 
												
													
														
															|  | 
 |  | 	/**
 | 
												
													
														
															|  | 
 |  | 	 * 根据咨询CODE获取session_id
 | 
												
													
														
															|  | 
 |  | 	 * @param consult
 | 
												
													
														
															|  | 
 |  | 	 * @return
 | 
												
													
														
															|  | 
 |  | 	 */
 | 
												
													
														
															|  | 
 |  | 	public JSONObject getTopic(String consult) throws Exception {
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		return imUtil.getTopic(consult);
 | 
												
													
														
															|  | 
 |  | 	}
 | 
												
													
														
															|  | }
 |  | }
 |