|  | @ -9330,13 +9330,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public MixEnvelop selectByUrlHsjc(Integer id,String wxId) throws Exception {
 | 
	
		
			
				|  |  |     public MixEnvelop selectByUrlHsjc(Integer id,String wxId,String channel) throws Exception {
 | 
	
		
			
				|  |  |         WxWechatDO wxWechatDO = wechatDao.findById(wxId);
 | 
	
		
			
				|  |  |         if (wxWechatDO == null) {
 | 
	
		
			
				|  |  |             throw new Exception("微信配置不存在!");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         BaseNatAppointmentDO natAppointmentDO = baseNatAppointmentDao.findOne(id);
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = basePatientDao.findById(natAppointmentDO.getPatientId());
 | 
	
		
			
				|  |  |         List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wxId, natAppointmentDO.getPatientId());
 | 
	
		
			
				|  |  |         if (patientWechatDos == null || patientWechatDos.size() == 0) {
 | 
	
		
			
				|  |  |             throw new Exception("openid不存在!");
 | 
	
	
		
			
				|  | @ -9350,7 +9351,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         if (!StringUtils.isNoneBlank(idcard)) {
 | 
	
		
			
				|  |  |             throw new Exception("就诊卡不存在!");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String url = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(), patientWechatDo.getOpenid(), idcard, "WX");
 | 
	
		
			
				|  |  |         String url = null;
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(channel)&&channel.equalsIgnoreCase("ALI")){
 | 
	
		
			
				|  |  |             url = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(), patientDO.getAlipayId(), idcard, "ALI");
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             url = ylzPayService.createSicardPayUrl(wxWechatDO.getAppOriginId(), patientWechatDo.getOpenid(), idcard, "WX");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(url);
 | 
	
		
			
				|  |  |         return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, object);
 | 
	
		
			
				|  |  |     }
 |