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
c7e8b256
Commit
c7e8b256
authored
Jun 28, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!277
parents
171d66cb
3d350b6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
85 deletions
+90
-85
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
+2
-2
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+88
-83
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoRelationSummary.java
View file @
c7e8b256
...
@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
...
@@ -55,10 +55,10 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"假期类型id"
,
example
=
"101"
)
private
Integer
leaveTypeId
;
private
Integer
leaveTypeId
;
@ApiModelProperty
(
value
=
"加班类型id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班类型id
1:工作日加班;2:休息日加班;3:节假日加班
"
,
example
=
"101"
)
private
Integer
overtimeTypeId
;
private
Integer
overtimeTypeId
;
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;
3:转调休或加班费
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"加班补偿方式 1:转调休;2:转加班费;
(3:转调休 4:加班费)
"
,
example
=
"101"
)
private
Integer
compensateId
;
private
Integer
compensateId
;
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
"开始时间"
)
@ApiModelProperty
(
value
=
"开始时间 "
,
example
=
"开始时间"
)
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
c7e8b256
...
@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{
...
@@ -107,8 +107,9 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次
//3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?")
// @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 */5 * * * ?")
@Scheduled
(
cron
=
"0 0 19 * * ?"
)
public
void
AttendanceTask
()
throws
ParseException
{
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
// boolean implement = false;
...
@@ -499,88 +500,7 @@ public class AttendanceTaskTiming{
...
@@ -499,88 +500,7 @@ public class AttendanceTaskTiming{
}
}
// if(Arrays.binarySearch(ClockInTool.deleteArrayNull(leaves), num) >= 0) {//请假
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
=
"未知"
;
//请假类型
String
company
=
"未知"
;
//请假单位
if
(
lea
!=
null
)
{
KqglAssoLeaveRules
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getId
,
lea
.
getLeaveTypeId
()));
if
(
rul
!=
null
)
{
leavetype
=
rul
.
getName
();
//1:按天请假;2:按半天;3:按小时
if
(
rul
.
getCompany
()
==
1
)
{
company
=
"天"
;
}
else
if
(
rul
.
getCompany
()
==
2
)
{
company
=
"半天"
;
}
else
{
company
=
"小时"
;
}
}
}
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
));
for
(
KqglAssoRelationSummary
lea
:
leas
)
{
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics
basics
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
org_code
));
if
(
basics
.
getMinimumUnit
()
==
1
)
{
company
=
"分钟"
;
}
else
if
(
basics
.
getMinimumUnit
()
==
2
)
{
company
=
"半小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
3
)
{
company
=
"小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
4
)
{
company
=
"半天"
;}
else
if
(
basics
.
getMinimumUnit
()
==
5
)
{
company
=
"天"
;}
//1:转调休;2:转加班费;3:转调休或加班费
if
(
lea
.
getCompensateId
()
==
1
)
{
method
=
"转调休"
;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
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(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(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
++;
}
}
}
}
/*
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* { rowData.add("上班缺卡"); }else
...
@@ -602,6 +522,91 @@ public class AttendanceTaskTiming{
...
@@ -602,6 +522,91 @@ public class AttendanceTaskTiming{
*/
*/
}
}
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
=
"未知"
;
//请假类型
String
company
=
"未知"
;
//请假单位
if
(
lea
!=
null
)
{
KqglAssoLeaveRules
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getId
,
lea
.
getLeaveTypeId
()));
if
(
rul
!=
null
)
{
leavetype
=
rul
.
getName
();
//1:按天请假;2:按半天;3:按小时
if
(
rul
.
getCompany
()
==
1
)
{
company
=
"天"
;
}
else
if
(
rul
.
getCompany
()
==
2
)
{
company
=
"半天"
;
}
else
{
company
=
"小时"
;
}
}
}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
}
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
(
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
(
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
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
overtimes
),
num
))
{
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
));
for
(
KqglAssoRelationSummary
lea
:
leas
)
{
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics
basics
=
KqglAssoOvertimeBasics
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoOvertimeBasics
>().
lambda
().
eq
(
KqglAssoOvertimeBasics:
:
getOrgCode
,
org_code
));
if
(
basics
.
getMinimumUnit
()
==
1
)
{
company
=
"分钟"
;
}
else
if
(
basics
.
getMinimumUnit
()
==
2
)
{
company
=
"半小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
3
)
{
company
=
"小时"
;}
else
if
(
basics
.
getMinimumUnit
()
==
4
)
{
company
=
"半天"
;}
else
if
(
basics
.
getMinimumUnit
()
==
5
)
{
company
=
"天"
;}
//1:转调休;2:转加班费;3:转调休或加班费
if
(
lea
.
getCompensateId
()
==
1
)
{
method
=
"转调休"
;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
))
{
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
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
))
{
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
(!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
num
)
&&
!
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
))
{
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
();
}
}
}
}
}
////////
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
if
(
attgro
.
getPbfs
()
==
1
){
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