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
c0735942
Commit
c0735942
authored
Aug 01, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化购买标准,身故残疾,医疗额度提示语句"
parent
391dd7ae
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+14
-0
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+9
-0
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+9
-0
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
c0735942
...
...
@@ -619,6 +619,20 @@ public class InsurancesConstants {
*/
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
/**
* 购买标准不能超过9999999.99
*/
public
static
final
String
INSURANCE_TYPE_STANDARD_MAX_ERROR
=
"购买标准不能超过9999999.99"
;
/**
* 医疗额度不能超过9999999.99
*/
public
static
final
String
MEDICAL_QUOTA_MAX_ERROR
=
"医疗额度不能超过9999999.99"
;
/**
* 身故和残疾不能超过9999999.99
*/
public
static
final
String
DIE_DISABLE_QUOTA_MAX_ERROR
=
"身故和残疾不能超过9999999.99"
;
/**
* 导入减员数据
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
c0735942
...
...
@@ -168,6 +168,15 @@ public class ValidityUtil {
if
(!
money
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
return
Boolean
.
FALSE
;
}
return
Boolean
.
TRUE
;
}
/**
* 判断金额是否大于9999999.99
* @param money 金额
* @return boolean
*/
public
static
boolean
validateMoneyMax
(
final
String
money
)
{
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
);
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
if
(
max
){
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
c0735942
...
...
@@ -125,12 +125,21 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if
(!
ValidityUtil
.
validateMoney
(
buyStandard
)){
return
R
.
failed
(
"购买标准格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
buyStandard
)){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_TYPE_STANDARD_MAX_ERROR
);
}
if
(!
ValidityUtil
.
validateMoney
(
medicalQuota
)){
return
R
.
failed
(
"医疗额度格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
medicalQuota
)){
return
R
.
failed
(
InsurancesConstants
.
MEDICAL_QUOTA_MAX_ERROR
);
}
if
(!
ValidityUtil
.
validateMoney
(
dieDisableQuota
)){
return
R
.
failed
(
"身故或残疾额度格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
dieDisableQuota
)){
return
R
.
failed
(
InsurancesConstants
.
DIE_DISABLE_QUOTA_MAX_ERROR
);
}
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceTypeStandard
.
getInsuranceTypeId
())
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
insuranceTypeStandard
.
getBuyStandard
())
...
...
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