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
9de6c97b
Commit
9de6c97b
authored
Jun 27, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
39da503f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
28 deletions
+31
-28
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+31
-28
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
9de6c97b
...
...
@@ -807,9 +807,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeProjectService
.
updateById
(
tEmployeeProject
);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
tEmployeeProject
.
getProjectStatus
()
==
CommonConstants
.
ONE_INT
&&
Common
.
isNotNull
(
tEmployeeInfo
))
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
());
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo
contractInfoInUse
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getEmpId
,
contractInfo
.
getEmpId
())
...
...
@@ -823,17 +822,20 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
else
{
tEmployeeInfo
.
setContractStatus
(
CommonConstants
.
TWO_INT
);
}
//减项成功把人员档案现存项目数减一
if
(
tEmployeeInfo
.
getProjectNum
()
==
CommonConstants
.
ZERO_INT
)
{
//减档
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
workInfo
.
append
(
"减档成功,"
);
}
else
{
failueInfo
.
append
(
"存在其他项目,无法减档"
);
if
(
tEmployeeProject
.
getProjectStatus
()
==
CommonConstants
.
ONE_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
//减项成功把人员档案现存项目数减一
if
(
tEmployeeInfo
.
getProjectNum
()
==
CommonConstants
.
ZERO_INT
)
{
//减档
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
workInfo
.
append
(
"减档成功,"
);
}
else
{
failueInfo
.
append
(
"存在其他项目,无法减档"
);
}
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
...
...
@@ -1760,9 +1762,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeProjectService
.
updateById
(
tEmployeeProject
);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
tEmployeeProject
.
getProjectStatus
()
==
CommonConstants
.
ONE_INT
&&
Common
.
isNotNull
(
tEmployeeInfo
))
{
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
());
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
// 判断人员有无审核通过的其他合同
contractInfoInUse
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
()
.
lambda
().
eq
(
TEmployeeContractInfo:
:
getEmpId
,
contract
.
getEmpId
())
...
...
@@ -1776,18 +1777,20 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
else
{
tEmployeeInfo
.
setContractStatus
(
CommonConstants
.
TWO_INT
);
}
//减项成功把人员档案现存项目数减一
if
(
tEmployeeInfo
.
getProjectNum
()
==
CommonConstants
.
ZERO_INT
)
{
//减档
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
workInfo
.
append
(
"减档成功,"
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
else
{
failueInfo
.
append
(
"存在其他项目,无法减档"
);
if
(
tEmployeeProject
.
getProjectStatus
()
==
CommonConstants
.
ONE_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
//减项成功把人员档案现存项目数减一
if
(
tEmployeeInfo
.
getProjectNum
()
==
CommonConstants
.
ZERO_INT
)
{
//减档
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
workInfo
.
append
(
"减档成功,"
);
}
else
{
failueInfo
.
append
(
"存在其他项目,无法减档"
);
}
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
...
...
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