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
b7e840a1
Commit
b7e840a1
authored
Nov 26, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进97
parent
bbdf5dd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
7 deletions
+62
-7
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyReportPdfService.java
+45
-5
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+16
-1
yd-csf-service/src/main/resources/mappers/PolicyFollowMapper.xml
+1
-1
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyReportPdfService.java
View file @
b7e840a1
...
@@ -69,7 +69,9 @@ public class PolicyReportPdfService {
...
@@ -69,7 +69,9 @@ public class PolicyReportPdfService {
addPolicyDetailFields
(
document
,
reportData
);
addPolicyDetailFields
(
document
,
reportData
);
// 7. 附加险表头
// 7. 附加险表头
addAdditionalInsuranceHeader
(
document
);
addAdditionalInsuranceHeader
(
document
);
// 8. 详细信息下方水平线
// 8. 附加险详细信息表格
addAdditionalInsuranceDetail
(
document
,
reportData
);
// 9. 详细信息下方水平线
addHorizontalLine
(
document
,
writer
);
addHorizontalLine
(
document
,
writer
);
// 移除了原来的备注说明,因为现在备注已经整合到保单详细字段中
// 移除了原来的备注说明,因为现在备注已经整合到保单详细字段中
...
@@ -82,6 +84,44 @@ public class PolicyReportPdfService {
...
@@ -82,6 +84,44 @@ public class PolicyReportPdfService {
}
}
/**
/**
* 附加险详细信息表格
*/
private
void
addAdditionalInsuranceDetail
(
Document
document
,
PolicyReportData
reportData
)
throws
DocumentException
{
if
(
reportData
.
getAdditionalInsurances
()
==
null
||
reportData
.
getAdditionalInsurances
().
isEmpty
())
{
return
;
}
PdfPTable
table
=
new
PdfPTable
(
4
);
table
.
setWidthPercentage
(
100
);
table
.
setWidths
(
new
float
[]{
25
,
25
,
25
,
25
});
table
.
setSpacingBefore
(
0
f
);
table
.
setSpacingAfter
(
ROW_SPACING
);
// 添加附加险数据行
for
(
PolicyReportData
.
AdditionalInsurance
insurance
:
reportData
.
getAdditionalInsurances
())
{
addTableCenterCellNoBorder
(
table
,
insurance
.
getName
()
!=
null
?
insurance
.
getName
()
:
""
);
addTableCenterCellNoBorder
(
table
,
insurance
.
getPaymentTerm
()
!=
null
?
String
.
valueOf
(
insurance
.
getPaymentTerm
())
:
""
);
addTableCenterCellNoBorder
(
table
,
insurance
.
getCurrency
()
!=
null
?
insurance
.
getCurrency
()
:
""
);
addTableCenterCellNoBorder
(
table
,
insurance
.
getFirstYearAmount
()
!=
null
?
formatAmount
(
insurance
.
getFirstYearAmount
())
:
""
);
}
document
.
add
(
table
);
}
/**
* 添加居中对齐的无边框内容单元格
*/
private
void
addTableCenterCellNoBorder
(
PdfPTable
table
,
String
text
)
{
Paragraph
para
=
new
Paragraph
(
text
,
chineseFont
);
com
.
lowagie
.
text
.
pdf
.
PdfPCell
cell
=
new
com
.
lowagie
.
text
.
pdf
.
PdfPCell
(
para
);
cell
.
setBorder
(
com
.
lowagie
.
text
.
Rectangle
.
NO_BORDER
);
cell
.
setHorizontalAlignment
(
com
.
lowagie
.
text
.
Element
.
ALIGN_CENTER
);
cell
.
setVerticalAlignment
(
com
.
lowagie
.
text
.
Element
.
ALIGN_MIDDLE
);
cell
.
setPadding
(
2
f
);
table
.
addCell
(
cell
);
}
/**
* 主标题 - 放大并居中
* 主标题 - 放大并居中
*/
*/
private
void
addMainTitle
(
Document
document
,
String
title
)
throws
DocumentException
{
private
void
addMainTitle
(
Document
document
,
String
title
)
throws
DocumentException
{
...
@@ -170,12 +210,12 @@ public class PolicyReportPdfService {
...
@@ -170,12 +210,12 @@ public class PolicyReportPdfService {
// 第一行:保單持有人 | 持有人值 | 保險公司 | 公司值
// 第一行:保單持有人 | 持有人值 | 保險公司 | 公司值
addTableHeaderCellNoBorder
(
table
,
"保單持有人"
);
addTableHeaderCellNoBorder
(
table
,
"保單持有人"
);
addTableCellNoBorder
(
table
,
data
.
getPolicyHolder
()
!=
null
?
data
.
getPolicyHolder
()
:
""
);
addTableCellNoBorder
(
table
,
data
.
getPolicyHolder
()
!=
null
?
data
.
getPolicyHolder
()
:
""
);
addTableHeaderCellNoBorder
(
table
,
"保險公司"
);
addTableCellNoBorder
(
table
,
data
.
getInsuranceCompany
()
!=
null
?
data
.
getInsuranceCompany
()
:
""
);
// 第二行:保單受保人 | 受保人值 | 受保人年齡 | 年齡值
addTableHeaderCellNoBorder
(
table
,
"保單受保人"
);
addTableHeaderCellNoBorder
(
table
,
"保單受保人"
);
addTableCellNoBorder
(
table
,
data
.
getInsuredPerson
()
!=
null
?
data
.
getInsuredPerson
()
:
""
);
addTableCellNoBorder
(
table
,
data
.
getInsuredPerson
()
!=
null
?
data
.
getInsuredPerson
()
:
""
);
// 第二行:保單受保人 | 受保人值 | 受保人年齡 | 年齡值
addTableHeaderCellNoBorder
(
table
,
"保險公司"
);
addTableCellNoBorder
(
table
,
data
.
getInsuranceCompany
()
!=
null
?
data
.
getInsuranceCompany
()
:
""
);
addTableHeaderCellNoBorder
(
table
,
"受保人年齡"
);
addTableHeaderCellNoBorder
(
table
,
"受保人年齡"
);
addTableCellNoBorder
(
table
,
data
.
getInsuredAge
()
!=
null
?
String
.
valueOf
(
data
.
getInsuredAge
())
:
""
);
addTableCellNoBorder
(
table
,
data
.
getInsuredAge
()
!=
null
?
String
.
valueOf
(
data
.
getInsuredAge
())
:
""
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
b7e840a1
...
@@ -11,7 +11,6 @@ import com.yd.auth.core.utils.SecurityUtil;
...
@@ -11,7 +11,6 @@ import com.yd.auth.core.utils.SecurityUtil;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.dto.*
;
...
@@ -569,7 +568,23 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
...
@@ -569,7 +568,23 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
@Override
@Override
public
PolicyReportData
queryPolicyReportData
(
String
policyBizId
)
{
public
PolicyReportData
queryPolicyReportData
(
String
policyBizId
)
{
// 查询主险信息
PolicyReportData
policyReportData
=
this
.
baseMapper
.
queryPolicyReportData
(
policyBizId
);
PolicyReportData
policyReportData
=
this
.
baseMapper
.
queryPolicyReportData
(
policyBizId
);
// 处理附加险信息
List
<
PolicyAdditional
>
additionalList
=
policyAdditionalService
.
list
(
new
QueryWrapper
<
PolicyAdditional
>().
eq
(
"policy_biz_id"
,
policyBizId
));
List
<
PolicyReportData
.
AdditionalInsurance
>
additionalInsurances
=
new
ArrayList
<>();
if
(
CollUtil
.
isNotEmpty
(
additionalList
))
{
for
(
PolicyAdditional
additional
:
additionalList
)
{
PolicyReportData
.
AdditionalInsurance
additionalInsurance
=
new
PolicyReportData
.
AdditionalInsurance
();
additionalInsurance
.
setName
(
additional
.
getAddProductName
());
additionalInsurance
.
setPaymentTerm
(
null
);
additionalInsurance
.
setCurrency
(
getCurrencyValue
(
additional
.
getCurrency
()));
additionalInsurance
.
setFirstYearAmount
(
additional
.
getPremium
());
additionalInsurances
.
add
(
additionalInsurance
);
}
}
// 处理附加险信息
policyReportData
.
setAdditionalInsurances
(
additionalInsurances
);
// 处理服务经理
// 处理服务经理
String
signerList
=
policyReportData
.
getServiceManager
();
String
signerList
=
policyReportData
.
getServiceManager
();
if
(
StringUtils
.
isNotBlank
(
signerList
))
{
if
(
StringUtils
.
isNotBlank
(
signerList
))
{
...
...
yd-csf-service/src/main/resources/mappers/PolicyFollowMapper.xml
View file @
b7e840a1
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
t.signer_list as serviceManager,
t.signer_list as serviceManager,
t.policy_holder as policyHolder,
t.policy_holder as policyHolder,
t.currency as currency,
t.currency as currency,
ifnull(i.name, i.name_en) as insuredPerson
ifnull(i.name, i.name_en) as insuredPerson
,
i.age as insuredAge
i.age as insuredAge
from policy_follow t
from policy_follow t
...
...
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