Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
11a40a1d
Commit
11a40a1d
authored
Jul 25, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ICBC 接口对接列表不显示开户失败的bug
parent
6537e55f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
HygfIcbcServiceImpl.java
...oot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
+18
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HygfIcbcServiceImpl.java
View file @
11a40a1d
...
...
@@ -318,7 +318,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
public
HygfIcbcRecordDTO
getObject
(
String
amosUserId
)
{
HygfIcbcRecord
hygfIcbcRecord
=
this
.
lambdaQuery
().
eq
(
HygfIcbcRecord:
:
getAmosUserId
,
amosUserId
).
last
(
"limit 1"
).
one
();
HygfIcbcRecordDTO
hygfIcbcRecordDTO
=
new
HygfIcbcRecordDTO
();
if
(
hygfIcbcRecord
==
null
||
IcbcEnum
.
OpenAccountState
.
FAIL
.
getCode
().
equals
(
hygfIcbcRecord
.
getOpenAccountStatus
())
)
{
if
(
hygfIcbcRecord
==
null
)
{
PeasantHousehold
peasantHousehold
=
peasantHouseholdService
.
lambdaQuery
()
.
select
(
PeasantHousehold:
:
getTelephone
,
PeasantHousehold:
:
getOwnersName
,
PeasantHousehold:
:
getIdCard
)
.
eq
(
PeasantHousehold:
:
getAmosUserId
,
amosUserId
).
last
(
"limit 1"
).
one
();
...
...
@@ -328,6 +328,17 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
hygfIcbcRecordDTO
.
setPhone
(
peasantHousehold
.
getTelephone
());
hygfIcbcRecordDTO
.
setOpenAccountStatus
(
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getCode
());
hygfIcbcRecordDTO
.
setOpenAccountStatusName
(
IcbcEnum
.
OpenAccountState
.
getNameByCode
(
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getCode
(),
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getName
()));
}
else
if
(
IcbcEnum
.
OpenAccountState
.
FAIL
.
getCode
().
equals
(
hygfIcbcRecord
.
getOpenAccountStatus
()))
{
Bean
.
toModel
(
hygfIcbcRecord
,
hygfIcbcRecordDTO
);
PeasantHousehold
peasantHousehold
=
peasantHouseholdService
.
lambdaQuery
()
.
select
(
PeasantHousehold:
:
getTelephone
,
PeasantHousehold:
:
getOwnersName
,
PeasantHousehold:
:
getIdCard
)
.
eq
(
PeasantHousehold:
:
getAmosUserId
,
amosUserId
).
last
(
"limit 1"
).
one
();
hygfIcbcRecordDTO
.
setCustName
(
peasantHousehold
.
getOwnersName
());
hygfIcbcRecordDTO
.
setIdCard
(
peasantHousehold
.
getIdCard
());
hygfIcbcRecordDTO
.
setPhone
(
peasantHousehold
.
getTelephone
());
hygfIcbcRecordDTO
.
setOpenAccountStatusName
(
IcbcEnum
.
OpenAccountState
.
getNameByCode
(
hygfIcbcRecordDTO
.
getOpenAccountStatus
(),
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getName
()));
hygfIcbcRecordDTO
.
setProtocolStatusName
(
IcbcEnum
.
ProtocolStatus
.
getNameByCode
(
hygfIcbcRecordDTO
.
getProtocolStatus
(),
""
));
}
else
{
Bean
.
toModel
(
hygfIcbcRecord
,
hygfIcbcRecordDTO
);
hygfIcbcRecordDTO
.
setOpenAccountStatusName
(
IcbcEnum
.
OpenAccountState
.
getNameByCode
(
hygfIcbcRecordDTO
.
getOpenAccountStatus
(),
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getName
()));
...
...
@@ -370,12 +381,17 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
return
Collections
.
emptyList
();
}
List
<
String
>
amosUserIds
=
hygfIcbcRecords
.
stream
().
map
(
HygfIcbcRecordDTO:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
List
<
PeasantHousehold
>
peasantHouseholds
=
peasantHouseholdService
.
lambdaQuery
().
select
(
PeasantHousehold:
:
getAmosUserId
,
PeasantHousehold:
:
getRegionalCompaniesName
).
in
(
PeasantHousehold:
:
getAmosUserId
,
amosUserIds
).
list
();
List
<
PeasantHousehold
>
peasantHouseholds
=
peasantHouseholdService
.
lambdaQuery
().
select
(
PeasantHousehold:
:
getAmosUserId
,
PeasantHousehold:
:
getRegionalCompaniesName
,
PeasantHousehold:
:
getOwnersName
,
PeasantHousehold:
:
getIdCard
,
PeasantHousehold:
:
getTelephone
).
in
(
PeasantHousehold:
:
getAmosUserId
,
amosUserIds
).
list
();
Map
<
String
,
List
<
PeasantHousehold
>>
PeasantHouseholdMap
=
peasantHouseholds
.
stream
().
collect
(
Collectors
.
groupingBy
(
PeasantHousehold:
:
getAmosUserId
));
// 根据农户 ID 分组
return
hygfIcbcRecords
.
stream
().
map
(
hygfIcbcRecordDTO
->
{
hygfIcbcRecordDTO
.
setOpenAccountStatusName
(
IcbcEnum
.
OpenAccountState
.
getNameByCode
(
hygfIcbcRecordDTO
.
getOpenAccountStatus
(),
IcbcEnum
.
OpenAccountState
.
INITIAL
.
getName
()));
hygfIcbcRecordDTO
.
setProtocolStatusName
(
IcbcEnum
.
ProtocolStatus
.
getNameByCode
(
hygfIcbcRecordDTO
.
getProtocolStatus
(),
""
));
List
<
PeasantHousehold
>
peasantHouseholdList
=
PeasantHouseholdMap
.
get
(
hygfIcbcRecordDTO
.
getAmosUserId
());
if
(
IcbcEnum
.
OpenAccountState
.
FAIL
.
getCode
().
equals
(
hygfIcbcRecordDTO
.
getOpenAccountStatus
()))
{
hygfIcbcRecordDTO
.
setCustName
(
peasantHouseholds
.
get
(
0
).
getOwnersName
());
hygfIcbcRecordDTO
.
setIdCard
(
peasantHouseholds
.
get
(
0
).
getIdCard
());
hygfIcbcRecordDTO
.
setPhone
(
peasantHouseholds
.
get
(
0
).
getTelephone
());
}
if
(!
CollectionUtils
.
isEmpty
(
peasantHouseholdList
))
{
// 根据区域经销商名称去重
List
<
HygfIcbcRecordDTO
.
IcbcPeasantHousehold
>
icbcPeasantHouseholds
=
Bean
.
toModels
(
peasantHouseholdList
,
HygfIcbcRecordDTO
.
IcbcPeasantHousehold
.
class
);
...
...
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