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
03030ab8
Commit
03030ab8
authored
Jun 01, 2023
by
wangzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-wzb:bug修复
parent
79a6ae70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
38 deletions
+47
-38
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+47
-38
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
03030ab8
...
...
@@ -312,12 +312,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
null
!=
validity
.
getErrorInfo
()
&&
!
validity
.
getErrorInfo
().
isEmpty
())
{
return
R
.
failed
(
validity
.
getErrorInfo
(),
ResultConstants
.
VALIDITY_FAIL
);
}
TEmployeeContractInfo
contractInfo
;
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
tEmployeeContractInfo
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
tEmployeeContractInfo
.
getSituation
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
tEmployeeContractInfo
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
tEmployeeContractInfo
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getContractType
,
CommonConstants
.
TWO_STRING
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getContractType
,
CommonConstants
.
ZERO_STRING
)
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
...
...
@@ -327,22 +332,22 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始日期的合同,禁止重复添加"
);
}
}
else
{
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
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_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
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
return
R
.
failed
(
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
);
}
}
return
this
.
saveContractAndAtta
(
tEmployeeContractInfo
,
user
);
...
...
@@ -1146,43 +1151,47 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
errorInfo
.
append
(
EmployeeConstants
.
WORKING_HOURS_EMPTY
);
}
}
TEmployeeContractInfo
contractInfo
;
if
(!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
()))
{
if
(
CommonConstants
.
CONTRACT_TYPE_TWO
.
equals
(
insert
.
getContractType
())
||
CommonConstants
.
CONTRACT_TYPE_ZERO
.
equals
(
insert
.
getContractType
()))
{
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
insert
.
getContractType
()))
{
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
TEmployeeContractInfo:
:
getContractStart
,
insert
.
getContractStart
())
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getContractType
,
CommonConstants
.
TWO_STRING
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getContractType
,
CommonConstants
.
ZERO_STRING
)
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始日期的合同,禁止重复添加!"
));
return
;
return
;
}
}
else
{
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
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
));
return
;
}
}
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
)
.
and
(
obj
->
obj
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
ONE_INT
)
.
or
()
.
eq
(
TEmployeeContractInfo:
:
getInUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_INT
)
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
));
return
;
}
}
}
if
(
Common
.
isEmpty
(
errorInfo
.
toString
()))
{
...
...
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