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
4e1816a4
Commit
4e1816a4
authored
Mar 15, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加每天同步过去一周考勤数据并重新计算
parent
6fe1942e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
16 deletions
+39
-16
attendance-performance-manager/pom.xml
attendance-performance-manager/pom.xml
+10
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventWeekTaskImpl.java
...m/mortals/xhx/daemon/task/SyncDoorsEventWeekTaskImpl.java
+26
-3
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+3
-3
No files found.
attendance-performance-manager/pom.xml
View file @
4e1816a4
...
...
@@ -174,16 +174,16 @@
<profiles.hik.protocol>
https://
</profiles.hik.protocol>
<profiles.hik.appKey>
25594054
</profiles.hik.appKey>
<profiles.hik.appSecret>
K12IkZoSLxpsJjrUPtfV
</profiles.hik.appSecret>
<profiles.dingtalk.domain>
https://oapi.dingtalk.com
</profiles.dingtalk.domain>
<profiles.dingtalk.oaScheme>
https
</profiles.dingtalk.oaScheme>
<profiles.dingtalk.oaUrl>
api.dingtalk.com
</profiles.dingtalk.oaUrl>
<profiles.dingtalk.oaScheme>
https
</profiles.dingtalk.oaScheme>
<profiles.dingtalk.agentId>
2652674890
</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>
dingpqzradgfr4efdi2j
</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>
bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
</profiles.dingtalk.appSecret>
<profiles.dingtalk.aesKey>
1QcPYuSpAc98OS3qQwwx5HPH85CZDidxF95yBGad2fJ
</profiles.dingtalk.aesKey>
<profiles.dingtalk.token>
m3WeuVx5kcTY76kh22uWZOTSu0XjvcwNhd
</profiles.dingtalk.token>
<profiles.dingtalk.opUserId>
254868153920685466
</profiles.dingtalk.opUserId>
<profiles.dingtalk.domain></profiles.dingtalk.domain>
<profiles.dingtalk.oaScheme></profiles.dingtalk.oaScheme>
<profiles.dingtalk.oaUrl></profiles.dingtalk.oaUrl>
<profiles.dingtalk.oaScheme></profiles.dingtalk.oaScheme>
<profiles.dingtalk.agentId></profiles.dingtalk.agentId>
<profiles.dingtalk.appKey></profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret></profiles.dingtalk.appSecret>
<profiles.dingtalk.aesKey></profiles.dingtalk.aesKey>
<profiles.dingtalk.token></profiles.dingtalk.token>
<profiles.dingtalk.opUserId></profiles.dingtalk.opUserId>
<profiles.webUrl>
https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/performance-h5
</profiles.webUrl>
<package.environment>
build
</package.environment>
<skipUi>
false
</skipUi>
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventWeekTaskImpl.java
View file @
4e1816a4
...
...
@@ -15,8 +15,10 @@ import com.mortals.framework.util.ThreadPool;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.AddAttendThread
;
import
com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordQuery
;
import
com.mortals.xhx.module.attendance.model.AttendanceRecordHikEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceRecordHikQuery
;
import
com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceRecordHikService
;
import
com.mortals.xhx.module.attendance.service.AttendanceStatService
;
import
com.mortals.xhx.module.hik.door.model.req.door.DoorEventReq
;
...
...
@@ -25,7 +27,9 @@ import com.mortals.xhx.module.hik.door.service.IHikDoorService;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StopWatch
;
...
...
@@ -45,6 +49,11 @@ public class SyncDoorsEventWeekTaskImpl implements ITaskExcuteService {
@Autowired
private
AttendanceRecordHikService
recordHikService
;
@Autowired
private
AttendanceLeaveRecordService
attendanceLeaveRecordService
;
@Value
(
"${dingtalk.domain:}"
)
protected
String
domain
;
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
...
...
@@ -71,12 +80,26 @@ public class SyncDoorsEventWeekTaskImpl implements ITaskExcuteService {
stopWatch
.
stop
();
log
.
info
(
"考勤计算日期:{} 完成,耗时:{}ms"
,
curDate
.
toDateStr
(),
stopWatch
.
getLastTaskTimeMillis
());
}
AddAttendThread
addAttendThread
=
new
AddAttendThread
(
recordHikService
,
hikEntity
,
null
);
ThreadPool
.
getInstance
().
execute
(
addAttendThread
);
}
//同步最近钉钉请假事件
if
(!
ObjectUtils
.
isEmpty
(
domain
)){
log
.
info
(
"开始同步钉钉请假事件!"
);
long
between
=
DateUtil
.
between
(
attendStart
,
attendEnd
,
DateUnit
.
DAY
,
true
);
AttendanceLeaveRecordQuery
query
=
new
AttendanceLeaveRecordQuery
();
query
.
setStartTimeStart
(
hikEntity
.
getAttendanceDateStart
());
query
.
setEndTimeEnd
(
hikEntity
.
getAttendanceDateEnd
());
if
(
between
>
120
)
return
;
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
attendanceLeaveRecordService
.
syncLeaveRecord
(
query
,
null
);
}
});
ThreadPool
.
getInstance
().
execute
(
thread
);
}
}
@Override
...
...
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
View file @
4e1816a4
...
...
@@ -5,7 +5,7 @@ Content-Type: application/json
{
"loginName":"admin",
"password":"
admin
",
"password":"
xhxADMIN8@a
",
"securityCode":"admin"
}
...
...
@@ -107,8 +107,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"startTimeStart":"2024-0
1
-01",
"endTimeEnd":"2024-0
2-29
"
"startTimeStart":"2024-0
3
-01",
"endTimeEnd":"2024-0
3-14
"
}
...
...
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