|  | @ -1614,6 +1614,7 @@ public class ImService {
 | 
	
		
			
				|  |  | 			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(cons.getRelationCode());
 | 
	
		
			
				|  |  | 			if(wlyyOutpatientDO != null && wlyyOutpatientDO.getId() != null){
 | 
	
		
			
				|  |  | 				wlyyOutpatientDO.setStatus("3");
 | 
	
		
			
				|  |  | 				outpatientDao.save(wlyyOutpatientDO);
 | 
	
		
			
				|  |  | 			}
 | 
	
		
			
				|  |  | 			
 | 
	
		
			
				|  |  | 			List<WlyyHospitalWaitingRoomDO> wlyyHospitalWaitingRoomDOS = hospitalWaitingRoomDao.findByOutpatientId(cons.getRelationCode());
 | 
	
	
		
			
				|  | @ -1627,7 +1628,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 +3096,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");
 | 
	
		
			
				|  |  | 					}
 | 
	
		
			
				|  |  | 				}
 | 
	
		
			
				|  |  | 			}
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |