| 
															
																@ -47,6 +47,7 @@ import com.yihu.jw.wechat.dao.BasePatientWechatDao; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.wechat.dao.WechatDao; 
															 | 
															
															 | 
															
																import com.yihu.jw.wechat.dao.WechatDao; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.wechat.dao.WxPayLogDao; 
															 | 
															
															 | 
															
																import com.yihu.jw.wechat.dao.WxPayLogDao; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.mysql.query.BaseJpaService; 
															 | 
															
															 | 
															
																import com.yihu.mysql.query.BaseJpaService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.ylzinfo.ehc.common.utils.DateUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.apache.commons.collections.map.HashedMap; 
															 | 
															
															 | 
															
																import org.apache.commons.collections.map.HashedMap; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.apache.commons.lang3.StringUtils; 
															 | 
															
															 | 
															
																import org.apache.commons.lang3.StringUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.slf4j.Logger; 
															 | 
															
															 | 
															
																import org.slf4j.Logger; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -1129,4 +1130,44 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        return ykyyService.getPayCDATA4Jkzl(businessOrderDO.getDescription(),businessOrderDO.getOrderNo(),totalFee,serverIp,notifyUrl); 
															 | 
															
															 | 
															
																        return ykyyService.getPayCDATA4Jkzl(businessOrderDO.getDescription(),businessOrderDO.getOrderNo(),totalFee,serverIp,notifyUrl); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    } 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    public Map yktMedicalCardTopUp(String mzhm,Double jkje,Integer type,Integer paymentType,String patientId,String wechatId){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        BasePatientDO patientDO = patientDao.findById(patientId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        BusinessOrderDO businessOrderDO = new BusinessOrderDO(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setPatient(patientId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setPatientName(patientDO.getName()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setCreateTime(DateUtil.getNowDate()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setOrderCategory("5"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setDescription("眼科就诊卡充值"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (paymentType==1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            businessOrderDO.setPayType(2); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (paymentType==2){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            businessOrderDO.setPayType(1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO.setPayPrice(jkje); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (type==0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            businessOrderDO.setOrderType(10); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (type==1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            businessOrderDO.setOrderType(11); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String rs = ykyyService.getNewSerialNumber(mzhm, jkje.intValue(), type, paymentType, patientDO.getUserId(), ""); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        businessOrderDO = businessOrderDao.save(businessOrderDO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        List<BasePatientWechatDo> patientWechatDoList = patientWechatDao.findByWechatIdAndPatientId(wechatId, patientId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        Map<String,Object> map=null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (patientWechatDoList.isEmpty()){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            map.put("error","无opinId"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return map; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        WxWechatDO wxWechatDO = wechatDao.findById(wechatId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String url = wxWechatDO.getBaseUrl(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String notifyUrl =url; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String price = businessOrderDO.getPayPrice()*100+""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																//       map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,WeChatConfig.TRADE_TYPE_JSAPI,patientWechatDoList.get(0).getOpenid(),orderNo,notifyUrl); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        return map; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																} 
															 | 
															
															 | 
															
																} 
															 |