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
e559e2a6
Commit
e559e2a6
authored
Sep 17, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fna接口34
parent
e4190370
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
33 deletions
+59
-33
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFnaController.java
+4
-23
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormAddRequest.java
+3
-3
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormUpdateRequest.java
+3
-3
yd-csf-service/src/main/java/com/yd/csf/service/service/FnaService.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaServiceImpl.java
+43
-1
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaVO.java
+1
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFnaController.java
View file @
e559e2a6
...
@@ -39,8 +39,7 @@ public class ApiFnaController {
...
@@ -39,8 +39,7 @@ public class ApiFnaController {
@Resource
@Resource
private
FnaService
fnaService
;
private
FnaService
fnaService
;
@Resource
private
CustomerService
customerService
;
@Resource
@Resource
private
ApiAppointmentService
appointmentService
;
private
ApiAppointmentService
appointmentService
;
...
@@ -88,34 +87,16 @@ public class ApiFnaController {
...
@@ -88,34 +87,16 @@ public class ApiFnaController {
if
(
fnaUpdateRequest
==
null
||
StringUtils
.
isBlank
(
fnaUpdateRequest
.
getFnaBizId
()))
{
if
(
fnaUpdateRequest
==
null
||
StringUtils
.
isBlank
(
fnaUpdateRequest
.
getFnaBizId
()))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
}
}
String
appointmentNo
=
null
;
// 判断是否存在
String
fnaBizId
=
fnaUpdateRequest
.
getFnaBizId
();
Fna
fna
=
fnaService
.
getByBizId
(
fnaBizId
);
if
(
fna
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
NOT_FOUND_ERROR
.
getCode
(),
ErrorCode
.
NOT_FOUND_ERROR
.
getMessage
());
}
BeanUtils
.
copyProperties
(
fnaUpdateRequest
,
fna
,
"fnaBizId"
);
if
(
StringUtils
.
isNotBlank
(
fnaUpdateRequest
.
getCustomerBizId
()))
{
Customer
customer
=
customerService
.
getByCustomerBizId
(
fnaUpdateRequest
.
getCustomerBizId
());
fna
.
setCustomerName
(
customer
.
getName
());
}
if
(
StringUtils
.
isNotBlank
(
fnaUpdateRequest
.
getAppointmentBizId
()))
{
if
(
StringUtils
.
isNotBlank
(
fnaUpdateRequest
.
getAppointmentBizId
()))
{
Result
<
ApiAppointmentInfoDto
>
apiAppointmentInfoDtoResult
=
appointmentService
.
mainDetail
(
fnaUpdateRequest
.
getAppointmentBizId
());
Result
<
ApiAppointmentInfoDto
>
apiAppointmentInfoDtoResult
=
appointmentService
.
mainDetail
(
fnaUpdateRequest
.
getAppointmentBizId
());
if
(
apiAppointmentInfoDtoResult
.
getData
()
!=
null
)
{
if
(
apiAppointmentInfoDtoResult
.
getData
()
!=
null
)
{
ApiAppointmentInfoDto
apiAppointmentInfoDto
=
apiAppointmentInfoDtoResult
.
getData
();
ApiAppointmentInfoDto
apiAppointmentInfoDto
=
apiAppointmentInfoDtoResult
.
getData
();
fna
.
setAppointmentNo
(
apiAppointmentInfoDto
.
getAppointmentNo
()
);
appointmentNo
=
apiAppointmentInfoDto
.
getAppointmentNo
(
);
}
}
}
}
// 操作数据库
return
Result
.
success
(
fnaService
.
updateFna
(
fnaUpdateRequest
,
appointmentNo
));
boolean
result
=
fnaService
.
updateById
(
fna
);
if
(!
result
)
{
return
Result
.
fail
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
}
return
Result
.
success
(
true
);
}
}
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormAddRequest.java
View file @
e559e2a6
...
@@ -50,19 +50,19 @@ public class FnaFormAddRequest implements Serializable {
...
@@ -50,19 +50,19 @@ public class FnaFormAddRequest implements Serializable {
/**
/**
* 平均月收入
* 平均月收入
*/
*/
@Schema
(
description
=
"
平均月收入
"
)
@Schema
(
description
=
"
在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等
"
)
private
String
monthlyIncome
;
private
String
monthlyIncome
;
/**
/**
* 平均月支出
* 平均月支出
*/
*/
@Schema
(
description
=
"
平均月支出
"
)
@Schema
(
description
=
"
过去24个月每月里,你每月的平均开支为?
"
)
private
String
monthlyExpense
;
private
String
monthlyExpense
;
/**
/**
* 累积流动资产
* 累积流动资产
*/
*/
@Schema
(
description
=
"
累积流动资产
"
)
@Schema
(
description
=
"
您现时的累积流动资产约有多少?
"
)
private
String
liquidAssets
;
private
String
liquidAssets
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FnaFormUpdateRequest.java
View file @
e559e2a6
...
@@ -55,19 +55,19 @@ public class FnaFormUpdateRequest implements Serializable {
...
@@ -55,19 +55,19 @@ public class FnaFormUpdateRequest implements Serializable {
/**
/**
* 平均月收入
* 平均月收入
*/
*/
@Schema
(
description
=
"
平均月收入
"
)
@Schema
(
description
=
"
在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等。
"
)
private
String
monthlyIncome
;
private
String
monthlyIncome
;
/**
/**
* 平均月支出
* 平均月支出
*/
*/
@Schema
(
description
=
"
平均月支出
"
)
@Schema
(
description
=
"
过去24个月每月里,你每月的平均开支为?
"
)
private
String
monthlyExpense
;
private
String
monthlyExpense
;
/**
/**
* 累积流动资产
* 累积流动资产
*/
*/
@Schema
(
description
=
"
累积流动资产
"
)
@Schema
(
description
=
"
您现时的累积流动资产约有多少?
"
)
private
String
liquidAssets
;
private
String
liquidAssets
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/FnaService.java
View file @
e559e2a6
...
@@ -6,6 +6,7 @@ import com.yd.csf.service.dto.DeleteFnaRequest;
...
@@ -6,6 +6,7 @@ import com.yd.csf.service.dto.DeleteFnaRequest;
import
com.yd.csf.service.dto.FnaAddRequest
;
import
com.yd.csf.service.dto.FnaAddRequest
;
import
com.yd.csf.service.dto.FnaQueryRequest
;
import
com.yd.csf.service.dto.FnaQueryRequest
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yd.csf.service.dto.FnaUpdateRequest
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.vo.FnaVO
;
import
com.yd.csf.service.vo.FnaVO
;
...
@@ -51,4 +52,6 @@ public interface FnaService extends IService<Fna> {
...
@@ -51,4 +52,6 @@ public interface FnaService extends IService<Fna> {
Boolean
deleteFna
(
DeleteFnaRequest
deleteRequest
);
Boolean
deleteFna
(
DeleteFnaRequest
deleteRequest
);
Fna
queryOne
(
String
fnaBizId
);
Fna
queryOne
(
String
fnaBizId
);
Boolean
updateFna
(
FnaUpdateRequest
fnaUpdateRequest
,
String
appointmentNo
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaServiceImpl.java
View file @
e559e2a6
...
@@ -13,13 +13,17 @@ import com.yd.common.enums.CommonEnum;
...
@@ -13,13 +13,17 @@ import com.yd.common.enums.CommonEnum;
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.feign.dto.appointment.ApiAppointmentInfoDto
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.common.ErrorCode
;
import
com.yd.csf.service.dao.FnaMapper
;
import
com.yd.csf.service.dao.FnaMapper
;
import
com.yd.csf.service.dto.DeleteFnaRequest
;
import
com.yd.csf.service.dto.DeleteFnaRequest
;
import
com.yd.csf.service.dto.FnaAddRequest
;
import
com.yd.csf.service.dto.FnaAddRequest
;
import
com.yd.csf.service.dto.FnaQueryRequest
;
import
com.yd.csf.service.dto.FnaQueryRequest
;
import
com.yd.csf.service.dto.FnaUpdateRequest
;
import
com.yd.csf.service.model.Customer
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.model.FnaForm
;
import
com.yd.csf.service.model.FnaForm
;
import
com.yd.csf.service.service.CustomerService
;
import
com.yd.csf.service.service.FnaFormService
;
import
com.yd.csf.service.service.FnaFormService
;
import
com.yd.csf.service.service.FnaService
;
import
com.yd.csf.service.service.FnaService
;
import
com.yd.csf.service.vo.FnaVO
;
import
com.yd.csf.service.vo.FnaVO
;
...
@@ -31,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -31,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -53,6 +58,11 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
...
@@ -53,6 +58,11 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
@Autowired
@Autowired
private
FnaFormService
fnaFormService
;
private
FnaFormService
fnaFormService
;
@Resource
private
CustomerService
customerService
;
@Resource
private
AppointmentServiceImpl
appointmentService
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -72,7 +82,7 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
...
@@ -72,7 +82,7 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
fna
.
setCreatorId
(
userBizId
);
fna
.
setCreatorId
(
userBizId
);
fna
.
setUpdaterId
(
userBizId
);
fna
.
setUpdaterId
(
userBizId
);
fna
.
setStatus
(
"
UNCOMPLETED
"
);
fna
.
setStatus
(
"
DRAFT
"
);
Date
date
=
new
Date
();
Date
date
=
new
Date
();
fna
.
setCreateTime
(
date
);
fna
.
setCreateTime
(
date
);
...
@@ -255,4 +265,36 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
...
@@ -255,4 +265,36 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
return
this
.
getOne
(
new
LambdaQueryWrapper
<
Fna
>().
eq
(
Fna:
:
getFnaBizId
,
fnaBizId
));
return
this
.
getOne
(
new
LambdaQueryWrapper
<
Fna
>().
eq
(
Fna:
:
getFnaBizId
,
fnaBizId
));
}
}
@Override
public
Boolean
updateFna
(
FnaUpdateRequest
fnaUpdateRequest
,
String
appointmentNo
)
{
// 判断是否存在
String
fnaBizId
=
fnaUpdateRequest
.
getFnaBizId
();
Fna
fna
=
this
.
getByBizId
(
fnaBizId
);
if
(
fna
==
null
)
{
throw
new
BusinessException
(
ErrorCode
.
NOT_FOUND_ERROR
.
getCode
(),
ErrorCode
.
NOT_FOUND_ERROR
.
getMessage
());
}
BeanUtils
.
copyProperties
(
fnaUpdateRequest
,
fna
,
"fnaBizId"
);
if
(
StringUtils
.
isNotBlank
(
fnaUpdateRequest
.
getCustomerBizId
()))
{
Customer
customer
=
customerService
.
getByCustomerBizId
(
fnaUpdateRequest
.
getCustomerBizId
());
fna
.
setCustomerName
(
customer
.
getName
());
}
// 设置 状态
String
customerBizId
=
fnaUpdateRequest
.
getCustomerBizId
();
String
fnaFormBizId
=
fnaUpdateRequest
.
getFnaFormBizId
();
if
(
StringUtils
.
isNotBlank
(
customerBizId
)
||
StringUtils
.
isNotBlank
(
fnaFormBizId
)
||
StringUtils
.
isBlank
(
appointmentNo
)
)
{
fna
.
setStatus
(
"UNCOMPLETED"
);
}
if
(
StringUtils
.
isNotBlank
(
customerBizId
)
&&
StringUtils
.
isNotBlank
(
fnaFormBizId
)
&&
StringUtils
.
isBlank
(
appointmentNo
))
{
fna
.
setStatus
(
"COMPLETED"
);
}
// 操作数据库
fna
.
setAppointmentNo
(
appointmentNo
);
return
this
.
updateById
(
fna
);
}
}
}
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaFormVO.java
View file @
e559e2a6
...
@@ -70,13 +70,13 @@ public class FnaFormVO implements Serializable {
...
@@ -70,13 +70,13 @@ public class FnaFormVO implements Serializable {
/**
/**
* 平均月支出
* 平均月支出
*/
*/
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为"
)
@Schema
(
description
=
"过去24个月每月里,你每月的平均开支为
?
"
)
private
String
monthlyExpense
;
private
String
monthlyExpense
;
/**
/**
* 累积流动资产
* 累积流动资产
*/
*/
@Schema
(
description
=
"您现时的累积流动资产约有多少"
)
@Schema
(
description
=
"您现时的累积流动资产约有多少
?
"
)
private
String
liquidAssets
;
private
String
liquidAssets
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FnaVO.java
View file @
e559e2a6
...
@@ -61,7 +61,7 @@ public class FnaVO implements Serializable {
...
@@ -61,7 +61,7 @@ public class FnaVO implements Serializable {
/**
/**
* FNA表单 状态
* FNA表单 状态
*/
*/
@Schema
(
description
=
"FNA表单 状态 'UNCOMPLETED'-未完成, 'COMPLETED'-已完成"
)
@Schema
(
description
=
"FNA表单 状态 '
DRAFT'-草稿, '
UNCOMPLETED'-未完成, 'COMPLETED'-已完成"
)
private
String
fnaFormStatus
;
private
String
fnaFormStatus
;
/**
/**
...
...
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