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
89dcba49
Commit
89dcba49
authored
Oct 13, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
eba11680
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
198 additions
and
6 deletions
+198
-6
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
+35
-2
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelImportAppointmentDto.java
+163
-4
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
View file @
89dcba49
...
...
@@ -14,8 +14,7 @@ import com.yd.common.utils.RandomStringGenerator;
import
com.yd.common.utils.RedisUtil
;
import
com.yd.csf.api.service.ApiAppointmentFileService
;
import
com.yd.csf.api.service.ApiAppointmentService
;
import
com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto
;
import
com.yd.csf.feign.dto.appointment.ApiProductPlanMainInfoDto
;
import
com.yd.csf.feign.dto.appointment.*
;
import
com.yd.csf.feign.dto.appointmentfile.ApiAppointmentFileDto
;
import
com.yd.csf.feign.dto.excel.*
;
import
com.yd.csf.feign.request.appointmentfile.ApiAppointmentFileAddRequest
;
...
...
@@ -374,10 +373,44 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
=
new
ApiProductPlanMainInfoDto
();
if
(!
Objects
.
isNull
(
productPlan
))
{
BeanUtils
.
copyProperties
(
productPlan
,
apiProductPlanMainInfoDto
);
apiProductPlanMainInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiProductPlanMainInfoDto
(
appointmentDto
,
apiProductPlanMainInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiProductPlanMainInfoDto
,
productPlan
);
iProductPlanService
.
saveOrUpdate
(
productPlan
);
}
//编辑更新附加计划(附加险列表)TODO
//编辑更新投保人信息
//查询投保人信息
Policyholder
policyholder
=
iPolicyholderService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
=
new
ApiPolicyholderInfoDto
();
if
(!
Objects
.
isNull
(
policyholder
))
{
BeanUtils
.
copyProperties
(
policyholder
,
apiPolicyholderInfoDto
);
apiPolicyholderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiPolicyholderInfoDto
(
appointmentDto
,
apiPolicyholderInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiPolicyholderInfoDto
,
policyholder
);
iPolicyholderService
.
saveOrUpdate
(
policyholder
);
}
//编辑更新受保人信息
//查询受保人信息
Insurant
insurant
=
iInsurantService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
ApiInsurantInfoDto
apiInsurantInfoDto
=
new
ApiInsurantInfoDto
();
if
(!
Objects
.
isNull
(
insurant
))
{
BeanUtils
.
copyProperties
(
insurant
,
apiInsurantInfoDto
);
apiInsurantInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiInsurantInfoDto
(
appointmentDto
,
apiInsurantInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
insurant
);
iInsurantService
.
saveOrUpdate
(
insurant
);
}
//编辑更新第二持有人信息
//查询第二持有人信息
SecondHolder
secondHolder
=
iSecondHolderService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
=
new
ApiSecondHolderInfoDto
();
if
(!
Objects
.
isNull
(
secondHolder
))
{
BeanUtils
.
copyProperties
(
secondHolder
,
apiSecondHolderInfoDto
);
apiSecondHolderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiSecondHolderInfoDto
(
appointmentDto
,
apiSecondHolderInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiSecondHolderInfoDto
,
secondHolder
);
iSecondHolderService
.
saveOrUpdate
(
secondHolder
);
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelImportAppointmentDto.java
View file @
89dcba49
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.utils.ChineseTextConverter
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.common.utils.StringUtil
;
import
com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto
;
import
com.yd.csf.feign.dto.appointment.ApiProductPlanMainInfoDto
;
import
com.yd.csf.feign.dto.appointment.*
;
import
com.yd.oss.feign.annotation.ExcelCollection
;
import
com.yd.oss.feign.annotation.ExcelField
;
import
com.yd.oss.feign.annotation.ExcelSheet
;
...
...
@@ -121,7 +121,7 @@ public class ApiExcelImportAppointmentDto {
* (銀聯/信用卡/銀行現金入數/現金/支票/電匯轉賬/銀行本票/銀行轉賬/銀行自動轉賬/其他)
* (首期付款方式(字典) )(产品计划信息表)
*/
@ExcelField
(
name
=
"
是否預繳保費
"
,
titleRow
=
25
,
titleCol
=
0
,
valueRow
=
25
,
valueCol
=
1
)
@ExcelField
(
name
=
"
首期保费缴付方式
"
,
titleRow
=
25
,
titleCol
=
0
,
valueRow
=
25
,
valueCol
=
1
)
private
String
planInitialPaymentMethod
;
/**
...
...
@@ -510,7 +510,7 @@ public class ApiExcelImportAppointmentDto {
* @param infoDto
* @return
*/
public
static
ApiProductPlanMainInfoDto
buildApi
Appointment
InfoDto
(
ApiExcelImportAppointmentDto
dto
,
public
static
ApiProductPlanMainInfoDto
buildApi
ProductPlanMain
InfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiProductPlanMainInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//保险公司名称
...
...
@@ -522,7 +522,166 @@ public class ApiExcelImportAppointmentDto {
//红利分配方式(字典)
infoDto
.
setDividendDistributionMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_DIVIDEND
.
getItemValue
(),
dto
.
getPlanDividendDistributionMethod
()));
//每期保费->主險每期保费金额(每期保费)(产品计划信息表)
infoDto
.
setEachIssuePremium
(
dto
.
getPlanEachIssuePremium
());
//首期付款方式->首期保费缴付方式
infoDto
.
setInitialPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getPlanInitialPaymentMethod
()));
//是否参加递增保障权益->是否參加遞增保障權益/通脹加保權益
infoDto
.
setIsJoin
(
Integer
.
valueOf
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_NO_YES
.
getItemValue
(),
dto
.
getPlanIsJoin
())));
//是否预缴保费->是否預繳保費 (如是,請填寫首期保費以外的剩餘保費)(是否预缴保费: 0-否, 1-是(字典)(产品计划信息表))
infoDto
.
setIsPrepay
(
Integer
.
valueOf
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_NO_YES
.
getItemValue
(),
dto
.
getPlanIsPrepay
())));
//付款频率
infoDto
.
setPaymentFrequency
(
dto
.
getPlanPaymentFrequency
());
//供款年期
infoDto
.
setPaymentTerm
(
dto
.
getPlanPaymentTerm
());
//保险产品名称->基本計劃名稱
infoDto
.
setProductName
(
dto
.
getPlanProductName
());
//续期付款方式
infoDto
.
setRenewalPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getPlanRenewalPaymentMethod
()));
//保额
infoDto
.
setSumInsured
(
dto
.
getPlanSumInsured
());
return
infoDto
;
}
/**
* 构造投保人信息
* @param dto
* @param infoDto
* @return
*/
public
static
ApiPolicyholderInfoDto
buildApiPolicyholderInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiPolicyholderInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期->出生日期 (西元 年/月/日)(投保人信息表:出生日期)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getPolicyholderBirthday
()));
//出生地
infoDto
.
setBirthplace
(
dto
.
getPolicyholderBirthplace
());
//公司地址
infoDto
.
setCompanyAddress
(
dto
.
getPolicyholderCompanyAddress
());
//现时每月收入->现时每月收入 (HKD)(投保人信息表:现时每月收入)
infoDto
.
setCurrentMonthlyIncome
(
dto
.
getPolicyholderCurrentMonthlyIncome
());
//受雇于现职年期->工作年期(僅限數字)(投保人信息表:总工作年期)
infoDto
.
setCurrentTenure
(
dto
.
getPolicyholderTotalWorkingYears
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getPolicyholderEducationLevel
())));
//邮箱
infoDto
.
setEmail
(
dto
.
getPolicyholderEmail
());
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getPolicyholderGender
()));
//证件号码->身份证号码
infoDto
.
setIdNumber
(
dto
.
getPolicyholderIdNumber
());
//过往一年是否所属国家以外地区居住超过182日 TODO
// infoDto.setIsExceed();
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getPolicyholderMailingAddress
());
//婚姻状况(字典)
infoDto
.
setMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getPolicyholderMaritalStatus
())));
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
0
));
//名字->中文姓名(投保人信息表:名字)
infoDto
.
setName
(
dto
.
getPolicyholderName
());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto
.
setNameEn
(
dto
.
getPolicyholderNameEn
());
//国籍
infoDto
.
setNationality
(
dto
.
getPolicyholderNationality
());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)
infoDto
.
setPassNo
(
dto
.
getPolicyholderPassNo
());
infoDto
.
setPassportNo
(
dto
.
getPolicyholderPassportNo
());
//职位
infoDto
.
setPosition
(
dto
.
getPolicyholderPosition
());
//居住地址->永久(住宅)地址(投保人信息表:居住地址)
infoDto
.
setResidentialAddress
(
dto
.
getPolicyholderResidentialAddress
());
//总工作年期
infoDto
.
setTotalWorkingYears
(
dto
.
getPolicyholderTotalWorkingYears
());
return
infoDto
;
}
/**
* 构造受保人信息
* @param dto
* @param infoDto
* @return
*/
public
static
ApiInsurantInfoDto
buildApiInsurantInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiInsurantInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期->出生日期 (西元 年/月/日)(投保人信息表:出生日期)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getInsurantBirthday
()));
//出生地
infoDto
.
setBirthplace
(
dto
.
getInsurantBirthplace
());
//公司地址
infoDto
.
setCompanyAddress
(
dto
.
getInsurantCompanyAddress
());
//现时每月收入->现时每月收入 (HKD)(投保人信息表:现时每月收入)
infoDto
.
setCurrentMonthlyIncome
(
dto
.
getInsurantCurrentMonthlyIncome
());
//受雇于现职年期->工作年期(僅限數字)(投保人信息表:总工作年期)
infoDto
.
setCurrentTenure
(
dto
.
getInsurantTotalWorkingYears
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantEducationLevel
())));
//邮箱
infoDto
.
setEmail
(
dto
.
getInsurantEmail
());
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getInsurantGender
()));
//证件号码->身份证号码
infoDto
.
setIdNumber
(
dto
.
getInsurantIdNumber
());
//过往一年是否所属国家以外地区居住超过182日 TODO
// infoDto.setIsExceed();
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getInsurantMailingAddress
());
//婚姻状况(字典)
infoDto
.
setMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantMaritalStatus
())));
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
0
));
//名字->中文姓名(投保人信息表:名字)
infoDto
.
setName
(
dto
.
getInsurantName
());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto
.
setNameEn
(
dto
.
getInsurantNameEn
());
//国籍
infoDto
.
setNationality
(
dto
.
getInsurantNationality
());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)
infoDto
.
setPassNo
(
dto
.
getInsurantPassNo
());
infoDto
.
setPassportNo
(
dto
.
getInsurantPassportNo
());
//职位
infoDto
.
setPosition
(
dto
.
getInsurantPosition
());
//居住地址->永久(住宅)地址(投保人信息表:居住地址)
infoDto
.
setResidentialAddress
(
dto
.
getInsurantResidentialAddress
());
//总工作年期
infoDto
.
setTotalWorkingYears
(
dto
.
getInsurantTotalWorkingYears
());
return
infoDto
;
}
/**
* 构造第二持有人信息
* @param dto
* @param infoDto
* @return
*/
public
static
ApiSecondHolderInfoDto
buildApiSecondHolderInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiSecondHolderInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期
infoDto
.
setBirthTime
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getSecondHolderBirthTime
()));
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getSecondHolderGender
()));
//身份证号码
infoDto
.
setIdNumber
(
dto
.
getSecondHolderIdNumber
());
//与受保人关系(字典)
infoDto
.
setInsurantRel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_REL
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getSecondHolderInsurantRel
())));
//名字
infoDto
.
setName
(
dto
.
getSecondHolderName
());
//名字-英文
infoDto
.
setNameEn
(
dto
.
getSecondHolderNameEn
());
return
infoDto
;
}
}
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