Commit 62f3e413 by 潘诗林

宁波财资接入优加

1 parent bf0e997d
Showing 24 changed files with 92 additions and 35 deletions
...@@ -81,4 +81,7 @@ public class NbCbBatchTransferParamDTO implements Serializable { ...@@ -81,4 +81,7 @@ public class NbCbBatchTransferParamDTO implements Serializable {
@ApiModelProperty(notes = "付款方式") @ApiModelProperty(notes = "付款方式")
private String paymentMethod; private String paymentMethod;
@ApiModelProperty(notes = "主体id")
private String custId;
} }
...@@ -71,4 +71,7 @@ public class NbCbTransferParamDTO implements Serializable { ...@@ -71,4 +71,7 @@ public class NbCbTransferParamDTO implements Serializable {
@ApiModelProperty(notes = "付款方式 0-银行转账 1-现金 2-银行承兑汇票 3-信用证 4-冲账 5-其他, 默认为0", required = false) @ApiModelProperty(notes = "付款方式 0-银行转账 1-现金 2-银行承兑汇票 3-信用证 4-冲账 5-其他, 默认为0", required = false)
private Byte payType; private Byte payType;
@ApiModelProperty(notes = "主体id")
private String custId;
} }
...@@ -19,7 +19,7 @@ public enum NbCbCustEnum { ...@@ -19,7 +19,7 @@ public enum NbCbCustEnum {
/** /**
* 广联主体 * 广联主体
*/ */
GL_CUST(1, "9000919969", "9865fe2c-1ba3-4e9c-af8a-24d2a8e0eafc", "广联主体"), GL_CUST(1, "9000919969", "54b3e05c-7983-4e6c-8920-f9ab8a0004a6", "广联主体"),
/** /**
* 优加主体 * 优加主体
......
...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "NbCbBatchTransferJob", cron = "0 0/5 * * * ?", description = "优加-调用宁波银行批量转账接口", overwrite = false) @ElasticJobConf(name = "NbCbYJBatchTransferJob", cron = "0 0/5 * * * ?", description = "优加-调用宁波银行批量转账接口", overwrite = false)
public class NbCbYJBatchTransferJob implements SimpleJob { public class NbCbYJBatchTransferJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "NbCbQueryBatchTransferJob", cron = "0 0/5 * * * ?", description = "优加-定时调用宁波银行批量转账单笔查证", overwrite = false) @ElasticJobConf(name = "NbCbYJQueryBatchTransferJob", cron = "0 0/5 * * * ?", description = "优加-定时调用宁波银行批量转账单笔查证", overwrite = false)
public class NbCbYJQueryBatchTransferJob implements SimpleJob { public class NbCbYJQueryBatchTransferJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* 优加-定时调用宁波银行单笔转账单笔查证 * 优加-定时调用宁波银行单笔转账单笔查证
*/ */
@Slf4j @Slf4j
@ElasticJobConf(name = "NbCbQueryTransferJob", cron = "0 0/5 * * * ?", description = "优加-定时调用宁波银行单笔转账单笔查证", overwrite = false) @ElasticJobConf(name = "NbCbYJQueryTransferJob", cron = "0 0/5 * * * ?", description = "优加-定时调用宁波银行单笔转账单笔查证", overwrite = false)
public class NbCbYJQueryTransferJob implements SimpleJob { public class NbCbYJQueryTransferJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* 优加-调用宁波银行单笔转账接口 * 优加-调用宁波银行单笔转账接口
*/ */
@Slf4j @Slf4j
@ElasticJobConf(name = "NbCbTransferJob", cron = "0 0/3 9-15 * * ?", description = "优加-调用宁波银行单笔转账接口", overwrite = false) @ElasticJobConf(name = "NbCbYJTransferJob", cron = "0 0/3 9-15 * * ?", description = "优加-调用宁波银行单笔转账接口", overwrite = false)
public class NbCbYJTransferJob implements SimpleJob { public class NbCbYJTransferJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbAccDetailJob", cron = "0 30 10,14 * * ?", description = "优加-定时查询宁波银行交易明细定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJAccDetailJob", cron = "0 30 10,14 * * ?", description = "优加-定时查询宁波银行交易明细定时任务", overwrite = false)
public class QueryNbCbYJAccDetailJob implements SimpleJob { public class QueryNbCbYJAccDetailJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date; import java.util.Date;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbAccDetailMonthlyJob", cron = "0 30 1 1 * ?", description = "优加-每月定时查询宁波银行交易明细定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJAccDetailMonthlyJob", cron = "0 30 1 1 * ?", description = "优加-每月定时查询宁波银行交易明细定时任务", overwrite = false)
public class QueryNbCbYJAccDetailMonthlyJob implements SimpleJob { public class QueryNbCbYJAccDetailMonthlyJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbAccDetailReceiptJob", cron = "0 0 18 * * ?", description = "优加-定时查询宁波银行交易明细和回单定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJAccDetailReceiptJob", cron = "0 0 18 * * ?", description = "优加-定时查询宁波银行交易明细和回单定时任务", overwrite = false)
public class QueryNbCbYJAccDetailReceiptJob implements SimpleJob { public class QueryNbCbYJAccDetailReceiptJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbAccDetailTodayJob", cron = "0 5 18 * * ?", description = "优加-定时查询宁波银行交易明细和回单定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJAccDetailTodayJob", cron = "0 5 18 * * ?", description = "优加-定时查询宁波银行交易明细和回单定时任务", overwrite = false)
public class QueryNbCbYJAccDetailTodayJob implements SimpleJob { public class QueryNbCbYJAccDetailTodayJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf; ...@@ -10,7 +10,7 @@ import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbReceiptJob", cron = "0 15 10,14 * * ?", description = "优加-定时查询宁波银行回单定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJReceiptJob", cron = "0 15 10,14 * * ?", description = "优加-定时查询宁波银行回单定时任务", overwrite = false)
public class QueryNbCbYJReceiptJob implements SimpleJob { public class QueryNbCbYJReceiptJob implements SimpleJob {
@Autowired @Autowired
......
...@@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date; import java.util.Date;
@Slf4j @Slf4j
@ElasticJobConf(name = "QueryNbCbReceiptMonthlyJob", cron = "0 30 0 1 * ?", description = "每月定时查询宁波银行回单定时任务", overwrite = false) @ElasticJobConf(name = "QueryNbCbYJReceiptMonthlyJob", cron = "0 30 0 1 * ?", description = "每月定时查询宁波银行回单定时任务", overwrite = false)
public class QueryNbCbYJReceiptMonthlyJob implements SimpleJob { public class QueryNbCbYJReceiptMonthlyJob implements SimpleJob {
@Autowired @Autowired
......
package cn.com.glsx.dj.financial.service; package cn.com.glsx.dj.financial.service;
import cn.com.glsx.dj.financial.enums.NbCbCustEnum;
import cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum; import cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum;
import cn.com.glsx.dj.financial.manager.QWManager; import cn.com.glsx.dj.financial.manager.QWManager;
import cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper; import cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper;
...@@ -566,8 +567,24 @@ public class QWApprovalService { ...@@ -566,8 +567,24 @@ public class QWApprovalService {
return; return;
} }
//查询模板配置的cust_type
ApprovalTemplateConfig condition = new ApprovalTemplateConfig();
condition.setDelFlag(0);
condition.setMerchantId(approvalRecord.getMerchantId());
condition.setTemplateId(approvalRecord.getTemplateId());
ApprovalTemplateConfig templateConfig = approvalTemplateConfigMapper.selectOne(condition);
if(Objects.isNull(templateConfig)){
log.info(String.format("未找到对应模板配置:%s",JSONObject.toJSONString(approvalRecord)));
return;
}
NbCbCustEnum nbCbCustEnum = NbCbCustEnum.getByCustType(Integer.valueOf(templateConfig.getCustType()));
if(Objects.isNull(nbCbCustEnum)){
log.info(String.format("未知的主体类型:%s",templateConfig.getCustType()));
return;
}
// 1. 构建请求参数 // 1. 构建请求参数
Object requestParams = strategy.buildRequestParams(approvalRecord); Object requestParams = strategy.buildRequestParams(approvalRecord,nbCbCustEnum.getCustId());
// 2. 发送请求 // 2. 发送请求
RpcResponse<String> stringRpcResponse = strategy.sendRequest(requestParams); RpcResponse<String> stringRpcResponse = strategy.sendRequest(requestParams);
......
...@@ -52,7 +52,7 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{ ...@@ -52,7 +52,7 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
private QWApprovalService qwApprovalService; private QWApprovalService qwApprovalService;
@Override @Override
public Object buildRequestParams(ApprovalRecords approvalRecord) { public Object buildRequestParams(ApprovalRecords approvalRecord,String custId) {
NbCbBatchTransferParamDTO batchTransferParam= new NbCbBatchTransferParamDTO(); NbCbBatchTransferParamDTO batchTransferParam= new NbCbBatchTransferParamDTO();
batchTransferParam.setPayName(approvalRecord.getPayerEntity()); batchTransferParam.setPayName(approvalRecord.getPayerEntity());
// 转化收款账号 // 转化收款账号
...@@ -87,6 +87,7 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{ ...@@ -87,6 +87,7 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
} }
} }
batchTransferParam.setCustId(custId);
batchTransferParam.setPayAcc(payerAccount); batchTransferParam.setPayAcc(payerAccount);
batchTransferParam.setPayName(payerAccountName); batchTransferParam.setPayName(payerAccountName);
batchTransferParam.setRcvAcc(approvalRecord.getBankAccount()); batchTransferParam.setRcvAcc(approvalRecord.getBankAccount());
......
...@@ -63,7 +63,7 @@ public class ThirdPartyNiBoStrategy implements ThirdPartyStrategy{ ...@@ -63,7 +63,7 @@ public class ThirdPartyNiBoStrategy implements ThirdPartyStrategy{
private KafkaTopicConfig kafkaTopicConfig; private KafkaTopicConfig kafkaTopicConfig;
@Override @Override
public Object buildRequestParams(ApprovalRecords approvalRecord) { public Object buildRequestParams(ApprovalRecords approvalRecord,String custId) {
NbCbTransferParamDTO transferParam= new NbCbTransferParamDTO(); NbCbTransferParamDTO transferParam= new NbCbTransferParamDTO();
transferParam.setPayName(approvalRecord.getPayerEntity()); transferParam.setPayName(approvalRecord.getPayerEntity());
// 转化收款账号 // 转化收款账号
...@@ -117,6 +117,7 @@ public class ThirdPartyNiBoStrategy implements ThirdPartyStrategy{ ...@@ -117,6 +117,7 @@ public class ThirdPartyNiBoStrategy implements ThirdPartyStrategy{
pushNb = false; pushNb = false;
} }
transferParam.setCustId(custId);
transferParam.setPayAcc(payerAccount); transferParam.setPayAcc(payerAccount);
transferParam.setPayName(payerAccountName); transferParam.setPayName(payerAccountName);
transferParam.setRcvAcc(approvalRecord.getBankAccount()); transferParam.setRcvAcc(approvalRecord.getBankAccount());
......
...@@ -6,7 +6,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse; ...@@ -6,7 +6,7 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
public interface ThirdPartyStrategy { public interface ThirdPartyStrategy {
Object buildRequestParams(ApprovalRecords approvalRecord); // 构建请求参数 Object buildRequestParams(ApprovalRecords approvalRecord,String custId); // 构建请求参数
RpcResponse<String> sendRequest(Object requestParams); // 发送请求 RpcResponse<String> sendRequest(Object requestParams); // 发送请求
......
...@@ -456,7 +456,7 @@ public class NbCbBatchTransferService { ...@@ -456,7 +456,7 @@ public class NbCbBatchTransferService {
//超过20w直接推送失败,发送邮件通知, //超过20w直接推送失败,发送邮件通知,
BigDecimal totalAmt = transferParam.getAmt(); BigDecimal totalAmt = transferParam.getAmt();
//非生产环境,只能使用 惠州广联数科科技有限公司(752901617710117) 打款到 深圳广联数科科技有限公司 (755922006010201),最多转账10元 //非生产环境,广联主体-只能使用 惠州广联数科科技有限公司(752901617710117) 打款到 深圳广联数科科技有限公司 (755922006010201),最多转账10元
String envName = env.getProperty("second.hand.car.env", "test"); String envName = env.getProperty("second.hand.car.env", "test");
if (!Objects.equals(envName, "pro")) { if (!Objects.equals(envName, "pro")) {
log.info("batchTransfer插入批量转账,当前环境:{}", envName); log.info("batchTransfer插入批量转账,当前环境:{}", envName);
...@@ -464,15 +464,20 @@ public class NbCbBatchTransferService { ...@@ -464,15 +464,20 @@ public class NbCbBatchTransferService {
log.info("batchTransfer插入批量转账,转账金额超过10元,totalAmt:{}", totalAmt); log.info("batchTransfer插入批量转账,转账金额超过10元,totalAmt:{}", totalAmt);
totalAmt = BigDecimal.TEN; totalAmt = BigDecimal.TEN;
} }
if (!nbCbBatchTransfer.getRcvAcc().equals(env.getProperty("second.hand.car.default.rcv.bank.acc", "755922006010201")) || //广联主体
if((NbCbCustEnum.GL_CUST.getCustId().equals(transferParam.getCustId())
&& (!nbCbBatchTransfer.getRcvAcc().equals(env.getProperty("second.hand.car.default.rcv.bank.acc", "755922006010201")) ||
!nbCbBatchTransfer.getRcvName().equals(env.getProperty("second.hand.car.default.rcv.name", "深圳广联数科科技有限公司")) || !nbCbBatchTransfer.getRcvName().equals(env.getProperty("second.hand.car.default.rcv.name", "深圳广联数科科技有限公司")) ||
!nbCbBatchTransfer.getRcvBankName().equals(env.getProperty("second.hand.car.default.rcv.bank.name", "招商银行深圳泰然支行")) !nbCbBatchTransfer.getRcvBankName().equals(env.getProperty("second.hand.car.default.rcv.bank.name", "招商银行深圳泰然支行"))
) { )) || (NbCbCustEnum.GL_CUST.getCustId().equals(transferParam.getCustId())
&& (!nbCbBatchTransfer.getRcvAcc().equals(env.getProperty("second.hand.car.default.rcv.bank.acc", "755922006010201")) ||
!nbCbBatchTransfer.getRcvName().equals(env.getProperty("second.hand.car.default.rcv.name", "深圳广联数科科技有限公司")) ||
!nbCbBatchTransfer.getRcvBankName().equals(env.getProperty("second.hand.car.default.rcv.bank.name", "招商银行深圳泰然支行"))
))){
log.warn("batchTransfer插入批量转账,收款人信息异常,rcvAcc:{}, rcvName:{}, rcvBankName:{}", nbCbBatchTransfer.getRcvAcc(), nbCbBatchTransfer.getRcvName(), nbCbBatchTransfer.getRcvBankName()); log.warn("batchTransfer插入批量转账,收款人信息异常,rcvAcc:{}, rcvName:{}, rcvBankName:{}", nbCbBatchTransfer.getRcvAcc(), nbCbBatchTransfer.getRcvName(), nbCbBatchTransfer.getRcvBankName());
pushStatus = TransferStatusEnum.TRANSFER_LAUNCH_FAILED.getValue(); pushStatus = TransferStatusEnum.TRANSFER_LAUNCH_FAILED.getValue();
nbCbBatchTransfer.setFailReason("收款人信息错误,只能是指定的收款人"); nbCbBatchTransfer.setFailReason("收款人信息错误,只能是指定的收款人");
} }
//非生产环境 银行摘要默认是往来款 //非生产环境 银行摘要默认是往来款
transferParam.setPurpose(env.getProperty("second.hand.car.default.remark.test", "往来款")); transferParam.setPurpose(env.getProperty("second.hand.car.default.remark.test", "往来款"));
} }
......
...@@ -2,12 +2,7 @@ package cn.com.glsx.dj.financial.service.nb; ...@@ -2,12 +2,7 @@ package cn.com.glsx.dj.financial.service.nb;
import cn.com.glsx.dj.financial.constants.CommonConstants; import cn.com.glsx.dj.financial.constants.CommonConstants;
import cn.com.glsx.dj.financial.dto.*; import cn.com.glsx.dj.financial.dto.*;
import cn.com.glsx.dj.financial.enums.NbCbTransferDataSourceEnum; import cn.com.glsx.dj.financial.enums.*;
import cn.com.glsx.dj.financial.enums.NbTransferStatusEnum;
import cn.com.glsx.dj.financial.enums.TransferErrorEnum;
import cn.com.glsx.dj.financial.enums.TransferSourceEnum;
import cn.com.glsx.dj.financial.enums.TransferStatusEnum;
import cn.com.glsx.dj.financial.enums.TransferStatusLogEnum;
import cn.com.glsx.dj.financial.mapper.NbCbTransferMapper; import cn.com.glsx.dj.financial.mapper.NbCbTransferMapper;
import cn.com.glsx.dj.financial.model.NbCbAccDetail; import cn.com.glsx.dj.financial.model.NbCbAccDetail;
import cn.com.glsx.dj.financial.model.NbCbAccount; import cn.com.glsx.dj.financial.model.NbCbAccount;
...@@ -49,6 +44,7 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter ...@@ -49,6 +44,7 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter
import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionSynchronizationManager;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Arrays; import java.util.Arrays;
...@@ -265,6 +261,7 @@ public class NbCbTransferService { ...@@ -265,6 +261,7 @@ public class NbCbTransferService {
String serialNo = generateSerialNo(); String serialNo = generateSerialNo();
NbCbTransfer nbCbTransfer = new NbCbTransfer(); NbCbTransfer nbCbTransfer = new NbCbTransfer();
nbCbTransfer.setSerialNo(serialNo); nbCbTransfer.setSerialNo(serialNo);
nbCbTransfer.setCustId(transferParam.getCustId());
NbCbAccountDTO payAccountParam = new NbCbAccountDTO(); NbCbAccountDTO payAccountParam = new NbCbAccountDTO();
payAccountParam.setBankAcc(transferParam.getPayAcc()); payAccountParam.setBankAcc(transferParam.getPayAcc());
...@@ -277,6 +274,7 @@ public class NbCbTransferService { ...@@ -277,6 +274,7 @@ public class NbCbTransferService {
} else { } else {
log.warn("singleTransfer单笔转账,查询付款账号失败,bankAcc:{}, accName:{}", transferParam.getPayAcc(), transferParam.getPayName()); log.warn("singleTransfer单笔转账,查询付款账号失败,bankAcc:{}, accName:{}", transferParam.getPayAcc(), transferParam.getPayName());
} }
nbCbTransfer.setPayName(transferParam.getPayName()); nbCbTransfer.setPayName(transferParam.getPayName());
nbCbTransfer.setPayAcc(transferParam.getPayAcc()); nbCbTransfer.setPayAcc(transferParam.getPayAcc());
...@@ -309,12 +307,38 @@ public class NbCbTransferService { ...@@ -309,12 +307,38 @@ public class NbCbTransferService {
if (Objects.equals(pushNb, false)) { if (Objects.equals(pushNb, false)) {
status = TransferStatusEnum.INVALID.getValue(); status = TransferStatusEnum.INVALID.getValue();
} }
BigDecimal totalAmt = transferParam.getAmt();
String envName = env.getProperty("second.hand.car.env", "test");
if (!Objects.equals(envName, "pro")) {
log.info("batchTransfer插入批量转账,当前环境:{}", envName);
if (totalAmt.compareTo(BigDecimal.TEN) > 0) {
log.info("batchTransfer插入批量转账,转账金额超过10元,totalAmt:{}", totalAmt);
totalAmt = BigDecimal.TEN;
}
//广联主体
if((NbCbCustEnum.GL_CUST.getCustId().equals(transferParam.getCustId())
&& (!nbCbTransfer.getRcvAcc().equals(env.getProperty("second.hand.car.default.rcv.bank.acc", "755922006010201")) ||
!nbCbTransfer.getRcvName().equals(env.getProperty("second.hand.car.default.rcv.name", "深圳广联数科科技有限公司")) ||
!nbCbTransfer.getRcvBankName().equals(env.getProperty("second.hand.car.default.rcv.bank.name", "招商银行深圳泰然支行"))
)) || (NbCbCustEnum.YJ_CUST.getCustId().equals(transferParam.getCustId())
&& (!nbCbTransfer.getRcvAcc().equals(env.getProperty("second.hand.car.default.rcv.bank.acc", "755922006010201")) ||
!nbCbTransfer.getRcvName().equals(env.getProperty("second.hand.car.default.rcv.name", "深圳广联数科科技有限公司")) ||
!nbCbTransfer.getRcvBankName().equals(env.getProperty("second.hand.car.default.rcv.bank.name", "招商银行深圳泰然支行"))
))){
log.warn("batchTransfer插入批量转账,收款人信息异常,rcvAcc:{}, rcvName:{}, rcvBankName:{}", nbCbTransfer.getRcvAcc(), nbCbTransfer.getRcvName(), nbCbTransfer.getRcvBankName());
status = TransferStatusEnum.TRANSFER_LAUNCH_FAILED.getValue();
nbCbTransfer.setFailReason("收款人信息错误,只能是指定的收款人");
}
//非生产环境 银行摘要默认是往来款
transferParam.setPurpose(env.getProperty("second.hand.car.default.remark.test", "往来款"));
}
Byte payType = transferParam.getPayType() == null ? 0 : transferParam.getPayType(); Byte payType = transferParam.getPayType() == null ? 0 : transferParam.getPayType();
nbCbTransfer.setPayType(payType); nbCbTransfer.setPayType(payType);
nbCbTransfer.setPurpose(purpose); nbCbTransfer.setPurpose(purpose);
nbCbTransfer.setAmt(transferParam.getAmt()); nbCbTransfer.setAmt(totalAmt);
Byte transferSource = transferParam.getTransferSource(); Byte transferSource = transferParam.getTransferSource();
nbCbTransfer.setTransferSource(transferSource); nbCbTransfer.setTransferSource(transferSource);
nbCbTransfer.setDjSerialNo(transferParam.getDjSerialNo()); nbCbTransfer.setDjSerialNo(transferParam.getDjSerialNo());
......
package cn.com.glsx.dj.financial.demo; package cn.com.glsx.dj.financial.demo;
import cn.com.glsx.dj.financial.BaseServiceTest; import cn.com.glsx.dj.financial.BaseServiceTest;
import cn.com.glsx.dj.financial.enums.NbCbCustEnum;
import cn.com.glsx.dj.financial.service.nb.NbCbAccDetailService; import cn.com.glsx.dj.financial.service.nb.NbCbAccDetailService;
import cn.com.glsx.dj.financial.service.nb.NbCbAccountService; import cn.com.glsx.dj.financial.service.nb.NbCbAccountService;
import cn.com.glsx.dj.financial.service.nb.NbCbReceiptService; import cn.com.glsx.dj.financial.service.nb.NbCbReceiptService;
...@@ -35,7 +36,7 @@ public class DemoTest extends BaseServiceTest { ...@@ -35,7 +36,7 @@ public class DemoTest extends BaseServiceTest {
public void main() { public void main() {
try { try {
//nbAccDetailService.queryNbCbJobAccDetail(""); //nbAccDetailService.queryNbCbJobAccDetail("");
nbCbAccountService.queryNbCbAccount("",""); nbCbAccountService.queryNbCbAccount("", NbCbCustEnum.YJ_CUST.getCustId());
//nbCbReceiptService.queryNbCbReceipt("{\"Data\":{\"queryFlag\":\"1\",\"custId\":\"0000112058\",\"accountSet\":[\"86041110000109337\"],\"serialNo\":\"\"}}"); //nbCbReceiptService.queryNbCbReceipt("{\"Data\":{\"queryFlag\":\"1\",\"custId\":\"0000112058\",\"accountSet\":[\"86041110000109337\"],\"serialNo\":\"\"}}");
//nbCbReceiptService.queryNbCbReceipt(""); //nbCbReceiptService.queryNbCbReceipt("");
//nbCbReceiptService.queryNbCbReceipt(""); //nbCbReceiptService.queryNbCbReceipt("");
......
...@@ -21,7 +21,7 @@ public class QueryNbCbAccDetailJobTest extends BaseServiceTest { ...@@ -21,7 +21,7 @@ public class QueryNbCbAccDetailJobTest extends BaseServiceTest {
public void testQueryNbCbAccDetailJob() { public void testQueryNbCbAccDetailJob() {
//生产环境 //生产环境
String s = "{\"Data\":{\"beginDate\":\"2025-09-09\",\"bankAccList\":[\"752901688710168\"],\"endDate\":\"2025-09-09\",\"custId\":\"9000919969\",\"pageSize\":\"1000\",\"currentPage\":\"0\",\"queryType\":\"0\"}}"; String s = "{\"Data\":{\"beginDate\":\"2025-09-09\",\"bankAccList\":[\"752901688710168\"],\"endDate\":\"2025-09-09\",\"custId\":\"9000919969\",\"pageSize\":\"1000\",\"currentPage\":\"0\",\"queryType\":\"0\"}}";
nbcAccDetailService.queryNbCbJobAccDetail(s, null, null,CommonConstants.MIDDLE_WARE); nbcAccDetailService.queryNbCbJobAccDetail(s, null, null,CommonConstants.MIDDLE_WARE,"");
} }
...@@ -29,6 +29,6 @@ public class QueryNbCbAccDetailJobTest extends BaseServiceTest { ...@@ -29,6 +29,6 @@ public class QueryNbCbAccDetailJobTest extends BaseServiceTest {
@Test @Test
public void testQueryNbCbAccDetailJobQa() { public void testQueryNbCbAccDetailJobQa() {
String s = "{\"Data\":{\"beginDate\":\"2024-03-01\",\"bankAccList\":[\"86041110000109337\"],\"endDate\":\"2024-03-30\",\"custId\":\"0000112058\",\"pageSize\":\"1000\",\"currentPage\":\"0\",\"queryType\":\"0\"}}"; String s = "{\"Data\":{\"beginDate\":\"2024-03-01\",\"bankAccList\":[\"86041110000109337\"],\"endDate\":\"2024-03-30\",\"custId\":\"0000112058\",\"pageSize\":\"1000\",\"currentPage\":\"0\",\"queryType\":\"0\"}}";
nbcAccDetailService.queryNbCbJobAccDetail(s, null, null, CommonConstants.MIDDLE_WARE); nbcAccDetailService.queryNbCbJobAccDetail(s, null, null, CommonConstants.MIDDLE_WARE,"");
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.job; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.job;
import cn.com.glsx.dj.financial.BaseServiceTest; import cn.com.glsx.dj.financial.BaseServiceTest;
import cn.com.glsx.dj.financial.constants.CommonConstants; import cn.com.glsx.dj.financial.constants.CommonConstants;
import cn.com.glsx.dj.financial.enums.NbCbCustEnum;
import cn.com.glsx.dj.financial.service.nb.NbCbTransferService; import cn.com.glsx.dj.financial.service.nb.NbCbTransferService;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -21,7 +22,7 @@ public class QueryNbCbTransferTest extends BaseServiceTest { ...@@ -21,7 +22,7 @@ public class QueryNbCbTransferTest extends BaseServiceTest {
String s = "79"; String s = "79";
try { try {
nbCbTransferService.transferSchedule(s,CommonConstants.MIDDLE_WARE,"9000919969"); nbCbTransferService.transferSchedule(null,CommonConstants.MIDDLE_WARE, NbCbCustEnum.YJ_CUST.getCustId());
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -19,7 +19,7 @@ public class NbCbBatchTransferServiceTest extends BaseServiceTest { ...@@ -19,7 +19,7 @@ public class NbCbBatchTransferServiceTest extends BaseServiceTest {
@Test @Test
public void testNbCbBatchTransferService() { public void testNbCbBatchTransferService() {
try { try {
nbCbBatchTransferService.transferSchedule(null, "chenxi"); nbCbBatchTransferService.transferSchedule(null, "chenxi","");
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.service.nb; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.service.nb;
import cn.com.glsx.dj.financial.dto.NbCbTransferDTO; import cn.com.glsx.dj.financial.dto.NbCbTransferDTO;
import cn.com.glsx.dj.financial.dto.NbCbTransferParamDTO; import cn.com.glsx.dj.financial.dto.NbCbTransferParamDTO;
import cn.com.glsx.dj.financial.enums.NbCbCustEnum;
import cn.com.glsx.dj.financial.service.BaseServiceTest; import cn.com.glsx.dj.financial.service.BaseServiceTest;
import cn.com.glsx.dj.financial.util.DateUtils; import cn.com.glsx.dj.financial.util.DateUtils;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...@@ -117,12 +118,12 @@ public class NbCbTransferServiceTest extends BaseServiceTest { ...@@ -117,12 +118,12 @@ public class NbCbTransferServiceTest extends BaseServiceTest {
NbCbTransferParamDTO nbCbTransferParamDTO = new NbCbTransferParamDTO(); NbCbTransferParamDTO nbCbTransferParamDTO = new NbCbTransferParamDTO();
nbCbTransferParamDTO.setDjSerialNo(DateUtils.formatDate(new Date(), "yyyyMMdd") + RandomUtils.nextInt(10000000, 100000000)); nbCbTransferParamDTO.setDjSerialNo(DateUtils.formatDate(new Date(), "yyyyMMdd") + RandomUtils.nextInt(10000000, 100000000));
nbCbTransferParamDTO.setPayAcc("755922006010201"); nbCbTransferParamDTO.setPayAcc("86041110001342705");
nbCbTransferParamDTO.setPayName("深圳广联数科科技有限公司"); nbCbTransferParamDTO.setPayName("深圳市优加智汇科技有限公司");
//收款账号 //收款账号
nbCbTransferParamDTO.setRcvAcc("42515848644"); nbCbTransferParamDTO.setRcvAcc("1234567890");
nbCbTransferParamDTO.setRcvBankName("测试银行"); nbCbTransferParamDTO.setRcvBankName("测试银行");
nbCbTransferParamDTO.setCustId(NbCbCustEnum.YJ_CUST.getCustId());
nbCbTransferParamDTO.setRcvName("周"); nbCbTransferParamDTO.setRcvName("周");
nbCbTransferParamDTO.setPurpose("其他"); nbCbTransferParamDTO.setPurpose("其他");
nbCbTransferParamDTO.setAmt(new BigDecimal("100")); nbCbTransferParamDTO.setAmt(new BigDecimal("100"));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!