Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
766376c8
Commit
766376c8
authored
Oct 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加假日数据
parent
420772e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+22
-6
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
766376c8
...
...
@@ -146,6 +146,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffQuery
.
setStatusNotList
(
Arrays
.
asList
(
StaffSatusEnum
.
离职
.
getValue
()));
Map
<
String
,
StaffEntity
>
staffCollect
=
this
.
find
(
staffQuery
).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getWorkNum
(),
y
->
y
,
(
o
,
n
)
->
n
));
List
<
PersonInfo
>
personInfoList
=
personRest
.
getData
().
getList
();
for
(
PersonInfo
personInfo
:
personInfoList
)
{
if
(
ObjectUtils
.
isEmpty
(
personInfo
.
getJobNo
()))
{
...
...
@@ -154,6 +155,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
if
(
staffCollect
.
containsKey
(
personInfo
.
getJobNo
()))
{
staffCollect
.
remove
(
personInfo
.
getJobNo
());
}
StaffEntity
staffEntity
=
this
.
getExtCache
(
StrUtil
.
padPre
(
personInfo
.
getJobNo
(),
8
,
"0"
));
...
...
@@ -195,11 +197,12 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffEntity
.
setUpdateTime
(
new
Date
());
this
.
update
(
staffEntity
);
}
}
log
.
info
(
"离职人员:size:{},==>{}"
,
staffCollect
.
size
(),
JSON
.
toJSONString
(
staffCollect
));
if
(
staffCollect
.
size
()
>
0
)
{
//需要将此人员变更为离职
staffCollect
.
entrySet
().
stream
().
forEach
(
item
->
{
String
key
=
item
.
getKey
();
if
(!
ObjectUtils
.
isEmpty
(
key
))
{
StaffEntity
staff
=
item
.
getValue
();
...
...
@@ -239,9 +242,12 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if
(
count
==
0
)
{
staffLeaveService
.
save
(
staffLeaveEntity
);
}
//考勤人员中有离职的 删除
Long
[]
groudStaffIds
=
attendanceGroupStaffService
.
find
(
new
AttendanceGroupStaffQuery
().
staffId
(
staff
.
getId
())).
stream
().
toArray
(
Long
[]::
new
);
// List<AttendanceGroupStaffEntity> attendanceGroupStaffEntities = attendanceGroupStaffService.find(new AttendanceGroupStaffQuery().staffId(staff.getId()));
// if (!ObjectUtils.isEmpty(attendanceGroupStaffEntities)) {
// attendanceGroupStaffService.removeList(attendanceGroupStaffEntities,context);
// }
Long
[]
groudStaffIds
=
attendanceGroupStaffService
.
find
(
new
AttendanceGroupStaffQuery
().
staffId
(
staff
.
getId
())).
stream
().
map
(
i
->
i
.
getId
()).
toArray
(
Long
[]::
new
);
if
(!
ObjectUtils
.
isEmpty
(
groudStaffIds
))
{
attendanceGroupStaffService
.
remove
(
groudStaffIds
,
null
);
}
...
...
@@ -337,10 +343,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
deptService
.
updateDeptNum
(
context
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"1"
+
StrUtil
.
padPre
(
"125"
,
7
,
"0"
));
}
@Override
protected
StaffEntity
findBefore
(
StaffEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
...
...
@@ -358,4 +361,17 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
}
return
params
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"1"
+
StrUtil
.
padPre
(
"125"
,
7
,
"0"
));
ArrayList
<
AttendanceGroupStaffEntity
>
attendanceGroupStaffEntities
=
new
ArrayList
<>();
Long
[]
ids
=
attendanceGroupStaffEntities
.
stream
().
map
(
i
->
i
.
getId
()).
toArray
(
Long
[]::
new
);
System
.
out
.
println
(
JSON
.
toJSONString
(
ids
));
}
}
\ No newline at end of file
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