Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
8e4a12ac
Commit
8e4a12ac
authored
Sep 29, 2024
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 校验是否有流水的账户
parent
f507b2e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
39 deletions
+44
-39
IcbcTransactionFlowQueryServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
+44
-39
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
View file @
8e4a12ac
...
...
@@ -223,57 +223,62 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
// 重新过滤已存入【入账记录】的流水信息
for
(
String
account
:
accountRecordListMap
.
keySet
())
{
// 获取当前账号下的流水
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
flowRecordList
=
accountRecordListMap
.
get
(
account
);
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if
(!
flowRecordList
.
isEmpty
())
{
// 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
List
<
String
>
serioListByAccount
=
serioMapByAccount
.
get
(
account
);
if
(
serioListByAccount
==
null
||
serioListByAccount
.
isEmpty
()){
serioListByAccount
=
new
ArrayList
<>();
}
if
(
accountRecordListMap
.
keySet
().
size
()>
0
){
for
(
String
account
:
accountRecordListMap
.
keySet
())
{
// 获取当前账号下的流水
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
flowRecordList
=
accountRecordListMap
.
get
(
account
);
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if
(!
flowRecordList
.
isEmpty
())
{
// 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
List
<
String
>
serioListByAccount
=
serioMapByAccount
.
get
(
account
);
if
(
serioListByAccount
==
null
||
serioListByAccount
.
isEmpty
()){
serioListByAccount
=
new
ArrayList
<>();
}
// 过滤出需要新增流水的数据
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
insertList
=
new
ArrayList
<>();
// 过滤出需要新增流水的数据
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
insertList
=
new
ArrayList
<>();
for
(
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
flowRecord
:
flowRecordList
)
{
if
(
"2"
.
equals
(
flowRecord
.
getDrcrf
())
&&
!
serioListByAccount
.
contains
(
flowRecord
.
getOnlySequence
())){
insertList
.
add
(
flowRecord
);
for
(
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
flowRecord
:
flowRecordList
)
{
if
(
"2"
.
equals
(
flowRecord
.
getDrcrf
())
&&
!
serioListByAccount
.
contains
(
flowRecord
.
getOnlySequence
())){
insertList
.
add
(
flowRecord
);
}
}
}
// 重新存入账号流水Map里
accountRecordListMap
.
put
(
account
,
insertList
);
// 重新存入账号流水Map里
accountRecordListMap
.
put
(
account
,
insertList
);
}
}
}
// 存入过滤后的流水信息到【入账记录】
for
(
String
account
:
accountRecordListMap
.
keySet
())
{
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
saveList
=
accountRecordListMap
.
get
(
account
);
// 封装数据
if
(
saveList
!=
null
&&
!
saveList
.
isEmpty
())
{
String
bankName
=
accountInfoMap
.
get
(
account
);
log
.
info
(
"需要存的流水到账--银行名称:"
+
bankName
);
log
.
info
(
"需要存的流水到账--明细条数:"
+
saveList
.
size
());
try
{
for
(
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
entry
:
saveList
)
{
EKPEntryPushParam
pushParam
=
new
EKPEntryPushParam
();
initValue
(
entry
,
pushParam
,
bankName
,
account
);
String
body
=
sendToEkp
(
pushParam
);
// 重试一次
if
(
StringUtils
.
isBlank
(
body
))
{
sendToEkp
(
pushParam
);
// 存入过滤后的流水信息到【入账记录】
for
(
String
account
:
accountRecordListMap
.
keySet
())
{
List
<
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
>
saveList
=
accountRecordListMap
.
get
(
account
);
// 封装数据
if
(
saveList
!=
null
&&
!
saveList
.
isEmpty
())
{
String
bankName
=
accountInfoMap
.
get
(
account
);
log
.
info
(
"需要存的流水到账--银行名称:"
+
bankName
);
log
.
info
(
"需要存的流水到账--明细条数:"
+
saveList
.
size
());
try
{
for
(
MybankEnterpriseTradeQhisdResponseV1
.
MybankEnterpriseTradeQhisdResponseRdV1
entry
:
saveList
)
{
EKPEntryPushParam
pushParam
=
new
EKPEntryPushParam
();
initValue
(
entry
,
pushParam
,
bankName
,
account
);
String
body
=
sendToEkp
(
pushParam
);
// 重试一次
if
(
StringUtils
.
isBlank
(
body
))
{
sendToEkp
(
pushParam
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"到账明细数据推送失败"
,
e
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"到账明细数据推送失败"
,
e
);
}
}
}
return
R
.
ok
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment