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
12f33d9e
Commit
12f33d9e
authored
Nov 27, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化-fxj
parent
7f181049
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
18 deletions
+66
-18
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+18
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+6
-4
SysBaseSetSocialInsertVo.java
...loud/plus/v1/yifu/social/vo/SysBaseSetSocialInsertVo.java
+14
-14
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+28
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
12f33d9e
...
...
@@ -874,6 +874,24 @@ public class DateUtil {
return
calendar
.
getTime
();
}
/**
* 获得指定日期的日期
*
* @param i
* @return
* @Author fxj
* @Date 2019-09-18
**/
public
static
Date
getDateByDayNum
(
int
i
)
{
// 取时间
Date
date
=
new
Date
();
Calendar
calendar
=
new
GregorianCalendar
();
calendar
.
setTime
(
date
);
// 把日期往后增加一个月.整数往后推,负数往前移动
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
i
);
return
calendar
.
getTime
();
}
/**
* @param @param i
* @param @return 参数
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
12f33d9e
...
...
@@ -3219,7 +3219,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
return
false
;
}
private
boolean
checkReplaceIsExit
(
List
<
InsuranceReplaceParam
>
listResult
,
InsuranceReplaceParam
param
,
List
<
TInsurancePreDetail
>
listInsured
)
{
private
boolean
checkReplaceIsExit
(
List
<
InsuranceReplaceParam
>
listResult
,
InsuranceReplaceParam
param
,
List
<
TInsurancePreDetail
>
listInsured
)
{
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
boolean
flag
=
false
;
for
(
TInsurancePreDetail
detail:
listInsured
){
...
...
@@ -3229,7 +3231,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
break
;
}
//保单生效日期及保单结束时间与新增数据的保单开始时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增不走原逻辑
if
(
LocalDateUtil
.
hasOverlap
(
detail
.
getPolicyEffect
(
),
detail
.
getPolicyEnd
(),
if
(
LocalDateUtil
.
hasOverlap
(
DateUtil
.
getDateByDayNum
(
1
),
detail
.
getPolicyEnd
(),
DateUtil
.
stringToDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
),
DateUtil
.
stringToDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)))
{
flag
=
true
;
...
...
@@ -3258,7 +3260,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
break
;
}
//保单生效日期及保单结束时间与新增数据的保单开始时间及保单结束时间重叠判断,重叠给提示,不重叠允许新增不走原逻辑
if
(
LocalDateUtil
.
hasOverlap
(
detail
.
getPolicyEffect
(
),
detail
.
getPolicyEnd
(),
if
(
LocalDateUtil
.
hasOverlap
(
DateUtil
.
getDateByDayNum
(
1
),
detail
.
getPolicyEnd
(),
DateUtil
.
convertToDateByLocalDate
(
param
.
getPolicyStart
()),
DateUtil
.
convertToDateByLocalDate
(
param
.
getPolicyEnd
())))
{
flag
=
true
;
...
...
@@ -4135,7 +4137,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
TInsurancePreDetail
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getReplaceEmpIdcardNo
());
if
(
checkReplaceIsExit
(
listResult
,
param
,
listInsured
)){
if
(
checkReplaceIsExit
(
listResult
,
param
,
listInsured
,
replace
.
getPolicyEffect
()
)){
continue
;
}
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SysBaseSetSocialInsertVo.java
View file @
12f33d9e
...
...
@@ -69,7 +69,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 养老基数上限
*/
@ExcelAttribute
(
name
=
"养老基数上限"
,
isNotEmpty
=
true
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"养老基数上限"
,
isNotEmpty
=
true
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"养老基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数上限"
)
...
...
@@ -78,7 +78,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 养老基数下限
*/
@ExcelAttribute
(
name
=
"养老基数下限"
,
isNotEmpty
=
true
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"养老基数下限"
,
isNotEmpty
=
true
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"养老基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"养老基数下限"
)
...
...
@@ -87,7 +87,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 工伤基数上限
*/
@ExcelAttribute
(
name
=
"工伤基数上限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"工伤基数上限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"工伤基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数上限"
)
...
...
@@ -96,7 +96,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 工伤基数下限
*/
@ExcelAttribute
(
name
=
"工伤基数下限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"工伤基数下限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"工伤基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"工伤基数下限"
)
...
...
@@ -105,7 +105,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 医疗基数上限
*/
@ExcelAttribute
(
name
=
"医疗基数上限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"医疗基数上限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"医疗基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数上限"
)
...
...
@@ -114,7 +114,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 医疗基数下限
*/
@ExcelAttribute
(
name
=
"医疗基数下限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"医疗基数下限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"医疗基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医疗基数下限"
)
...
...
@@ -123,7 +123,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 生育基数上限
*/
@ExcelAttribute
(
name
=
"生育基数上限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"生育基数上限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"生育基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数上限"
)
...
...
@@ -132,7 +132,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 生育基数下限
*/
@ExcelAttribute
(
name
=
"生育基数下限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"生育基数下限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"生育基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生育基数下限"
)
...
...
@@ -141,7 +141,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 失业基数上限
*/
@ExcelAttribute
(
name
=
"失业基数上限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"失业基数上限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"失业基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数上限"
)
...
...
@@ -150,7 +150,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 失业基数下限
*/
@ExcelAttribute
(
name
=
"失业基数下限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"失业基数下限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"失业基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"失业基数下限"
)
...
...
@@ -159,7 +159,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 大病基数上限
*/
@ExcelAttribute
(
name
=
"大病基数上限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"大病基数上限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"大病基数上限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数上限"
)
...
...
@@ -168,7 +168,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 大病基数下限
*/
@ExcelAttribute
(
name
=
"大病基数下限"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"大病基数下限"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"大病基数下限"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"大病基数下限"
)
...
...
@@ -222,7 +222,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 单位大病金额
*/
@ExcelAttribute
(
name
=
"单位大病金额"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"单位大病金额"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"单位大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病金额"
)
...
...
@@ -231,7 +231,7 @@ public class SysBaseSetSocialInsertVo extends RowIndex implements Serializable {
/**
* 个人大病金额
*/
@ExcelAttribute
(
name
=
"个人大病金额"
,
isFloat
=
true
,
max
=
"9999999
100.01
"
,
min
=
0
)
@ExcelAttribute
(
name
=
"个人大病金额"
,
isFloat
=
true
,
max
=
"9999999
99.99
"
,
min
=
0
)
@Schema
(
description
=
"个人大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病金额"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
12f33d9e
...
...
@@ -1046,6 +1046,22 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//各种比例需在0~100内
if
(
infoVo
.
getUpPersion
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getUpInjury
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getUpMedical
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getUpBirth
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getUpUnemployment
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerPersion
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerInjury
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerMedical
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerBirth
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerUnemployment
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"基数上下限不能小于0,请修改后重新提交"
,
excel
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
//单位及个人比例合计
infoVo
.
setUnitProSum
(
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitInjuryPro
(),
infoVo
.
getUnitMedicalPro
(),
...
...
@@ -1068,6 +1084,12 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMessageList
.
add
(
errorMsg
);
continue
;
}
if
(
infoVo
.
getUpBig
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
infoVo
.
getLowerBig
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"大病上下限不可小于0,请修改后重新提交"
,
excel
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
}
infoVo
.
setStatus
(
CommonConstants
.
ZERO_INT
);
infoVo
.
setBaseType
(
CommonConstants
.
ZERO_STRING
);
...
...
@@ -1226,6 +1248,12 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
errorMessageList
.
add
(
errorMsg
);
continue
;
}
if
(
excel
.
getLowerLimit
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
||
excel
.
getUpperLimit
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
errorMsg
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
"基数下限不可小于0,请修改后重新提交。"
,
excel
);
errorMessageList
.
add
(
errorMsg
);
continue
;
}
infoVo
.
setFundPayLowerLimit
(
excel
.
getLowerLimit
());
infoVo
.
setFundPayUpperLimit
(
excel
.
getUpperLimit
());
//单边小数点
...
...
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