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
4473d93d
Commit
4473d93d
authored
Dec 14, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:优化测试
parent
69a49880
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
InsuranceRegisterParam.java
...ud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
+8
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+7
-14
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
View file @
4473d93d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -80,4 +82,10 @@ public class InsuranceRegisterParam implements Serializable {
*/
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/**
* 数据传递对象,校验通过后不需要再查数据库
*/
@JsonIgnore
private
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
4473d93d
...
...
@@ -1727,6 +1727,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
R
<
List
<
InsuranceRegisterParam
>>
registeredPolicyPremium
(
List
<
InsuranceRegisterParam
>
paramList
)
{
long
l
=
System
.
currentTimeMillis
();
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
...
...
@@ -1756,20 +1757,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
success
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
//排除替换类型,解决保单保费挂靠问题
.
ne
(
TInsuranceDetail:
:
getBuyType
,
CommonConstants
.
FOUR_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
TInsuranceDetail
detail
=
success
.
getDetail
();
actualMoney
=
detail
.
getActualPremium
();
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
...
...
@@ -2010,6 +1998,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
operatList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operatList
=
null
;
}
long
e
=
System
.
currentTimeMillis
();
long
r
=
e
-
l
;
log
.
info
(
"共耗时:"
,
r
);
return
R
.
ok
(
operatList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -3613,6 +3604,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
//数据传递对象,校验通过后不需要再查数据库
BeanCopyUtils
.
copyProperties
(
detail
,
param
.
getDetail
());
}
return
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
...
...
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