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
861f9a38
Commit
861f9a38
authored
Jul 25, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险办理成功,投保退回返回格式修改
parent
fee28deb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
24 deletions
+24
-24
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+5
-4
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+4
-4
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+15
-16
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
861f9a38
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -159,11 +160,11 @@ public class TInsuranceDetailController {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
@Operation
(
summary
=
"投保退回"
,
description
=
"投保退回"
)
@PostMapping
(
"/rollBackInsurance"
)
public
R
<
String
>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
public
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
rollBackInsurance
(
idList
);
}
...
...
@@ -172,11 +173,11 @@ public class TInsuranceDetailController {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
@Operation
(
summary
=
"办理成功"
,
description
=
"办理成功"
)
@PostMapping
(
"/successfulInsurance"
)
public
R
<
String
>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
public
R
<
List
<
TInsuranceDetail
>
>
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 @
861f9a38
...
...
@@ -104,18 +104,18 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
);
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
List
<
String
>
idList
);
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
);
R
<
List
<
TInsuranceDetail
>
>
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 @
861f9a38
...
...
@@ -148,8 +148,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceAddParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
List
<
InsuranceAddParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceAddParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
success
,
detail
);
...
...
@@ -482,11 +482,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* 投保退回
*
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
* @author licancan
*/
@Override
public
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -495,6 +495,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
TInsuranceDetail
>
errorList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
detailList
.
stream
().
forEach
(
e
->{
// 记录状态置为「退回」
...
...
@@ -505,18 +506,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//更新
this
.
saveOrUpdateBatch
(
detailList
);
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 办理成功
*
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
* @author licancan
*/
@Override
public
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
TInsuranceDetail
>
>
successfulInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -525,6 +526,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
TInsuranceDetail
>
errorList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
...
...
@@ -540,7 +542,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this
.
saveOrUpdateBatch
(
detailList
);
//todo 根据结算类型推送ekp
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
...
...
@@ -916,7 +918,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1141,17 +1143,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
if
(
ValidityUtil
.
validateIDCard
(
param
.
getReplaceEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getReplaceEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
// todo校验身份合法
// todo
校验身份合法
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -1180,10 +1182,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
// 无效、已过期、已出险、已减员的 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
||
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
||
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
||
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1255,7 +1254,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
...
...
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