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
13c9c6a6
Commit
13c9c6a6
authored
Sep 11, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fna接口23
parent
246eb490
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
26 deletions
+74
-26
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
+11
-11
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaUpdateRequest.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/dto/PersonalData.java
+5
-5
yd-csf-service/src/main/java/com/yd/csf/service/model/Customer.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+38
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaFormServiceImpl.java
+15
-4
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
+3
-3
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
View file @
13c9c6a6
...
@@ -48,7 +48,7 @@ public class CustomerAddRequest implements Serializable {
...
@@ -48,7 +48,7 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 名字拼音
* 名字拼音
*/
*/
@Schema
(
description
=
"名字
拼音"
)
@Schema
(
description
=
"名字
-英文"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
firstNamePinyin
;
private
String
firstNamePinyin
;
/**
/**
...
@@ -60,7 +60,7 @@ public class CustomerAddRequest implements Serializable {
...
@@ -60,7 +60,7 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 称谓
* 称谓
*/
*/
@Schema
(
description
=
"称谓 字典值: csf_customer_title"
)
@Schema
(
description
=
"称谓 字典值: csf_customer_title"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
title
;
private
String
title
;
/**
/**
...
@@ -90,7 +90,7 @@ public class CustomerAddRequest implements Serializable {
...
@@ -90,7 +90,7 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 年龄
* 年龄
*/
*/
@Schema
(
description
=
"年龄"
)
@Schema
(
description
=
"年龄"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
age
;
private
String
age
;
/**
/**
...
@@ -102,13 +102,13 @@ public class CustomerAddRequest implements Serializable {
...
@@ -102,13 +102,13 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 电话号码
* 电话号码
*/
*/
@Schema
(
description
=
"电话号码"
)
@Schema
(
description
=
"电话号码"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
phone
;
private
String
phone
;
/**
/**
* 电子邮箱
* 电子邮箱
*/
*/
@Schema
(
description
=
"电子邮箱"
)
@Schema
(
description
=
"电子邮箱"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
email
;
private
String
email
;
/**
/**
...
@@ -124,9 +124,9 @@ public class CustomerAddRequest implements Serializable {
...
@@ -124,9 +124,9 @@ public class CustomerAddRequest implements Serializable {
private
String
smokeQuantity
;
private
String
smokeQuantity
;
/**
/**
*
公司类型
*
行业
*/
*/
@Schema
(
description
=
"
公司类型"
)
@Schema
(
description
=
"
行业"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
companyType
;
private
String
companyType
;
/**
/**
...
@@ -162,7 +162,7 @@ public class CustomerAddRequest implements Serializable {
...
@@ -162,7 +162,7 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 婚姻状况
* 婚姻状况
*/
*/
@Schema
(
description
=
"婚姻状况 字典值: csf_marriage"
)
@Schema
(
description
=
"婚姻状况 字典值: csf_marriage"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
Object
marriage
;
private
Object
marriage
;
/**
/**
...
@@ -174,13 +174,13 @@ public class CustomerAddRequest implements Serializable {
...
@@ -174,13 +174,13 @@ public class CustomerAddRequest implements Serializable {
/**
/**
* 教育程度
* 教育程度
*/
*/
@Schema
(
description
=
"教育程度 字典值: csf_education"
)
@Schema
(
description
=
"教育程度 字典值: csf_education"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
Object
education
;
private
Object
education
;
/**
/**
* 国
家
* 国
籍 (国家/地区)
*/
*/
@Schema
(
description
=
"国
家"
)
@Schema
(
description
=
"国
籍 (国家/地区)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
country
;
private
String
country
;
// region 客户扩展信息
// region 客户扩展信息
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaUpdateRequest.java
View file @
13c9c6a6
...
@@ -15,7 +15,7 @@ public class FnaUpdateRequest implements Serializable {
...
@@ -15,7 +15,7 @@ public class FnaUpdateRequest implements Serializable {
/**
/**
* fna唯一业务ID
* fna唯一业务ID
*/
*/
@Schema
(
description
=
"fna唯一业务ID"
,
nullable
=
true
)
@Schema
(
description
=
"fna唯一业务ID"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
fnaBizId
;
private
String
fnaBizId
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/PersonalData.java
View file @
13c9c6a6
...
@@ -5,25 +5,25 @@ import lombok.Data;
...
@@ -5,25 +5,25 @@ import lombok.Data;
@Data
@Data
public
class
PersonalData
{
public
class
PersonalData
{
@Schema
(
description
=
"陪同顾问姓名"
)
@Schema
(
description
=
"陪同顾问姓名"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
accountName
;
private
String
accountName
;
@Schema
(
description
=
"陪同顾问手机号"
)
@Schema
(
description
=
"陪同顾问手机号"
)
private
String
accountPhone
;
private
String
accountPhone
;
@Schema
(
description
=
"理财顾问注册编号"
)
@Schema
(
description
=
"理财顾问注册编号"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
registrationNumber
;
private
String
registrationNumber
;
@Schema
(
description
=
"理财顾问内部编码"
)
@Schema
(
description
=
"理财顾问内部编码"
)
private
String
number
;
private
String
number
;
@Schema
(
description
=
"客户姓名"
)
@Schema
(
description
=
"客户姓名"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
customerName
;
private
String
customerName
;
@Schema
(
description
=
"税务国家"
)
@Schema
(
description
=
"税务国家"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
taxCountry
;
private
String
taxCountry
;
@Schema
(
description
=
"就业情况"
)
@Schema
(
description
=
"就业情况"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
employment
;
private
String
employment
;
@Schema
(
description
=
"其他就业情况"
)
@Schema
(
description
=
"其他就业情况"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Customer.java
View file @
13c9c6a6
...
@@ -57,7 +57,7 @@ public class Customer implements Serializable {
...
@@ -57,7 +57,7 @@ public class Customer implements Serializable {
private
String
lastNamePinyin
;
private
String
lastNamePinyin
;
/**
/**
* 名字
拼音
* 名字
-英文
*/
*/
private
String
firstNamePinyin
;
private
String
firstNamePinyin
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
13c9c6a6
...
@@ -138,10 +138,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -138,10 +138,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
}
}
// 客户主表信息
// 客户主表信息
Customer
customer
=
new
Customer
();
Customer
customer
=
new
Customer
();
BeanUtils
.
copyProperties
(
customerAddRequest
,
customer
);
BeanUtils
.
copyProperties
(
customerAddRequest
,
customer
);
// 校验客户主表信息
validCustomer
(
customer
);
// 客户扩展表信息
// 客户扩展表信息
CustomerExpand
customerExpand
=
customerService
.
getCustomerExpand
(
customerAddRequest
);
CustomerExpand
customerExpand
=
customerService
.
getCustomerExpand
(
customerAddRequest
);
...
@@ -178,6 +180,41 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -178,6 +180,41 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
return
map
;
return
map
;
}
}
private
void
validCustomer
(
Customer
customer
)
{
String
firstNamePinyin
=
customer
.
getFirstNamePinyin
();
if
(
StringUtils
.
isBlank
(
firstNamePinyin
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"名字-英文不能为空"
);
}
String
phone
=
customer
.
getPhone
();
if
(
StringUtils
.
isBlank
(
phone
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"客户手机号不能为空"
);
}
String
title
=
customer
.
getTitle
();
if
(
StringUtils
.
isBlank
(
title
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"称谓不能为空"
);
}
String
age
=
customer
.
getAge
();
if
(
StringUtils
.
isBlank
(
age
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"年龄不能为空"
);
}
String
companyType
=
customer
.
getCompanyType
();
if
(
StringUtils
.
isBlank
(
companyType
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"行业不能为空"
);
}
Object
marriage
=
customer
.
getMarriage
();
if
(
marriage
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"婚姻状况不能为空"
);
}
String
country
=
customer
.
getCountry
();
if
(
StringUtils
.
isBlank
(
country
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"国籍不能为空"
);
}
Object
education
=
customer
.
getEducation
();
if
(
education
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"教育程度不能为空"
);
}
}
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaFormServiceImpl.java
View file @
13c9c6a6
...
@@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.dao.FnaFormMapper
;
import
com.yd.csf.service.dao.FnaFormMapper
;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.model.FnaForm
;
import
com.yd.csf.service.model.FnaForm
;
import
com.yd.csf.service.service.FnaFormService
;
import
com.yd.csf.service.service.FnaFormService
;
import
com.yd.csf.service.utils.ValidateUtil
;
import
com.yd.csf.service.vo.FnaFormVO
;
import
com.yd.csf.service.vo.FnaFormVO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -125,19 +127,23 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -125,19 +127,23 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
}
}
Object
familyMembers
=
fnaForm
.
getFamilyMembers
();
Object
familyMembers
=
fnaForm
.
getFamilyMembers
();
if
(
familyMembers
!=
null
)
{
if
(
familyMembers
!=
null
)
{
fnaFormVO
.
setFamilyMembers
(
GSON
.
fromJson
(
familyMembers
.
toString
(),
FamilyMembers
.
class
));
fnaFormVO
.
setFamilyMembers
(
GSON
.
fromJson
(
familyMembers
.
toString
(),
new
TypeToken
<
List
<
FamilyMember
>>()
{
}.
getType
()));
}
}
Object
existingSecurityOwner
=
fnaForm
.
getExistingSecurityOwner
();
Object
existingSecurityOwner
=
fnaForm
.
getExistingSecurityOwner
();
if
(
existingSecurityOwner
!=
null
)
{
if
(
existingSecurityOwner
!=
null
)
{
fnaFormVO
.
setExistingSecurityOwner
(
GSON
.
fromJson
(
existingSecurityOwner
.
toString
(),
ExistingSecuritys
.
class
));
fnaFormVO
.
setExistingSecurityOwner
(
GSON
.
fromJson
(
existingSecurityOwner
.
toString
(),
new
TypeToken
<
List
<
ExistingSecurity
>>()
{
}.
getType
()));
}
}
Object
existingSecurityInsured
=
fnaForm
.
getExistingSecurityInsured
();
Object
existingSecurityInsured
=
fnaForm
.
getExistingSecurityInsured
();
if
(
existingSecurityInsured
!=
null
)
{
if
(
existingSecurityInsured
!=
null
)
{
fnaFormVO
.
setExistingSecurityInsured
(
GSON
.
fromJson
(
existingSecurityInsured
.
toString
(),
ExistingSecuritys
.
class
));
fnaFormVO
.
setExistingSecurityInsured
(
GSON
.
fromJson
(
existingSecurityInsured
.
toString
(),
new
TypeToken
<
List
<
ExistingSecurity
>>()
{
}.
getType
()));
}
}
Object
ownerAssets
=
fnaForm
.
getOwnerAssets
();
Object
ownerAssets
=
fnaForm
.
getOwnerAssets
();
if
(
ownerAssets
!=
null
)
{
if
(
ownerAssets
!=
null
)
{
fnaFormVO
.
setOwnerAssets
(
GSON
.
fromJson
(
ownerAssets
.
toString
(),
OwnerAssets
.
class
));
fnaFormVO
.
setOwnerAssets
(
GSON
.
fromJson
(
ownerAssets
.
toString
(),
new
TypeToken
<
OwnerAssets
>()
{
}.
getType
()));
}
}
Object
monthlyIncome
=
fnaForm
.
getCompanyBusinessData
();
Object
monthlyIncome
=
fnaForm
.
getCompanyBusinessData
();
if
(
monthlyIncome
!=
null
)
{
if
(
monthlyIncome
!=
null
)
{
...
@@ -176,6 +182,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -176,6 +182,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
if
(
fnaFormAddRequest
==
null
)
{
if
(
fnaFormAddRequest
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
}
}
PersonalData
personalData
=
fnaFormAddRequest
.
getPersonalData
();
if
(
personalData
==
null
||
ValidateUtil
.
isAllFieldsNull
(
personalData
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"个人资料不能为空"
);
}
}
}
@Override
@Override
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
View file @
13c9c6a6
...
@@ -47,19 +47,19 @@ public class FnaFormVO implements Serializable {
...
@@ -47,19 +47,19 @@ public class FnaFormVO implements Serializable {
* 家庭状况
* 家庭状况
*/
*/
@Schema
(
description
=
"家庭状况"
)
@Schema
(
description
=
"家庭状况"
)
private
FamilyMembers
familyMembers
;
private
List
<
FamilyMember
>
familyMembers
;
/**
/**
* 保单持有人个人已有保障
* 保单持有人个人已有保障
*/
*/
@Schema
(
description
=
"保单持有人个人已有保障"
)
@Schema
(
description
=
"保单持有人个人已有保障"
)
private
ExistingSecuritys
existingSecurityOwner
;
private
List
<
ExistingSecurity
>
existingSecurityOwner
;
/**
/**
* 受保人个人已有保障
* 受保人个人已有保障
*/
*/
@Schema
(
description
=
"受保人个人已有保障"
)
@Schema
(
description
=
"受保人个人已有保障"
)
private
ExistingSecuritys
existingSecurityInsured
;
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
/**
/**
* 平均月收入
* 平均月收入
...
...
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