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
5acd26bb
Commit
5acd26bb
authored
Aug 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改本月统计
parent
025c8f14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+14
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventAfterTaskImpl.java
.../mortals/xhx/daemon/task/SyncDoorsEventAfterTaskImpl.java
+9
-3
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
5acd26bb
...
@@ -23,12 +23,14 @@ import com.mortals.xhx.base.system.user.service.UserService;
...
@@ -23,12 +23,14 @@ import com.mortals.xhx.base.system.user.service.UserService;
import
com.mortals.xhx.base.system.valid.service.ValidCodeService
;
import
com.mortals.xhx.base.system.valid.service.ValidCodeService
;
import
com.mortals.xhx.common.code.GoWorkResultEnum
;
import
com.mortals.xhx.common.code.GoWorkResultEnum
;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.common.code.ProcessStatusEnum
;
import
com.mortals.xhx.common.code.SourceType
;
import
com.mortals.xhx.common.code.SourceType
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.HomeStatInfo
;
import
com.mortals.xhx.common.pdu.HomeStatInfo
;
import
com.mortals.xhx.common.pdu.user.UserPdu
;
import
com.mortals.xhx.common.pdu.user.UserPdu
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordHikService
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordHikService
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService
;
...
@@ -80,6 +82,9 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -80,6 +82,9 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
@Autowired
private
AttendanceVacationRecordService
vacationRecordService
;
private
AttendanceVacationRecordService
vacationRecordService
;
@Autowired
private
AttendanceLeaveRecordService
leaveRecordService
;
@Autowired
@Autowired
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
...
@@ -233,10 +238,17 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -233,10 +238,17 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
.
count
();
.
count
();
AttendanceVacationRecordQuery
vacationRecordQuery
=
new
AttendanceVacationRecordQuery
();
/*
AttendanceVacationRecordQuery vacationRecordQuery = new AttendanceVacationRecordQuery();
vacationRecordQuery.setCreateTimeStart(DateUtil.beginOfMonth(new Date()).toDateStr());
vacationRecordQuery.setCreateTimeStart(DateUtil.beginOfMonth(new Date()).toDateStr());
vacationRecordQuery.setCreateTimeEnd(DateUtil.today());
vacationRecordQuery.setCreateTimeEnd(DateUtil.today());
int
levealPersonNum
=
vacationRecordService
.
count
(
vacationRecordQuery
,
getContext
());
int levealPersonNum = vacationRecordService.count(vacationRecordQuery, getContext());*/
AttendanceLeaveRecordQuery
leaveRecordQuery
=
new
AttendanceLeaveRecordQuery
();
leaveRecordQuery
.
setCreateTimeStart
(
DateUtil
.
beginOfMonth
(
new
Date
()).
toDateStr
());
leaveRecordQuery
.
setCreateTimeEnd
(
DateUtil
.
today
());
leaveRecordQuery
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
int
levealPersonNum
=
leaveRecordService
.
count
(
leaveRecordQuery
,
getContext
());
//总打卡记录
//总打卡记录
long
totalAttend
=
attendanceRecordEntities
.
parallelStream
().
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
()).
count
();
long
totalAttend
=
attendanceRecordEntities
.
parallelStream
().
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
()).
count
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventAfterTaskImpl.java
View file @
5acd26bb
...
@@ -87,8 +87,8 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
...
@@ -87,8 +87,8 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
eventTypes
.
add
(
196891
);
eventTypes
.
add
(
196891
);
doorEventReq
.
setEventTypes
(
eventTypes
);
doorEventReq
.
setEventTypes
(
eventTypes
);
// 获取当天的开始时间
// 获取当天的开始时间
// Date todayStart = DateUtil.offsetHour(new Date(), -5).toJdkDate();
// Date todayStart = DateUtil.offsetHour(new Date(), -5).toJdkDate();
Date
todayStart
=
DateUtil
.
beginOfDay
(
new
Date
());
Date
todayStart
=
DateUtil
.
beginOfDay
(
new
Date
());
// 获取当天的结束时间
// 获取当天的结束时间
Date
todayEnd
=
DateUtil
.
endOfDay
(
new
Date
());
Date
todayEnd
=
DateUtil
.
endOfDay
(
new
Date
());
doorEventReq
.
setStartTime
(
todayStart
);
doorEventReq
.
setStartTime
(
todayStart
);
...
@@ -106,7 +106,7 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
...
@@ -106,7 +106,7 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
doorEventReq
.
setPageNo
(
i
);
doorEventReq
.
setPageNo
(
i
);
doorEventReq
.
setPageSize
(
1000
);
doorEventReq
.
setPageSize
(
1000
);
doorEventsRest
=
hikDoorService
.
getDoorEvents
(
doorEventReq
);
doorEventsRest
=
hikDoorService
.
getDoorEvents
(
doorEventReq
);
log
.
info
(
"doorEventsRest:{} msg:{},page:{}"
,
doorEventsRest
.
getCode
(),
doorEventsRest
.
getMsg
(),
doorEventReq
.
getPageNo
());
//
log.info("doorEventsRest:{} msg:{},page:{}", doorEventsRest.getCode(), doorEventsRest.getMsg(), doorEventReq.getPageNo());
getDoorEvents
(
doorEventsRest
);
getDoorEvents
(
doorEventsRest
);
}
}
}
}
...
@@ -117,6 +117,12 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
...
@@ -117,6 +117,12 @@ public class SyncDoorsEventAfterTaskImpl implements ITaskExcuteService {
List
<
AttendanceRecordHikEntity
>
attRecords
=
doorEventsRest
.
getData
().
getList
().
stream
().
map
(
item
->
{
List
<
AttendanceRecordHikEntity
>
attRecords
=
doorEventsRest
.
getData
().
getList
().
stream
().
map
(
item
->
{
AttendanceRecordHikEntity
recordHikEntity
=
new
AttendanceRecordHikEntity
();
AttendanceRecordHikEntity
recordHikEntity
=
new
AttendanceRecordHikEntity
();
recordHikEntity
.
initAttrValue
();
recordHikEntity
.
initAttrValue
();
if
(
ObjectUtils
.
isEmpty
(
item
.
getJobNo
()))
{
log
.
info
(
"jobNo is null "
);
return
null
;
}
StaffEntity
staffCache
=
staffService
.
getExtCache
(
StrUtil
.
padPre
(
item
.
getJobNo
(),
8
,
"0"
));
StaffEntity
staffCache
=
staffService
.
getExtCache
(
StrUtil
.
padPre
(
item
.
getJobNo
(),
8
,
"0"
));
if
(
ObjectUtils
.
isEmpty
(
staffCache
))
{
if
(
ObjectUtils
.
isEmpty
(
staffCache
))
{
log
.
info
(
"staff is null !staffCode:{}"
,
item
.
getJobNo
());
log
.
info
(
"staff is null !staffCode:{}"
,
item
.
getJobNo
());
...
...
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