| 
					
				 | 
			
			
				@ -1627,7 +1627,12 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						if (wxId.equalsIgnoreCase("xm_ykyy_wx")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							if (!flag){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(consult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								BusinessOrderDO businessOrderDO = new BusinessOrderDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								if(cons.getRelationCode() != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									businessOrderDO  = businessOrderDao.selectByRelationCode(cons.getRelationCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								}else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									businessOrderDO  = businessOrderDao.selectByRelationCode(consult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								if (businessOrderDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"4"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3090,4 +3095,23 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						return flag; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					public void doctorReplyUpdateYktState(String consult,String doctor,String wxId){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						if (wxId.equalsIgnoreCase("xm_ykyy_wx")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							String sql ="select * from muc_messages m  where m.session_id IN " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"(SELECT t.session_id FROM topics t where t.id = '"+consult+"') " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"and m.sender_id = '"+doctor+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							if (mapList!=null&&mapList.size()!=0&&mapList.size()==1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								//眼科接诊时更新眼科通状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								if (!flag){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(consult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									if (businessOrderDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
										ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),"5"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |