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
5bd602ad
Commit
5bd602ad
authored
Jul 29, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量办理 100%
parent
c7deae3c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
184 additions
and
80 deletions
+184
-80
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+8
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+4
-0
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+4
-4
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+141
-76
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+27
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
5bd602ad
...
...
@@ -448,4 +448,12 @@ public interface ErrorCodes {
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
String
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
=
"emp.dispatch.social.date.limit.error"
;
/**
* 派增异常: 社保各项起缴月份需为可补缴月份,请确认后操作!
*/
String
EMP_DISPATCH_SOCIAL_START_IS_ERROR
=
"emp.dispatch.social.start.is.error"
;
/**
* 派增异常: 公积金起缴月份需为可补缴月份,请确认后操作!
*/
String
EMP_DISPATCH_FUND_DATE_LIMIT_ERROR
=
"emp.dispatch.fund.start.is.error"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
5bd602ad
...
...
@@ -167,6 +167,10 @@ emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD
emp.dispatch.social.date.limit.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
793E
\u
4FDD
\u5404\u9879\u
8D77
\u
7F34
\u
65E5
\u
4E0D
\u
4E00
\u
81F4
\u
FF0C
\u
59D4
\u6258\u5907\u
6CE8
\u
5FC5
\u
586B
emp.dispatch.social.start.is.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
793E
\u
4FDD
\u5404\u9879\u
8D77
\u
7F34
\u6708\u
4EFD
\u9700\u
4E3A
\u
53EF
\u8865\u
7F34
\u6708\u
4EFD
\u
FF0C
\u
8BF7
\u
786E
\u
8BA4
\u
540E
\u
64CD
\u
4F5C
\u
FF01
emp.dispatch.fund.start.is.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
516C
\u
79EF
\u
91D1
\u
8D77
\u
7F34
\u6708\u
4EFD
\u9700\u
4E3A
\u
53EF
\u8865\u
7F34
\u6708\u
4EFD
\u
FF0C
\u
8BF7
\u
786E
\u
8BA4
\u
540E
\u
64CD
\u
4F5C
\u
FF01
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
5bd602ad
...
...
@@ -54,7 +54,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -62,7 +62,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 员工类型
*/
@Length
(
max
=
32
,
message
=
"员工类型 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
...
...
@@ -70,7 +70,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 手机号码
*/
@Length
(
max
=
32
,
message
=
"手机号码 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
)
@Schema
(
description
=
"手机号码"
)
@ExcelProperty
(
"手机号码"
)
private
String
empMobile
;
...
...
@@ -123,7 +123,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-市
*/
@ExcelAttribute
(
name
=
"档案-市"
,
isArea
=
true
,
parentField
=
"fileProvince"
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"档案-市"
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
)
@ExcelProperty
(
"档案-市"
)
private
String
fileCity
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
5bd602ad
...
...
@@ -820,6 +820,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
dispatch
.
setEmpType
(
empVo
.
getEmpNatrue
());
if
(
Common
.
isNotNull
(
empVo
.
getIdProvince
())){
dispatch
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
dispatch
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
...
...
@@ -856,6 +857,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund
.
setProvidentStart
(
excel
.
getProvidentStart
());
if
(
Common
.
isNotNull
(
fundSet
)){
fund
.
setProvidentHousehold
(
fundSet
.
getDepartId
());
fund
.
setProvidentHouseholdName
(
fundSet
.
getDepartName
());
if
(!
checkFundPer
(
fundSet
.
getFundProList
(),
excel
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_PERCENT_NOT_EXIST
)));
return
true
;
...
...
@@ -1361,6 +1363,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_USED
)));
return
true
;
}
if
(
Common
.
isEmpty
(
empVo
.
getContractStart
())
&&
Common
.
isEmpty
(
excel
.
getContractStart
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_USED
)));
return
true
;
}
excel
.
setEmpType
(
empVo
.
getEmpNatrue
());
excel
.
setEmpMobile
(
empVo
.
getEmpPhone
());
excel
.
setFileProvince
(
Common
.
isNotNullToStr
(
empVo
.
getFileProvince
()));
excel
.
setFileCity
(
Common
.
isNotNullToStr
(
empVo
.
getFileCity
()));
excel
.
setFileTown
(
Common
.
isNotNullToStr
(
empVo
.
getFileTown
()));
excel
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
excel
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
}
excel
.
setSettleDomainId
(
setInfoVo
.
getId
());
excel
.
setDepartName
(
setInfoVo
.
getDepartName
());
...
...
@@ -1434,6 +1448,33 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
// 各个社保基数和日期空 默认养老日期和基数
initExcelBaseAndDate
(
excel
);
// 校验各项起缴日期 查看是否符合社保补缴政策
if
(
validSocialStartDate
(
errorMessageList
,
excel
,
socialSet
))
return
true
;
//校验各项基数
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
))
return
true
;
}
// 校验公积金上下限和起缴日期
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
if
(
Common
.
isNotNull
(
fundSet
)
&&
Common
.
isNotNull
(
excel
.
getProvidentCardinal
())
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_LIMIT_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getProvidentStart
()),
fundSet
.
getCanOverpay
(),
fundSet
.
getOverpayNumber
(),
fundSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_DATE_LIMIT_ERROR
)));
return
true
;
}
}
return
false
;
}
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
...
...
@@ -1459,9 +1500,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if
(
Common
.
isEmpty
(
excel
.
getRecordBase
())
&&
Common
.
isEmpty
(
excel
.
getSocialHousehold
())){
boolean
flag
=
false
;
// 各个社保基数和日期空 默认养老日期和基数
initExcelBaseAndDate
(
excel
);
// 自定义 只要有一个不相当同的 日期或基数 就要提示
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
...
...
@@ -1508,15 +1546,42 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
return
false
;
}
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())
&&
Common
.
isNotNull
(
fundSet
)
&&
Common
.
isNotNull
(
excel
.
getProvidentCardinal
())
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_LIMIT_ERROR
)));
private
boolean
validSocialStartDate
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())){
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getPensionStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getMedicalStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getUnemployStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getWorkInjuryStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getBirthStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getBigailmentStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
}
return
false
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
5bd602ad
...
...
@@ -155,4 +155,31 @@ public class ServiceUtil {
}
return
false
;
}
/**
* 查看社保公积金起缴日期是否符合补缴逻辑
* @Author fxj
* @Date 2020-09-07
* @param socialStartDate 起缴日期
* @param canOverpay 是否可补缴 0:是,1:否
* @param overpayNumber 补缴期限 整数
* @param haveThisMonth 是否含当月 0:是,1:否 如果无符合条件默认不含当月
* @return 符合 false 不符合 true
**/
public
static
boolean
checkDispatchDate
(
LocalDateTime
socialStartDate
,
String
canOverpay
,
Integer
overpayNumber
,
String
haveThisMonth
){
if
(
null
==
socialStartDate
){
return
false
;
}
LocalDateTime
temp
=
null
;
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
canOverpay
)){
temp
=
socialStartDate
.
plusMonths
(
CommonConstants
.
ZERO_STRING
.
equals
(
haveThisMonth
)?(
long
)
overpayNumber:
(
long
)(
overpayNumber
+
1
));
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
canOverpay
)){
temp
=
socialStartDate
;
}
return
(
null
!=
temp
&&
(
temp
.
getYear
()
<
now
.
getYear
()
||
isaBoolean
(
temp
,
now
)));
}
private
static
boolean
isaBoolean
(
LocalDateTime
temp
,
LocalDateTime
now
)
{
return
temp
.
getYear
()
==
now
.
getYear
()
&&
temp
.
getMonthValue
()
<
now
.
getMonthValue
();
}
}
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