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
20f4d4a5
Commit
20f4d4a5
authored
Nov 20, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.17' into MVP1.7.17
parents
5c9ee63d
a4b1dc3b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
16 deletions
+155
-16
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+14
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+5
-0
LocalDateUtil.java
...ifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
+20
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+116
-16
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
20f4d4a5
...
@@ -700,6 +700,20 @@ public class DateUtil {
...
@@ -700,6 +700,20 @@ public class DateUtil {
return
date
;
return
date
;
}
}
/**
* @Author fxj
* @Description 将LocalDate转成Date
* @Date 16:11 2025/11/20
* @Param
* @return
**/
public
static
Date
convertToDateByLocalDate
(
LocalDate
localDate
)
{
if
(
localDate
==
null
)
{
return
null
;
}
return
Date
.
from
(
localDate
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
}
public
static
String
dateFromat
(
Date
date
,
int
minute
)
{
public
static
String
dateFromat
(
Date
date
,
int
minute
)
{
String
dateFormat
=
null
;
String
dateFormat
=
null
;
int
year
=
Integer
.
parseInt
(
getYear
(
date
));
int
year
=
Integer
.
parseInt
(
getYear
(
date
));
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
20f4d4a5
...
@@ -112,6 +112,11 @@ public class InsurancesConstants {
...
@@ -112,6 +112,11 @@ public class InsurancesConstants {
* 本次派单前系统已有该人员在途/在保数据
* 本次派单前系统已有该人员在途/在保数据
*/
*/
public
static
final
String
DIS_PERSON_DATA_IS_EXIST
=
"本次派单前系统已有该人员在途/在保数据"
;
public
static
final
String
DIS_PERSON_DATA_IS_EXIST
=
"本次派单前系统已有该人员在途/在保数据"
;
/**
* 本次派单保单起止时间与在途/在保数据时间上重叠
*/
public
static
final
String
DIS_PERSON_DATA_IS_REPEAT
=
"本次派单保单起止时间与在途/在保数据时间上重叠"
;
/**
/**
* 投保记录不存在
* 投保记录不存在
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
View file @
20f4d4a5
...
@@ -373,4 +373,24 @@ public class LocalDateUtil {
...
@@ -373,4 +373,24 @@ public class LocalDateUtil {
// 格式化日期
// 格式化日期
return
date
.
format
(
formatter
);
return
date
.
format
(
formatter
);
}
}
/**
* @Author fxj
* @Description 判断 日期policyEffect及policyEnd 与 日期policyStart及policyEnd1 是否时间上有重叠,有返回true 否返回 false
* @Date 14:52 2025/11/20
* @Param
* @return
**/
public
static
boolean
hasOverlap
(
Date
start1
,
Date
end1
,
Date
start2
,
Date
end2
)
{
// 检查参数有效性
if
(
start1
==
null
||
end1
==
null
||
start2
==
null
||
end2
==
null
)
{
return
false
;
}
// 检查单个时间段的开始结束时间是否合理
if
(
start1
.
after
(
end1
)
||
start2
.
after
(
end2
))
{
return
false
;
}
// 判断不重叠的情况,然后取反
// 时间段1完全在时间段2之前,或者时间段1完全在时间段2之后
return
!(
end1
.
before
(
start2
)
||
start1
.
after
(
end2
));
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
20f4d4a5
...
@@ -3121,13 +3121,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3121,13 +3121,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
if
(
checkIsExit
(
listResult
,
param
,
listInsured
)){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
continue
;
// listInProgress.addAll(listInsured);
}
}
}
}
listSuccess
.
add
(
param
);
listSuccess
.
add
(
param
);
...
@@ -3136,6 +3131,119 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3136,6 +3131,119 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
map
.
put
(
"listSuccess"
,
listSuccess
);
map
.
put
(
"listSuccess"
,
listSuccess
);
return
map
;
return
map
;
}
}
/**
* @Author fxj
* @Description 判断商险 待投保、投保中、已投保(有效,未过期) 如果保单生效时间为空直接提示存在在途或在保数据
* 如果保单生效时间不为空 判断新增保单生效时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增
* @Date 15:40 2025/11/20
* @Param
* @return
**/
private
boolean
checkIsExit
(
List
<
InsuranceAddParam
>
listResult
,
InsuranceAddParam
param
,
List
<
TInsurancePreDetail
>
listInsured
)
{
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
List
<
TInsurancePreDetail
>
insured1
=
new
ArrayList
<>();
List
<
TInsurancePreDetail
>
insured2
=
new
ArrayList
<>();
for
(
TInsurancePreDetail
detail:
listInsured
){
//如果保单生效日期为空就不需校验,按原逻辑处理 提示存在在途或在保数据
if
(
Common
.
isEmpty
(
detail
.
getPolicyEffect
()))
{
insured1
.
add
(
detail
);
continue
;
}
//保单生效日期及保单结束时间与新增数据的保单开始时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增不走原逻辑
if
(
LocalDateUtil
.
hasOverlap
(
detail
.
getPolicyEffect
(),
detail
.
getPolicyEnd
(),
DateUtil
.
stringToDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
),
DateUtil
.
stringToDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)))
{
insured2
.
add
(
detail
);
continue
;
}
}
if
(!
insured1
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
insured1
);
listResult
.
add
(
param
);
return
true
;
}
if
(!
insured2
.
isEmpty
()){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_REPEAT
);
param
.
setInProgressList
(
insured2
);
listResult
.
add
(
param
);
return
true
;
}
}
return
false
;
}
private
boolean
checkReplaceIsExit
(
List
<
InsuranceReplaceParam
>
listResult
,
InsuranceReplaceParam
param
,
List
<
TInsurancePreDetail
>
listInsured
)
{
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
List
<
TInsurancePreDetail
>
insured1
=
new
ArrayList
<>();
List
<
TInsurancePreDetail
>
insured2
=
new
ArrayList
<>();
for
(
TInsurancePreDetail
detail:
listInsured
){
//如果保单生效日期为空就不需校验,按原逻辑处理 提示存在在途或在保数据
if
(
Common
.
isEmpty
(
detail
.
getPolicyEffect
()))
{
insured1
.
add
(
detail
);
continue
;
}
//保单生效日期及保单结束时间与新增数据的保单开始时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增不走原逻辑
if
(
LocalDateUtil
.
hasOverlap
(
detail
.
getPolicyEffect
(),
detail
.
getPolicyEnd
(),
DateUtil
.
stringToDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
),
DateUtil
.
stringToDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)))
{
insured2
.
add
(
detail
);
continue
;
}
}
if
(!
insured1
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
insured1
);
listResult
.
add
(
param
);
return
true
;
}
if
(!
insured2
.
isEmpty
()){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_REPEAT
);
param
.
setInProgressList
(
insured2
);
listResult
.
add
(
param
);
return
true
;
}
}
return
false
;
}
private
boolean
checkBatchIsExit
(
List
<
InsuranceBatchParam
>
listResult
,
InsuranceBatchParam
param
,
List
<
TInsurancePreDetail
>
listInsured
)
{
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
List
<
TInsurancePreDetail
>
insured1
=
new
ArrayList
<>();
List
<
TInsurancePreDetail
>
insured2
=
new
ArrayList
<>();
for
(
TInsurancePreDetail
detail:
listInsured
){
//如果保单生效日期为空就不需校验,按原逻辑处理 提示存在在途或在保数据
if
(
Common
.
isEmpty
(
detail
.
getPolicyEffect
()))
{
insured1
.
add
(
detail
);
continue
;
}
//保单生效日期及保单结束时间与新增数据的保单开始时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增不走原逻辑
if
(
LocalDateUtil
.
hasOverlap
(
detail
.
getPolicyEffect
(),
detail
.
getPolicyEnd
(),
DateUtil
.
convertToDateByLocalDate
(
param
.
getPolicyStart
()),
DateUtil
.
convertToDateByLocalDate
(
param
.
getPolicyEnd
())))
{
insured2
.
add
(
detail
);
continue
;
}
}
if
(!
insured1
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
insured1
);
listResult
.
add
(
param
);
return
true
;
}
if
(!
insured2
.
isEmpty
()){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_REPEAT
);
param
.
setInProgressList
(
insured2
);
listResult
.
add
(
param
);
return
true
;
}
}
return
false
;
}
private
Map
<
String
,
String
>
getInsurAutoMap
(
List
<
InsuranceAddParam
>
paramList
)
{
private
Map
<
String
,
String
>
getInsurAutoMap
(
List
<
InsuranceAddParam
>
paramList
)
{
Map
<
String
,
String
>
insurAutoMap
=
null
;
Map
<
String
,
String
>
insurAutoMap
=
null
;
...
@@ -3589,11 +3697,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3589,11 +3697,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
if
(
checkBatchIsExit
(
listResult
,
param
,
listInsured
)){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3998,11 +4102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3998,11 +4102,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getReplaceEmpIdcardNo
());
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getReplaceEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
if
(
checkReplaceIsExit
(
listResult
,
param
,
listInsured
)){
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
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