Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
429d0c76
Commit
429d0c76
authored
Jun 28, 2020
by
lal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交BUG
parent
5cbf737c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
44 deletions
+49
-44
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
+2
-2
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+47
-42
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
View file @
429d0c76
...
...
@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
private
Integer
leaveTypeId
;
@ApiModelProperty
(
value
=
"加班类型id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班类型id
1:工作日加班;2:休息日加班;3:节假日加班
"
,
example
=
"101"
)
private
Integer
overtimeTypeId
;
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;
3:转调休或加班费
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;
(3:转调休 4:加班费)
"
,
example
=
"101"
)
private
Integer
compensateId
;
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
"开始时间"
)
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
429d0c76
...
...
@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0
02 12
* * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0
22 15
* * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
@Scheduled
(
cron
=
"0 0 19 * * ?"
)
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
...
...
@@ -499,7 +500,29 @@ public class AttendanceTaskTiming{
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(leaves), num) >= 0) {//请假
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
leaves
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
2
));
String
leavetype
=
"未知"
;
//请假类型
...
...
@@ -516,25 +539,20 @@ public class AttendanceTaskTiming{
}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(travels), num) >= 0) {//出差
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
travels
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
3
));
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"出差"
+
lea
.
getDuration
()+
"天"
);
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(goouts), num) >= 0){//外出
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
goouts
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
4
));
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"外出"
+
lea
.
getDuration
()+
"天"
);
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cards), num) >= 0){//补卡
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
cards
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
5
));
rowData
.
add
(
"已补卡:"
+
lea
.
getStartTime
());
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(overtimes), num) >= 0) {//加班
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
overtimes
),
num
))
{
// KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
String
company
=
"未知"
,
method
=
"无"
;
//加班单位、加班补偿方式
List
<
KqglAssoRelationSummary
>
leas
=
KqglAssoRelationSummary
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
1
));
...
...
@@ -553,55 +571,42 @@ public class AttendanceTaskTiming{
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
))
{
if
(
lea
.
getCompensateId
()
==
1
)
{
workingturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
workingtransferovertime
++;
if
(
lea
.
getOvertimeTypeId
()
==
1
)
{
if
(
lea
.
getCompensateId
()
==
1
||
lea
.
getCompensateId
()
==
3
)
{
workingturncompenleave
=
workingturncompenleave
+
lea
.
getDuration
();
}
else
if
(
lea
.
getCompensateId
()
==
2
||
lea
.
getCompensateId
()
==
4
)
{
workingtransferovertime
=
workingtransferovertime
+
+
lea
.
getDuration
();
}
}
}
//休息日
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0) {
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
))
{
if
(
lea
.
getCompensateId
()
==
1
)
{
restturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
resttransferovertime
++;
if
(
lea
.
getOvertimeTypeId
()
==
2
)
{
if
(
lea
.
getCompensateId
()
==
1
||
lea
.
getCompensateId
()
==
3
)
{
restturncompenleave
=
restturncompenleave
+
lea
.
getDuration
();
}
else
if
(
lea
.
getCompensateId
()
==
2
||
lea
.
getCompensateId
()
==
4
)
{
resttransferovertime
=
resttransferovertime
+
lea
.
getDuration
();
}
}
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) {
if
(!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
)
&&
!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
))
{
if
(
lea
.
getCompensateId
()
==
1
)
{
holidayturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
holidaytransferovertime
++;
if
(
lea
.
getOvertimeTypeId
()
==
3
)
{
if
(
lea
.
getCompensateId
()
==
1
||
lea
.
getCompensateId
()
==
3
)
{
// holidayturncompenleave++;
holidayturncompenleave
=
holidayturncompenleave
+
lea
.
getDuration
();
}
else
if
(
lea
.
getCompensateId
()
==
2
||
lea
.
getCompensateId
()
==
4
)
{
// holidaytransferovertime++;
holidaytransferovertime
=
holidaytransferovertime
+
lea
.
getDuration
();
}
}
}
}
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
}
////////
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
if
(
attgro
.
getPbfs
()
==
1
){
...
...
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