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
1c9afdf1
Commit
1c9afdf1
authored
Oct 09, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_zxm' into test
parents
efcbdefb
3e5915ad
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
177 additions
and
8 deletions
+177
-8
yd-csf-api/pom.xml
+5
-0
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiBeneficiaryController.java
+11
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiAppointmentCheckService.java
+2
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiBeneficiaryService.java
+3
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentCheckServiceImpl.java
+87
-1
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+24
-7
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiBeneficiaryServiceImpl.java
+14
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/client/beneficiary/ApiBeneficiaryFeignClient.java
+9
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/request/beneficiary/ApiBatchEditBeneficiaryRequest.java
+22
-0
No files found.
yd-csf-api/pom.xml
View file @
1c9afdf1
...
...
@@ -79,6 +79,11 @@
<artifactId>
hutool-all
</artifactId>
</dependency>
<dependency>
<groupId>
com.yd
</groupId>
<artifactId>
yd-question-feign
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
...
...
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiBeneficiaryController.java
View file @
1c9afdf1
...
...
@@ -6,6 +6,7 @@ import com.yd.csf.api.service.ApiBeneficiaryService;
import
com.yd.csf.feign.client.beneficiary.ApiBeneficiaryFeignClient
;
import
com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto
;
import
com.yd.csf.feign.dto.appointment.ApiInsurantInfoDto
;
import
com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest
;
import
com.yd.csf.feign.request.beneficiary.ApiBeneficiaryPageRequest
;
import
com.yd.csf.feign.response.beneficiary.ApiBeneficiaryPageResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -79,6 +80,16 @@ public class ApiBeneficiaryController implements ApiBeneficiaryFeignClient {
}
/**
* 批量编辑受益人信息
* @param request
* @return
*/
@Override
public
Result
batchEdit
(
ApiBatchEditBeneficiaryRequest
request
)
{
return
apiBeneficiaryService
.
batchEdit
(
request
);
}
/**
* 删除单个受益人信息
* @param beneficiaryBizId
* @return
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiAppointmentCheckService.java
View file @
1c9afdf1
...
...
@@ -25,6 +25,8 @@ public interface ApiAppointmentCheckService {
Result
checkEditApiInsurantInfoDto
(
ApiInsurantInfoDto
dto
);
Result
checkEditApiBeneficiaryInfoDtoList
(
List
<
ApiBeneficiaryInfoDto
>
list
);
Result
checkAddApiBeneficiaryInfoDtoList
(
List
<
ApiBeneficiaryInfoDto
>
list
);
Result
checkEditApiSecondHolderInfoDto
(
ApiSecondHolderInfoDto
dto
);
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiBeneficiaryService.java
View file @
1c9afdf1
...
...
@@ -2,6 +2,7 @@ package com.yd.csf.api.service;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto
;
import
com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest
;
import
java.util.List
;
...
...
@@ -15,6 +16,8 @@ public interface ApiBeneficiaryService {
Result
edit
(
ApiBeneficiaryInfoDto
apiBeneficiaryInfoDto
);
Result
batchEdit
(
ApiBatchEditBeneficiaryRequest
request
);
Result
del
(
String
beneficiaryBizId
);
Result
batchAddBeneficiaryData
(
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
,
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentCheckServiceImpl.java
View file @
1c9afdf1
...
...
@@ -544,7 +544,8 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @param list
* @return
*/
public
Result
checkAddApiBeneficiaryInfoDtoList
(
List
<
ApiBeneficiaryInfoDto
>
list
){
@Override
public
Result
checkEditApiBeneficiaryInfoDtoList
(
List
<
ApiBeneficiaryInfoDto
>
list
){
if
(
CollectionUtils
.
isEmpty
(
list
))
{
//如果对象集合空就放行不校验
return
Result
.
success
();
...
...
@@ -559,6 +560,91 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if
(
StringUtils
.
isBlank
(
dto
.
getInsurantRel
()))
{
throw
new
BusinessException
(
tipStr
+
"与受保人关系不能为空"
);
}
if
(
Objects
.
isNull
(
dto
.
getId
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的受益人信息主键id不能为空"
);
}
// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
// throw new BusinessException(tipStr+"第"+i+"项的预约信息主表唯一业务ID不能为空");
// }
if
(
StringUtils
.
isBlank
(
dto
.
getBeneficiaryBizId
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的受益人信息表唯一业务ID不能为空"
);
}
if
(
RelTypeEnum
.
MYSELF
.
getItemValue
().
equals
(
dto
.
getInsurantRel
()))
{
//如果对象与受保人关系为本人,就不校验下面的参数,继续循环下一个
continue
;
}
if
(
CustomerTypeEnum
.
INDIVIDUAL
.
getItemValue
().
equals
(
dto
.
getCustomerType
()))
{
//客户类型为个人的字段校验
//校验客户类型为个人类型的公共参数字段
if
(
StringUtils
.
isBlank
(
dto
.
getName
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的名字不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getNameEn
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的名字-英文不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getGender
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的性别不能为空"
);
}
// CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
// BeanUtils.copyProperties(dto,individualCheckCommonDto);
// checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
}
else
if
(
CustomerTypeEnum
.
COMPANY
.
getItemValue
().
equals
(
dto
.
getCustomerType
())){
//客户类型为公司的字段校验
if
(
StringUtils
.
isBlank
(
dto
.
getCompanyName
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司名称不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getCompanyNameEn
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司名称(英文)不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getCompanyBusinessNo
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司商业登记号码不能为空"
);
}
if
(
Objects
.
isNull
(
dto
.
getCompanyRegisterTime
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司注册日期不能为空"
);
}
if
(
Objects
.
isNull
(
dto
.
getCompanyMobile
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司电话不能为空"
);
}
if
(
Objects
.
isNull
(
dto
.
getCompanyMobileCode
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司电话区号不能为空"
);
}
if
(
Objects
.
isNull
(
dto
.
getCompanyRegisterRegion
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的公司注册地区不能为空"
);
}
// CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
// BeanUtils.copyProperties(dto,companyCheckCommonDto);
// //校验客户类型为公司类型的公共参数字段
// checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
}
i
++;
}
return
Result
.
success
();
}
/**
* 编辑预约入参字段校验 - 受益人列表信息字段校验
* @param list
* @return
*/
public
Result
checkAddApiBeneficiaryInfoDtoList
(
List
<
ApiBeneficiaryInfoDto
>
list
){
if
(
CollectionUtils
.
isEmpty
(
list
))
{
//如果对象集合空就放行不校验
return
Result
.
success
();
}
String
tipStr
=
"受益人-"
;
//列表下标标记位
int
i
=
1
;
for
(
ApiBeneficiaryInfoDto
dto
:
list
)
{
if
(
StringUtils
.
isBlank
(
dto
.
getCustomerType
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的客户类型不能为空"
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getInsurantRel
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的与受保人关系不能为空"
);
}
if
(!
Objects
.
isNull
(
dto
.
getId
()))
{
throw
new
BusinessException
(
tipStr
+
"第"
+
i
+
"项的受益人信息主键id不传值"
);
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
1c9afdf1
...
...
@@ -23,6 +23,8 @@ import com.yd.csf.service.model.Fna;
import
com.yd.csf.service.model.ProductPlan
;
import
com.yd.csf.service.service.FnaService
;
import
com.yd.csf.service.service.IAppointmentService
;
import
com.yd.question.feign.client.ApiQuestionnairesFeignClient
;
import
com.yd.question.feign.request.ApiObjectSaveRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -70,6 +72,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Autowired
private
FnaService
fnaService
;
@Autowired
private
ApiQuestionnairesFeignClient
apiQuestionnairesFeignClient
;
/**
* 预约分页查询
* @param request
...
...
@@ -165,6 +170,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//添加第二持有人信息表数据
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
//新增健康问卷和预约对象关系绑定
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
ApiAppointmentAddResponse
response
=
new
ApiAppointmentAddResponse
();
...
...
@@ -222,6 +230,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//添加第二持有人信息表数据
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
//新增健康问卷和预约对象关系绑定
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
return
Result
.
success
();
}
...
...
@@ -446,13 +457,19 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
return
Result
.
success
();
}
// /**
// * 保存健康问卷和预约对象关系绑定
// * @return
// */
// public Result objectSaveQuestion() {
//
// }
/**
* 新增健康问卷和预约对象关系绑定
* @return
*/
public
Result
objectSaveJkQuestion
(
String
appointmentBizId
)
{
ApiObjectSaveRequest
apiObjectSaveRequest
=
new
ApiObjectSaveRequest
();
apiObjectSaveRequest
.
setObjectBizId
(
appointmentBizId
);
apiObjectSaveRequest
.
setObjectName
(
"预约"
);
apiObjectSaveRequest
.
setObjectTableName
(
"appointment"
);
apiObjectSaveRequest
.
setQuestionnaireBizId
(
"questionnaires_1001"
);
apiQuestionnairesFeignClient
.
objectSave
(
apiObjectSaveRequest
);
return
Result
.
success
();
}
/**
* 校验预约信息是否存在
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiBeneficiaryServiceImpl.java
View file @
1c9afdf1
...
...
@@ -8,6 +8,7 @@ import com.yd.common.utils.RandomStringGenerator;
import
com.yd.csf.api.service.ApiAppointmentCheckService
;
import
com.yd.csf.api.service.ApiBeneficiaryService
;
import
com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto
;
import
com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest
;
import
com.yd.csf.feign.utils.CommonUtil
;
import
com.yd.csf.service.dto.BeneficiaryDto
;
import
com.yd.csf.service.model.Beneficiary
;
...
...
@@ -109,6 +110,19 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
}
/**
* 批量编辑受益人信息
* @param request
* @return
*/
@Override
public
Result
batchEdit
(
ApiBatchEditBeneficiaryRequest
request
)
{
apiAppointmentCheckService
.
checkEditApiBeneficiaryInfoDtoList
(
request
.
getBeneficiaryInfoDtoList
());
//批量编辑受益人信息表数据
batchEditBeneficiaryData
(
request
.
getBeneficiaryInfoDtoList
(),
request
.
getAppointmentBizId
());
return
Result
.
success
();
}
/**
* 删除单个受益人信息
* @param beneficiaryBizId
* @return
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/client/beneficiary/ApiBeneficiaryFeignClient.java
View file @
1c9afdf1
...
...
@@ -4,6 +4,7 @@ import com.yd.common.result.Result;
import
com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto
;
import
com.yd.csf.feign.dto.appointment.ApiInsurantInfoDto
;
import
com.yd.csf.feign.fallback.beneficiary.ApiBeneficiaryFeignFallbackFactory
;
import
com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest
;
import
com.yd.csf.feign.request.beneficiary.ApiBeneficiaryPageRequest
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -58,6 +59,14 @@ public interface ApiBeneficiaryFeignClient {
Result
edit
(
@Validated
@RequestBody
ApiBeneficiaryInfoDto
apiBeneficiaryInfoDto
);
/**
* 批量编辑受益人信息
* @param request
* @return
*/
@PutMapping
(
"/batch/edit"
)
Result
batchEdit
(
@Validated
@RequestBody
ApiBatchEditBeneficiaryRequest
request
);
/**
* 删除单个受益人信息
* @param beneficiaryBizId
* @return
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/beneficiary/ApiBatchEditBeneficiaryRequest.java
0 → 100644
View file @
1c9afdf1
package
com
.
yd
.
csf
.
feign
.
request
.
beneficiary
;
import
com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
@Data
public
class
ApiBatchEditBeneficiaryRequest
{
/**
* 预约信息主表唯一业务ID
*/
@NotBlank
(
message
=
"预约信息主表唯一业务ID不能为空"
)
private
String
appointmentBizId
;
/**
* 受益人列表
*/
private
List
<
ApiBeneficiaryInfoDto
>
beneficiaryInfoDtoList
;
}
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