yonge 3 anos atrás
pai
commit
93f674088c

+ 0 - 8
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysUserTsign.java

@@ -31,14 +31,6 @@ public class SysUserTsign extends BaseEntity {
 		// TODO Auto-generated constructor stub
 	}
 
-    public SysUserTsign(Integer userId, String accountId, String sealData, String name, String cardNo) {
-        this.userId = userId;
-        this.accountId = accountId;
-        this.sealData = sealData;
-        this.name = name;
-        this.cardNo = cardNo;
-    }
-
     public SysUserTsign(Integer userId, String accountId, String sealData, String name, String cardNo,Integer tenantId) {
         this.userId = userId;
         this.accountId = accountId;

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/PayService.java

@@ -39,6 +39,6 @@ public interface PayService {
 	 * @return
 	 * @throws Exception
 	 */
-	Map<String, Object> getPayToPlatformMap(PaymentChannelEnum paymentChannel, String payeeMerNo, BigDecimal amount, BigDecimal balanceAmount, String orderNo,
+	Map<String, Object> getPayToPlatformMap(PaymentChannelEnum paymentChannel, BigDecimal amount, BigDecimal balanceAmount, String orderNo,
 			String notifyUrl, String returnUrl, String orderSubject, String orderBody) throws Exception;
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -204,7 +204,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
                 }
             }
 
-            sysUserTsign = new SysUserTsign(userId, accountId, sealData, realName, idCardNo);
+            sysUserTsign = new SysUserTsign(userId, accountId, sealData, realName, idCardNo, user.getTenantId());
 
             sysUserTsignService.insert(sysUserTsign);
 

+ 16 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -8,6 +8,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -24,6 +25,7 @@ import com.ym.mec.biz.dal.dto.RouteScaleDto;
 import com.ym.mec.biz.dal.entity.HfMember;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
+import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.entity.SysPaymentConfig;
 import com.ym.mec.biz.dal.enums.FeeTypeEnum;
 import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
@@ -140,9 +142,22 @@ public class PayServiceImpl implements PayService {
     }
 
     @Override
-	public Map<String, Object> getPayToPlatformMap(PaymentChannelEnum paymentChannel, String payeeMerNo, BigDecimal amount, BigDecimal balanceAmount, String orderNo, String notifyUrl, String returnUrl,
+	public Map<String, Object> getPayToPlatformMap(PaymentChannelEnum paymentChannel, BigDecimal amount, BigDecimal balanceAmount, String orderNo, String notifyUrl, String returnUrl,
 			String orderSubject, String orderBody) throws Exception {
     	
+    	SysConfig config = sysConfigDao.findByParamName("platform_collection_organ");
+        if (Objects.isNull(config)) {
+            throw new BizException("平台收款账户没有设置[platform_collection_organ]");
+        }
+    	
+    	SysPaymentConfig sysPaymentConfig = sysPaymentConfigService.findPaymentConfigByOrganId(Integer.parseInt(config.getParanValue()));
+    	
+    	if(sysPaymentConfig == null || StringUtils.isBlank(sysPaymentConfig.getHfMerNo())){
+    		throw new BizException("分部[{}]没有设置收款账号", config.getParanValue());
+    	}
+    	
+    	String payeeMerNo = sysPaymentConfig.getHfMerNo();
+    	
         Map<String, Object> payMap = null;
         
     	if (paymentChannel.equals(PaymentChannelEnum.YQPAY)) {

+ 0 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -478,7 +478,6 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         if (productInfo.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
             result = payService.getPayToPlatformMap(
                     PaymentChannelEnum.ADAPAY,
-                    null,
                     productInfo.getPayAmount(),
                     BigDecimal.ZERO,
                     orderNo,
@@ -526,7 +525,6 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         if (amount.compareTo(BigDecimal.ZERO) > 0) {
             result = payService.getPayToPlatformMap(
                     PaymentChannelEnum.ADAPAY,
-                    null,
                     amount,
                     BigDecimal.ZERO,
                     orderNo,
@@ -741,7 +739,6 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         if (amount.compareTo(BigDecimal.ZERO) > 0) {
             result = payService.getPayToPlatformMap(
                     PaymentChannelEnum.ADAPAY,
-                    null,
                     amount,
                     BigDecimal.ZERO,
                     orderNo,