| 
					
				 | 
			
			
				@ -3379,12 +3379,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if ("1".equalsIgnoreCase(wlyyOutpatientDO.getType())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    data.put("type", "9"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个图文复诊已被医生取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "doctorRefuse", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "doctorRefuseRemind", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if ("2".equalsIgnoreCase(wlyyOutpatientDO.getType())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    data.put("type", "16"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个视频复诊已被医生取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "doctorRefuse", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "doctorRefuseRemind", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                data.put("msg", msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                messageDO.setData(data.toString()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3470,74 +3470,96 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您的视频复诊订单已被医生取消,您可重新发起。由于订单取消将不做扣费处理"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = outpatientDO.getPatientName() + ",您好!您的视频复诊已取消"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("doctorRefuseRemind医生拒诊入参:outpatientId="+outpatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("payRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("9".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您有一个图文复诊订单待支付,点击完成支付,如您已支付请忽略本条信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = outpatientDO.getPatientName() + ",您好!您有一个图文复诊订单待支付,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("图文复诊订单待支付微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您有一个视频复诊订单待支付,点击完成支付,如您已支付请忽略本条信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = outpatientDO.getPatientName() + ",您好!您有一个视频复诊订单待支付,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频复诊订单待支付微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("1".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您有一个图文咨询订单待支付,点击完成支付,如您已支付请忽略本条信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = consPatientDO.getName() + ",您好!您有一个图文咨询订单待支付,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/chatRoom?type=1&consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/chatRoom?type=1&consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("图文咨询订单待支付微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您有一个视频咨询订单待支付,点击完成支付,如您已支付请忽略本条信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first =  consPatientDO.getName() + ",您好!您有一个视频咨询订单待支付,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/chatRoom?type=1&consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/chatRoom?type=1&consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频咨询订单待支付微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("prescriptionPayRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            first = outpatientDO.getPatientName() + ",您好! 医生已为您开具处方,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            contentMsg = "医生已为您开具处方,请及时支付。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            remark = "点击完成支付,如您已支付请忽略本条信息"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("处方支付微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("msgRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            first = outpatientDO.getPatientName() + ",您好!"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            contentMsg = "" + remindMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            remark = "请您尽快回复"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("outpatientMsgRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            first = doctorDO.getName() + doctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您的视频复诊已开始,错过将重新排队"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                remark = "点击消息进入视频诊室接听视频通话,开始视频咨询。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "您的视频咨询已开始,错过将重新排队"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                remark = "点击消息进入视频诊室接听视频通话,开始视频复诊。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/#/returnVisit/prescriptionDetail?outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          if (StringUtils.isNotEmpty(outpatientId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  first = doctorDO.getName() + doctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  contentMsg = "您的视频复诊已开始,错过将重新排队"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  remark = "点击消息进入视频诊室接听视频通话,开始视频咨询。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  msgUrl="/ims-wx/index.html#/returnVisit/preChat?type=16&outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  logger.info("视频问诊已接诊提醒微信模板消息发送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          if (consultTeam!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  first = consDoctorDO.getName() + consDoctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  contentMsg = "您的视频咨询已开始,错过将重新排队"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  remark = "点击消息进入视频诊室接听视频通话,开始视频复诊。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  msgUrl="/ims-wx/index.html#/zx/prechat?consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  logger.info("视频咨询已接诊提醒微信模板消息发送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = "您的视频复诊已预约成功。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "预计" + outpatientDO.getDoctorName() + "医生将于" + DateUtil.dateToStrLong(outpatientDO.getRegisterDate()) + " 与您进行视频复诊。请留意微信公众号消息。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/returnVisit/preChat?type=16&outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/returnVisit/preChat?type=16&outpatientId="+outpatientId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频复诊已预约成功微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = "您的视频咨询已预约成功。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                contentMsg = "预计" + consDoctorDO.getName() + "医生将于" + DateUtil.dateToStrLong(consultTeam.getCzrq()) + " 与您进行视频咨询。请留意微信公众号消息。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/#/zx/prechat?consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                msgUrl="/ims-wx/index.html#/zx/prechat?consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频咨询已预约成功微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            remark = "咨询开始时,医生将邀请您进行视频通话,请您关注消息提醒,及时接受医生视频邀请。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else if ("evaluateRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultTeam.getType()!=null&&1==consultTeam.getType()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = consultTeam.getName() + ",您好!您有1条图文咨询已结束,请及时对咨询医生进行评价。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("图文咨询服务评价微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultTeam.getType()!=null&&9==consultTeam.getType()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = consultTeam.getName() + ",您好!您有1条图文复诊已结束,请及时对咨询医生进行评价。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("图文复诊服务评价微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultTeam.getType()!=null&&16==consultTeam.getType()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = consultTeam.getName() + ",您好!您有1条视频复诊已结束,请及时对咨询医生进行评价。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频复诊服务评价微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultTeam.getType()!=null&&17==consultTeam.getType()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                first = consultTeam.getName() + ",您好!您有1条视频咨询已结束,请及时对咨询医生进行评价。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("视频咨询服务评价微信消息模板推送开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            contentMsg = "请对" + consDoctorDO.getName() + "医生的服务进行评价"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/#/fuwupingjia?consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            msgUrl="/ims-wx/index.html#/fuwupingjia?consultCode="+consultTeam.getConsult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3569,11 +3591,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getHospitalName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword3(config.getKeyword3() + doctorDO.getFee()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("眼科微信消息模板推送 医生拒诊开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("payRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scene = "zxzfts"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //就诊支付 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3592,6 +3612,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 就诊支付提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //咨询支付 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (consultTeam!=null){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3609,6 +3630,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword3(config.getKeyword3() + consDoctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 咨询支付提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("prescriptionPayRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3622,6 +3644,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("眼科微信消息模板推送 处方支付提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("msgRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scene = "zxxxtx"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_msg_notice", scene, 1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3633,22 +3656,49 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("outpatientMsgRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scene = "mzxxtx"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice", scene, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BeanUtils.copyProperties(config, newConfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setFirst(config.getFirst().replace("key2", doctorDO.getJobTitleName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNotEmpty(outpatientId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_jz", scene, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    BeanUtils.copyProperties(config, newConfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setFirst(config.getFirst().replace("key2", doctorDO.getJobTitleName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 视频问诊接诊提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (consultTeam!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_zx", scene, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    BeanUtils.copyProperties(config, newConfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setFirst(config.getFirst().replace("key2", consDoctorDO.getJobTitleName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword1(config.getKeyword1() + consDoctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword2(config.getKeyword2() + consultTeam.getCzrq());//咨询暂无挂号时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword3(config.getKeyword3() + hospitalDO.getDeptName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword4(config.getKeyword4() + consultTeam.getSymptoms()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if ("16".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } else if ("17".equals(type)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 视频咨询接诊提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scene = "spwzyytx"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3666,6 +3716,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 视频问诊预约提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (consultTeam!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_video_notice_zx", scene, 1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3680,6 +3731,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(consDoctorDO.getId(), wxId, outpatientId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("眼科微信消息模板推送 视频咨询预约提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3692,6 +3744,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setKeyword2(config.getKeyword2() + consDoctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //发起微信消息模板推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("眼科微信消息模板推送 服务评价提醒开始"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3700,7 +3753,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (BasePatientWechatDo one : ps) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("发送的消息="+ com.alibaba.fastjson.JSONObject.toJSONString(newConfig)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newConfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newConfig); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("发送成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("发送失败,error="+e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //保存发送模板记录, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                WxPushLogDO wxPushLogDO = new WxPushLogDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wxPushLogDO.setCreateTime(new Date()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3738,7 +3798,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        "wx53f6bb4ac081d840"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("url="+(prefix+msgUrl)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("url="+prefix+msgUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String msg="first:"+first+"contentMsg:"+contentMsg+"remark:"+remark; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("发送的信息="+msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("XZZX_Msg_" + titelType + "=" + responseMsg); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3768,8 +3828,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        remark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("url="+(prefix+msgUrl)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String msg="first:"+first+"contentMsg:"+contentMsg+"remark:"+remark; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("url="+prefix+msgUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String msg="first:"+first+"-----contentMsg:"+contentMsg+"-----remark:"+remark; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("发送的信息="+msg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("ZSYY_Msg" + titelType + "=" + responseMsg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -4721,7 +4781,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (one.getEndTime().before(workTimeDO.getStartTime()) || one.getStartTime().after(workTimeDO.getEndTime())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    throw new Exception("您选择的时间与“开始时间:"+one.getStartTime()+"-结束时间:"+one.getEndTime()+"”的医院排班/自己排班冲突,请重新选择!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    throw new Exception("您选择的时间与“开始时间:"+DateUtil.dateToStrLong(one.getStartTime())+"-结束时间:"+DateUtil.dateToStrLong(one.getEndTime())+"”的医院排班/自己排班冲突,请重新选择!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -7510,12 +7570,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deptDescDOList = dictDeptDescDao.findByOrgCode(orgCode, keyName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        deptDescDOList.forEach(one -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            one.setDeptDescription(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<DictDeptDescDO> res = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        deptDescDOList.forEach(one->{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            DictDeptDescDO descDO = new DictDeptDescDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            BeanUtils.copyProperties(one,descDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            descDO.setDeptDescription(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            res.add(descDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (deptDescDOList == null || deptDescDOList.size() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return MixEnvelop.getError("无科室信息"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, deptDescDOList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |