|  | @ -8,6 +8,7 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.wx.WxAccessTokenDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.common.GetuiClientDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.securitymonitoring.SecurityMonitoringOrderDO;
 | 
	
	
		
			
				|  | @ -15,6 +16,8 @@ import com.yihu.jw.entity.hospital.message.SystemMessageDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.message.dao.SystemMessageDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.org.dao.BaseOrgDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.push.dao.GetuiClientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.push.service.GetuiService;
 | 
	
		
			
				|  |  | import com.yihu.jw.sms.service.TXYSmsService;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.WxAccessTokenDao;
 | 
	
	
		
			
				|  | @ -31,9 +34,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.scheduling.annotation.Async;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Component;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.Date;
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
		
			
				|  |  | import java.util.UUID;
 | 
	
		
			
				|  |  | import java.util.*;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | /**
 | 
	
		
			
				|  |  |  * Created by liub on 2020/12/28.
 | 
	
	
		
			
				|  | @ -67,8 +68,10 @@ public class MessageUtil {
 | 
	
		
			
				|  |  |     private BaseOrgDao orgDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private TXYSmsService txySmsService;
 | 
	
		
			
				|  |  |     //发送微信模板消息
 | 
	
		
			
				|  |  |     private  String sendMessageUrl = "http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private GetuiService getuiService;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private GetuiClientDao getuiClientDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 您好{1}有一条新的在线报名申请,请及时前往APP消息应用进行处理。
 | 
	
	
		
			
				|  | @ -82,6 +85,34 @@ public class MessageUtil {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 发送医生个推推送消息
 | 
	
		
			
				|  |  |      * type 1 安防紧急预警 2紧急呼叫 4im 5生日祝福
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void sendDoctorGetuiMessage(String doctorCode,String type,String url,String title,String body){
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             List<GetuiClientDO> clientDOS = getuiClientDao.findByUser(doctorCode,2);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONObject payload = new JSONObject();
 | 
	
		
			
				|  |  |             payload.put("title",title);
 | 
	
		
			
				|  |  |             payload.put("body",body);
 | 
	
		
			
				|  |  |             payload.put("url",url);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |             json.put("title",title);
 | 
	
		
			
				|  |  |             json.put("body",body);
 | 
	
		
			
				|  |  |             json.put("url",url);
 | 
	
		
			
				|  |  | //        json.put("clickType","url");
 | 
	
		
			
				|  |  |             json.put("platform",getuiService.cloudCareDoctor);
 | 
	
		
			
				|  |  |             json.put("payload",payload.toString());
 | 
	
		
			
				|  |  |             for(GetuiClientDO clientDO:clientDOS){
 | 
	
		
			
				|  |  |                 getuiService.push2(clientDO.getClientId(),Integer.valueOf(clientDO.getClientType()),json);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }catch (Exception e){
 | 
	
		
			
				|  |  |             e.printStackTrace();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      * @param wechatId
 | 
	
	
		
			
				|  | @ -117,7 +148,7 @@ public class MessageUtil {
 | 
	
		
			
				|  |  |                 newConfig.setFirst(first);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (StringUtils.isNoneBlank(url)){
 | 
	
		
			
				|  |  |                newConfig.setUrl(url);
 | 
	
		
			
				|  |  |                 newConfig.setUrl(url);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (StringUtils.isNoneBlank(remark)){
 | 
	
		
			
				|  |  |                 newConfig.setRemark(remark);
 |