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
f6950e7a
Commit
f6950e7a
authored
Nov 26, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-离职待办-优化代码
parent
07ec4846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
172 additions
and
137 deletions
+172
-137
EmployeeRegistrationLeaveServiceImpl.java
...sp/service/impl/EmployeeRegistrationLeaveServiceImpl.java
+172
-137
No files found.
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationLeaveServiceImpl.java
View file @
f6950e7a
...
...
@@ -1069,17 +1069,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
String
[]
insuranceArr
;
String
errorMessage
;
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
ONE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getSocialDispatchIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getSocialExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusSocial
())
&&
(
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
SIX_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
NINE_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
TEN_STRING
)
)
)
{
if
(
judgeToUpdateSocial
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
leave
.
setFailSocialUser
(
userName
);
vo
=
new
TDispatchReduceVo
();
vo
.
setLeaveId
(
leave
.
getId
());
...
...
@@ -1098,16 +1088,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
socialOldList
.
add
(
vo
);
}
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
TWO_STRING
))
&&
Common
.
isNotNull
(
leave
.
getFundDispatchIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getFundExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusFund
())
&&
(
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
NINE_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
TEN_STRING
)
)
)
{
if
(
judgeToUpdateFund
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
leave
.
setFailFundUser
(
userName
);
vo
=
new
TDispatchReduceVo
();
vo
.
setLeaveId
(
leave
.
getId
());
...
...
@@ -1126,15 +1107,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
fundOldList
.
add
(
vo
);
}
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
THREE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getInsuranceIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getInsuranceExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusInsurance
())
&&
(
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
NINE_STRING
)
)
)
{
if
(
judgeToUpdateInsurance
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
insuranceArr
=
leave
.
getInsuranceIdOld
().
split
(
","
);
insuranceList
=
new
ArrayList
<>();
for
(
String
id
:
insuranceArr
)
{
...
...
@@ -1143,15 +1116,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
leaveInsuranceMap
.
put
(
leave
.
getId
(),
insuranceList
);
}
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
FOUR_STRING
))
&&
Common
.
isNotNull
(
leave
.
getContractIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getContractExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusContract
())
&&
(
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
TEN_STRING
)
)
)
{
if
(
judgeToUpdateContract
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
leave
.
setFailContractUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getContractIdOld
());
...
...
@@ -1165,13 +1130,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
listParamContract
.
add
(
searchVo
);
}
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
FIVE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getEmpProjectIdOld
())
&&
Common
.
isNotNull
(
leave
.
getDoStatusProject
())
&&
(
leave
.
getDoStatusProject
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusProject
().
equals
(
CommonConstants
.
NINE_STRING
)
)
)
{
if
(
judgeToUpdateProject
(
doType
,
leave
)
)
{
leave
.
setFailEmpUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
...
...
@@ -1186,13 +1145,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
listParamProject
.
add
(
searchVo
);
}
if
((
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
SIX_STRING
))
&&
Common
.
isNotNull
(
leave
.
getEmpIdOld
())
&&
Common
.
isNotNull
(
leave
.
getDoStatusEmp
())
&&
(
leave
.
getDoStatusEmp
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusEmp
().
equals
(
CommonConstants
.
NINE_STRING
)
)
)
{
if
(
judgeToUpdateEmp
(
doType
,
leave
)
)
{
leave
.
setFailEmpProjectUser
(
userName
);
searchVo
=
new
BaseSearchVO
();
searchVo
.
setSearchKey
(
leave
.
getEmpProjectIdOld
());
...
...
@@ -1238,19 +1191,21 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setSocialId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusSocial
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
judgeToUpdateSocial
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setSocialId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusSocial
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailSocialRemark
(
errorMessage
);
leave
.
setFailSocialTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusSocial
(
CommonConstants
.
THREE_STRING
);
}
leave
.
setFailSocialRemark
(
errorMessage
);
leave
.
setFailSocialTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusSocial
(
CommonConstants
.
THREE_STRING
);
}
}
}
...
...
@@ -1278,19 +1233,21 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setFundId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusFund
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
judgeToUpdateFund
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setFundId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusFund
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailFundRemark
(
errorMessage
);
leave
.
setFailFundTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusFund
(
CommonConstants
.
THREE_STRING
);
}
leave
.
setFailFundRemark
(
errorMessage
);
leave
.
setFailFundTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusFund
(
CommonConstants
.
THREE_STRING
);
}
}
}
...
...
@@ -1321,31 +1278,33 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
List
<
String
>
errorList
=
new
ArrayList
<>();
List
<
String
>
successList
=
new
ArrayList
<>();
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
errorMsg
=
new
StringBuilder
();
leave
.
setInsuranceId
(
leave
.
getInsuranceIdOld
());
insuranceList
=
leaveInsuranceMap
.
get
(
leave
.
getId
());
if
(
insuranceList
!=
null
)
{
// 处理每一条商险
for
(
String
insuranceId
:
insuranceList
)
{
if
(
errorMap
.
get
(
insuranceId
)
!=
null
)
{
errorMsg
.
append
(
errorMap
.
get
(
insuranceId
)).
append
(
CommonConstants
.
SEMICOLON_STRING
);
errorList
.
add
(
insuranceId
);
}
else
{
successList
.
add
(
insuranceId
);
if
(
judgeToUpdateInsurance
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
errorMsg
=
new
StringBuilder
();
leave
.
setInsuranceId
(
leave
.
getInsuranceIdOld
());
insuranceList
=
leaveInsuranceMap
.
get
(
leave
.
getId
());
if
(
insuranceList
!=
null
)
{
// 处理每一条商险
for
(
String
insuranceId
:
insuranceList
)
{
if
(
errorMap
.
get
(
insuranceId
)
!=
null
)
{
errorMsg
.
append
(
errorMap
.
get
(
insuranceId
)).
append
(
CommonConstants
.
SEMICOLON_STRING
);
errorList
.
add
(
insuranceId
);
}
else
{
successList
.
add
(
insuranceId
);
}
}
}
if
(
errorMsg
.
length
()
>
CommonConstants
.
ZERO_INT
)
{
leave
.
setFailInsuranceUser
(
userName
);
errorMessage
=
errorMsg
.
toString
();
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
errorMsg
.
length
()
>
CommonConstants
.
ZERO_INT
)
{
leave
.
setFailInsuranceUser
(
userName
);
errorMessage
=
errorMsg
.
toString
();
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailInsuranceRemark
(
errorMessage
);
leave
.
setFailInsuranceTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusInsurance
(
CommonConstants
.
THREE_STRING
);
}
else
{
// 待减员
leave
.
setDoStatusInsurance
(
CommonConstants
.
FOUR_STRING
);
}
leave
.
setFailInsuranceRemark
(
errorMessage
);
leave
.
setFailInsuranceTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusInsurance
(
CommonConstants
.
THREE_STRING
);
}
else
{
// 待减员
leave
.
setDoStatusInsurance
(
CommonConstants
.
FOUR_STRING
);
}
}
}
...
...
@@ -1359,9 +1318,11 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
else
{
// 全部成功
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
leave
.
setInsuranceId
(
leave
.
getInsuranceIdOld
());
// 待办理
leave
.
setDoStatusInsurance
(
CommonConstants
.
FOUR_STRING
);
if
(
judgeToUpdateInsurance
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
leave
.
setInsuranceId
(
leave
.
getInsuranceIdOld
());
// 待办理
leave
.
setDoStatusInsurance
(
CommonConstants
.
FOUR_STRING
);
}
}
leaveInsuranceMapper
.
updateLeaveInsuranceListByIdAndStatus
(
CommonConstants
.
FOUR_STRING
,
insuranceOldList
);
}
...
...
@@ -1391,19 +1352,21 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setContractId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusContract
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
judgeToUpdateContract
(
isExit
,
doType
,
nowTime
,
leave
)
)
{
// 成功
if
(
successMap
.
get
(
leave
.
getId
())
!=
null
)
{
leave
.
setContractId
(
successMap
.
get
(
leave
.
getId
()));
leave
.
setDoStatusContract
(
CommonConstants
.
FOUR_STRING
);
}
else
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
// 失败
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailContractRemark
(
errorMessage
);
leave
.
setFailContractTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusContract
(
CommonConstants
.
THREE_STRING
);
}
leave
.
setFailContractRemark
(
errorMessage
);
leave
.
setFailContractTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusContract
(
CommonConstants
.
THREE_STRING
);
}
}
}
...
...
@@ -1424,21 +1387,25 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
errorMap
.
put
(
message
.
getKey
(),
message
.
getMessage
());
}
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
judgeToUpdateProject
(
doType
,
leave
)
)
{
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailEmpProjectRemark
(
errorMessage
);
leave
.
setFailEmpProjectTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusProject
(
CommonConstants
.
NINE_STRING
);
}
leave
.
setFailEmpProjectRemark
(
errorMessage
);
leave
.
setFailEmpProjectTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusProject
(
CommonConstants
.
NINE_STRING
);
}
}
}
else
{
// 全部成功
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
leave
.
setEmpProjectId
(
leave
.
getEmpProjectIdOld
());
leave
.
setDoStatusProject
(
CommonConstants
.
EIGHT_STRING
);
if
(
judgeToUpdateProject
(
doType
,
leave
)
)
{
leave
.
setEmpProjectId
(
leave
.
getEmpProjectIdOld
());
leave
.
setDoStatusProject
(
CommonConstants
.
EIGHT_STRING
);
}
}
}
}
...
...
@@ -1459,21 +1426,25 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
errorMap
.
put
(
message
.
getKey
(),
message
.
getMessage
());
}
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
if
(
judgeToUpdateEmp
(
doType
,
leave
)
)
{
if
(
errorMap
.
get
(
leave
.
getId
())
!=
null
)
{
errorMessage
=
errorMap
.
get
(
leave
.
getId
());
if
(
Common
.
isNotNull
(
errorMessage
)
&&
errorMessage
.
length
()
>
300
)
{
errorMessage
=
errorMessage
.
substring
(
0
,
300
);
}
leave
.
setFailEmpRemark
(
errorMessage
);
leave
.
setFailEmpTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusEmp
(
CommonConstants
.
NINE_STRING
);
}
leave
.
setFailEmpRemark
(
errorMessage
);
leave
.
setFailEmpTime
(
LocalDateTime
.
now
());
leave
.
setDoStatusEmp
(
CommonConstants
.
NINE_STRING
);
}
}
}
else
{
// 全部成功
for
(
EmployeeRegistrationLeave
leave
:
leaveList
)
{
leave
.
setEmpId
(
leave
.
getEmpIdOld
());
leave
.
setDoStatusEmp
(
CommonConstants
.
EIGHT_STRING
);
if
(
judgeToUpdateEmp
(
doType
,
leave
)
)
{
leave
.
setEmpId
(
leave
.
getEmpIdOld
());
leave
.
setDoStatusEmp
(
CommonConstants
.
EIGHT_STRING
);
}
}
}
}
...
...
@@ -1511,16 +1482,14 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
leaveLog
.
setCreateTime
(
LocalDateTime
.
now
());
leaveLog
.
setContent
(
preContent
);
logList
.
add
(
leaveLog
);
if
(!
isReturn
)
{
if
((
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
.
getDoStatusContract
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusContract
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusInsurance
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
leave
.
getDoStatusInsurance
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusProject
())
&&
CommonConstants
.
NINE_STRING
.
equals
(
leave
.
getDoStatusProject
()))
||
(
Common
.
isNotNull
(
leave
.
getDoStatusEmp
())
&&
CommonConstants
.
NINE_STRING
.
equals
(
leave
.
getDoStatusEmp
()))
)
{
isReturn
=
true
;
}
isReturn
=
true
;
}
}
leaveLogService
.
saveBatch
(
logList
);
...
...
@@ -1532,6 +1501,72 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
}
}
private
boolean
judgeToUpdateEmp
(
String
doType
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
SIX_STRING
))
&&
Common
.
isNotNull
(
leave
.
getEmpIdOld
())
&&
Common
.
isNotNull
(
leave
.
getDoStatusEmp
())
&&
(
leave
.
getDoStatusEmp
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusEmp
().
equals
(
CommonConstants
.
NINE_STRING
)
);
}
private
boolean
judgeToUpdateProject
(
String
doType
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
FIVE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getEmpProjectIdOld
())
&&
Common
.
isNotNull
(
leave
.
getDoStatusProject
())
&&
(
leave
.
getDoStatusProject
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusProject
().
equals
(
CommonConstants
.
NINE_STRING
)
);
}
private
boolean
judgeToUpdateContract
(
String
isExit
,
String
doType
,
LocalDateTime
nowTime
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
FOUR_STRING
))
&&
Common
.
isNotNull
(
leave
.
getContractIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getContractExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusContract
())
&&
(
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusContract
().
equals
(
CommonConstants
.
TEN_STRING
)
);
}
private
boolean
judgeToUpdateSocial
(
String
isExit
,
String
doType
,
LocalDateTime
nowTime
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
ONE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getSocialDispatchIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getSocialExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusSocial
())
&&
(
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
SIX_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
NINE_STRING
)
||
leave
.
getDoStatusSocial
().
equals
(
CommonConstants
.
TEN_STRING
)
);
}
private
boolean
judgeToUpdateFund
(
String
isExit
,
String
doType
,
LocalDateTime
nowTime
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
TWO_STRING
))
&&
Common
.
isNotNull
(
leave
.
getFundDispatchIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getFundExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusFund
())
&&
(
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
NINE_STRING
)
||
leave
.
getDoStatusFund
().
equals
(
CommonConstants
.
TEN_STRING
)
);
}
// 派单时,判断是否需要办理此条商险
private
boolean
judgeToUpdateInsurance
(
String
isExit
,
String
doType
,
LocalDateTime
nowTime
,
EmployeeRegistrationLeave
leave
)
{
return
(
Common
.
isEmpty
(
doType
)
||
doType
.
contains
(
CommonConstants
.
THREE_STRING
))
&&
Common
.
isNotNull
(
leave
.
getInsuranceIdOld
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
isExit
)
||
(
CommonConstants
.
ONE_STRING
.
equals
(
isExit
)
&&
leave
.
getInsuranceExpectedTime
().
isBefore
(
nowTime
)))
&&
Common
.
isNotNull
(
leave
.
getDoStatusInsurance
())
&&
(
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
TWO_STRING
)
||
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
THREE_STRING
)
||
leave
.
getDoStatusInsurance
().
equals
(
CommonConstants
.
NINE_STRING
)
);
}
@Override
public
void
reduceHandleToLeave
(
BaseServiceParamListVO
vo
)
{
if
(
vo
==
null
)
{
...
...
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