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
6bca6186
Commit
6bca6186
authored
Nov 26, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-离职待办-优化代码
parent
f6950e7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
27 deletions
+29
-27
EmployeeRegistrationLeaveServiceImpl.java
...sp/service/impl/EmployeeRegistrationLeaveServiceImpl.java
+29
-27
No files found.
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationLeaveServiceImpl.java
View file @
6bca6186
...
@@ -1068,8 +1068,26 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1068,8 +1068,26 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
List
<
String
>
insuranceList
;
List
<
String
>
insuranceList
;
String
[]
insuranceArr
;
String
[]
insuranceArr
;
String
errorMessage
;
String
errorMessage
;
// 1社保2公积金3商险4合同5项目档案6人员档案
List
<
EmployeeRegistrationLeaveLog
>
logList
=
new
ArrayList
<>();
EmployeeRegistrationLeaveLog
leaveLog
;
String
preContent
=
"立即发起全部日期的事项:"
;
if
(
Common
.
isNotNull
(
isExit
)
&&
isExit
.
equals
(
CommonConstants
.
ONE_STRING
))
{
preContent
+=
"立即发起今日及之前的事项:"
;
}
StringBuilder
logSubType
;
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
//日志
leaveLog
=
new
EmployeeRegistrationLeaveLog
();
leaveLog
.
setLeaveId
(
leave
.
getId
());
leaveLog
.
setCreateName
(
user
.
getNickname
());
leaveLog
.
setCreateTime
(
LocalDateTime
.
now
());
leaveLog
.
setContent
(
preContent
);
logSubType
=
new
StringBuilder
();
if
(
judgeToUpdateSocial
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
if
(
judgeToUpdateSocial
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
ONE_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
leave
.
setFailSocialUser
(
userName
);
leave
.
setFailSocialUser
(
userName
);
vo
=
new
TDispatchReduceVo
();
vo
=
new
TDispatchReduceVo
();
vo
.
setLeaveId
(
leave
.
getId
());
vo
.
setLeaveId
(
leave
.
getId
());
...
@@ -1089,6 +1107,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1089,6 +1107,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
socialOldList
.
add
(
vo
);
socialOldList
.
add
(
vo
);
}
}
if
(
judgeToUpdateFund
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
if
(
judgeToUpdateFund
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
TWO_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
leave
.
setFailFundUser
(
userName
);
leave
.
setFailFundUser
(
userName
);
vo
=
new
TDispatchReduceVo
();
vo
=
new
TDispatchReduceVo
();
vo
.
setLeaveId
(
leave
.
getId
());
vo
.
setLeaveId
(
leave
.
getId
());
...
@@ -1108,6 +1127,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1108,6 +1127,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
fundOldList
.
add
(
vo
);
fundOldList
.
add
(
vo
);
}
}
if
(
judgeToUpdateInsurance
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
if
(
judgeToUpdateInsurance
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
THREE_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
insuranceArr
=
leave
.
getInsuranceIdOld
().
split
(
","
);
insuranceArr
=
leave
.
getInsuranceIdOld
().
split
(
","
);
insuranceList
=
new
ArrayList
<>();
insuranceList
=
new
ArrayList
<>();
for
(
String
id
:
insuranceArr
)
{
for
(
String
id
:
insuranceArr
)
{
...
@@ -1117,6 +1137,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1117,6 +1137,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
leaveInsuranceMap
.
put
(
leave
.
getId
(),
insuranceList
);
leaveInsuranceMap
.
put
(
leave
.
getId
(),
insuranceList
);
}
}
if
(
judgeToUpdateContract
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
if
(
judgeToUpdateContract
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
FOUR_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
leave
.
setFailContractUser
(
userName
);
leave
.
setFailContractUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getContractIdOld
());
searchVo
.
setSearchKey
(
leave
.
getContractIdOld
());
...
@@ -1131,6 +1152,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1131,6 +1152,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
if
(
judgeToUpdateProject
(
doType
,
leave
)
)
{
if
(
judgeToUpdateProject
(
doType
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
FIVE_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
leave
.
setFailEmpUser
(
userName
);
leave
.
setFailEmpUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
...
@@ -1146,6 +1168,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1146,6 +1168,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
listParamProject
.
add
(
searchVo
);
listParamProject
.
add
(
searchVo
);
}
}
if
(
judgeToUpdateEmp
(
doType
,
leave
)
)
{
if
(
judgeToUpdateEmp
(
doType
,
leave
)
)
{
logSubType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
CommonConstants
.
SIX_INT
]).
append
(
CommonConstants
.
DUNHAO_STRING
);
leave
.
setFailEmpProjectUser
(
userName
);
leave
.
setFailEmpProjectUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
...
@@ -1159,6 +1182,11 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1159,6 +1182,11 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
listParamEmp
.
add
(
searchVo
);
listParamEmp
.
add
(
searchVo
);
}
}
if
(
logSubType
.
length
()
>
0
)
{
logSubType
.
setLength
(
logSubType
.
length
()
-
1
);
// 长度减1,去掉最后一个
leaveLog
.
setContent
(
preContent
+
logSubType
);
logList
.
add
(
leaveLog
);
}
}
}
//组装返回给前端
//组装返回给前端
...
@@ -1449,39 +1477,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
...
@@ -1449,39 +1477,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
}
}
}
}
// 1社保2公积金3商险4合同5项目档案6人员档案
List
<
EmployeeRegistrationLeaveLog
>
logList
=
new
ArrayList
<>();
EmployeeRegistrationLeaveLog
leaveLog
;
String
preContent
=
"立即发起全部日期的事项:"
;
if
(
Common
.
isNotNull
(
isExit
)
&&
isExit
.
equals
(
CommonConstants
.
ONE_STRING
))
{
preContent
+=
"立即发起今日及之前的事项:"
;
}
if
(
Common
.
isNotNull
(
doType
))
{
String
[]
doTypeArray
=
doType
.
split
(
","
);
StringBuilder
subType
=
new
StringBuilder
();
for
(
String
doTypeSub
:
doTypeArray
)
{
subType
.
append
(
RegistConstants
.
DO_TYPE_ARR
[
Integer
.
parseInt
(
doTypeSub
)]).
append
(
CommonConstants
.
DUNHAO_STRING
);
}
if
(
subType
.
length
()
>
0
)
{
subType
.
setLength
(
subType
.
length
()
-
1
);
// 长度减1,去掉最后一个
}
preContent
+=
subType
;
}
else
{
preContent
=
"全部事项"
;
}
// 是否返回前端错误信息
// 是否返回前端错误信息
boolean
isReturn
=
false
;
boolean
isReturn
=
false
;
// 最终更新总状态
// 最终更新总状态
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
judgeStatus
(
leave
);
judgeStatus
(
leave
);
//日志
leaveLog
=
new
EmployeeRegistrationLeaveLog
();
leaveLog
.
setLeaveId
(
leave
.
getId
());
leaveLog
.
setCreateName
(
user
.
getNickname
());
leaveLog
.
setCreateTime
(
LocalDateTime
.
now
());
leaveLog
.
setContent
(
preContent
);
logList
.
add
(
leaveLog
);
if
(!
isReturn
&&
(
Common
.
isNotNull
(
leave
.
getDoStatusSocial
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusSocial
()))
if
(!
isReturn
&&
(
Common
.
isNotNull
(
leave
.
getDoStatusSocial
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusSocial
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusFund
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusFund
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusFund
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusFund
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusContract
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusContract
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusContract
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusContract
()))
...
...
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