| 
					
				 | 
			
			
				@ -1,8 +1,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.wlyy.web.third; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.entity.message.SMS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.entity.patient.Patient; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.entity.patient.PatientReservation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.logs.BusinessLogs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.repository.message.SMSDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.app.reservation.PatientReservationService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.common.account.DoctorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.common.account.PatientService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -12,6 +14,7 @@ import com.yihu.wlyy.service.third.guahao.GuahaoYihuService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.service.third.guahao.IGuahaoService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.task.PushMsgTask; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.util.HttpClientUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.util.NetworkUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.util.SystemConf; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.wlyy.web.WeixinBaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -56,6 +59,8 @@ public class BookingController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DoctorService doctorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private SMSDao smsDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 根据城市编码获取相应挂号服务 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -443,6 +448,18 @@ public class BookingController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (resultJson != null && resultJson.getInt("result") != 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        des = "短信提醒失败!(原因:"+resultJson.getString("description")+")"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //保存短信记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    SMS sms = new SMS(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setContent(msg+des); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setCaptcha(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Date date = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setDeadline(date); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setCzrq(date); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setMobile(patientPhone); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setIp(NetworkUtil.getIpAddress(request)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setType(6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sms.setStatus(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    smsDao.save(sms); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    // 推送消息给微信端 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Patient p = patientService.findByCode(patient); 
			 |