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
d193adac
Commit
d193adac
authored
Sep 19, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fna接口42
parent
6c418256
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
149 additions
and
141 deletions
+149
-141
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFnaFormController.java
+19
-23
yd-csf-service/src/main/java/com/yd/csf/service/dao/FnaFormMapper.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormAddRequest.java
+12
-26
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormOther.java
+11
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormUpdateRequest.java
+12
-26
yd-csf-service/src/main/java/com/yd/csf/service/dto/IncomeExpense.java
+19
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/LiquidAssets.java
+25
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/PersonalData.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/FnaForm.java
+9
-24
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaFormServiceImpl.java
+25
-11
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
+9
-21
yd-csf-service/src/main/resources/mappers/FnaFormMapper.xml
+6
-8
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFnaFormController.java
View file @
d193adac
package
com
.
yd
.
csf
.
api
.
controller
;
package
com
.
yd
.
csf
.
api
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.utils.SecurityUtil
;
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.exception.BusinessException
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
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.dto.FnaFormAddRequest
;
import
com.yd.csf.service.dto.FnaFormAddRequest
;
import
com.yd.csf.service.dto.FnaFormQueryRequest
;
import
com.yd.csf.service.dto.FnaFormUpdateRequest
;
import
com.yd.csf.service.dto.FnaFormUpdateRequest
;
import
com.yd.csf.service.dto.FnaUpdateRequest
;
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.vo.FnaFormVO
;
import
com.yd.csf.service.vo.FnaFormVO
;
...
@@ -19,7 +16,6 @@ import com.yd.user.feign.client.sysuser.ApiSysUserFeignClient;
...
@@ -19,7 +16,6 @@ import com.yd.user.feign.client.sysuser.ApiSysUserFeignClient;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -55,11 +51,11 @@ public class ApiFnaFormController {
...
@@ -55,11 +51,11 @@ public class ApiFnaFormController {
public
Result
<
Map
<
String
,
Object
>>
addFnaForm
(
@RequestBody
FnaFormAddRequest
fnaFormAddRequest
,
HttpServletRequest
request
)
{
public
Result
<
Map
<
String
,
Object
>>
addFnaForm
(
@RequestBody
FnaFormAddRequest
fnaFormAddRequest
,
HttpServletRequest
request
)
{
if
(
fnaFormAddRequest
==
null
)
{
if
(
fnaFormAddRequest
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
Error
Code
.
PARAMS_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
Result
Code
.
PARAMS_ERROR
.
getMessage
());
}
}
String
saveType
=
fnaFormAddRequest
.
getSaveType
();
String
saveType
=
fnaFormAddRequest
.
getSaveType
();
if
(
StringUtils
.
isBlank
(
saveType
))
{
if
(
StringUtils
.
isBlank
(
saveType
))
{
return
Result
.
fail
(
Error
Code
.
PARAMS_ERROR
.
getCode
(),
"保存方式必传"
);
return
Result
.
fail
(
Result
Code
.
PARAMS_ERROR
.
getCode
(),
"保存方式必传"
);
}
}
// 校验
// 校验
fnaFormService
.
validFnaFormAdd
(
fnaFormAddRequest
.
getPersonalData
(),
saveType
);
fnaFormService
.
validFnaFormAdd
(
fnaFormAddRequest
.
getPersonalData
(),
saveType
);
...
@@ -81,7 +77,7 @@ public class ApiFnaFormController {
...
@@ -81,7 +77,7 @@ public class ApiFnaFormController {
// 写入数据库
// 写入数据库
boolean
result
=
fnaFormService
.
save
(
fnaForm
);
boolean
result
=
fnaFormService
.
save
(
fnaForm
);
if
(!
result
)
{
if
(!
result
)
{
return
Result
.
fail
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
FAIL
.
getCode
(),
ResultCode
.
FAIL
.
getMessage
());
}
}
// 返回新写入的数据 id
// 返回新写入的数据 id
...
@@ -101,20 +97,20 @@ public class ApiFnaFormController {
...
@@ -101,20 +97,20 @@ public class ApiFnaFormController {
// @PostMapping("/delete")
// @PostMapping("/delete")
// public Result<Boolean> deleteFna(@RequestBody DeleteRequest deleteRequest, HttpServletRequest request) {
// public Result<Boolean> deleteFna(@RequestBody DeleteRequest deleteRequest, HttpServletRequest request) {
// if (deleteRequest == null || deleteRequest.getId() <= 0) {
// if (deleteRequest == null || deleteRequest.getId() <= 0) {
// throw new BusinessException(
Error
Code.PARAMS_ERROR);
// throw new BusinessException(
Result
Code.PARAMS_ERROR);
// }
// }
// User user = userService.getLoginUser(request);
// User user = userService.getLoginUser(request);
// long id = deleteRequest.getId();
// long id = deleteRequest.getId();
// // 判断是否存在
// // 判断是否存在
// FnaForm oldFna = fnaFormService.getById(id);
// FnaForm oldFna = fnaFormService.getById(id);
// ThrowUtils.throwIf(oldFna == null,
ErrorCode.NOT_FOUND
_ERROR);
// ThrowUtils.throwIf(oldFna == null,
ResultCode.NULL
_ERROR);
// // 仅本人或管理员可删除
// // 仅本人或管理员可删除
// if (!oldFna.getUserId().equals(user.getId()) && !userService.isAdmin(request)) {
// if (!oldFna.getUserId().equals(user.getId()) && !userService.isAdmin(request)) {
// throw new BusinessException(
Error
Code.NO_AUTH_ERROR);
// throw new BusinessException(
Result
Code.NO_AUTH_ERROR);
// }
// }
// // 操作数据库
// // 操作数据库
// boolean result = fnaFormService.removeById(id);
// boolean result = fnaFormService.removeById(id);
// ThrowUtils.throwIf(!result,
ErrorCode.OPERATION_ERROR
);
// ThrowUtils.throwIf(!result,
ResultCode.FAIL
);
// return Result.success(true);
// return Result.success(true);
// }
// }
...
@@ -128,11 +124,17 @@ public class ApiFnaFormController {
...
@@ -128,11 +124,17 @@ public class ApiFnaFormController {
@Operation
(
summary
=
"更新 Fna表单"
)
@Operation
(
summary
=
"更新 Fna表单"
)
public
Result
<
Boolean
>
updateFnaForm
(
@RequestBody
FnaFormUpdateRequest
fnaUpdateRequest
)
{
public
Result
<
Boolean
>
updateFnaForm
(
@RequestBody
FnaFormUpdateRequest
fnaUpdateRequest
)
{
if
(
fnaUpdateRequest
==
null
||
StringUtils
.
isBlank
(
fnaUpdateRequest
.
getFnaFormBizId
()))
{
if
(
fnaUpdateRequest
==
null
||
StringUtils
.
isBlank
(
fnaUpdateRequest
.
getFnaFormBizId
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
Error
Code
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
Result
Code
.
PARAMS_ERROR
.
getMessage
());
}
}
String
saveType
=
fnaUpdateRequest
.
getSaveType
();
String
saveType
=
fnaUpdateRequest
.
getSaveType
();
if
(
StringUtils
.
isBlank
(
saveType
))
{
if
(
StringUtils
.
isBlank
(
saveType
))
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"保存方式必传"
);
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保存方式必传"
);
}
// 判断是否存在
String
fnaFormBizId
=
fnaUpdateRequest
.
getFnaFormBizId
();
FnaForm
oldFna
=
fnaFormService
.
getByFnaFormBizId
(
fnaFormBizId
);
if
(
oldFna
==
null
)
{
return
Result
.
fail
(
ResultCode
.
NULL_ERROR
.
getCode
(),
ResultCode
.
NULL_ERROR
.
getMessage
());
}
}
// 校验
// 校验
fnaFormService
.
validFnaFormAdd
(
fnaUpdateRequest
.
getPersonalData
(),
saveType
);
fnaFormService
.
validFnaFormAdd
(
fnaUpdateRequest
.
getPersonalData
(),
saveType
);
...
@@ -140,16 +142,10 @@ public class ApiFnaFormController {
...
@@ -140,16 +142,10 @@ public class ApiFnaFormController {
FnaForm
fnaForm
=
fnaFormService
.
getFnaForm
(
fnaUpdateRequest
);
FnaForm
fnaForm
=
fnaFormService
.
getFnaForm
(
fnaUpdateRequest
);
// 表单状态
// 表单状态
fnaForm
.
setFnaFormStatus
(
"save"
.
equals
(
saveType
)?
"COMPLETED"
:
"UNCOMPLETED"
);
fnaForm
.
setFnaFormStatus
(
"save"
.
equals
(
saveType
)?
"COMPLETED"
:
"UNCOMPLETED"
);
// 判断是否存在
String
fnaFormBizId
=
fnaUpdateRequest
.
getFnaFormBizId
();
FnaForm
oldFna
=
fnaFormService
.
getByFnaFormBizId
(
fnaFormBizId
);
if
(
oldFna
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
NOT_FOUND_ERROR
.
getCode
(),
ErrorCode
.
NOT_FOUND_ERROR
.
getMessage
());
}
// 操作数据库
// 操作数据库
boolean
result
=
fnaFormService
.
updateById
(
fnaForm
);
boolean
result
=
fnaFormService
.
updateById
(
fnaForm
);
if
(!
result
)
{
if
(!
result
)
{
return
Result
.
fail
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
FAIL
.
getCode
(),
ResultCode
.
FAIL
.
getMessage
());
}
}
return
Result
.
success
(
true
);
return
Result
.
success
(
true
);
}
}
...
@@ -164,12 +160,12 @@ public class ApiFnaFormController {
...
@@ -164,12 +160,12 @@ public class ApiFnaFormController {
@Operation
(
summary
=
"根据 fnaFormBizId 获取Fna表单详情"
)
@Operation
(
summary
=
"根据 fnaFormBizId 获取Fna表单详情"
)
public
Result
<
FnaFormVO
>
getFnaFormVOByFnaFormBizId
(
String
fnaFormBizId
,
HttpServletRequest
request
)
{
public
Result
<
FnaFormVO
>
getFnaFormVOByFnaFormBizId
(
String
fnaFormBizId
,
HttpServletRequest
request
)
{
if
(
fnaFormBizId
==
null
)
{
if
(
fnaFormBizId
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
Error
Code
.
PARAMS_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
Result
Code
.
PARAMS_ERROR
.
getMessage
());
}
}
// 查询数据库
// 查询数据库
FnaForm
fnaForm
=
fnaFormService
.
getByFnaFormBizId
(
fnaFormBizId
);
FnaForm
fnaForm
=
fnaFormService
.
getByFnaFormBizId
(
fnaFormBizId
);
if
(
fnaForm
==
null
)
{
if
(
fnaForm
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
NOT_FOUND_ERROR
.
getCode
(),
ErrorCode
.
NOT_FOUND
_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
NULL_ERROR
.
getCode
(),
ResultCode
.
NULL
_ERROR
.
getMessage
());
}
}
// 获取封装类
// 获取封装类
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dao/FnaFormMapper.java
View file @
d193adac
...
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author Zhang Jianan
* @author Zhang Jianan
* @description 针对表【fna_form(fna表单表)】的数据库操作Mapper
* @description 针对表【fna_form(fna表单表)】的数据库操作Mapper
* @createDate 2025-09-05 11:19:10
* @createDate 2025-09-05 11:19:10
* @Entity
generator.domain
.FnaForm
* @Entity
com.yd.csf.service.model
.FnaForm
*/
*/
public
interface
FnaFormMapper
extends
BaseMapper
<
FnaForm
>
{
public
interface
FnaFormMapper
extends
BaseMapper
<
FnaForm
>
{
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormAddRequest.java
View file @
d193adac
...
@@ -48,34 +48,16 @@ public class FnaFormAddRequest implements Serializable {
...
@@ -48,34 +48,16 @@ public class FnaFormAddRequest implements Serializable {
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
/**
/**
*
平均月收入
*
收支情况
*/
*/
@Schema
(
description
=
"
在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等
"
)
@Schema
(
description
=
"
收支情况
"
)
private
String
monthlyIncom
e
;
private
IncomeExpense
incomeExpens
e
;
/**
/**
*
平均月支出
*
流动资产
*/
*/
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为?"
)
@Schema
(
description
=
"流动资产"
)
private
String
monthlyExpense
;
private
LiquidAssets
liquidAssets
;
/**
* 累积流动资产
*/
@Schema
(
description
=
"您现时的累积流动资产约有多少?"
)
private
String
liquidAssets
;
/**
* 流动资产种类
*/
@Schema
(
description
=
"流动资产种类,多选逗号隔开 字典值:csf_liquid_asset_type"
)
private
String
liquidAssetType
;
/**
* 其他流动资产的说明
*/
@Schema
(
description
=
"其他流动资产的说明"
)
private
String
otherLiquidAsset
;
/**
/**
* 保单持有人资产
* 保单持有人资产
...
@@ -89,8 +71,11 @@ public class FnaFormAddRequest implements Serializable {
...
@@ -89,8 +71,11 @@ public class FnaFormAddRequest implements Serializable {
@Schema
(
description
=
"公司业务资料"
)
@Schema
(
description
=
"公司业务资料"
)
private
CompanyBusinessData
companyBusinessData
;
private
CompanyBusinessData
companyBusinessData
;
@Schema
(
description
=
"首期及续保保费的财富来源,单选 字典值:csf_premium_funding_source"
)
/**
private
String
premiumFundingSource
;
* 其他问题
*/
@Schema
(
description
=
"Fna表单其他问题"
)
private
FnaFormOther
fnaFormOther
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormOther.java
0 → 100644
View file @
d193adac
package
com
.
yd
.
csf
.
service
.
dto
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
FnaFormOther
{
@Schema
(
description
=
"首期及续保保费的财富来源,单选 字典值:csf_premium_funding_source"
)
private
String
premiumFundingSource
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormUpdateRequest.java
View file @
d193adac
...
@@ -53,34 +53,16 @@ public class FnaFormUpdateRequest implements Serializable {
...
@@ -53,34 +53,16 @@ public class FnaFormUpdateRequest implements Serializable {
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
/**
/**
*
平均月收入
*
收支情况
*/
*/
@Schema
(
description
=
"
在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等。
"
)
@Schema
(
description
=
"
收支情况
"
)
private
String
monthlyIncom
e
;
private
IncomeExpense
incomeExpens
e
;
/**
/**
*
平均月支出
*
流动资产
*/
*/
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为?"
)
@Schema
(
description
=
"流动资产"
)
private
String
monthlyExpense
;
private
LiquidAssets
liquidAssets
;
/**
* 累积流动资产
*/
@Schema
(
description
=
"您现时的累积流动资产约有多少?"
)
private
String
liquidAssets
;
/**
* 流动资产种类
*/
@Schema
(
description
=
"流动资产种类,多选逗号隔开 字典值:csf_liquid_asset_type"
)
private
String
liquidAssetType
;
/**
* 其他流动资产的说明
*/
@Schema
(
description
=
"其他流动资产的说明"
)
private
String
otherLiquidAsset
;
/**
/**
* 保单持有人资产
* 保单持有人资产
...
@@ -94,8 +76,11 @@ public class FnaFormUpdateRequest implements Serializable {
...
@@ -94,8 +76,11 @@ public class FnaFormUpdateRequest implements Serializable {
@Schema
(
description
=
"公司业务资料"
)
@Schema
(
description
=
"公司业务资料"
)
private
CompanyBusinessData
companyBusinessData
;
private
CompanyBusinessData
companyBusinessData
;
@Schema
(
description
=
"首期及续保保费的财富来源,单选 字典值:csf_premium_funding_source"
)
/**
private
String
premiumFundingSource
;
* 其他问题
*/
@Schema
(
description
=
"Fna表单其他问题"
)
private
FnaFormOther
fnaFormOther
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/dto/IncomeExpense.java
0 → 100644
View file @
d193adac
package
com
.
yd
.
csf
.
service
.
dto
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
IncomeExpense
{
/**
* 平均月收入
*/
@Schema
(
description
=
"在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等"
)
private
String
monthlyIncome
;
/**
* 平均月支出
*/
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为?"
)
private
String
monthlyExpense
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/LiquidAssets.java
0 → 100644
View file @
d193adac
package
com
.
yd
.
csf
.
service
.
dto
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
LiquidAssets
{
/**
* 累积流动资产
*/
@Schema
(
description
=
"您现时的累积流动资产约有多少?"
)
private
String
liquidAssets
;
/**
* 流动资产种类
*/
@Schema
(
description
=
"流动资产种类,多选逗号隔开 字典值:csf_liquid_asset_type"
)
private
String
liquidAssetType
;
/**
* 其他流动资产的说明
*/
@Schema
(
description
=
"其他流动资产的说明"
)
private
String
otherLiquidAsset
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/PersonalData.java
View file @
d193adac
...
@@ -20,7 +20,7 @@ public class PersonalData {
...
@@ -20,7 +20,7 @@ public class PersonalData {
@Schema
(
description
=
"税务国家"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@Schema
(
description
=
"税务国家"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
taxCountry
;
private
String
taxCountry
;
@Schema
(
description
=
"就业情况"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@Schema
(
description
=
"就业情况
字典值: csf_employment
"
,
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/FnaForm.java
View file @
d193adac
package
com
.
yd
.
csf
.
service
.
model
;
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -18,7 +18,7 @@ public class FnaForm implements Serializable {
...
@@ -18,7 +18,7 @@ public class FnaForm implements Serializable {
/**
/**
* id
* id
*/
*/
@TableId
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
/**
/**
...
@@ -62,29 +62,14 @@ public class FnaForm implements Serializable {
...
@@ -62,29 +62,14 @@ public class FnaForm implements Serializable {
private
Object
existingSecurityInsured
;
private
Object
existingSecurityInsured
;
/**
/**
* 平均月收入
* 收支情况
*/
private
String
monthlyIncome
;
/**
* 平均月支出
*/
private
String
monthlyExpense
;
/**
* 累积流动资产
*/
private
String
liquidAssets
;
/**
* 流动资产种类(A.现金 B.银行存款……)
*/
*/
private
String
liquidAssetTyp
e
;
private
Object
incomeExpens
e
;
/**
/**
*
其他流动资产的说明
*
流动资产
*/
*/
private
String
otherLiquidAsset
;
private
Object
liquidAssets
;
/**
/**
* 保单持有人资产
* 保单持有人资产
...
@@ -97,12 +82,12 @@ public class FnaForm implements Serializable {
...
@@ -97,12 +82,12 @@ public class FnaForm implements Serializable {
private
Object
companyBusinessData
;
private
Object
companyBusinessData
;
/**
/**
*
首期及续保保费的财富来源(A.储蓄 B.受雇收入 C.自雇收入 D.投资收入)
*
表单其他问题
*/
*/
private
String
premiumFundingSource
;
private
Object
fnaFormOther
;
/**
/**
*
fna
表单状态
* 表单状态
*/
*/
private
String
fnaFormStatus
;
private
String
fnaFormStatus
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaFormServiceImpl.java
View file @
d193adac
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,6 +6,7 @@ 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.google.gson.reflect.TypeToken
;
import
com.yd.common.enums.ResultCode
;
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
;
...
@@ -128,6 +129,14 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -128,6 +129,14 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
fnaFormVO
.
setExistingSecurityInsured
(
GSON
.
fromJson
(
existingSecurityInsured
.
toString
(),
new
TypeToken
<
List
<
ExistingSecurity
>>()
{
fnaFormVO
.
setExistingSecurityInsured
(
GSON
.
fromJson
(
existingSecurityInsured
.
toString
(),
new
TypeToken
<
List
<
ExistingSecurity
>>()
{
}.
getType
()));
}.
getType
()));
}
}
Object
incomeExpense
=
fnaForm
.
getIncomeExpense
();
if
(
incomeExpense
!=
null
)
{
fnaFormVO
.
setIncomeExpense
(
GSON
.
fromJson
(
incomeExpense
.
toString
(),
IncomeExpense
.
class
));
}
Object
liquidAssets
=
fnaForm
.
getLiquidAssets
();
if
(
liquidAssets
!=
null
)
{
fnaFormVO
.
setLiquidAssets
(
GSON
.
fromJson
(
liquidAssets
.
toString
(),
LiquidAssets
.
class
));
}
Object
ownerAssets
=
fnaForm
.
getOwnerAssets
();
Object
ownerAssets
=
fnaForm
.
getOwnerAssets
();
if
(
ownerAssets
!=
null
)
{
if
(
ownerAssets
!=
null
)
{
fnaFormVO
.
setOwnerAssets
(
GSON
.
fromJson
(
ownerAssets
.
toString
(),
new
TypeToken
<
OwnerAssets
>()
{
fnaFormVO
.
setOwnerAssets
(
GSON
.
fromJson
(
ownerAssets
.
toString
(),
new
TypeToken
<
OwnerAssets
>()
{
...
@@ -137,6 +146,10 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -137,6 +146,10 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
if
(
monthlyIncome
!=
null
)
{
if
(
monthlyIncome
!=
null
)
{
fnaFormVO
.
setCompanyBusinessData
(
GSON
.
fromJson
(
monthlyIncome
.
toString
(),
CompanyBusinessData
.
class
));
fnaFormVO
.
setCompanyBusinessData
(
GSON
.
fromJson
(
monthlyIncome
.
toString
(),
CompanyBusinessData
.
class
));
}
}
Object
fnaFormOther
=
fnaForm
.
getFnaFormOther
();
if
(
fnaFormOther
!=
null
)
{
fnaFormVO
.
setFnaFormOther
(
GSON
.
fromJson
(
fnaFormOther
.
toString
(),
FnaFormOther
.
class
));
}
return
fnaFormVO
;
return
fnaFormVO
;
}
}
...
@@ -168,23 +181,23 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -168,23 +181,23 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
@Override
@Override
public
void
validFnaFormAdd
(
PersonalData
personalData
,
String
saveType
)
{
public
void
validFnaFormAdd
(
PersonalData
personalData
,
String
saveType
)
{
if
(
personalData
==
null
||
ValidateUtil
.
isAllFieldsNull
(
personalData
))
{
if
(
personalData
==
null
||
ValidateUtil
.
isAllFieldsNull
(
personalData
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"个人资料不能全不为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"个人资料不能全不为空"
);
}
}
if
(
"save"
.
equals
(
saveType
))
{
if
(
"save"
.
equals
(
saveType
))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getAccountName
()))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getAccountName
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"陪同顾问姓名不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"陪同顾问姓名不能为空"
);
}
}
if
(
StringUtils
.
isBlank
(
personalData
.
getRegistrationNumber
()))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getRegistrationNumber
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"理财顾问注册编号不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"理财顾问注册编号不能为空"
);
}
}
if
(
StringUtils
.
isBlank
(
personalData
.
getCustomerName
()))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getCustomerName
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"客户姓名不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"客户姓名不能为空"
);
}
}
if
(
StringUtils
.
isBlank
(
personalData
.
getTaxCountry
()))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getTaxCountry
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"税务国家不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"税务国家不能为空"
);
}
}
if
(
StringUtils
.
isBlank
(
personalData
.
getEmployment
()))
{
if
(
StringUtils
.
isBlank
(
personalData
.
getEmployment
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS
_ERROR
.
getCode
(),
"就业情况不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK
_ERROR
.
getCode
(),
"就业情况不能为空"
);
}
}
}
}
}
}
...
@@ -198,13 +211,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -198,13 +211,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
fnaForm
.
setFamilyMembers
(
GSON
.
toJson
(
fnaFormAddRequest
.
getFamilyMembers
()));
fnaForm
.
setFamilyMembers
(
GSON
.
toJson
(
fnaFormAddRequest
.
getFamilyMembers
()));
fnaForm
.
setExistingSecurityOwner
(
GSON
.
toJson
(
fnaFormAddRequest
.
getExistingSecurityOwner
()));
fnaForm
.
setExistingSecurityOwner
(
GSON
.
toJson
(
fnaFormAddRequest
.
getExistingSecurityOwner
()));
fnaForm
.
setExistingSecurityInsured
(
GSON
.
toJson
(
fnaFormAddRequest
.
getExistingSecurityInsured
()));
fnaForm
.
setExistingSecurityInsured
(
GSON
.
toJson
(
fnaFormAddRequest
.
getExistingSecurityInsured
()));
fnaForm
.
setMonthlyIncome
(
fnaFormAddRequest
.
getMonthlyIncome
());
fnaForm
.
setIncomeExpense
(
GSON
.
toJson
(
fnaFormAddRequest
.
getIncomeExpense
()));
fnaForm
.
setMonthlyExpense
(
fnaFormAddRequest
.
getMonthlyExpense
());
fnaForm
.
setLiquidAssets
(
GSON
.
toJson
(
fnaFormAddRequest
.
getLiquidAssets
()));
fnaForm
.
setLiquidAssets
(
fnaFormAddRequest
.
getLiquidAssets
());
fnaForm
.
setLiquidAssetType
(
fnaFormAddRequest
.
getLiquidAssetType
());
fnaForm
.
setOwnerAssets
(
GSON
.
toJson
(
fnaFormAddRequest
.
getOwnerAssets
()));
fnaForm
.
setOwnerAssets
(
GSON
.
toJson
(
fnaFormAddRequest
.
getOwnerAssets
()));
fnaForm
.
setCompanyBusinessData
(
GSON
.
toJson
(
fnaFormAddRequest
.
getCompanyBusinessData
()));
fnaForm
.
setCompanyBusinessData
(
GSON
.
toJson
(
fnaFormAddRequest
.
getCompanyBusinessData
()));
fnaForm
.
set
PremiumFundingSource
(
fnaFormAddRequest
.
getPremiumFundingSource
(
));
fnaForm
.
set
FnaFormOther
(
GSON
.
toJson
(
fnaFormAddRequest
.
getFnaFormOther
()
));
return
fnaForm
;
return
fnaForm
;
}
}
...
@@ -218,8 +229,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
...
@@ -218,8 +229,11 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
fnaForm
.
setFamilyMembers
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getFamilyMembers
()));
fnaForm
.
setFamilyMembers
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getFamilyMembers
()));
fnaForm
.
setExistingSecurityOwner
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getExistingSecurityOwner
()));
fnaForm
.
setExistingSecurityOwner
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getExistingSecurityOwner
()));
fnaForm
.
setExistingSecurityInsured
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getExistingSecurityInsured
()));
fnaForm
.
setExistingSecurityInsured
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getExistingSecurityInsured
()));
fnaForm
.
setIncomeExpense
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getIncomeExpense
()));
fnaForm
.
setLiquidAssets
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getLiquidAssets
()));
fnaForm
.
setOwnerAssets
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getOwnerAssets
()));
fnaForm
.
setOwnerAssets
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getOwnerAssets
()));
fnaForm
.
setCompanyBusinessData
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getCompanyBusinessData
()));
fnaForm
.
setCompanyBusinessData
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getCompanyBusinessData
()));
fnaForm
.
setFnaFormOther
(
GSON
.
toJson
(
fnaFormUpdateRequest
.
getFnaFormOther
()));
return
fnaForm
;
return
fnaForm
;
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
View file @
d193adac
...
@@ -62,28 +62,16 @@ public class FnaFormVO implements Serializable {
...
@@ -62,28 +62,16 @@ public class FnaFormVO implements Serializable {
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
private
List
<
ExistingSecurity
>
existingSecurityInsured
;
/**
/**
*
平均月收入
*
收支情况
*/
*/
@Schema
(
description
=
"
在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等
"
)
@Schema
(
description
=
"
收支情况
"
)
private
String
monthlyIncom
e
;
private
IncomeExpense
incomeExpens
e
;
/**
/**
*
平均月支出
*
流动资产
*/
*/
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为?"
)
@Schema
(
description
=
"流动资产"
)
private
String
monthlyExpense
;
private
LiquidAssets
liquidAssets
;
/**
* 累积流动资产
*/
@Schema
(
description
=
"您现时的累积流动资产约有多少?"
)
private
String
liquidAssets
;
/**
* 流动资产种类(A.现金 B.银行存款……)
*/
@Schema
(
description
=
"流动资产种类(A.现金 B.银行存款 C.货币市场账户 D.交投活络的股票 E.债券及互惠基金 F.美国国库债券 G. 其他(請說明))"
)
private
String
liquidAssetType
;
/**
/**
* 保单持有人资产
* 保单持有人资产
...
@@ -98,10 +86,10 @@ public class FnaFormVO implements Serializable {
...
@@ -98,10 +86,10 @@ public class FnaFormVO implements Serializable {
private
CompanyBusinessData
companyBusinessData
;
private
CompanyBusinessData
companyBusinessData
;
/**
/**
*
首期及续保保费的财富来源(A.储蓄 B.受雇收入 C.自雇收入 D.投资收入)
*
其他问题
*/
*/
@Schema
(
description
=
"
首期及续保保费的财富来源(A.储蓄 B.受雇收入 C.自雇收入 D.投资收入)
"
)
@Schema
(
description
=
"
Fna表单其他问题
"
)
private
String
premiumFundingSource
;
private
FnaFormOther
fnaFormOther
;
/**
/**
...
...
yd-csf-service/src/main/resources/mappers/FnaFormMapper.xml
View file @
d193adac
...
@@ -14,13 +14,12 @@
...
@@ -14,13 +14,12 @@
<result
property=
"familyMembers"
column=
"family_members"
/>
<result
property=
"familyMembers"
column=
"family_members"
/>
<result
property=
"existingSecurityOwner"
column=
"existing_security_owner"
/>
<result
property=
"existingSecurityOwner"
column=
"existing_security_owner"
/>
<result
property=
"existingSecurityInsured"
column=
"existing_security_insured"
/>
<result
property=
"existingSecurityInsured"
column=
"existing_security_insured"
/>
<result
property=
"monthlyIncome"
column=
"monthly_income"
/>
<result
property=
"incomeExpense"
column=
"income_expense"
/>
<result
property=
"monthlyExpense"
column=
"monthly_expense"
/>
<result
property=
"liquidAssets"
column=
"liquid_assets"
/>
<result
property=
"liquidAssets"
column=
"liquid_assets"
/>
<result
property=
"liquidAssetType"
column=
"liquid_asset_type"
/>
<result
property=
"ownerAssets"
column=
"owner_assets"
/>
<result
property=
"ownerAssets"
column=
"owner_assets"
/>
<result
property=
"companyBusinessData"
column=
"company_business_data"
/>
<result
property=
"companyBusinessData"
column=
"company_business_data"
/>
<result
property=
"premiumFundingSource"
column=
"premium_funding_source"
/>
<result
property=
"fnaFormOther"
column=
"fna_form_other"
/>
<result
property=
"fnaFormStatus"
column=
"fna_form_status"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
...
@@ -31,9 +30,8 @@
...
@@ -31,9 +30,8 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,fna_form_biz_id,user_biz_id,agent_biz_id,customer_biz_id,personal_data,
id,fna_form_biz_id,user_biz_id,agent_biz_id,customer_biz_id,personal_data,
family_members,existing_security_owner,existing_security_insured,monthly_income,monthly_expense,
family_members,existing_security_owner,existing_security_insured,income_expense,liquid_assets,
liquid_assets,liquid_asset_type,owner_assets,company_business_data,premium_funding_source,
owner_assets,company_business_data,fna_form_other,fna_form_status,remark,
remark,is_deleted,creator_id,updater_id,create_time,
is_deleted,creator_id,updater_id,create_time,update_time
update_time
</sql>
</sql>
</mapper>
</mapper>
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