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
556a631f
Commit
556a631f
authored
Jul 18, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同优化
parent
a5b74e9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+15
-13
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
556a631f
...
...
@@ -31,7 +31,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractUpdateVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
...
...
@@ -42,7 +45,6 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.annotation.CacheConfig
;
import
org.springframework.cache.support.SimpleValueWrapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -56,9 +58,7 @@ import java.math.BigDecimal;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 员工合同
...
...
@@ -118,23 +118,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
Common
.
isEmpty
(
tEmployeeContractInfo
.
getEmpId
())
||
Common
.
isEmpty
(
tEmployeeContractInfo
.
getSettleDomain
()))
{
return
R
.
failed
(
EmployeeConstants
.
EMPID_NOT_EMPTY
);
}
return
this
.
setBaseInfo
(
tEmployeeContractInfo
);
return
this
.
setBaseInfo
(
tEmployeeContractInfo
,
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"员工合同保存异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"员工合同保存系统异常!"
);
}
}
private
R
<
List
<
ErrorMessage
>>
setBaseInfo
(
TEmployeeContractInfo
tEmployeeContractInfo
)
{
private
R
<
List
<
ErrorMessage
>>
setBaseInfo
(
TEmployeeContractInfo
tEmployeeContractInfo
,
TEmployeeProject
tEmployeeProject
)
{
// 获取人员档案
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getById
(
tEmployeeContractInfo
.
getEmpId
());
// 获取项目
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
.
lambda
().
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeContractInfo
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getDeptId
,
tEmployeeContractInfo
.
getSettleDomain
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
tEmployeeProject
==
null
)
{
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
.
lambda
().
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeContractInfo
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getDeptId
,
tEmployeeContractInfo
.
getSettleDomain
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
null
==
tEmployeeInfo
||
tEmployeeProject
==
null
)
{
return
R
.
failed
(
EMPINFO_IS_NOT_EXITS_BYID
);
}
...
...
@@ -740,7 +742,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
insert
.
setContractTerm
(
String
.
valueOf
(
b
));
}
// 核心保存
R
<
List
<
ErrorMessage
>>
info
=
this
.
setBaseInfo
(
insert
);
R
<
List
<
ErrorMessage
>>
info
=
this
.
setBaseInfo
(
insert
,
project
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
info
.
getMsg
()));
}
}
else
{
...
...
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