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
effa3d72
Commit
effa3d72
authored
Jul 14, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
c0855d36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
110 additions
and
42 deletions
+110
-42
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+110
-42
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
effa3d72
...
...
@@ -344,6 +344,7 @@ public class ClockInController {
}
execution_status
=
1
;
}
else
{
boolean
getinto2
=
true
;
execution_status
=
2
;
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
//下班1
if
(
dkmc
.
getSbdk1
()
!=
null
&&
dkmc
.
getXbdk1
()
==
null
){
...
...
@@ -351,11 +352,11 @@ public class ClockInController {
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
starttime1
)));
//应打卡时间
Date
sd2
=
df1
.
parse
(
sStdIoTime
);
//打卡时间
if
(
sd1
.
after
(
sd2
))
{
sbdkkd
=
true
;
//
atttype
=
1
;
sbdkkd
=
true
;
//
打卡无效
//
atttype = 1;
}
else
{
kskd
=
false
;
atttype
=
2
;
//
atttype = 2;
}
}
else
{
//最后一次卡的时候 再继续打视为更新最后一次打卡
...
...
@@ -368,66 +369,97 @@ public class ClockInController {
if
(
effectiveDate1
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk1
()
!=
null
)
{
sbdkkd
=
true
;
//打卡无效
atttype
=
1
;
//
atttype = 1;
}
else
{
atttype
=
1
;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
boolean
effectiveDate2
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime1ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime1js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate2
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk1
()
!=
null
)
{
kskd
=
true
;
atttype
=
2
;
}
else
{
kskd
=
false
;
atttype
=
2
;
// atttype = 2;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
boolean
effectiveDate3
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime2ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime2js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate3
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
atttype
=
3
;
//
atttype = 3;
}
else
{
atttype
=
3
;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
boolean
effectiveDate4
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime2ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime2js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate4
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk2
()
!=
null
)
{
kskd
=
true
;
kskd
=
true
;
//更新最后一次打卡
atttype
=
4
;
}
else
{
kskd
=
false
;
atttype
=
4
;
// atttype = 4;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
if
(
attdate
.
getAttsch
().
size
()
==
6
)
{
boolean
effectiveDate5
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime3ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime3js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate5
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
atttype
=
5
;
//
atttype = 5;
}
else
{
atttype
=
5
;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
{
isRange
=
false
;
}
boolean
effectiveDate6
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime3ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime3js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate6
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk2
()
!=
null
)
{
kskd
=
true
;
kskd
=
true
;
////更新最后一次打卡
atttype
=
6
;
}
else
{
kskd
=
false
;
atttype
=
6
;
// atttype = 6;
getinto2
=
false
;
isRange
=
true
;
//在范围
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
{
isRange
=
false
;
}
}
}
}
...
...
@@ -884,6 +916,8 @@ public class ClockInController {
.
eq
(
KqglAssoDkjl:
:
getSort
,
atttype
).
eq
(
KqglAssoDkjl:
:
getQyid
,
qyid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
toweek
)));
KqglAssoDkjl
.
builder
().
id
(
dkjj
.
getId
()).
status
(
0
).
sort
(
0
).
build
().
updateById
();
msg
=
"打卡已更新数据"
;
sbyf
=
0
;
}
int
results
=
0
;
...
...
@@ -964,6 +998,7 @@ public class ClockInController {
//第二次未超过应上班打卡时间 打卡为无效
if
(
sbdkkd
)
{
sbyf
=
0
;
status
=
2
;
atttype
=
0
;
msg
=
"已有最优的打卡记录存在"
;
...
...
@@ -1526,6 +1561,7 @@ public class ClockInController {
}
execution_status
=
1
;
}
else
{
boolean
getinto2
=
true
;
execution_status
=
2
;
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
//下班1
if
(
clock
.
getType
()
==
1
)
{
...
...
@@ -1535,7 +1571,7 @@ public class ClockInController {
Date
sd2
=
df1
.
parse
(
sStdIoTime
);
//打卡时间
if
(
sd1
.
after
(
sd2
))
{
sbdkkd
=
true
;
//打卡无效
atttype
=
1
;
//
atttype = 1;
}
}
}
else
if
(
clock
.
getType
()
==
2
){
...
...
@@ -1543,10 +1579,11 @@ public class ClockInController {
kskd
=
false
;
}
else
{
//最后一次卡的时候 再继续打视为更新最后一次打卡
kskd
=
true
;
}
kskd
=
true
;
//更新最后一次打卡
atttype
=
clock
.
getType
();
}
}
}
if
(
attdate
.
getAttsch
().
size
()
==
4
||
attdate
.
getAttsch
().
size
()
==
6
)
{
if
(
clock
.
getType
()
==
1
)
{
...
...
@@ -1554,66 +1591,97 @@ public class ClockInController {
if
(
effectiveDate1
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk1
()
!=
null
)
{
sbdkkd
=
true
;
//打卡无效
}
}
else
{
atttype
=
clock
.
getType
();
isRange
=
true
;
//在范围
getinto2
=
false
;
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
if
(
clock
.
getType
()
==
2
)
{
boolean
effectiveDate2
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime1ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime1js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate2
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk1
()
!=
null
)
{
kskd
=
true
;
}
else
{
kskd
=
false
;
kskd
=
true
;
////更新最后一次打卡
atttype
=
clock
.
getType
();
isRange
=
true
;
//在范围
getinto2
=
false
;
}
else
{
kskd
=
false
;
//更新最后一次打卡
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
if
(
clock
.
getType
()
==
3
)
{
boolean
effectiveDate3
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime2ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime2js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate3
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
}
sbdkkd
=
true
;
//
打卡无效
}
else
{
atttype
=
clock
.
getType
();
isRange
=
true
;
//在范围
getinto2
=
false
;
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
if
(
clock
.
getType
()
==
4
)
{
boolean
effectiveDate4
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime2ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime2js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate4
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk2
()
!=
null
)
{
kskd
=
true
;
kskd
=
true
;
////更新最后一次打卡
atttype
=
clock
.
getType
();
isRange
=
true
;
//在范围
getinto2
=
false
;
}
else
{
kskd
=
false
;
atttype
=
clock
.
getType
();
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
}
if
(
attdate
.
getAttsch
().
size
()
==
6
)
{
if
(
clock
.
getType
()
==
5
)
{
boolean
effectiveDate5
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime3ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
starttime3js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate5
)
{
//在范围内就打卡
if
(
dkmc
.
getSbdk2
()
!=
null
)
{
sbdkkd
=
true
;
//
}
sbdkkd
=
true
;
//
打卡无效
}
else
{
atttype
=
clock
.
getType
();
}
else
{
isRange
=
false
;
}
isRange
=
true
;
//在范围
getinto2
=
false
;
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
else
if
(
clock
.
getType
()
==
6
)
{
boolean
effectiveDate6
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime3ks
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
endtime3js
),
"yyyy-MM-dd HH:mm"
);
if
(
effectiveDate6
)
{
//在范围内就打卡
if
(
dkmc
.
getXbdk2
()
!=
null
)
{
kskd
=
true
;
kskd
=
true
;
//更新最后一次打卡
atttype
=
clock
.
getType
();
isRange
=
true
;
//在范围
getinto2
=
false
;
}
else
{
kskd
=
false
;
atttype
=
clock
.
getType
();
}
}
else
{
isRange
=
false
;
}
}
else
{
if
(
getinto2
)
{
isRange
=
false
;
}
}
}
}
}
...
...
@@ -1646,7 +1714,7 @@ public class ClockInController {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
);
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
//
System.out.println("当前打卡时间不在范围内");
isRange
=
false
;
}
}
...
...
@@ -1962,6 +2030,8 @@ public class ClockInController {
.
eq
(
KqglAssoDkjl:
:
getSort
,
atttype
).
eq
(
KqglAssoDkjl:
:
getQyid
,
qyid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
toweek
)));
KqglAssoDkjl
.
builder
().
id
(
dkjj
.
getId
()).
status
(
0
).
sort
(
0
).
build
().
updateById
();
msg
=
"打卡已更新数据"
;
sbyf
=
0
;
}
int
results
=
0
;
...
...
@@ -2042,6 +2112,7 @@ public class ClockInController {
//第二次未超过应上班打卡时间 打卡为无效
if
(
sbdkkd
)
{
sbyf
=
0
;
status
=
2
;
atttype
=
0
;
msg
=
"已有最优的打卡记录存在"
;
...
...
@@ -2140,6 +2211,9 @@ public class ClockInController {
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
Long
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
str
,
"yyyy-MM-dd"
)).
getTime
();
String
stampToDate
=
ClockInTool
.
stampToDate
(
String
.
valueOf
(
endDate
));
//当天打卡的最后时间
Timestamp
d
=
Timestamp
.
valueOf
(
stampToDate
);
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
//考勤组信息
if
(
attgro
!=
null
)
{
...
...
@@ -2179,24 +2253,18 @@ public class ClockInController {
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
// 当前时间大于下班打卡时间
bc
++;
ash
.
setIsdk
(
1
);
if
(
b
.
before
(
d
))
{
ash
.
setIsupdate
(
1
);
}
}
else
{
bsz
=
1
;
}
}
if
(
r
==
2
)
{
String
stampToDate
=
ClockInTool
.
stampToDate
(
String
.
valueOf
(
endDate
));
Timestamp
d
=
Timestamp
.
valueOf
(
stampToDate
);
// if (b.after(a) && b.after(c)) {
// ash.setIsdk(1);
// }
if
(
b
.
after
(
a
)
&&
b
.
before
(
d
))
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
)
&&
b
.
before
(
d
))
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
if
(
b
.
before
(
a
)
||
b
.
after
(
c
))
{
bc
++;
}
else
{
ash
.
setIsdk
(
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