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
0a3406d8
Commit
0a3406d8
authored
May 29, 2024
by
姬鋆屾
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/attendance-performance-platform
parents
4750d31b
aaba4a11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
46 deletions
+31
-46
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordHikServiceImpl.java
...tendance/service/impl/AttendanceRecordHikServiceImpl.java
+4
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/AttendanceWorkAbstract.java
...odule/attendance/service/work/AttendanceWorkAbstract.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
...odule/attendance/service/work/FixWorkOtherAttendance.java
+7
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
...xhx/module/attendance/web/AttendanceRecordController.java
+0
-34
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+6
-6
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceRecordHikServiceImpl.java
View file @
0a3406d8
...
...
@@ -707,7 +707,9 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
public
void
deletFakeRecord
(
AttendanceRecordHikQuery
recordHikQuery
,
Context
context
)
{
//重新拉去的考勤记录,判断是否存在虚增的记录
log
.
info
(
"开始删除虚增的记录!"
);
recordHikQuery
.
setEventSource
(
"当日未有记录虚增考勤记录!"
);
return
;
//只删除多条重复的记录
/* recordHikQuery.setEventSource("当日未有记录虚增考勤记录!");
List<AttendanceRecordHikEntity> fackAttendlist = this.find(recordHikQuery);
if (!ObjectUtils.isEmpty(fackAttendlist)) {
log.info("虚增的记录:{}", fackAttendlist.size());
...
...
@@ -725,7 +727,7 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
this.remove(recordHikEntity.getId(), context);
}
}
}
}
*/
}
public
void
syncDoorEvents
(
AttendanceRecordHikQuery
recordHikQuery
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/AttendanceWorkAbstract.java
View file @
0a3406d8
...
...
@@ -122,6 +122,20 @@ public abstract class AttendanceWorkAbstract {
}
protected
Long
getWeekWorkDayClassId
(
AttendanceGroupFixedworkEntity
attendanceGroupFixedworkEntity
,
String
week
)
{
Long
weekClassId
=
-
1L
;
switch
(
week
)
{
case
"星期六"
:
weekClassId
=
attendanceGroupFixedworkEntity
.
getSaturdayClassId
();
break
;
case
"星期日"
:
weekClassId
=
attendanceGroupFixedworkEntity
.
getSundayClassId
();
break
;
}
return
weekClassId
;
}
public
AttendanceWorkAbstract
(
int
type
)
{
this
.
type
=
type
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
View file @
0a3406d8
...
...
@@ -98,6 +98,9 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
if
(!
checkWorkByHoliday
)
{
// log.info("当前日期不在考勤时间范围内,不做处理!");
return
;
}
else
{
//工作日要上班 获取配置的周六 周日班次 默认周一
weekClassId
=
this
.
getWeekClassId
(
attendanceGroupFixedworkEntity
,
"星期一"
);
}
}
else
{
if
(
checkHolidayByWorkDay
)
{
...
...
@@ -382,11 +385,11 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
Date
goWorkDate
=
detail
.
getGoWorkDate
();
Date
offWorkDate
=
detail
.
getOffWorkDate
();
if
(
GoWorkResultEnum
.
正常
.
getValue
()
!=
goWorkResult
)
{
if
(
GoWorkResultEnum
.
请假
.
getValue
()
<
goWorkResult
)
{
//判断 异常记录是否在请假时间段内
// DateUtil.between()
if
(
ObjectUtils
.
isEmpty
(
goWorkDate
)){
detail
.
setGoWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
detail
.
setGoWorkResult
(
GoWorkResultEnum
.
请假
.
getValue
());
}
else
{
boolean
in
=
DateUtil
.
isIn
(
goWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
...
...
@@ -396,11 +399,11 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
}
if
(
GoWorkResultEnum
.
正常
.
getValue
()
!=
offWorkResult
)
{
if
(
GoWorkResultEnum
.
请假
.
getValue
()
<
offWorkResult
)
{
//判断 异常记录是否在请假时间段内
// DateUtil.between()
if
(
ObjectUtils
.
isEmpty
(
offWorkDate
)){
detail
.
setOffWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
detail
.
setOffWorkResult
(
GoWorkResultEnum
.
请假
.
getValue
());
}
else
{
boolean
in
=
DateUtil
.
isIn
(
offWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
View file @
0a3406d8
...
...
@@ -66,8 +66,6 @@ import java.util.stream.Collectors;
@RequestMapping
(
"attendance/record"
)
public
class
AttendanceRecordController
extends
BaseCRUDJsonBodyMappingController
<
AttendanceRecordService
,
AttendanceRecordEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
@Autowired
private
UploadService
uploadService
;
...
...
@@ -80,8 +78,6 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
@Autowired
private
AttendanceClassService
attendanceClassService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
AttendanceExportRecordService
attendanceExportRecordService
;
@Autowired
private
AttendanceGroupService
groupService
;
...
...
@@ -371,37 +367,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
.
filter
(
distinctByKey
(
f
->
f
.
getOrderNum
()))
.
sorted
(
Comparator
.
comparingInt
(
AttendanceRecordDetailEntity:
:
getOrderNum
))
.
collect
(
Collectors
.
toList
());
//list.parallelStream().collect(Collectors.groupingBy())
List
<
AttDsyncColumn
>
dsyncColumns
=
new
ArrayList
<>();
/* for (int i = 1; i <= collect.size(); i++) {
AttDsyncColumn attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡时间", i));
attDsyncColumn.setProperty("goWorkDate");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡结果", i));
attDsyncColumn.setProperty("goWorkResult");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("下班%s打卡时间", i));
attDsyncColumn.setProperty("offWorkDate");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("下班%s打卡结果",i));
attDsyncColumn.setProperty("offWorkResult");
attDsyncColumn.setOrderNum(i);
dsyncColumns.add(attDsyncColumn);
}*/
collect
.
forEach
(
item
->
{
AttDsyncColumn
attDsyncColumn
=
new
AttDsyncColumn
();
attDsyncColumn
.
setName
(
String
.
format
(
"上班%s打卡时间"
,
item
.
getOrderNum
()));
...
...
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
View file @
0a3406d8
...
...
@@ -37,8 +37,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "2024-0
3-0
1",
"attendanceDateEnd": "2024-0
3-3
1"
"attendanceDateStart": "2024-0
5-1
1",
"attendanceDateEnd": "2024-0
5-1
1"
}
###海康考勤打卡记录计算1
...
...
@@ -46,8 +46,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecord
Content-Type: application/json
{
"attendanceDateStart": "202
3-12-04
",
"attendanceDateEnd": "202
3-12-08
",
"attendanceDateStart": "202
4-05-11
",
"attendanceDateEnd": "202
4-05-11
",
"staffId": 322
}
...
...
@@ -58,8 +58,8 @@ POST {{baseUrl}}/attendance/record/hik/addAttendanceRecordCustom
Content-Type: application/json
{
"attendanceDateStart": "2024-05-
01
",
"attendanceDateEnd": "2024-05-
19
"
"attendanceDateStart": "2024-05-
22
",
"attendanceDateEnd": "2024-05-
28
"
}
...
...
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