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
45a39c46
Commit
45a39c46
authored
Jul 06, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
证明补充
parent
db553efb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
8 deletions
+36
-8
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+36
-8
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
45a39c46
...
...
@@ -23,9 +23,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCertRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCertRecordService
;
...
...
@@ -33,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -53,6 +56,9 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
private
final
TEmployeeProjectMapper
projectMapper
;
private
final
TEmployeeInfoMapper
employeeInfoMapper
;
private
final
TEmployeeContractInfoMapper
contractInfoMapper
;
@Override
public
R
<
TCertRecordVo
>
getCertRecordInfo
(
String
id
)
{
TEmployeeProject
project
=
projectMapper
.
selectById
(
id
);
...
...
@@ -63,6 +69,21 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
if
(!
Common
.
isNotNull
(
employeeInfo
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
// 取值最早的合同
TEmployeeContractInfo
last
=
contractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getIsObsolete
,
CommonConstants
.
ZERO_STRING
)
.
orderByDesc
(
TEmployeeContractInfo:
:
getAuditTimeLast
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 取值最早的合同
TEmployeeContractInfo
first
=
contractInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getAuditStatus
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getIsObsolete
,
CommonConstants
.
ZERO_STRING
)
.
orderByAsc
(
TEmployeeContractInfo:
:
getAuditTimeLast
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
TCertRecordVo
vo
=
new
TCertRecordVo
();
vo
.
setEmpIdcard
(
project
.
getEmpIdcard
());
vo
.
setEmpId
(
project
.
getEmpId
());
...
...
@@ -70,17 +91,24 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
vo
.
setPost
(
project
.
getPost
());
vo
.
setProjectName
(
project
.
getDeptName
());
vo
.
setProjectCode
(
project
.
getDeptNo
());
// TODO 最新合同时间
vo
.
setContractStart
(
null
);
vo
.
setContractEnd
(
null
);
// TODO 派减离职时间和原因
// 最新合同时间
if
(
Common
.
isNotNull
(
last
)){
if
(
Common
.
isNotNull
(
last
.
getContractStart
())){
vo
.
setContractStart
(
LocalDateTimeUtils
.
convertDateToLDT
(
last
.
getContractStart
()));
}
if
(
Common
.
isNotNull
(
last
.
getContractEnd
())){
vo
.
setContractEnd
(
LocalDateTimeUtils
.
convertDateToLDT
(
last
.
getContractEnd
()));
}
}
// 派减离职时间和原因
vo
.
setLeaveTime
(
employeeInfo
.
getLeaveTime
());
vo
.
setLeaveReason
(
employeeInfo
.
getLeaveReason
());
// TODO 第一次合同开始截止时间
vo
.
setEntryTime
(
employeeInfo
.
getCreateTime
());
vo
.
setFirstContractTime
(
null
);
// 第一次合同开始时间和创建时间
if
(
Common
.
isNotNull
(
first
)
&&
Common
.
isNotNull
(
first
.
getContractStart
())){
vo
.
setEntryTime
(
LocalDateTimeUtils
.
convertDateToLDT
(
first
.
getContractStart
()));
vo
.
setFirstContractTime
(
first
.
getCreateTime
());
}
vo
.
setSex
(
employeeInfo
.
getEmpSex
());
vo
.
setIntroductionUnit
(
CommonConstants
.
EMPTY_STRING
);
vo
.
setSeal
(
"安徽皖信人力资源管理有限公司"
);
...
...
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