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
c52e5670
Commit
c52e5670
authored
Aug 23, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改本月统计
parent
eabef769
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+8
-1
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
c52e5670
...
@@ -216,12 +216,19 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -216,12 +216,19 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
//获取当月打卡人数,如果存在
//获取当月打卡人数,如果存在
Long
totalCache
=
cacheService
.
hget
(
RedisKey
.
KEY_ATTENC_TOTOAL_CACHE
,
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
),
Long
.
class
);
/*
Long totalCache = cacheService.hget(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.format(new Date(), "yyyy-MM"), Long.class);
if (ObjectUtils.isEmpty(totalCache)) {
if (ObjectUtils.isEmpty(totalCache)) {
totalCache = recordHikService.find(hikQuery).parallelStream().map(item -> item.getStaffId()).distinct().count();
totalCache = recordHikService.find(hikQuery).parallelStream().map(item -> item.getStaffId()).distinct().count();
cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.format(new Date(), "yyyy-MM"), totalCache);
cacheService.hset(RedisKey.KEY_ATTENC_TOTOAL_CACHE, DateUtil.format(new Date(), "yyyy-MM"), totalCache);
}*/
Long
totalCache
=
cacheService
.
hget
(
RedisKey
.
KEY_ATTENC_TOTOAL_CACHE
,
DateUtil
.
yesterday
().
toDateStr
(),
Long
.
class
);
if
(
ObjectUtils
.
isEmpty
(
totalCache
))
{
totalCache
=
recordHikService
.
find
(
hikQuery
).
parallelStream
().
map
(
item
->
item
.
getStaffId
()).
distinct
().
count
();
cacheService
.
hset
(
RedisKey
.
KEY_ATTENC_TOTOAL_CACHE
,
DateUtil
.
yesterday
().
toDateStr
(),
totalCache
);
}
}
//迟到次数
//迟到次数
long
beLate
=
attendanceRecordEntities
.
parallelStream
()
long
beLate
=
attendanceRecordEntities
.
parallelStream
()
.
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
())
.
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
())
...
...
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