Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-financial
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d73ad1bc
authored
Apr 03, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
宁波财资接入优加:转账查询主体优化
1 parent
a4ce3d52
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
17 deletions
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/dto/NbCbBatchTransferDTO.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/nb/NbCbBatchTransferService.java
rpc-dj-financial/src/main/resources/META-INF/orm/NbCbBatchTransferMapper.xml
rpc-dj-financial/src/test/java/cn/com/glsx/dj/financial/service/nb/NbCbReceiptServiceTest.java
rpc-dj-financial/src/test/java/cn/com/glsx/dj/financial/service/nb/NbCbTransferServiceTest.java
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/dto/NbCbBatchTransferDTO.java
View file @
d73ad1b
...
@@ -108,6 +108,11 @@ public class NbCbBatchTransferDTO extends NbCbBatchTransfer {
...
@@ -108,6 +108,11 @@ public class NbCbBatchTransferDTO extends NbCbBatchTransfer {
private
Byte
wechatType
;
private
Byte
wechatType
;
/**
/**
* NbCbCustEnum
*/
private
Integer
custType
;
/**
* 操作日志
* 操作日志
*/
*/
private
List
<
NbCbBatchTransferLog
>
logList
;
private
List
<
NbCbBatchTransferLog
>
logList
;
...
...
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/nb/NbCbBatchTransferService.java
View file @
d73ad1b
...
@@ -215,13 +215,13 @@ public class NbCbBatchTransferService {
...
@@ -215,13 +215,13 @@ public class NbCbBatchTransferService {
}
}
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
public
void
launchTransfer
(
NbCbBatchTransferDTO
nbCbBatchTransfer
,
Byte
transferStatusLogType
,
Integer
custType
)
throws
Exception
{
public
void
launchTransfer
(
NbCbBatchTransferDTO
nbCbBatchTransfer
,
Byte
transferStatusLogType
)
throws
Exception
{
//调用宁波银行接口发起转账
//调用宁波银行接口发起转账
boolean
transferSuccess
=
false
;
boolean
transferSuccess
=
false
;
String
failReason
=
"成功"
;
String
failReason
=
"成功"
;
try
{
try
{
// 广联主体校验转账额度
// 广联主体校验转账额度
if
(
Objects
.
equals
(
NbCbCustEnum
.
GL_CUST
.
getCustType
(),
custType
)){
if
(
Objects
.
equals
(
NbCbCustEnum
.
GL_CUST
.
getCustType
(),
nbCbBatchTransfer
.
getCustType
()
)){
//判断发起转账是否异常
//判断发起转账是否异常
checkTransferException
(
nbCbBatchTransfer
);
checkTransferException
(
nbCbBatchTransfer
);
}
}
...
@@ -254,7 +254,7 @@ public class NbCbBatchTransferService {
...
@@ -254,7 +254,7 @@ public class NbCbBatchTransferService {
nbCbTransferLogService
.
insertOne
(
nbCbTransferResultLog
);
nbCbTransferLogService
.
insertOne
(
nbCbTransferResultLog
);
// 广联主体校验转账额度
// 广联主体校验转账额度
if
(
Objects
.
equals
(
NbCbCustEnum
.
GL_CUST
.
getCustType
(),
custType
)
){
if
(
Objects
.
equals
(
NbCbCustEnum
.
GL_CUST
.
getCustType
(),
nbCbBatchTransfer
.
getCustType
()
)
){
// 二手车业务处理
// 二手车业务处理
thiz
.
usedCarBusinessDeal
(
nbCbBatchTransfer
,
transferSuccess
);
thiz
.
usedCarBusinessDeal
(
nbCbBatchTransfer
,
transferSuccess
);
}
}
...
@@ -579,8 +579,6 @@ public class NbCbBatchTransferService {
...
@@ -579,8 +579,6 @@ public class NbCbBatchTransferService {
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
public
void
transferSchedule
(
String
jobParameter
,
String
updatedBy
,
Integer
custType
)
throws
Exception
{
public
void
transferSchedule
(
String
jobParameter
,
String
updatedBy
,
Integer
custType
)
throws
Exception
{
log
.
info
(
"调用宁波银行批量转账接口任务,jobParameter:{}"
,
jobParameter
);
log
.
info
(
"调用宁波银行批量转账接口任务,jobParameter:{}"
,
jobParameter
);
//获取主体配置
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
custType
);
List
<
Long
>
idList
=
Lists
.
newArrayList
();
List
<
Long
>
idList
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
jobParameter
))
{
if
(
StringUtils
.
isNotBlank
(
jobParameter
))
{
idList
=
Arrays
.
stream
(
jobParameter
.
split
(
","
)).
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
idList
=
Arrays
.
stream
(
jobParameter
.
split
(
","
)).
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
...
@@ -589,13 +587,13 @@ public class NbCbBatchTransferService {
...
@@ -589,13 +587,13 @@ public class NbCbBatchTransferService {
nbCbBatchTransferDTO
.
setIdList
(
idList
);
nbCbBatchTransferDTO
.
setIdList
(
idList
);
nbCbBatchTransferDTO
.
setPushStatus
(
TransferStatusEnum
.
NOT_TRANSFER
.
getValue
());
nbCbBatchTransferDTO
.
setPushStatus
(
TransferStatusEnum
.
NOT_TRANSFER
.
getValue
());
nbCbBatchTransferDTO
.
setPaymentMethod
(
"银行转账"
);
nbCbBatchTransferDTO
.
setPaymentMethod
(
"银行转账"
);
nbCbBatchTransferDTO
.
setCust
Id
(
custId
);
nbCbBatchTransferDTO
.
setCust
Type
(
custType
);
List
<
NbCbBatchTransferDTO
>
list
=
thiz
.
list
(
nbCbBatchTransferDTO
);
List
<
NbCbBatchTransferDTO
>
list
=
thiz
.
list
(
nbCbBatchTransferDTO
);
manualTransfer
(
list
,
updatedBy
,
TransferStatusLogEnum
.
TRANSFER_LAUNCHED
.
getValue
(),
false
,
custType
);
manualTransfer
(
list
,
updatedBy
,
TransferStatusLogEnum
.
TRANSFER_LAUNCHED
.
getValue
(),
false
);
}
}
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
,
rollbackFor
=
RpcServiceException
.
class
)
public
void
manualTransfer
(
List
<
NbCbBatchTransferDTO
>
list
,
String
updatedBy
,
Byte
transferStatusLogType
,
boolean
throwException
,
Integer
custType
)
throws
Exception
{
public
void
manualTransfer
(
List
<
NbCbBatchTransferDTO
>
list
,
String
updatedBy
,
Byte
transferStatusLogType
,
boolean
throwException
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
return
;
}
}
...
@@ -608,7 +606,7 @@ public class NbCbBatchTransferService {
...
@@ -608,7 +606,7 @@ public class NbCbBatchTransferService {
for
(
NbCbBatchTransferDTO
nbCbTransfer
:
list
)
{
for
(
NbCbBatchTransferDTO
nbCbTransfer
:
list
)
{
nbCbTransfer
.
setUpdatedBy
(
updatedBy
);
nbCbTransfer
.
setUpdatedBy
(
updatedBy
);
try
{
try
{
thiz
.
launchTransfer
(
nbCbTransfer
,
transferStatusLogType
,
custType
);
thiz
.
launchTransfer
(
nbCbTransfer
,
transferStatusLogType
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用宁波银行批量转账接口异常:{}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"调用宁波银行批量转账接口异常:{}"
,
e
.
getMessage
(),
e
);
if
(
throwException
)
{
if
(
throwException
)
{
...
@@ -926,7 +924,7 @@ public class NbCbBatchTransferService {
...
@@ -926,7 +924,7 @@ public class NbCbBatchTransferService {
if
(
CollectionUtils
.
isEmpty
(
validList
)
||
validList
.
size
()
!=
nbCbTransferDTO
.
getIdList
().
size
())
{
if
(
CollectionUtils
.
isEmpty
(
validList
)
||
validList
.
size
()
!=
nbCbTransferDTO
.
getIdList
().
size
())
{
throw
new
RpcServiceException
(
TransferErrorEnum
.
TRANSFER_ERROR
,
"请选择未推送、推送失败的记录"
);
throw
new
RpcServiceException
(
TransferErrorEnum
.
TRANSFER_ERROR
,
"请选择未推送、推送失败的记录"
);
}
}
manualTransfer
(
nbCbTransfers
,
nbCbTransferDTO
.
getUpdatedBy
(),
TransferStatusLogEnum
.
TRANSFER_RE_LAUNCHED
.
getValue
(),
true
,
NbCbCustEnum
.
GL_CUST
.
getCustType
()
);
manualTransfer
(
nbCbTransfers
,
nbCbTransferDTO
.
getUpdatedBy
(),
TransferStatusLogEnum
.
TRANSFER_RE_LAUNCHED
.
getValue
(),
true
);
return
true
;
return
true
;
}
catch
(
RpcServiceException
e
)
{
}
catch
(
RpcServiceException
e
)
{
throw
e
;
throw
e
;
...
...
rpc-dj-financial/src/main/resources/META-INF/orm/NbCbBatchTransferMapper.xml
View file @
d73ad1b
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
<result
column=
"receiptStatus"
property=
"receiptStatus"
jdbcType=
"TINYINT"
/>
<result
column=
"receiptStatus"
property=
"receiptStatus"
jdbcType=
"TINYINT"
/>
<result
column=
"ncr_pdf_url"
property=
"receiptUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"ncr_pdf_url"
property=
"receiptUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"trans_time"
property=
"transTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"trans_time"
property=
"transTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"cust_type"
property=
"custType"
jdbcType=
"TINYINT"
/>
<association
property=
"oaApplyBatchTransfer"
javaType=
"cn.com.glsx.dj.financial.model.OaApplyBatchTransfer"
>
<association
property=
"oaApplyBatchTransfer"
javaType=
"cn.com.glsx.dj.financial.model.OaApplyBatchTransfer"
>
<id
column=
"oa_id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"oa_id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"oa_license_plate"
property=
"licensePlate"
jdbcType=
"VARCHAR"
/>
<id
column=
"oa_license_plate"
property=
"licensePlate"
jdbcType=
"VARCHAR"
/>
...
@@ -110,7 +111,7 @@
...
@@ -110,7 +111,7 @@
cbtd.status as detail_status, cbtd.trans_time as detail_trans_time, cbtd.voucher_no as detail_voucher_no,
cbtd.status as detail_status, cbtd.trans_time as detail_trans_time, cbtd.voucher_no as detail_voucher_no,
cbtd.err_desc as detail_err_desc, cbtd.purpose as detail_purpose,
cbtd.err_desc as detail_err_desc, cbtd.purpose as detail_purpose,
cbtd.erp_remark1 as detail_erp_remark1, cbtd.erp_remark2 as detail_erp_remark2, cbtd.erp_remark3 as detail_erp_remark3,
cbtd.erp_remark1 as detail_erp_remark1, cbtd.erp_remark2 as detail_erp_remark2, cbtd.erp_remark3 as detail_erp_remark3,
cbtd.erp_remark4 as detail_erp_remark4, cbtd.bill_no as detail_bill_no,
cbtd.erp_remark4 as detail_erp_remark4, cbtd.bill_no as detail_bill_no,
ncci.cust_type AS cust_type,
<!--明细-->
<!--明细-->
case cbt.nb_transfer_status when 0 then ifnull(ncad.trans_time, cbt.updated_date) else null end as trans_time,
case cbt.nb_transfer_status when 0 then ifnull(ncad.trans_time, cbt.updated_date) else null end as trans_time,
...
@@ -127,7 +128,7 @@
...
@@ -127,7 +128,7 @@
left join oa_apply_batch_transfer oa on oa.merchant_sp_no = cbt.dj_serial_no and oa.deleted_flag = 'N' and oa.wechat_type = 1
left join oa_apply_batch_transfer oa on oa.merchant_sp_no = cbt.dj_serial_no and oa.deleted_flag = 'N' and oa.wechat_type = 1
left join nb_cb_acc_detail ncad on ncad.serial_no = cbtd.acc_detail_serial_no and ncad.deleted_flag = 'N' and ncad.cd_sign = 1
left join nb_cb_acc_detail ncad on ncad.serial_no = cbtd.acc_detail_serial_no and ncad.deleted_flag = 'N' and ncad.cd_sign = 1
left join nb_cb_receipt ncr on ncad.sub_serial_no = ncr.sub_serial_no and ncad.match_code = ncr.match_code and ncr.deleted_flag = 'N'
left join nb_cb_receipt ncr on ncad.sub_serial_no = ncr.sub_serial_no and ncad.match_code = ncr.match_code and ncr.deleted_flag = 'N'
left join nb_cb_cust_info ncci on ncci.cust_id = cbt.cust_id and ncci.deleted_flag = 'N'
<include
refid=
"listCondition"
></include>
<include
refid=
"listCondition"
></include>
order by cbt.id desc
order by cbt.id desc
</select>
</select>
...
...
rpc-dj-financial/src/test/java/cn/com/glsx/dj/financial/service/nb/NbCbReceiptServiceTest.java
View file @
d73ad1b
...
@@ -17,7 +17,7 @@ public class NbCbReceiptServiceTest extends BaseServiceTest {
...
@@ -17,7 +17,7 @@ public class NbCbReceiptServiceTest extends BaseServiceTest {
@Test
@Test
public
void
testQueryNbCbReceipt
()
{
public
void
testQueryNbCbReceipt
()
{
try
{
try
{
nbCbReceiptService
.
queryNbCbReceipt
(
""
,
null
,
null
,
"中间件"
,
1
);
nbCbReceiptService
.
queryNbCbReceipt
(
""
,
null
,
null
,
"中间件"
,
2
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
rpc-dj-financial/src/test/java/cn/com/glsx/dj/financial/service/nb/NbCbTransferServiceTest.java
View file @
d73ad1b
...
@@ -121,12 +121,12 @@ public class NbCbTransferServiceTest extends BaseServiceTest {
...
@@ -121,12 +121,12 @@ public class NbCbTransferServiceTest extends BaseServiceTest {
nbCbTransferParamDTO
.
setPayAcc
(
"86041110001342705"
);
nbCbTransferParamDTO
.
setPayAcc
(
"86041110001342705"
);
nbCbTransferParamDTO
.
setPayName
(
"深圳市优加智汇科技有限公司"
);
nbCbTransferParamDTO
.
setPayName
(
"深圳市优加智汇科技有限公司"
);
//收款账号
//收款账号
nbCbTransferParamDTO
.
setRcvAcc
(
"1
23456789
0"
);
nbCbTransferParamDTO
.
setRcvAcc
(
"1
500014126001
0"
);
nbCbTransferParamDTO
.
setRcvBankName
(
"
测试银
行"
);
nbCbTransferParamDTO
.
setRcvBankName
(
"
平安银行深圳福田支
行"
);
nbCbTransferParamDTO
.
setCustId
(
"9002368118"
);
nbCbTransferParamDTO
.
setCustId
(
"9002368118"
);
nbCbTransferParamDTO
.
setRcvName
(
"
周
"
);
nbCbTransferParamDTO
.
setRcvName
(
"
深圳市优加智汇科技有限公司
"
);
nbCbTransferParamDTO
.
setPurpose
(
"其他"
);
nbCbTransferParamDTO
.
setPurpose
(
"其他"
);
nbCbTransferParamDTO
.
setAmt
(
new
BigDecimal
(
"1
00
"
));
nbCbTransferParamDTO
.
setAmt
(
new
BigDecimal
(
"1"
));
nbCbTransferParamDTO
.
setTransferSource
((
byte
)
1
);
nbCbTransferParamDTO
.
setTransferSource
((
byte
)
1
);
String
result
=
nbCbTransferService
.
singleTransfer
(
nbCbTransferParamDTO
);
String
result
=
nbCbTransferService
.
singleTransfer
(
nbCbTransferParamDTO
);
System
.
out
.
println
(
result
);
System
.
out
.
println
(
result
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment