|  | @ -666,10 +666,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
												
													
														
															|  |                     String price = Integer.parseInt(totalFee)/100+"";
 |  |                     String price = Integer.parseInt(totalFee)/100+"";
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                     if (businessOrderDO.getOrderType()==10){
 |  |                     if (businessOrderDO.getOrderType()==10){
 | 
												
													
														
															|  |                         ykyyService.upRecharge4Jkzl(seqNo,Integer.parseInt(price),0);
 |  | 
 | 
												
													
														
															|  | 
 |  |                         String re = ykyyService.upRecharge4Jkzl(businessOrderDO.getYkOrderNo(), Integer.parseInt(price), 0);
 | 
												
													
														
															|  | 
 |  |                         logger.info("调用结果="+re);
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                     if (businessOrderDO.getOrderType()==11){
 |  |                     if (businessOrderDO.getOrderType()==11){
 | 
												
													
														
															|  |                         ykyyService.upRecharge4Jkzl(seqNo,Integer.parseInt(price),1);
 |  | 
 | 
												
													
														
															|  | 
 |  |                         String re = ykyyService.upRecharge4Jkzl(businessOrderDO.getYkOrderNo(), Integer.parseInt(price), 1);
 | 
												
													
														
															|  | 
 |  |                         logger.info("调用结果="+re);
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
											
												
													
														
															|  | @ -1145,7 +1147,19 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public Map yktMedicalCardTopUp(String mzhm,Double jkje,Integer type,Integer paymentType,String patientId,String wechatId){
 |  | 
 | 
												
													
														
															|  | 
 |  |     /**
 | 
												
													
														
															|  | 
 |  |      * 眼科就诊卡充值
 | 
												
													
														
															|  | 
 |  |      * @param mzhm
 | 
												
													
														
															|  | 
 |  |      * @param jkje
 | 
												
													
														
															|  | 
 |  |      * @param type
 | 
												
													
														
															|  | 
 |  |      * @param paymentType
 | 
												
													
														
															|  | 
 |  |      * @param patientId
 | 
												
													
														
															|  | 
 |  |      * @param wechatId
 | 
												
													
														
															|  | 
 |  |      * @param hospitalId
 | 
												
													
														
															|  | 
 |  |      * @return
 | 
												
													
														
															|  | 
 |  |      * @throws Exception
 | 
												
													
														
															|  | 
 |  |      */
 | 
												
													
														
															|  | 
 |  |     public Map yktMedicalCardTopUp(String mzhm,Double jkje,Integer type,Integer paymentType,String patientId,String wechatId,String hospitalId) throws Exception {
 | 
												
													
														
															|  |         BasePatientDO patientDO = patientDao.findById(patientId);
 |  |         BasePatientDO patientDO = patientDao.findById(patientId);
 | 
												
													
														
															|  |         BusinessOrderDO businessOrderDO = new BusinessOrderDO();
 |  |         BusinessOrderDO businessOrderDO = new BusinessOrderDO();
 | 
												
													
														
															|  |         businessOrderDO.setPatient(patientId);
 |  |         businessOrderDO.setPatient(patientId);
 | 
												
											
												
													
														
															|  | @ -1153,34 +1167,46 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
 | 
												
													
														
															|  |         businessOrderDO.setCreateTime(DateUtil.getNowDate());
 |  |         businessOrderDO.setCreateTime(DateUtil.getNowDate());
 | 
												
													
														
															|  |         businessOrderDO.setOrderCategory("5");
 |  |         businessOrderDO.setOrderCategory("5");
 | 
												
													
														
															|  |         businessOrderDO.setDescription("眼科就诊卡充值");
 |  |         businessOrderDO.setDescription("眼科就诊卡充值");
 | 
												
													
														
															|  | 
 |  |         businessOrderDO.setPayPrice(jkje);
 | 
												
													
														
															|  | 
 |  |         businessOrderDO.setOrderNo("HLWYY"+System.currentTimeMillis()+(int)(Math.random()*900)+100);
 | 
												
													
														
															|  |         if (paymentType==1){
 |  |         if (paymentType==1){
 | 
												
													
														
															|  |             businessOrderDO.setPayType(2);
 |  |             businessOrderDO.setPayType(2);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if (paymentType==2){
 |  |         if (paymentType==2){
 | 
												
													
														
															|  |             businessOrderDO.setPayType(1);
 |  |             businessOrderDO.setPayType(1);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         businessOrderDO.setPayPrice(jkje);
 |  | 
 | 
												
													
														
															|  |         if (type==0){
 |  |         if (type==0){
 | 
												
													
														
															|  |             businessOrderDO.setOrderType(10);
 |  |             businessOrderDO.setOrderType(10);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if (type==1){
 |  |         if (type==1){
 | 
												
													
														
															|  |             businessOrderDO.setOrderType(11);
 |  |             businessOrderDO.setOrderType(11);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         String rs = ykyyService.getNewSerialNumber(mzhm, jkje.intValue(), type, paymentType, patientDO.getUserId(), "");
 |  | 
 | 
												
													
														
															|  | 
 |  |         Map<String,Object> map=null;
 | 
												
													
														
															|  | 
 |  |         String rs = ykyyService.getNewSerialNumber(mzhm, jkje.intValue(), type, paymentType, patientDO.getUserId(), hospitalId);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |         Map<String,Object> rsMap = JSONObject.parseObject(rs, Map.class);
 | 
												
													
														
															|  | 
 |  |         if ("10000".equalsIgnoreCase(JSONObject.toJSONString(rsMap.get("code")))){
 | 
												
													
														
															|  | 
 |  |             businessOrderDO.setYkOrderNo(JSONObject.toJSONString(rsMap.get("value")));
 | 
												
													
														
															|  | 
 |  |         }else {
 | 
												
													
														
															|  | 
 |  |             map.put("error","眼科接口调用失败");
 | 
												
													
														
															|  | 
 |  |             logger.info("error="+"眼科接口调用失败");
 | 
												
													
														
															|  | 
 |  |             return map;
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         businessOrderDO = businessOrderDao.save(businessOrderDO);
 |  |         businessOrderDO = businessOrderDao.save(businessOrderDO);
 | 
												
													
														
															|  |         List<BasePatientWechatDo> patientWechatDoList = patientWechatDao.findByWechatIdAndPatientId(wechatId, patientId);
 |  |         List<BasePatientWechatDo> patientWechatDoList = patientWechatDao.findByWechatIdAndPatientId(wechatId, patientId);
 | 
												
													
														
															|  |         Map<String,Object> map=null;
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         if (patientWechatDoList.isEmpty()){
 |  |         if (patientWechatDoList.isEmpty()){
 | 
												
													
														
															|  |             map.put("error","无opinId");
 |  |             map.put("error","无opinId");
 | 
												
													
														
															|  | 
 |  |             logger.info("error="+"无opinId");
 | 
												
													
														
															|  |             return map;
 |  |             return map;
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
 |  |         WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
 | 
												
													
														
															|  |         String url = wxWechatDO.getBaseUrl();
 |  |         String url = wxWechatDO.getBaseUrl();
 | 
												
													
														
															|  |         String notifyUrl =url;
 |  |         String notifyUrl =url;
 | 
												
													
														
															|  |         String price = businessOrderDO.getPayPrice()*100+"";
 |  |         String price = businessOrderDO.getPayPrice()*100+"";
 | 
												
													
														
															|  | //       map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,WeChatConfig.TRADE_TYPE_JSAPI,patientWechatDoList.get(0).getOpenid(),orderNo,notifyUrl);
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |         map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,WeChatConfig.TRADE_TYPE_JSAPI,patientWechatDoList.get(0).getOpenid(),businessOrderDO.getOrderNo(),notifyUrl);
 | 
												
													
														
															|  | 
 |  |         logger.info("success="+JSONObject.toJSONString(map));
 | 
												
													
														
															|  |         return map;
 |  |         return map;
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 |