Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
1113972a
Commit
1113972a
authored
Jan 21, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进v2
parent
aca8d8c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
47 deletions
+7
-47
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+7
-47
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
1113972a
...
...
@@ -475,53 +475,10 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
policy
.
setInsuranceCompanyBizId
(
productInfo
.
getInsuranceCompanyBizId
());
policy
.
setReconciliationCompany
(
productInfo
.
getReconciliationCompany
());
policy
.
setReconciliationCompanyBizId
(
productInfo
.
getReconciliationCompanyBizId
());
// 设置对账公司编码
String
reconciliationCompanyCode
=
productInfo
.
getReconciliationCompanyCode
();
if
(
StringUtils
.
isBlank
(
reconciliationCompanyCode
))
{
// 如果产品信息中没有编码,则调用对账公司 feignclient
ApiInsuranceReconciliationCompanyPageRequest
reconciliationCompanyPageRequest
=
new
ApiInsuranceReconciliationCompanyPageRequest
();
reconciliationCompanyPageRequest
.
setPageNo
(
1
);
reconciliationCompanyPageRequest
.
setPageSize
(
999
);
Result
iPageResult
=
apiInsuranceReconciliationCompanyFeignClient
.
page
(
reconciliationCompanyPageRequest
);
// 解析响应获取对账公司编码
if
(
iPageResult
!=
null
&&
iPageResult
.
getCode
()
==
200
)
{
try
{
// Feign 返回的泛型会被反序列化为 LinkedHashMap,需要手动提取
Object
data
=
iPageResult
.
getData
();
if
(
data
instanceof
Map
)
{
Map
<
String
,
Object
>
dataMap
=
(
Map
<
String
,
Object
>)
data
;
Object
recordsObj
=
dataMap
.
get
(
"records"
);
if
(
recordsObj
instanceof
List
)
{
List
<
Map
<
String
,
Object
>>
records
=
(
List
<
Map
<
String
,
Object
>>)
recordsObj
;
// 遍历分页结果,找到匹配的对账公司
String
targetBizId
=
productInfo
.
getReconciliationCompanyBizId
();
for
(
Map
<
String
,
Object
>
record
:
records
)
{
String
recordBizId
=
(
String
)
record
.
get
(
"reconciliationCompanyBizId"
);
if
(
targetBizId
.
equals
(
recordBizId
))
{
// 获取对账公司编码
reconciliationCompanyCode
=
(
String
)
record
.
get
(
"code"
);
log
.
info
(
"从对账公司服务获取编码: reconciliationCompanyBizId={}, code={}"
,
targetBizId
,
reconciliationCompanyCode
);
break
;
// 找到后跳出循环
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"解析对账公司响应失败: {}"
,
e
.
getMessage
(),
e
);
}
}
// 如果仍然没有获取到编码,抛异常
if
(
StringUtils
.
isBlank
(
reconciliationCompanyCode
))
{
throw
new
BusinessException
(
"未能从对账公司服务获取编码,请补充,当前对账公司:"
+
productInfo
.
getReconciliationCompany
());
}
}
policy
.
setReconciliationCompanyCode
(
reconciliationCompanyCode
);
policy
.
setReconciliationCompanyCode
(
productInfo
.
getReconciliationCompanyCode
());
}
}
// 保存保单
policyService
.
save
(
policy
);
...
...
@@ -871,9 +828,12 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
throw
new
BusinessException
(
"产品上架信息未配置对账公司"
);
}
log
.
info
(
"成功获取产品信息: productLaunchBizId={}, reconciliationCompanyBizId={}"
,
log
.
info
(
"成功获取产品信息: productLaunchBizId={}, reconciliationCompanyBizId={}
, reconciliationCompany={}, reconciliationCompanyCode={}
"
,
productLaunchBizId
,
productInfo
.
getReconciliationCompanyBizId
());
productInfo
.
getReconciliationCompanyBizId
(),
productInfo
.
getReconciliationCompany
(),
productInfo
.
getReconciliationCompanyCode
()
);
return
productInfo
;
}
catch
(
Exception
e
)
{
...
...
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