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
bad8b7e3
Commit
bad8b7e3
authored
Oct 10, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis缓存字典
parent
d315e2fe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
39 deletions
+78
-39
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
+9
-7
yd-csf-feign/pom.xml
+5
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelAppointmentPlanDto.java
+11
-6
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelBeneficiaryDto.java
+7
-3
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelHkStayDto.java
+6
-3
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelInsurantDto.java
+15
-8
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelPolicyholderDto.java
+14
-7
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelSecondHolderDto.java
+11
-5
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
View file @
bad8b7e3
...
...
@@ -2,6 +2,7 @@ package com.yd.csf.api.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yd.common.constant.RedisConstants
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
...
...
@@ -32,6 +33,7 @@ import com.yd.oss.feign.request.ApiOssExportAppointmentExcelRequest;
import
com.yd.oss.feign.response.ApiGeneratePdfResponse
;
import
com.yd.oss.feign.response.ApiOssExcelParseResponse
;
import
com.yd.oss.feign.response.ApiOssExportAppointmentExcelResponse
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -197,7 +199,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
try
{
//查询redis缓存的字典列表信息
// redisUtil.getCacheList()
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
=
redisUtil
.
getCacheObject
(
RedisConstants
.
DICT_LIST
);
//预约信息
Result
<
Appointment
>
result
=
apiAppointmentService
.
checkAppointmentIsExist
(
appointmentBizId
);
Appointment
appointment
=
result
.
getData
();
...
...
@@ -215,7 +217,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
if
(!
Objects
.
isNull
(
productPlan
))
{
ApiExcelAppointmentPlanDto
planDto
=
new
ApiExcelAppointmentPlanDto
();
BeanUtils
.
copyProperties
(
productPlan
,
planDto
);
planDto
=
ApiExcelAppointmentPlanDto
.
setApiExcelAppointmentPlanDto
(
planDto
);
planDto
=
ApiExcelAppointmentPlanDto
.
setApiExcelAppointmentPlanDto
(
planDto
,
dictTypeResponses
);
//对象转成map.方便excel做占位符字段替换
Map
<
String
,
Object
>
planMap
=
BeanMapUtils
.
convertToMapSafely
(
planDto
);
data
.
putAll
(
planMap
);
...
...
@@ -251,7 +253,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
BeanUtils
.
copyProperties
(
dto
,
beneficiaryDto
);
return
beneficiaryDto
;
}).
collect
(
Collectors
.
toList
());
apiExcelBeneficiaryDtoList
=
ApiExcelBeneficiaryDto
.
setApiExcelBeneficiaryDtoList
(
apiExcelBeneficiaryDtoList
);
apiExcelBeneficiaryDtoList
=
ApiExcelBeneficiaryDto
.
setApiExcelBeneficiaryDtoList
(
apiExcelBeneficiaryDtoList
,
dictTypeResponses
);
List
<
Map
<
String
,
Object
>>
mapList1
=
BeanMapUtils
.
convertListToMapListSafelyWithEmpty
(
apiExcelBeneficiaryDtoList
);
data
.
put
(
"beneficiaryList"
,
mapList1
);
}
...
...
@@ -259,7 +261,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
//Excel-客戶在港/澳停留時間信息
ApiExcelHkStayDto
stayDto
=
new
ApiExcelHkStayDto
();
BeanUtils
.
copyProperties
(
appointment
,
stayDto
);
stayDto
=
ApiExcelHkStayDto
.
setApiExcelHkStayDto
(
stayDto
);
stayDto
=
ApiExcelHkStayDto
.
setApiExcelHkStayDto
(
stayDto
,
dictTypeResponses
);
Map
<
String
,
Object
>
stayMap
=
BeanMapUtils
.
convertToMapSafely
(
stayDto
);
data
.
putAll
(
stayMap
);
...
...
@@ -268,7 +270,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
if
(!
Objects
.
isNull
(
insurant
))
{
ApiExcelInsurantDto
insurantDto
=
new
ApiExcelInsurantDto
();
BeanUtils
.
copyProperties
(
insurant
,
insurantDto
);
insurantDto
=
ApiExcelInsurantDto
.
setApiExcelInsurantDto
(
insurantDto
);
insurantDto
=
ApiExcelInsurantDto
.
setApiExcelInsurantDto
(
insurantDto
,
dictTypeResponses
);
//对象转成map.方便excel做占位符字段替换
Map
<
String
,
Object
>
insurantMap
=
BeanMapUtils
.
convertToMapSafely
(
insurantDto
);
data
.
putAll
(
insurantMap
);
...
...
@@ -279,7 +281,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
if
(!
Objects
.
isNull
(
policyholder
))
{
ApiExcelPolicyholderDto
policyholderDto
=
new
ApiExcelPolicyholderDto
();
BeanUtils
.
copyProperties
(
policyholder
,
policyholderDto
);
policyholderDto
=
ApiExcelPolicyholderDto
.
setApiExcelPolicyholderDto
(
policyholderDto
);
policyholderDto
=
ApiExcelPolicyholderDto
.
setApiExcelPolicyholderDto
(
policyholderDto
,
dictTypeResponses
);
//对象转成map.方便excel做占位符字段替换
Map
<
String
,
Object
>
policyholderMap
=
BeanMapUtils
.
convertToMapSafely
(
policyholderDto
);
data
.
putAll
(
policyholderMap
);
...
...
@@ -290,7 +292,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
if
(!
Objects
.
isNull
(
secondHolder
))
{
ApiExcelSecondHolderDto
secondHolderDto
=
new
ApiExcelSecondHolderDto
();
BeanUtils
.
copyProperties
(
secondHolder
,
secondHolderDto
);
secondHolderDto
=
ApiExcelSecondHolderDto
.
setApiExcelSecondHolderDto
(
secondHolderDto
);
secondHolderDto
=
ApiExcelSecondHolderDto
.
setApiExcelSecondHolderDto
(
secondHolderDto
,
dictTypeResponses
);
//对象转成map.方便excel做占位符字段替换
Map
<
String
,
Object
>
secondHolderMap
=
BeanMapUtils
.
convertToMapSafely
(
secondHolderDto
);
data
.
putAll
(
secondHolderMap
);
...
...
yd-csf-feign/pom.xml
View file @
bad8b7e3
...
...
@@ -36,5 +36,10 @@
<artifactId>
yd-question-feign
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.yd
</groupId>
<artifactId>
yd-user-feign
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelAppointmentPlanDto.java
View file @
bad8b7e3
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.enums.NoYesEnum
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.math.BigDecimal
;
...
...
@@ -171,7 +173,8 @@ public class ApiExcelAppointmentPlanDto {
* @param dto
* @return
*/
public
static
ApiExcelAppointmentPlanDto
setApiExcelAppointmentPlanDto
(
ApiExcelAppointmentPlanDto
dto
)
{
public
static
ApiExcelAppointmentPlanDto
setApiExcelAppointmentPlanDto
(
ApiExcelAppointmentPlanDto
dto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
ApiExcelAppointmentPlanDto
mainDto
=
new
ApiExcelAppointmentPlanDto
();
BeanUtils
.
copyProperties
(
dto
,
mainDto
);
mainDto
.
setPlanCompanyName
(
dto
.
getCompanyName
());
...
...
@@ -181,14 +184,16 @@ public class ApiExcelAppointmentPlanDto {
mainDto
.
setPlanInitialPaymentMethod
(
dto
.
getInitialPaymentMethod
());
mainDto
.
setPlanIsJoin
(
dto
.
getIsJoin
());
mainDto
.
setPlanIsPrepay
(
NoYesEnum
.
getLabelByValue
(
dto
.
getIsPrepay
()));
//付款频率(字典)(产品计划信息表)TODO
mainDto
.
setPlanPaymentFrequency
(
dto
.
getPaymentFrequency
());
//付款频率(字典)(产品计划信息表)
mainDto
.
setPlanPaymentFrequency
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FREQUENCY
.
getItemValue
(),
dto
.
getPaymentFrequency
()));
mainDto
.
setPlanPaymentTerm
(
dto
.
getPaymentTerm
());
//保单生效日(产品计划信息表)
TODO
//保单生效日(产品计划信息表)
mainDto
.
setPlanPolicyEffectiveDate
(
DateUtil
.
getyyyyMMdd
(
dto
.
getPolicyEffectiveDate
()));
mainDto
.
setPlanProductName
(
dto
.
getProductName
());
//续期保费缴付方式(字典)(产品计划信息表)TODO
mainDto
.
setPlanRenewalPaymentMethod
(
dto
.
getRenewalPaymentMethod
());
//续期保费缴付方式(字典)(产品计划信息表)
mainDto
.
setPlanRenewalPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getRenewalPaymentMethod
()));
mainDto
.
setPlanSumInsured
(
dto
.
getSumInsured
());
return
mainDto
;
}
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelBeneficiaryDto.java
View file @
bad8b7e3
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -85,7 +87,8 @@ public class ApiExcelBeneficiaryDto {
* @param list
* @return
*/
public
static
List
<
ApiExcelBeneficiaryDto
>
setApiExcelBeneficiaryDtoList
(
List
<
ApiExcelBeneficiaryDto
>
list
)
{
public
static
List
<
ApiExcelBeneficiaryDto
>
setApiExcelBeneficiaryDtoList
(
List
<
ApiExcelBeneficiaryDto
>
list
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
List
<
ApiExcelBeneficiaryDto
>
newList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
newList
=
list
.
stream
().
map
(
dto
->
{
...
...
@@ -94,8 +97,9 @@ public class ApiExcelBeneficiaryDto {
newDto
.
setBeneficiaryBenefitRatio
(
dto
.
getBeneficiaryBenefitRatio
());
newDto
.
setBeneficiaryBirthTime
(
DateUtil
.
getyyyyMMdd
(
dto
.
getBirthTime
()));
newDto
.
setBeneficiaryIdNumber
(
newDto
.
getIdNumber
());
//與受保人關係(受益人信息表:与受保人关系(字典)) TODO
newDto
.
setBeneficiaryInsurantRel
(
newDto
.
getInsurantRel
());
//與受保人關係(受益人信息表:与受保人关系(字典))
newDto
.
setBeneficiaryInsurantRel
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_REL
.
getItemValue
(),
newDto
.
getInsurantRel
()));
newDto
.
setBeneficiaryName
(
newDto
.
getName
());
newDto
.
setBeneficiaryNameEn
(
newDto
.
getNameEn
());
return
newDto
;
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelHkStayDto.java
View file @
bad8b7e3
...
...
@@ -2,10 +2,12 @@ package com.yd.csf.feign.dto.excel;
import
com.yd.common.utils.DateUtil
;
import
com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* Excel-客戶在港/澳停留時間信息
...
...
@@ -90,14 +92,15 @@ public class ApiExcelHkStayDto {
* @param dto
* @return
*/
public
static
ApiExcelHkStayDto
setApiExcelHkStayDto
(
ApiExcelHkStayDto
dto
)
{
public
static
ApiExcelHkStayDto
setApiExcelHkStayDto
(
ApiExcelHkStayDto
dto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
ApiExcelHkStayDto
stayDto
=
new
ApiExcelHkStayDto
();
BeanUtils
.
copyProperties
(
dto
,
stayDto
);
stayDto
.
setHkAccompanyMobile
(
dto
.
getAccompanyMobileCode
()
+
"-"
+
dto
.
getAccompanyMobile
());
stayDto
.
setHkAccompanyName
(
dto
.
getAccompanyName
());
//抵港(澳)日期及时间(到港时间)(预约信息主表)年-月-日 时:分
TODO
//抵港(澳)日期及时间(到港时间)(预约信息主表)年-月-日 时:分
stayDto
.
setHkArrivalTime
(
DateUtil
.
getyyyyMMddHHmm
(
dto
.
getArrivalTime
()));
//离港(澳)日期及时间(离港时间)(预约信息主表)年-月-日 时:分
TODO
//离港(澳)日期及时间(离港时间)(预约信息主表)年-月-日 时:分
stayDto
.
setHkDepartureTime
(
DateUtil
.
getyyyyMMddHHmm
(
dto
.
getDepartureTime
()));
stayDto
.
setHkHkMobile
(
dto
.
getHkMobileCode
()
+
"-"
+
dto
.
getHkMobile
());
stayDto
.
setHkMeetingPoint
(
dto
.
getMeetingPoint
());
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelInsurantDto.java
View file @
bad8b7e3
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* 受保人资料 (如與保單持有人為同一人無須填寫)
...
...
@@ -257,7 +260,8 @@ public class ApiExcelInsurantDto {
* @param dto
* @return
*/
public
static
ApiExcelInsurantDto
setApiExcelInsurantDto
(
ApiExcelInsurantDto
dto
)
{
public
static
ApiExcelInsurantDto
setApiExcelInsurantDto
(
ApiExcelInsurantDto
dto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
ApiExcelInsurantDto
insurantDto
=
new
ApiExcelInsurantDto
();
BeanUtils
.
copyProperties
(
dto
,
insurantDto
);
insurantDto
.
setInsurantBirthday
(
DateUtil
.
getyyyyMMdd
(
dto
.
getBirthday
()));
...
...
@@ -266,15 +270,17 @@ public class ApiExcelInsurantDto {
insurantDto
.
setInsurantCompanyAddress
(
dto
.
getCompanyAddress
());
insurantDto
.
setInsurantCompanyName
(
dto
.
getCompanyName
());
insurantDto
.
setInsurantCurrentMonthlyIncome
(
dto
.
getCurrentMonthlyIncome
());
//教育程度 (大學或以上/大專/中學/小學或以下)(受保人信息表:教育程度(字典))TODO
insurantDto
.
setInsurantEducationLevel
(
dto
.
getEducationLevel
());
//教育程度 (大學或以上/大專/中學/小學或以下)(受保人信息表:教育程度(字典))
insurantDto
.
setInsurantEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
dto
.
getEducationLevel
()));
insurantDto
.
setInsurantEmail
(
dto
.
getEmail
());
//性别(受保人信息表:性别 字典)
TODO
//性别(受保人信息表:性别 字典)
insurantDto
.
setInsurantGender
(
dto
.
getGender
());
insurantDto
.
setInsurantIdNumber
(
dto
.
getIdNumber
());
insurantDto
.
setInsurantMailingAddress
(
dto
.
getMailingAddress
());
//婚姻状况 (單身 / 已婚 / 離異/ 喪偶)(受保人信息表:婚姻状况(字典))TODO
insurantDto
.
setInsurantMaritalStatus
(
dto
.
getMaritalStatus
());
//婚姻状况 (單身 / 已婚 / 離異/ 喪偶)(受保人信息表:婚姻状况(字典))
insurantDto
.
setInsurantMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
dto
.
getMaritalStatus
()));
insurantDto
.
setInsurantMobile
(
dto
.
getMobileCode
()
+
"-"
+
dto
.
getMobile
());
insurantDto
.
setInsurantName
(
dto
.
getName
());
insurantDto
.
setInsurantNameEn
(
dto
.
getNameEn
());
...
...
@@ -282,8 +288,9 @@ public class ApiExcelInsurantDto {
insurantDto
.
setInsurantNationality
(
dto
.
getNationality
());
insurantDto
.
setInsurantPassNo
(
dto
.
getPassNo
());
insurantDto
.
setInsurantPassportNo
(
dto
.
getPassportNo
());
//與投保人關系(受保人信息表:与投保人关系(字典)) TODO
insurantDto
.
setInsurantPolicyholderRel
(
dto
.
getPolicyholderRel
());
//與投保人關系(受保人信息表:与投保人关系(字典))
insurantDto
.
setInsurantPolicyholderRel
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_REL
.
getItemValue
(),
dto
.
getPolicyholderRel
()));
//公司业务性质(受保人信息表:TODO)
insurantDto
.
setInsurantPompanyNature
(
dto
.
getInsurantPompanyNature
());
insurantDto
.
setInsurantPosition
(
dto
.
getPosition
());
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelPolicyholderDto.java
View file @
bad8b7e3
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* 保单持有人资料(投保人信息)
...
...
@@ -247,7 +250,8 @@ public class ApiExcelPolicyholderDto {
* @param dto
* @return
*/
public
static
ApiExcelPolicyholderDto
setApiExcelPolicyholderDto
(
ApiExcelPolicyholderDto
dto
)
{
public
static
ApiExcelPolicyholderDto
setApiExcelPolicyholderDto
(
ApiExcelPolicyholderDto
dto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
ApiExcelPolicyholderDto
insurantDto
=
new
ApiExcelPolicyholderDto
();
BeanUtils
.
copyProperties
(
dto
,
insurantDto
);
insurantDto
.
setPolicyholderBirthday
(
DateUtil
.
getyyyyMMdd
(
dto
.
getBirthday
()));
...
...
@@ -256,15 +260,18 @@ public class ApiExcelPolicyholderDto {
insurantDto
.
setPolicyholderCompanyAddress
(
dto
.
getCompanyAddress
());
insurantDto
.
setPolicyholderCompanyName
(
dto
.
getCompanyName
());
insurantDto
.
setPolicyholderCurrentMonthlyIncome
(
dto
.
getCurrentMonthlyIncome
());
//教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))TODO
insurantDto
.
setPolicyholderEducationLevel
(
dto
.
getEducationLevel
());
//教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
insurantDto
.
setPolicyholderEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
dto
.
getEducationLevel
()));
insurantDto
.
setPolicyholderEmail
(
dto
.
getEmail
());
//性别(投保人信息表:性别 字典)TODO
insurantDto
.
setPolicyholderGender
(
dto
.
getGender
());
//性别(投保人信息表:性别 字典)
insurantDto
.
setPolicyholderGender
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getGender
()));
insurantDto
.
setPolicyholderIdNumber
(
dto
.
getIdNumber
());
insurantDto
.
setPolicyholderMailingAddress
(
dto
.
getMailingAddress
());
//婚姻状况 (單身 / 已婚 / 離異/ 喪偶)(投保人信息表:婚姻状况(字典))TODO
insurantDto
.
setPolicyholderMaritalStatus
(
dto
.
getMaritalStatus
());
//婚姻状况 (單身 / 已婚 / 離異/ 喪偶)(投保人信息表:婚姻状况(字典))
insurantDto
.
setPolicyholderMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
dto
.
getMaritalStatus
()));
insurantDto
.
setPolicyholderMobile
(
dto
.
getMobileCode
()
+
"-"
+
dto
.
getMobile
());
insurantDto
.
setPolicyholderName
(
dto
.
getName
());
insurantDto
.
setPolicyholderNameEn
(
dto
.
getNameEn
());
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelSecondHolderDto.java
View file @
bad8b7e3
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.Data
;
import
org.springframework.beans.BeanUtils
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* 第二持有人资料
...
...
@@ -80,15 +83,18 @@ public class ApiExcelSecondHolderDto {
* @param dto
* @return
*/
public
static
ApiExcelSecondHolderDto
setApiExcelSecondHolderDto
(
ApiExcelSecondHolderDto
dto
)
{
public
static
ApiExcelSecondHolderDto
setApiExcelSecondHolderDto
(
ApiExcelSecondHolderDto
dto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
ApiExcelSecondHolderDto
secondHolderDto
=
new
ApiExcelSecondHolderDto
();
BeanUtils
.
copyProperties
(
dto
,
secondHolderDto
);
secondHolderDto
.
setSecondHolderBirthTime
(
DateUtil
.
getyyyyMMdd
(
dto
.
getBirthTime
()));
//性別(第二持有人信息表:性别)字典 TODO
secondHolderDto
.
setSecondHolderGender
(
dto
.
getGender
());
//性別(第二持有人信息表:性别)字典
secondHolderDto
.
setSecondHolderGender
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getGender
()));
secondHolderDto
.
setSecondHolderIdNumber
(
dto
.
getIdNumber
());
//與受保人關係(第二持有人信息表:与受保人关系(字典)) TODO
secondHolderDto
.
setSecondHolderInsurantRel
(
dto
.
getInsurantRel
());
//與受保人關係(第二持有人信息表:与受保人关系(字典))
secondHolderDto
.
setSecondHolderInsurantRel
(
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_REL
.
getItemValue
(),
dto
.
getInsurantRel
()));
secondHolderDto
.
setSecondHolderName
(
dto
.
getName
());
secondHolderDto
.
setSecondHolderNameEn
(
dto
.
getNameEn
());
return
secondHolderDto
;
...
...
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