| 
					
				 | 
			
			
				@ -835,50 +835,50 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultModel == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return error(-1, "咨询记录不存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 查询日志列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject json = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ConsultTeamLog log = consultTeamService.oneLog(logId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (log != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("id", log.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置回复医生姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("doctorName", log.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置回复内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("content", log.getContent()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置咨询或回复时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("time", DateUtil.dateToStr(log.getCzrq(), DateUtil.YYYY_MM_DD_HH_MM_SS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置记录类型:1文字,2图片,3语音 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("msgType", log.getChatType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置类型:0患者问,1医生回复,2患者追问,3患者评价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("type", log.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            JSONObject obj = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            // 查询日志列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            JSONObject json = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            json.put("id", obj.getInt("id")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (!obj.getString("from").equals(getUID())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                Doctor doc = doctorService.findDoctorByCode(obj.getString("from")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置回复医生姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("doctorName", doc.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                Patient p = patientDao.findByCode(obj.getString("from")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            ConsultTeamLog log = consultTeamService.oneLog(logId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (log != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("id", log.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置回复医生姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("doctorName", p.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            // 设置回复内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            json.put("content", obj.getString("content")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            // 设置咨询或回复时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            json.put("time", DateUtil.dateToStr(new Date(obj.getLong("timestamp")), DateUtil.YYYY_MM_DD_HH_MM_SS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            // 设置记录类型:1文字,2图片,3语音 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            json.put("msgType", obj.getInt("contentType") == 2 ? 2 : 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            // 设置类型:0患者问,1医生回复,2患者追问,3患者评价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if (!obj.getString("from").equals(getUID())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("type", 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("type", obj.getInt("contentType") == 6 ? 0 : 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("doctorName", log.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置回复内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("content", log.getContent()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置咨询或回复时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("time", DateUtil.dateToStr(log.getCzrq(), DateUtil.YYYY_MM_DD_HH_MM_SS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置记录类型:1文字,2图片,3语音 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("msgType", log.getChatType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                // 设置类型:0患者问,1医生回复,2患者追问,3患者评价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                json.put("type", log.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject obj = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject json = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("id", obj.getInt("id")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!obj.getString("from").equals(getUID())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Doctor doc = doctorService.findDoctorByCode(obj.getString("from")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置回复医生姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("doctorName", doc.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Patient p = patientDao.findByCode(obj.getString("from")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置回复医生姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("doctorName", p.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 设置回复内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("content", obj.getString("content")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 设置咨询或回复时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("time", DateUtil.dateToStr(new Date(obj.getLong("timestamp")), DateUtil.YYYY_MM_DD_HH_MM_SS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 设置记录类型:1文字,2图片,3语音 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            json.put("msgType", obj.getInt("contentType") == 2 ? 2 : 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 设置类型:0患者问,1医生回复,2患者追问,3患者评价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!obj.getString("from").equals(getUID())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("type", 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("type", obj.getInt("contentType") == 6 ? 0 : 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            // 返回结果 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200, "查询成功", "consult", json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 |