|  | @ -3332,14 +3332,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |      * @param type
 |  |      * @param type
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  |     public void sendWxTemplateMsg(String wxId,WlyyOutpatientDO outpatientDO,String type){
 |  |     public void sendWxTemplateMsg(String wxId,WlyyOutpatientDO outpatientDO,String type){
 | 
												
													
														
															|  |         List<BasePatientWechatDo> ps = basePatientWechatDao.findByWechatIdAndPatientId(wxId, outpatientDO.getPatient());
 |  | 
 | 
												
													
														
															|  |         if(ps.isEmpty()){
 |  | 
 | 
												
													
														
															|  |             logger.info("该用户"+outpatientDO.getPatientName()+"没有openid,无法推送模版消息,用户ID:"+outpatientDO.getPatient()+"wechatId:"+wxId);
 |  | 
 | 
												
													
														
															|  |             return;
 |  | 
 | 
												
													
														
															|  | 
 |  |         BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
 | 
												
													
														
															|  | 
 |  |         String typeMsg="";
 | 
												
													
														
															|  | 
 |  |         String first="";
 | 
												
													
														
															|  | 
 |  |         if ("9".equals(type)){
 | 
												
													
														
															|  | 
 |  |             typeMsg="通知内容:您的图文复诊订单已被医生取消,您可重新发起。由于订单取消将不做扣费处理";
 | 
												
													
														
															|  | 
 |  |             first=outpatientDO.getPatientName() + ",您好!您的图文复诊已取消";
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |         if ("16".equals(type)){
 | 
												
													
														
															|  | 
 |  |             typeMsg="通知内容:您的视频复诊订单已被医生取消,您可重新发起。由于订单取消将不做扣费处理";
 | 
												
													
														
															|  | 
 |  |             first=outpatientDO.getPatientName() + ",您好!您的视频复诊已取消";
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
 |  |         if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<BasePatientWechatDo> ps = basePatientWechatDao.findByWechatIdAndPatientId(wxId, outpatientDO.getPatient());
 | 
												
													
														
															|  | 
 |  |             if(ps.isEmpty()){
 | 
												
													
														
															|  | 
 |  |                 logger.info("该用户"+outpatientDO.getPatientName()+"没有openid,无法推送模版消息,用户ID:"+outpatientDO.getPatient()+"wechatId:"+wxId);
 | 
												
													
														
															|  | 
 |  |                 return;
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             ps.stream().forEach(one->{
 |  |             ps.stream().forEach(one->{
 | 
												
													
														
															|  |                 BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
 |  | 
 | 
												
													
														
															|  |                 WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId,"template_doctor_notice","ysqxjz",1);
 |  |                 WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId,"template_doctor_notice","ysqxjz",1);
 | 
												
													
														
															|  |                 WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
 |  |                 WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
 | 
												
													
														
															|  |                 BeanUtils.copyProperties(config,newConfig);
 |  |                 BeanUtils.copyProperties(config,newConfig);
 | 
												
											
												
													
														
															|  | @ -3370,18 +3384,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             });
 |  |             });
 | 
												
													
														
															|  |         }else if("xm_xzzx_wx".equalsIgnoreCase(wxId)) {
 |  |         }else if("xm_xzzx_wx".equalsIgnoreCase(wxId)) {
 | 
												
													
														
															|  |             BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
 |  | 
 | 
												
													
														
															|  |             String MsgUrl="https://www.xmheart.com/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientDO.getPatient();
 |  |             String MsgUrl="https://www.xmheart.com/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientDO.getPatient();
 | 
												
													
														
															|  |             xzzxEntranceService.sendXCXMes(wxId,
 |  | 
 | 
												
													
														
															|  |                    doctorDO.getId(),
 |  | 
 | 
												
													
														
															|  | 
 |  |             String responseMsg = xzzxEntranceService.sendXCXMes(wxId,
 | 
												
													
														
															|  | 
 |  |                     doctorDO.getId(),
 | 
												
													
														
															|  |                     doctorDO.getIdcard(),
 |  |                     doctorDO.getIdcard(),
 | 
												
													
														
															|  |                     outpatientDO.getPatientName()+",您好!您的图文咨询已取消",
 |  | 
 | 
												
													
														
															|  |                     "通知时间:"+DateUtil.getStringDate(),
 |  | 
 | 
												
													
														
															|  |                     "通知内容:您的图文咨询订单已被医生取消,您可重新发起。由于订单取消将不做扣费处理",
 |  | 
 | 
												
													
														
															|  | 
 |  |                     first,
 | 
												
													
														
															|  | 
 |  |                     "通知时间:" + DateUtil.getStringDate(),
 | 
												
													
														
															|  | 
 |  |                     typeMsg,
 | 
												
													
														
															|  |                     MsgUrl,
 |  |                     MsgUrl,
 | 
												
													
														
															|  |                     "wx53f6bb4ac081d840");
 |  |                     "wx53f6bb4ac081d840");
 | 
												
													
														
															|  | 
 |  |             logger.info("XZZX_Msg="+responseMsg);
 | 
												
													
														
															|  |         }else if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
 |  |         }else if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             String MsgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientDO.getPatient();
 | 
												
													
														
															|  | 
 |  |             String responseMsg = entranceService.ehospitalNotice(doctorDO.getName(),
 | 
												
													
														
															|  | 
 |  |                     doctorDO.getIdcard(),
 | 
												
													
														
															|  | 
 |  |                     doctorDO.getMobile(),
 | 
												
													
														
															|  | 
 |  |                     first,
 | 
												
													
														
															|  | 
 |  |                     MsgUrl,
 | 
												
													
														
															|  | 
 |  |                     "通知时间:" + DateUtil.getStringDate(),
 | 
												
													
														
															|  | 
 |  |                     typeMsg
 | 
												
													
														
															|  | 
 |  |             );
 | 
												
													
														
															|  | 
 |  |             logger.info("ZSYY_Msg="+responseMsg);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 |