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
5fa0696a
Commit
5fa0696a
authored
May 28, 2023
by
zhenbin wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-wzb:bug修复
parent
0bd6e881
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
2 deletions
+88
-2
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+88
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
5fa0696a
...
...
@@ -246,8 +246,23 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
tEmployeeContractInfo
.
getSituation
())
&&!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
tEmployeeContractInfo
.
getSituation
())){
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())){
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始日期的合同,禁止重复添加"
);
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
tEmployeeContractInfo
.
getContractEnd
())
...
...
@@ -259,8 +274,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"
不能
重复添加"
);
return
R
.
failed
(
"
该员工已存在相同起始和截止日期的合同,禁止
重复添加"
);
}
}
}
return
null
;
...
...
@@ -290,6 +307,38 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
null
!=
validity
.
getErrorInfo
()
&&
!
validity
.
getErrorInfo
().
isEmpty
())
{
return
R
.
failed
(
validity
.
getErrorInfo
(),
ResultConstants
.
VALIDITY_FAIL
);
}
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
tEmployeeContractInfo
.
getSituation
())
&&!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
tEmployeeContractInfo
.
getSituation
())){
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())){
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始日期的合同,禁止重复添加"
);
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
tEmployeeContractInfo
.
getContractEnd
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
);
}
}
return
this
.
saveContractAndAtta
(
tEmployeeContractInfo
,
user
);
}
catch
(
Exception
e
)
{
log
.
error
(
"员工合同保存异常:"
+
e
.
getMessage
());
...
...
@@ -1083,7 +1132,42 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
errorInfo
.
append
(
EmployeeConstants
.
WORKING_HOURS_EMPTY
);
}
}
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
())
&&!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
())){
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getContractType
())){
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
insert
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorInfo
.
append
(
"该员工已存在相同起始日期的合同,禁止重复添加!"
);
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
insert
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getContractEnd
,
insert
.
getContractEnd
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorInfo
.
append
(
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
);
}
}
}
if
(
Common
.
isEmpty
(
errorInfo
.
toString
()))
{
TEmployeeProject
project
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
...
...
@@ -1357,6 +1441,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
Common
.
isEmpty
(
contractInfos
)){
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
List
<
ErrorMessage
>
errorMessages
=
new
ArrayList
<>();
TEmployeeContractInfo
tEmployeeContractInfo
;
TEmployeeContractInfo
contractInfoInUse
;
...
...
@@ -1377,6 +1462,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo
.
setContractNo
(
contract
.
getContractNo
());
tEmployeeContractInfo
.
setAuditUserName
(
user
.
getNickname
());
tEmployeeContractInfo
.
setId
(
contract
.
getId
());
if
(
tEmployeeContractInfo
.
getAuditStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
2
])
{
// 非作废、终止,本条变为在用
if
(
Common
.
isEmpty
(
contract
.
getSituation
())
...
...
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