1
0

2 Ревизии 919cc98e89 ... 994db7682c

Автор SHA1 Съобщение Дата
  yonge 994db7682c Merge branch 'zx_saas_director_0927' of http://git.dayaedu.com/yonge/mec into zx_saas_director_0927 преди 2 месеца
  yonge 6f525359e2 add:乐队指导培训由武汉学校收款 преди 2 месеца
променени са 1 файла, в които са добавени 41 реда и са изтрити 0 реда
  1. 41 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

+ 41 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -188,6 +188,47 @@ public class PayServiceImpl implements PayService {
 			}
 			
 		}
+		
+		//如果是乐队指导培训的订单,由武汉学校收款
+		if(studentPaymentOrder != null && studentPaymentOrder.getType() == OrderTypeEnum.DIRECTOR_TRAINING_CAMP) {
+			
+			Integer routeOrganId = 50;
+			HfMember receiverMember = hfMemberDao.getByOrganId(routeOrganId, paymentChannelStr);
+			
+			if(receiverMember == null) {
+        		throw new BizException("分部[{}]收款账户查询失败", routeOrganId);
+			}
+			
+			String merNo = receiverMember.getMemberId();
+        	if(StringUtils.isBlank(merNo)){
+        		throw new BizException("平台收款账户查询失败");
+        	}
+			
+			StudentPaymentRouteOrder studentPaymentRouteOrder = new StudentPaymentRouteOrder();
+            studentPaymentRouteOrder.setOrderNo(orderNo);
+            studentPaymentRouteOrder.setRouteOrganId(routeOrganId);
+            studentPaymentRouteOrder.setFeeFlag("Y");
+            studentPaymentRouteOrder.setRouteAmount(amount);
+            studentPaymentRouteOrder.setRouteBalanceAmount(balanceAmount);
+            studentPaymentRouteOrder.setMerNo(merNo);
+            studentPaymentRouteOrder.setSaleAmount(BigDecimal.ZERO);
+            studentPaymentRouteOrder.setServiceAmount(amount);
+            studentPaymentRouteOrder.setTenantId(tenantId);
+            studentPaymentRouteOrder.setCreateTime(date);
+            studentPaymentRouteOrder.setUpdateTime(date);
+            studentPaymentRouteOrderDao.insert(studentPaymentRouteOrder);
+            
+            Map<String, Object> unionPay = new HashMap<>();
+            Map<String, Object> payMap = null;
+
+        	payMap = Payment.getPayMap(hfMerchantConfig, amount, orderNo, returnUrl, orderSubject, orderBody);
+
+            unionPay.put("orderNo", orderNo);
+            unionPay.put("type", paymentChannel.getCode());
+            unionPay.put("payMap", payMap);
+            unionPay.put("routingMerNos", merNo);
+            return unionPay;
+		}
 
 		BigDecimal subBalance = BigDecimal.ZERO;