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
b169d734
Commit
b169d734
authored
Mar 27, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-入职登记提交
parent
a8e96132
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
141 additions
and
3 deletions
+141
-3
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+141
-3
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
b169d734
...
...
@@ -228,8 +228,104 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
EmployeeRegistrationPre
pre
=
new
EmployeeRegistrationPre
();
BeanUtils
.
copyProperties
(
preVo
,
pre
);
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
pre
.
setExpectedCollectionTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedCollectionTime
()));
}
if
(
Common
.
isNotNull
(
preExit
))
{
pre
.
setId
(
preExit
.
getId
());
String
natureItemBefore
=
null
;
String
natureItemAfter
=
null
;
String
contractItemBefore
=
null
;
String
contractItemAfter
=
null
;
String
contractXfBefore
=
null
;
String
contractXfAfter
=
null
;
if
(!
preExit
.
getContractType
().
equals
(
pre
.
getContractType
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
preExit
.
getContractType
())){
contractItemBefore
=
entry
.
getValue
();
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
pre
.
getContractType
())){
contractItemAfter
=
entry
.
getValue
();
}
if
(
null
!=
contractItemBefore
&&
null
!=
contractItemAfter
)
{
break
;
}
}
}
if
(!
preExit
.
getEmpNature
().
equals
(
pre
.
getEmpNature
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"emp_natrue"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
preExit
.
getEmpNature
())){
natureItemBefore
=
entry
.
getValue
();
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
pre
.
getEmpNature
())){
natureItemAfter
=
entry
.
getValue
();
}
if
(
null
!=
natureItemAfter
&&
null
!=
natureItemBefore
)
{
break
;
}
}
}
if
(
null
!=
preExit
.
getContractSubName
()
&&
null
==
pre
.
getContractSubName
())
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
preExit
.
getContractSubName
())){
contractXfBefore
=
entry
.
getValue
();
break
;
}
}
}
if
(
null
==
preExit
.
getContractSubName
()
&&
null
!=
pre
.
getContractSubName
())
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
pre
.
getContractSubName
())){
contractXfAfter
=
entry
.
getValue
();
break
;
}
}
}
if
(
null
!=
preExit
.
getContractSubName
()
&&
null
!=
pre
.
getContractSubName
()
&&
!
preExit
.
getContractSubName
().
equals
(
pre
.
getContractSubName
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
preExit
.
getContractSubName
())){
contractXfBefore
=
entry
.
getValue
();
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
pre
.
getContractSubName
())){
contractXfAfter
=
entry
.
getValue
();
}
if
(
null
!=
contractXfBefore
&&
null
!=
contractXfAfter
)
{
break
;
}
}
}
if
(
null
!=
natureItemBefore
)
{
preExit
.
setEmpNature
(
natureItemBefore
);
}
if
(
null
!=
natureItemAfter
)
{
pre
.
setEmpNature
(
natureItemAfter
);
}
if
(
null
!=
contractItemBefore
)
{
preExit
.
setContractType
(
contractItemBefore
);
}
if
(
null
!=
contractItemAfter
)
{
pre
.
setContractType
(
contractItemAfter
);
}
if
(
null
!=
contractXfBefore
)
{
preExit
.
setContractSubName
(
contractXfBefore
);
}
if
(
null
!=
contractXfAfter
)
{
pre
.
setContractSubName
(
contractXfAfter
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
4
],
pre
.
getId
().
toString
(),
""
,
preExit
,
pre
);
baseMapper
.
deleteById
(
preExit
);
// if (Common.isNotNull(preVo.getServerItem())) {
// pre.setServerItem(preVo.getServerItem());
...
...
@@ -268,9 +364,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
// pre.setContractSubName(null);
// }
}
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
pre
.
setExpectedCollectionTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedCollectionTime
()));
}
baseMapper
.
insert
(
pre
);
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
// 事务提交后触发调度
...
...
@@ -328,6 +421,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
String
natureItemAfter
=
null
;
String
contractItemBefore
=
null
;
String
contractItemAfter
=
null
;
String
contractXfBefore
=
null
;
String
contractXfAfter
=
null
;
if
(!
comparePre
.
getContractType
().
equals
(
employeeRegistrationPre
.
getContractType
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
...
...
@@ -358,6 +453,42 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
}
if
(
null
!=
comparePre
.
getContractSubName
()
&&
null
==
employeeRegistrationPre
.
getContractSubName
())
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
comparePre
.
getContractSubName
())){
contractXfBefore
=
entry
.
getValue
();
break
;
}
}
}
if
(
null
==
comparePre
.
getContractSubName
()
&&
null
!=
employeeRegistrationPre
.
getContractSubName
())
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getContractSubName
())){
contractXfAfter
=
entry
.
getValue
();
break
;
}
}
}
if
(
null
!=
comparePre
.
getContractSubName
()
&&
null
!=
employeeRegistrationPre
.
getContractSubName
()
&&
!
comparePre
.
getContractSubName
().
equals
(
employeeRegistrationPre
.
getContractSubName
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type_sub"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
comparePre
.
getContractSubName
())){
contractXfBefore
=
entry
.
getValue
();
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getContractSubName
())){
contractXfAfter
=
entry
.
getValue
();
}
if
(
null
!=
contractXfBefore
&&
null
!=
contractXfAfter
)
{
break
;
}
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
try
{
updatePre
.
setServerItem
(
employeeRegistrationPre
.
getServerItem
());
...
...
@@ -366,6 +497,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
updatePre
.
setFileProvince
(
employeeRegistrationPre
.
getFileProvince
());
updatePre
.
setFileCity
(
employeeRegistrationPre
.
getFileCity
());
updatePre
.
setFileTown
(
employeeRegistrationPre
.
getFileTown
());
updatePre
.
setContractSubName
(
null
==
employeeRegistrationPre
.
getContractSubName
()
?
""
:
employeeRegistrationPre
.
getContractSubName
());
baseMapper
.
updateById
(
employeeRegistrationPre
);
if
(
null
!=
natureItemBefore
)
{
comparePre
.
setEmpNature
(
natureItemBefore
);
...
...
@@ -379,6 +511,12 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
null
!=
contractItemAfter
)
{
employeeRegistrationPre
.
setContractType
(
contractItemAfter
);
}
if
(
null
!=
contractXfBefore
)
{
comparePre
.
setContractSubName
(
contractXfBefore
);
}
if
(
null
!=
contractXfAfter
)
{
employeeRegistrationPre
.
setContractSubName
(
contractXfAfter
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
4
],
employeeRegistrationPre
.
getId
().
toString
(),
""
,
comparePre
,
employeeRegistrationPre
,
user
);
}
catch
(
Exception
e
)
{
...
...
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