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
298b0029
Commit
298b0029
authored
Jul 28, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
Feature licancan See merge request fangxinjiang/yifu!57
parents
a07eea68
22ffc8e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
LocalDateUtil.java
...ifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
+8
-3
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+9
-7
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
View file @
298b0029
...
...
@@ -74,9 +74,14 @@ public class LocalDateUtil {
* @return {@link LocalDate}
*/
public
static
LocalDate
parseLocalDate
(
String
strDate
){
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
LocalDate
localDate
=
LocalDate
.
parse
(
strDate
,
dateTimeFormatter
);
return
localDate
;
try
{
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
LocalDate
localDate
=
LocalDate
.
parse
(
strDate
,
dateTimeFormatter
);
return
localDate
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
null
;
}
}
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
298b0029
...
...
@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
...
...
@@ -696,6 +695,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
...
...
@@ -728,6 +728,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
//保费存储
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
...
...
@@ -758,6 +759,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
successList
.
add
(
detail
);
}
}
...
...
@@ -1632,21 +1634,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 已出险 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsUse
()
!=
null
&&
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
USE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
}
// 投保状态 已投保 已失效 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsEffect
()
!=
null
&&
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
EFFECT_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
}
// 投保状态 已投保 已过期 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
){
&&
detail
.
getIsOverdue
()
!=
null
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
OVERDUE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1659,8 +1661,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 减员状态 待减员/减员中 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
&&
(
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
||
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
TWO_INT
)){
&&
(
detail
.
getReduceHandleStatus
()
!=
null
&&
(
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
||
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
TWO_INT
))
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
REDUCE_REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1813,7 +1815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(!
BigDecimalUtils
.
isBigDecimal
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
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