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
259d0d35
Commit
259d0d35
authored
Jul 08, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同同步档案信息
parent
f0a19ca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
17 deletions
+34
-17
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+34
-17
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
259d0d35
...
...
@@ -49,6 +49,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -739,8 +740,26 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 渲染字典值
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
String
tempStr
=
null
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getValue
())
&&
entry
.
getValue
().
equals
(
contractInfo
.
getContractName
())){
tempStr
=
entry
.
getKey
();
break
;
}
}
if
(
tEmployeeProject
!=
null
)
{
tEmployeeProject
.
setContractStatus
(
CommonConstants
.
ONE_INT
);
//签订类型正常签订的时候更新项目档案信息
if
(
EmployeeConstants
.
SITUATION_ONE
.
equals
(
contractInfo
.
getSituation
()))
{
tEmployeeProject
.
setContractType
(
null
==
tempStr
?
""
:
tempStr
);
tEmployeeProject
.
setWorkingHours
(
contractInfo
.
getWorkingHours
());
tEmployeeProject
.
setPost
(
contractInfo
.
getPost
());
tEmployeeProject
.
setEnjoinDate
(
LocalDateUtil
.
parseLocalDate
(
contractInfo
.
getContractStart
().
toString
()));
tEmployeeProject
.
setTryPeriod
(
contractInfo
.
getTryPeriod
());
}
tEmployeeProjectService
.
updateById
(
tEmployeeProject
);
}
// 更新档案、项目合同状态为(1在用)
...
...
@@ -760,16 +779,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TPreEmployeeProject
preEmployeeProject
=
preEmployeeProjectMapper
.
selectOne
(
Wrappers
.<
TPreEmployeeProject
>
query
()
.
lambda
().
eq
(
TPreEmployeeProject:
:
getPreMainId
,
empMain
.
getId
()));
if
(
Optional
.
ofNullable
(
preEmployeeProject
).
isPresent
())
{
// 渲染字典值
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
String
tempStr
=
null
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getValue
())
&&
entry
.
getValue
().
equals
(
contractInfo
.
getContractName
())){
tempStr
=
entry
.
getKey
();
break
;
}
}
preEmployeeProject
.
setContractType
(
null
==
tempStr
?
""
:
tempStr
);
preEmployeeProject
.
setWorkingHours
(
contractInfo
.
getWorkingHours
());
preEmployeeProject
.
setPost
(
contractInfo
.
getPost
());
...
...
@@ -1636,6 +1645,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo
.
setAuditTimeLast
(
LocalDateTime
.
now
());
tEmployeeContractInfo
.
setInUse
(
CommonConstants
.
ZERO_STRING
);
// 更新档案、项目合同状态为(1可用)
String
tempStr
=
null
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getValue
())
&&
entry
.
getValue
().
equals
(
contract
.
getContractName
())){
tempStr
=
entry
.
getKey
();
break
;
}
}
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
.
lambda
().
eq
(
TEmployeeProject:
:
getEmpId
,
contract
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getDeptId
,
contract
.
getSettleDomain
())
...
...
@@ -1644,6 +1660,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
tEmployeeProject
!=
null
)
{
tEmployeeProject
.
setContractStatus
(
CommonConstants
.
ONE_INT
);
//签订类型正常签订的时候更新项目档案信息
if
(
EmployeeConstants
.
SITUATION_ONE
.
equals
(
contract
.
getSituation
()))
{
tEmployeeProject
.
setContractType
(
null
==
tempStr
?
""
:
tempStr
);
tEmployeeProject
.
setWorkingHours
(
contract
.
getWorkingHours
());
tEmployeeProject
.
setPost
(
contract
.
getPost
());
tEmployeeProject
.
setEnjoinDate
(
LocalDateUtil
.
parseLocalDate
(
contract
.
getContractStart
().
toString
()));
tEmployeeProject
.
setTryPeriod
(
contract
.
getTryPeriod
());
}
tEmployeeProjectService
.
updateById
(
tEmployeeProject
);
}
// 更新档案、项目合同状态为(1在用)
...
...
@@ -1663,13 +1687,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TPreEmployeeProject
preEmployeeProject
=
preEmployeeProjectMapper
.
selectOne
(
Wrappers
.<
TPreEmployeeProject
>
query
()
.
lambda
().
eq
(
TPreEmployeeProject:
:
getPreMainId
,
empMain
.
getId
()));
if
(
Optional
.
ofNullable
(
preEmployeeProject
).
isPresent
())
{
String
tempStr
=
null
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getValue
())
&&
entry
.
getValue
().
equals
(
contract
.
getContractName
())){
tempStr
=
entry
.
getKey
();
break
;
}
}
preEmployeeProject
.
setContractType
(
null
==
tempStr
?
""
:
tempStr
);
preEmployeeProject
.
setWorkingHours
(
contract
.
getWorkingHours
());
preEmployeeProject
.
setPost
(
contract
.
getPost
());
...
...
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