Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
9f4ecdfc
Commit
9f4ecdfc
authored
Jul 21, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
商险退回和办理成功接口 See merge request fangxinjiang/yifu!23
parents
f16d14ba
58e98afc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
+109
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+26
-0
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+18
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+65
-0
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
9f4ecdfc
...
...
@@ -154,6 +154,32 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceExportList
(
param
));
}
/**
* 投保退回
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
@Operation
(
summary
=
"投保退回"
,
description
=
"投保退回"
)
@PostMapping
(
"/rollBackInsurance"
)
public
R
<
String
>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
rollBackInsurance
(
idList
);
}
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
@Operation
(
summary
=
"办理成功"
,
description
=
"办理成功"
)
@PostMapping
(
"/successfulInsurance"
)
public
R
<
String
>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
successfulInsurance
(
idList
);
}
/***********************减员办理********************************/
/**
* 导入减员校验
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
9f4ecdfc
...
...
@@ -99,6 +99,24 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
List
<
InsuranceExportListVO
>
getInsuranceExportList
(
InsuranceExportListParam
param
);
/**
* 投保退回
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
);
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
);
/***********************减员办理********************************/
/**
* 减员导入校验
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
9f4ecdfc
...
...
@@ -458,6 +458,71 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
insuranceExportList
;
}
/**
* 投保退回
*
* @param idList
* @return {@link R<String>}
* @author licancan
*/
@Override
public
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
CollectionUtils
.
isEmpty
(
idList
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
detailList
.
stream
().
forEach
(
e
->{
// 记录状态置为「退回」
e
.
setBuyHandleStatus
(
CommonConstants
.
FOUR_INT
);
e
.
setUpdateBy
(
user
.
getId
());
e
.
setUpdateTime
(
LocalDateTime
.
now
());
});
//更新
this
.
saveOrUpdateBatch
(
detailList
);
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 办理成功
*
* @param idList
* @return {@link R<String>}
* @author licancan
*/
@Override
public
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
CollectionUtils
.
isEmpty
(
idList
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
}
//记录状态均置为「已投保」
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
}
//更新
this
.
saveOrUpdateBatch
(
detailList
);
//todo 根据结算类型推送ekp
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 商险新增校验
*
...
...
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