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
ab1c89e5
Commit
ab1c89e5
authored
Jul 17, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
6b0dcc31
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
19 deletions
+68
-19
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+49
-14
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+9
-4
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
+10
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
ab1c89e5
...
@@ -531,6 +531,7 @@ public class ClockInController {
...
@@ -531,6 +531,7 @@ public class ClockInController {
}
}
}
}
if
(
isRange
)
{
if
(
isRange
)
{
int
yxcd
=
shif
.
getYxcdfzs
();
//允许迟到
int
yzcd
=
shif
.
getYzcdfzs
();
//严重迟到分钟数
int
yzcd
=
shif
.
getYzcdfzs
();
//严重迟到分钟数
int
kgcdfzs
=
shif
.
getKgcdfzs
();
//旷工迟到分钟数
int
kgcdfzs
=
shif
.
getKgcdfzs
();
//旷工迟到分钟数
...
@@ -648,6 +649,10 @@ public class ClockInController {
...
@@ -648,6 +649,10 @@ public class ClockInController {
}
}
}
}
//允许迟到范围
if
(
sbdkjg
<=
yxcd
)
{
sbdkjg
=
0
;
}
if
(
atttype
==
1
)
{
if
(
atttype
==
1
)
{
pcd
.
setSbdk1
(
time_
);
pcd
.
setSbdk1
(
time_
);
...
@@ -669,16 +674,25 @@ public class ClockInController {
...
@@ -669,16 +674,25 @@ public class ClockInController {
pcd
.
setXbdk3jg
(
sbdkjg
);
pcd
.
setXbdk3jg
(
sbdkjg
);
}
}
int
ydkcs
=
0
;
int
ydkcs
=
0
;
if
(
shif
!=
null
){
ydkcs
=
shif
.
getSxbcs
()*
2
;}
//应打卡次数
if
(
shif
!=
null
){
if
(
sbdkjg
>
yzcd
&&
yzcd
>
0
)
{
ydkcs
=
shif
.
getSxbcs
()*
2
;
}
//应打卡次数
pcd
.
setYdkcs
(
ydkcs
);
//严重迟到范围
if
(
sbdkjg
>
yzcd
&&
sbdkjg
<
kgcdfzs
&&
yzcd
>
0
)
{
yzcdcs
++;
yzcdcs
++;
yzcdsc
=
sbdkjg
-
yzcd
;
yzcdsc
=
sbdkjg
;
}
}
if
(
sbdkjg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
kgcdcs
++;}
//旷工迟到
pcd
.
setYdkcs
(
ydkcs
);
if
(
sbdkjg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
pcd
.
setYzcdcs
(
yzcdcs
);
kgcdcs
++;
pcd
.
setYzcdsc
(
Double
.
valueOf
(
yzcdsc
));
}
pcd
.
setKgcdfzs
(
kgcdcs
);
pcd
.
setYzcdcs
(
yzcdcs
);
//严重迟到次数
pcd
.
setYzcdsc
(
Double
.
valueOf
(
yzcdsc
));
//严重迟到时长(分钟)
pcd
.
setKgcdfzs
(
kgcdcs
);
//旷工迟到次数
if
(!
pcd
.
insert
())
{
if
(!
pcd
.
insert
())
{
throw
new
CustomException
(
"打卡明细-新增异常-1"
);
throw
new
CustomException
(
"打卡明细-新增异常-1"
);
}
}
...
@@ -710,15 +724,26 @@ public class ClockInController {
...
@@ -710,15 +724,26 @@ public class ClockInController {
Long
time
=
(
time_
-
punchcardtime
)/
1000
/
60
;
Long
time
=
(
time_
-
punchcardtime
)/
1000
/
60
;
if
(
time
>
0
){
sbdk2jg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));}
if
(
time
>
0
){
sbdk2jg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));}
}
}
if
(
sbdk2jg
>
yzcd
&&
yzcd
>
0
)
{
//允许迟到范围
if
(
sbdk2jg
<=
yxcd
)
{
sbdk2jg
=
0
;
}
//严重迟到范围
if
(
sbdk2jg
>
yzcd
&&
sbdk2jg
<
kgcdfzs
&&
yzcd
>
0
)
{
yzcdcs
=
dkmc
.
getYzcdcs
()+
1
;
yzcdcs
=
dkmc
.
getYzcdcs
()+
1
;
yzcdsc
=
sbdk2jg
-
yzcd
;
yzcdsc
=
sbdk2jg
;
}
//旷工迟到
if
(
sbdk2jg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
kgcdcs
++;
}
}
if
(
sbdk2jg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
kgcdcs
++;}
pcd
.
setId
(
dkmc
.
getId
());
pcd
.
setId
(
dkmc
.
getId
());
pcd
.
setSbdk2
(
time_
);
//上班1打卡时间
pcd
.
setSbdk2
(
time_
);
//上班1打卡时间
pcd
.
setSbdk2jg
(
sbdk2jg
);
pcd
.
setSbdk2jg
(
sbdk2jg
);
pcd
.
setYzcdcs
(
yzcdcs
);
pcd
.
setYzcdcs
(
yzcdcs
);
pcd
.
setYzcdsc
(
Double
.
valueOf
(
yzcdsc
));
pcd
.
setYzcdsc
(
Double
.
valueOf
(
yzcdsc
));
pcd
.
setKgcdfzs
(
kgcdcs
);
pcd
.
setKgcdfzs
(
kgcdcs
);
...
@@ -754,11 +779,21 @@ public class ClockInController {
...
@@ -754,11 +779,21 @@ public class ClockInController {
Long
time
=
(
time_
-
punchcardtime
)/
1000
/
60
;
Long
time
=
(
time_
-
punchcardtime
)/
1000
/
60
;
if
(
time
>
0
){
sbdk3jg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));}
if
(
time
>
0
){
sbdk3jg
=
Math
.
abs
(
Integer
.
valueOf
(
time
.
toString
()));}
}
}
if
(
sbdk3jg
>
yzcd
&&
yzcd
>
0
)
{
//允许迟到范围
if
(
sbdk3jg
<=
yxcd
)
{
sbdk3jg
=
0
;
}
//严重迟到范围
if
(
sbdk3jg
>
yzcd
&&
sbdk3jg
<
kgcdfzs
&&
yzcd
>
0
)
{
yzcdcs
=
dkmc
.
getYzcdcs
()+
1
;
yzcdcs
=
dkmc
.
getYzcdcs
()+
1
;
yzcdsc
=
sbdk3jg
-
yzcd
;
yzcdsc
=
sbdk3jg
;
}
}
if
(
sbdk3jg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
kgcdcs
++;}
//旷工迟到
if
(
sbdk3jg
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
kgcdcs
++;
}
pcd
.
setId
(
dkmc
.
getId
());
pcd
.
setId
(
dkmc
.
getId
());
pcd
.
setSbdk3
(
time_
);
//上班1打卡时间
pcd
.
setSbdk3
(
time_
);
//上班1打卡时间
pcd
.
setSbdk3jg
(
sbdk3jg
);
pcd
.
setSbdk3jg
(
sbdk3jg
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
ab1c89e5
...
@@ -117,7 +117,7 @@ public class AttendanceTaskTiming{
...
@@ -117,7 +117,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 24 10
* * ?")
@Scheduled
(
cron
=
"0 30 19
* * ?"
)
public
void
AttendanceTask
()
throws
ParseException
{
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
// boolean implement = false;
...
@@ -154,9 +154,14 @@ public class AttendanceTaskTiming{
...
@@ -154,9 +154,14 @@ public class AttendanceTaskTiming{
String
str
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
String
str
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
()).
toString
();
//
String
ttstr
=
new
SimpleDateFormat
(
"yyyy-MM"
).
format
(
new
Date
()).
toString
();
//
String
ttstr
=
new
SimpleDateFormat
(
"yyyy-MM"
).
format
(
new
Date
()).
toString
();
//
String
[]
rangeArray
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
sdf1
.
format
(
c
.
getTime
()),
str
)).
split
(
";"
);
//目前为止所有日期
String
yesterday
=
ClockInTool
.
requires_extra_times
(
str
,-
1
,
3
,
1
);
//前一天
String
[]
rangeArray
=
ClockInTool
.
listToString
(
ClockInTool
.
getDays
(
sdf1
.
format
(
c
.
getTime
()),
yesterday
)).
split
(
";"
);
//目前为止所有日期
String
[]
range
=
rangeArray
[
0
].
split
(
","
);
String
[]
range
=
rangeArray
[
0
].
split
(
","
);
Long
endDateyesterday
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
yesterday
,
"yyyy-MM-dd"
)).
getTime
();
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
;
...
@@ -181,7 +186,7 @@ public class AttendanceTaskTiming{
...
@@ -181,7 +186,7 @@ public class AttendanceTaskTiming{
//考勤组信息
//考勤组信息
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
new
Date
().
getTime
()
);
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDateyesterday
);
int
dkjl
=
0
;
//目前为止打卡次数
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
@@ -423,7 +428,7 @@ public class AttendanceTaskTiming{
...
@@ -423,7 +428,7 @@ public class AttendanceTaskTiming{
}
}
}
}
}
}
List
<
PunchRecord
>
initial
=
punchrecordmapper
.
getMaintenancePunchCardList
(
startDate
,
new
Date
().
getTime
()
,
user
.
getEmpnum
());
List
<
PunchRecord
>
initial
=
punchrecordmapper
.
getMaintenancePunchCardList
(
startDate
,
endDateyesterday
,
user
.
getEmpnum
());
// // 迟到次数 迟到时长 早退次数 早退时长
// // 迟到次数 迟到时长 早退次数 早退时长
// int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
// int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
String
[]
cdts
=
new
String
[
31
];
//迟到的具体天数
String
[]
cdts
=
new
String
[
31
];
//迟到的具体天数
...
...
src/main/resources/mapping/kqmk/KqglAssoMonthPunchSummaryMapper.xml
View file @
ab1c89e5
...
@@ -242,12 +242,21 @@
...
@@ -242,12 +242,21 @@
</select>
</select>
<select
id=
"MonthlySummaryLeave"
resultMap=
"BalanceSheetDataMap"
>
<select
id=
"MonthlySummaryLeave"
resultMap=
"BalanceSheetDataMap"
>
<!-- select res.leave_type_id as leaverulesid,res.duration as balancedays from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = 2
and res.org_code = #{orgcode}
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.leave_type_id,res.duration -->
select aa.leaverulesid,SUM(aa.balancedays) as balancedays from (
select res.leave_type_id as leaverulesid,res.duration as balancedays from kqgl_asso_relation_summary res
select res.leave_type_id as leaverulesid,res.duration as balancedays from kqgl_asso_relation_summary res
where res.user_id = #{userid}
where res.user_id = #{userid}
and res.approval_type = 2
and res.approval_type = 2
and res.org_code = #{orgcode}
and res.org_code = #{orgcode}
and SUBSTR(res.app_time,1,7) = #{apptime}
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.leave_type_id,res.duration
GROUP BY res.leave_type_id,res.duration) as aa
GROUP BY aa.leaverulesid
</select>
</select>
<select
id=
"FormMonthlySummaryLeave"
resultMap=
"BalanceSheetDataMap"
>
<select
id=
"FormMonthlySummaryLeave"
resultMap=
"BalanceSheetDataMap"
>
...
...
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