Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
8633f077
Commit
8633f077
authored
May 29, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入离职导入限制-fxj
parent
6bf43d86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
25 deletions
+43
-25
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+43
-25
No files found.
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
8633f077
...
...
@@ -2152,30 +2152,42 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(
Common
.
isEmpty
(
checkRes
)
||
checkRes
.
getCode
()
!=
CommonConstants
.
SUCCESS
){
return
checkRes
.
getMsg
();
}
EmployeeRegistration
exit
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistration
>
query
().
lambda
()
// 查询该员工在该项目下最新的入职登记记录(不限状态)
EmployeeRegistration
latestExit
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistration
>
query
().
lambda
()
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
registration
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
registration
.
getDeptNo
())
.
eq
(
EmployeeRegistration:
:
getFeedbackType
,
registration
.
getFeedbackType
())
.
orderByDesc
(
EmployeeRegistration:
:
getCreateTime
)
.
in
(
EmployeeRegistration:
:
getProcessStatus
,
CommonConstants
.
processStatus
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
))
{
return
RegistConstants
.
REGIST_SAME_CHECK
;
// 如果存在历史记录,根据不同状态处理
if
(
Common
.
isNotNull
(
latestExit
))
{
String
processStatus
=
latestExit
.
getProcessStatus
();
// 状态为待处理(0)或已接收(1) → 拦截重复登记
if
(
CommonConstants
.
processStatus
.
contains
(
processStatus
))
{
return
RegistConstants
.
REGIST_SAME_CHECK
;
}
// 状态为已处理(2) → 需要校验项目档案
if
(
CommonConstants
.
TWO_STRING
.
equals
(
processStatus
))
{
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
vo
.
setDeptNo
(
registration
.
getDeptNo
());
EmpProjectStatusVo
exitProject
=
getEmpProjectStatus
(
vo
);
if
(!
Common
.
isEmpty
(
exitProject
))
{
return
RegistConstants
.
EMP_PROJECT_IS_EXIT_CHECK
;
}
}
// 其他状态(如拒绝入职3、已离职等)→ 允许重新登记,不校验项目档案
}
//针对入职的判断
//针对入职的其他判断
if
(
CommonConstants
.
ONE_STRING
.
equals
(
registration
.
getFeedbackType
()))
{
int
nowDay
=
Integer
.
parseInt
(
DateUtil
.
getThisDay
());
if
(
Common
.
isNot16Age
(
registration
.
getEmpIdcard
(),
nowDay
))
{
return
CommonConstants
.
UNDER_16_ERROR
;
}
//针对入职的判断是否存在在项项目档案
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
vo
.
setDeptNo
(
registration
.
getDeptNo
());
EmpProjectStatusVo
exitProject
=
getEmpProjectStatus
(
vo
);
if
(!
Common
.
isEmpty
(
exitProject
))
{
return
RegistConstants
.
EMP_PROJECT_IS_EXIT_CHECK
;
}
}
//针对离职的判断人员项目档案状态是否正常
if
(
CommonConstants
.
TWO_STRING
.
equals
(
registration
.
getFeedbackType
()))
{
...
...
@@ -3194,22 +3206,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
insert
.
getDeptNo
())
.
eq
(
EmployeeRegistration:
:
getFeedbackType
,
insert
.
getFeedbackType
())
.
in
(
EmployeeRegistration:
:
getProcessStatus
,
CommonConstants
.
processStatus
)
.
orderByDesc
(
EmployeeRegistration:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 如果存在历史记录,根据不同状态处理
if
(
Common
.
isNotNull
(
exit
))
{
errorList
.
add
(
RegistConstants
.
REGIST_SAME_CHECK
);
}
//针对入职的判断是否存在在项项目档案
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insert
.
getFeedbackType
()))
{
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
insert
.
getEmpIdcard
());
vo
.
setDeptNo
(
insert
.
getDeptNo
());
EmpProjectStatusVo
exitProject
=
getEmpProjectStatus
(
vo
);
if
(!
Common
.
isEmpty
(
exitProject
))
{
errorList
.
add
(
RegistConstants
.
EMP_PROJECT_IS_EXIT_CHECK
);
String
processStatus
=
exit
.
getProcessStatus
();
// 状态为待处理(0)或已接收(1) → 拦截重复登记
if
(
CommonConstants
.
processStatus
.
contains
(
processStatus
))
{
errorList
.
add
(
RegistConstants
.
REGIST_SAME_CHECK
);
}
// 状态为已处理(2) → 需要校验项目档案
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
processStatus
))
{
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
insert
.
getEmpIdcard
());
vo
.
setDeptNo
(
insert
.
getDeptNo
());
EmpProjectStatusVo
exitProject
=
getEmpProjectStatus
(
vo
);
if
(!
Common
.
isEmpty
(
exitProject
))
{
errorList
.
add
(
RegistConstants
.
EMP_PROJECT_IS_EXIT_CHECK
);
}
}
// 其他状态(如拒绝入职3、已离职等)→ 允许重新登记,不校验项目档案
}
//针对离职的判断人员项目档案状态是否正常(前置条件:项目存在)
...
...
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