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
8464815d
Commit
8464815d
authored
Jan 25, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加请假跨天判读
parent
7e4da754
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
13 deletions
+61
-13
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
...odule/attendance/service/work/FixWorkOtherAttendance.java
+16
-7
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+6
-5
db/add.sql
db/add.sql
+39
-1
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
View file @
8464815d
...
...
@@ -345,10 +345,10 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
long
betweened
=
DateUtil
.
between
(
DateUtil
.
parseDate
(
commonData
.
getDateStr
()),
leaveRecord
.
getEndTime
(),
DateUnit
.
DAY
);
if
(
betweened
>
0
)
{
//全天
calLeaveDate
(
commonData
,
DateUtil
.
parseDate
(
commonData
.
getDateStr
()+
" 00:00:00"
),
DateUtil
.
parseDat
e
(
commonData
.
getDateStr
()+
" 23:59:59"
));
calLeaveDate
(
commonData
,
DateUtil
.
parseDate
Time
(
commonData
.
getDateStr
()+
" 00:00:00"
),
DateUtil
.
parseDateTim
e
(
commonData
.
getDateStr
()+
" 23:59:59"
));
}
else
if
(
betweened
==
0
)
{
//最后一天
calLeaveDate
(
commonData
,
DateUtil
.
parseDate
(
commonData
.
getDateStr
()+
" 00:00:00"
),
leaveRecord
.
getEndTime
());
calLeaveDate
(
commonData
,
DateUtil
.
parseDate
Time
(
commonData
.
getDateStr
()+
" 00:00:00"
),
leaveRecord
.
getEndTime
());
}
}
else
if
(
between
==
0
)
{
...
...
@@ -385,18 +385,27 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
if
(
GoWorkResultEnum
.
正常
.
getValue
()
!=
goWorkResult
)
{
//判断 异常记录是否在请假时间段内
// DateUtil.between()
boolean
in
=
DateUtil
.
isIn
(
goWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
if
(
ObjectUtils
.
isEmpty
(
goWorkDate
)){
detail
.
setGoWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
}
else
{
boolean
in
=
DateUtil
.
isIn
(
goWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
detail
.
setGoWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
}
}
}
if
(
GoWorkResultEnum
.
正常
.
getValue
()
!=
offWorkResult
)
{
//判断 异常记录是否在请假时间段内
// DateUtil.between()
boolean
in
=
DateUtil
.
isIn
(
offWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
if
(
ObjectUtils
.
isEmpty
(
offWorkDate
)){
detail
.
setOffWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
}
else
{
boolean
in
=
DateUtil
.
isIn
(
offWorkDate
,
startLeaveTime
,
endLeaveTime
);
if
(
in
)
{
detail
.
setOffWorkResult
(
GoWorkResultEnum
.
正常
.
getValue
());
}
}
}
}
...
...
@@ -468,7 +477,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorEntity
.
setShiftsName
(
recordDetailEntity
.
getShiftsName
());
errorEntity
.
setProcessStatus
(
YesNoEnum
.
NO
.
getValue
());
errorEntity
.
setCreateTime
(
new
Date
());
errorEntity
.
setCreateUserId
(
context
==
null
?
1L
:
context
.
getUser
().
getId
()
);
errorEntity
.
setCreateUserId
(
1L
);
Date
offWorkDate
=
attendanceClassDetailEntity
.
getOffWorkDate
();
errorEntity
.
setGoOffDateTime
(
DateUtil
.
parseDateTime
(
dateStr
+
" "
+
DateUtil
.
formatTime
(
offWorkDate
)).
toJdkDate
());
if
(!
ObjectUtils
.
isEmpty
(
recordDetailEntity
.
getOffWorkDate
()))
{
...
...
attendance-performance-manager/src/test/java/com/mortals/httpclient/system.http
View file @
8464815d
...
...
@@ -4,8 +4,8 @@ POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin
1
",
"password":"a
A123!@#
",
"loginName":"admin",
"password":"a
dmin
",
"securityCode":"admin"
}
...
...
@@ -39,7 +39,7 @@ Content-Type: application/json
{
"attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2024-01-2
3
"
"attendanceDateEnd":"2024-01-2
4
"
}
###海康考勤打卡记录计算1
...
...
@@ -48,8 +48,9 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2023-12-01"
"attendanceDateStart":"2023-12-04",
"attendanceDateEnd":"2023-12-04",
"staffId": 322
}
...
...
db/add.sql
View file @
8464815d
...
...
@@ -1119,4 +1119,42 @@ CREATE TABLE mortals_xhx_check_window_workman_perform(
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
,
KEY
`year`
(
`year`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'窗口人员考核汇总核查'
;
\ No newline at end of file
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'窗口人员考核汇总核查'
;
-- ----------------------------
-- 绩效异常记录信息表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_perform_error_record`
;
CREATE
TABLE
mortals_xhx_perform_error_record
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`staffId`
bigint
(
20
)
COMMENT
'员工ID'
,
`staffName`
varchar
(
64
)
NOT
NULL
COMMENT
'员工姓名'
,
`workNum`
varchar
(
128
)
COMMENT
'工号'
,
`windowNum`
varchar
(
128
)
COMMENT
'窗口编号'
,
`deptId`
bigint
(
20
)
COMMENT
'所属部门'
,
`deptName`
varchar
(
128
)
COMMENT
'所属部门名称'
,
`irregularType`
tinyint
(
1
)
COMMENT
'违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)'
,
`happenTime`
datetime
COMMENT
'发生时间'
,
`duration`
int
(
9
)
DEFAULT
'0'
COMMENT
'持续时间,秒'
,
`alarmTime`
datetime
COMMENT
'报警时间'
,
`snapPath`
varchar
(
255
)
COMMENT
'图片凭证地址'
,
`categoryId`
bigint
(
20
)
COMMENT
'绩效规则分类id'
,
`categoryName`
varchar
(
128
)
COMMENT
'规则名称'
,
`ruleId`
bigint
(
20
)
COMMENT
'绩效规则id'
,
`ruleName`
varchar
(
128
)
COMMENT
'规则名称'
,
`subMethod`
tinyint
(
1
)
DEFAULT
'2'
COMMENT
'扣分方式(1.系统自动,2.人工添加)'
,
`deductPerson`
varchar
(
128
)
COMMENT
'扣分人员'
,
`deductTime`
datetime
COMMENT
'扣分时间'
,
`subAddType`
tinyint
(
1
)
DEFAULT
'1'
COMMENT
'增减类型(1.增加,2.扣除)'
,
`score`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'扣分或增加分值'
,
`processStatus`
tinyint
(
1
)
DEFAULT
'1'
COMMENT
'处理状态(1.未处理,2.已处理)'
,
`fileNames`
varchar
(
256
)
COMMENT
'附件名称,多个逗号分割'
,
`filePaths`
varchar
(
512
)
COMMENT
'附件下载地址,多个逗号分割'
,
`remark`
varchar
(
255
)
COMMENT
'备注'
,
`createUserId`
bigint
(
20
)
NOT
NULL
COMMENT
'创建用户'
,
`createTime`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'绩效异常记录信息'
;
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