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
5272ee82
Commit
5272ee82
authored
5 years ago
by
lal
Committed by
chenzg
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交BUG
parent
708e1728
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
14 deletions
+36
-14
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+33
-12
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+1
-1
src/main/resources/mapping/kqgl/AttendanceGroupMapper.xml
+1
-1
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
5272ee82
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
5272ee82
...
@@ -105,9 +105,10 @@ public class AttendanceTaskTiming{
...
@@ -105,9 +105,10 @@ public class AttendanceTaskTiming{
*/
*/
//3.添加定时任务 每四小时执行一次
//3.添加定时任务 每四小时执行一次
@Scheduled
(
cron
=
"0 0 */4 * * ?"
)
//
@Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0 */5 * * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 02 12 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
@Scheduled
(
cron
=
"0 */5 * * * ?"
)
public
void
AttendanceTask
()
throws
ParseException
{
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
// boolean implement = false;
...
@@ -150,10 +151,12 @@ public class AttendanceTaskTiming{
...
@@ -150,10 +151,12 @@ public class AttendanceTaskTiming{
int
year
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
int
year
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
int
month
=
Calendar
.
getInstance
().
get
(
Calendar
.
MONTH
)
+
1
;
int
month
=
Calendar
.
getInstance
().
get
(
Calendar
.
MONTH
)
+
1
;
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
));
for
(
int
t
=
0
;
t
<
orgcodelist
.
size
();
t
++){
for
(
int
t
=
0
;
t
<
orgcodelist
.
size
();
t
++){
int
org_code
=
orgcodelist
.
get
(
t
).
getId
();
//企业组织代码
int
org_code
=
orgcodelist
.
get
(
t
).
getId
();
//企业组织代码
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
)
.
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
).
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
org_code
));
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
for
(
AdditionalDto
user
:
userlist
)
{
for
(
AdditionalDto
user
:
userlist
)
{
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
...
@@ -181,16 +184,34 @@ public class AttendanceTaskTiming{
...
@@ -181,16 +184,34 @@ public class AttendanceTaskTiming{
dkjtts
[
dk
]
=
pcd
.
getData
();
dkjtts
[
dk
]
=
pcd
.
getData
();
dk
++;
dk
++;
if
(
pcd
.
getYdkcs
()
==
2
||
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getYdkcs
()
==
2
||
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getSbdk1
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getSbdk1
()
==
null
){
if
(
pcd
.
getXbdk1
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getXbdk1
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
}
}
if
(
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getYdkcs
()
==
4
||
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getSbdk2
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getSbdk2
()
==
null
){
if
(
pcd
.
getXbdk2
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getXbdk2
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
}
}
if
(
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getYdkcs
()
==
6
){
if
(
pcd
.
getSbdk3
()
==
null
){
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getSbdk3
()
==
null
){
if
(
pcd
.
getXbdk3
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
sblacks
[
sbqkcs
]
=
pcd
.
getData
();
sbqkcs
++;
}
if
(
pcd
.
getXbdk3
()
==
null
){
xblacks
[
xbqkcs
]
=
pcd
.
getData
();
xbqkcs
++;
}
}
}
}
}
}
}
...
@@ -439,7 +460,7 @@ public class AttendanceTaskTiming{
...
@@ -439,7 +460,7 @@ public class AttendanceTaskTiming{
}
}
//排查请假是否在最后一次打卡范围内 查询当月的请假所有日期
//排查请假是否在最后一次打卡范围内 查询当月的请假所有日期
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
);
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
,
org_code
);
// KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
// KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
String
beginTime
=
sdf1
.
format
(
new
Date
());
String
beginTime
=
sdf1
.
format
(
new
Date
());
// List<String> rowData = new ArrayList<String>();
// List<String> rowData = new ArrayList<String>();
...
@@ -676,7 +697,7 @@ public class AttendanceTaskTiming{
...
@@ -676,7 +697,7 @@ public class AttendanceTaskTiming{
summary
.
setEarlyLeaveTimes
(
Double
.
valueOf
(
leanum
));
//早退次数
summary
.
setEarlyLeaveTimes
(
Double
.
valueOf
(
leanum
));
//早退次数
summary
.
setLengthEarlyLeave
(
Double
.
valueOf
(
leahours
));
//早退时长(分钟)
summary
.
setLengthEarlyLeave
(
Double
.
valueOf
(
leahours
));
//早退时长(分钟)
summary
.
setNumberWorkCardShortage
(
Double
.
valueOf
(
sbqkcs
));
//上班缺卡次数
summary
.
setNumberWorkCardShortage
(
Double
.
valueOf
(
sbqkcs
));
//上班缺卡次数
summary
.
setNumberDutyCardShortage
(
Double
.
valueOf
(
xbqkcs
));
//下班缺卡次数
summary
.
setNumberDutyCardShortage
(
Double
.
valueOf
(
xbqkcs
<
0
?
0
:
xbqkcs
));
//下班缺卡次数
summary
.
setLengthBusinessTrip
(
traveltotal
);
//出差时长
summary
.
setLengthBusinessTrip
(
traveltotal
);
//出差时长
summary
.
setTimeOut
(
egresstotal
);
//外出时长
summary
.
setTimeOut
(
egresstotal
);
//外出时长
summary
.
setTotalOvertimeHours
(
overtimetotal
);
//加班总时长
summary
.
setTotalOvertimeHours
(
overtimetotal
);
//加班总时长
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
5272ee82
...
@@ -20,7 +20,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
...
@@ -20,7 +20,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
List
<
KqglAssoRelationSummary
>
SpecificLeave
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
SpecificLeave
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
}
}
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqgl/AttendanceGroupMapper.xml
View file @
5272ee82
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<result
column=
"hk_address"
property=
"hkAddress"
/>
<result
column=
"hk_address"
property=
"hkAddress"
/>
<result
column=
"qq"
property=
"qq"
/>
<result
column=
"qq"
property=
"qq"
/>
<result
column=
"wechat"
property=
"wechat"
/>
<result
column=
"wechat"
property=
"wechat"
/>
<
result
column=
"email"
property=
"email"
/
>
<
!-- <result column="email" property="email" /> --
>
<result
column=
"blood_type"
property=
"bloodType"
/>
<result
column=
"blood_type"
property=
"bloodType"
/>
<result
column=
"language"
property=
"language"
/>
<result
column=
"language"
property=
"language"
/>
<result
column=
"edu"
property=
"edu"
/>
<result
column=
"edu"
property=
"edu"
/>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
5272ee82
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
res.end_time
res.end_time
from kqgl_asso_relation_summary res
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
where res.user_id = #{userid}
and res.org_code = #{orgcode}
and res.approval_type = #{approvaltype}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.start_time,res.end_time;
GROUP BY res.start_time,res.end_time;
...
...
This diff is collapsed.
Click to expand it.
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