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
dddc6d2a
Commit
dddc6d2a
authored
Aug 03, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化金额校验,新增不等于零的校验"
parent
013a7a7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
26 deletions
+36
-26
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+9
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+27
-26
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
dddc6d2a
...
...
@@ -168,6 +168,15 @@ public class ValidityUtil {
if
(!
money
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
return
Boolean
.
FALSE
;
}
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
);
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
if
(
max
){
return
Boolean
.
FALSE
;
}
boolean
min
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
<=
0
;
if
(
min
){
return
Boolean
.
FALSE
;
}
return
Boolean
.
TRUE
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
dddc6d2a
...
...
@@ -2762,37 +2762,38 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(!
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//推送EKP // TODO: 2022/8/2
//根据旧的结算id获取旧的结算信息
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//如果已经推送过实际保费,则先作废,再推送新的预估保费和实际保费
//如果已经推送过实际保费,则先作废,再推送新的实际保费
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
){
//作废旧的数据,生成作废结算信息记录
TInsuranceSettleCancel
cancel
=
new
TInsuranceSettleCancel
();
cancel
.
setDeptNo
(
success
.
getOldDeptNo
());
cancel
.
setInsDetailId
(
success
.
getId
());
cancel
.
setSettleId
(
defaultSettleId
);
cancel
.
setCreateUesr
(
user
.
getId
());
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//生成新的结算信息
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//赋值新的结算信息id
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送至EKP执行作废操作
//作废成功后推送新的 TODO: 2022/8/2
}
//如果没有推送过实际保费
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
){
//推送新的至EKP
}
//新增新的结算数据
TInsuranceSettle
newInsuranceSettle
=
new
TInsuranceSettle
();
newInsuranceSettle
.
setInsDetailId
(
insuranceDetailId
);
newInsuranceSettle
.
setSettleType
(
newSettleType
);
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
newInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
newInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setActualPremium
(
success
.
getActualPremium
());
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
//赋值新的预估费用和新的结算信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
...
...
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