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
32d60884
Commit
32d60884
authored
Sep 04, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
878af765
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
10 deletions
+63
-10
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+63
-10
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
32d60884
...
@@ -281,8 +281,9 @@ public class ClockInController {
...
@@ -281,8 +281,9 @@ public class ClockInController {
}
else
{
}
else
{
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
endtime3
=
0
,
endtime3ks
=
0
,
endtime3js
=
0
;
endtime3
=
0
,
endtime3ks
=
0
,
endtime3js
=
0
;
List
<
AttSchedule
>
ash
=
null
;
if
(
attdate
.
getAttsch
().
size
()
>
0
)
{
if
(
attdate
.
getAttsch
().
size
()
>
0
)
{
List
<
AttSchedule
>
ash
=
attdate
.
getAttsch
();
ash
=
attdate
.
getAttsch
();
int
y
=
0
;
int
y
=
0
;
clockt
.
setShifid
(
ash
.
get
(
y
).
getId
());
clockt
.
setShifid
(
ash
.
get
(
y
).
getId
());
shifid
=
ash
.
get
(
y
).
getId
();
//班次id
shifid
=
ash
.
get
(
y
).
getId
();
//班次id
...
@@ -537,6 +538,27 @@ public class ClockInController {
...
@@ -537,6 +538,27 @@ public class ClockInController {
if
(
clockt
.
getShifid
()
!=
0
)
{
if
(
clockt
.
getShifid
()
!=
0
)
{
boolean
dddbdk
=
true
;
//
boolean
dak2
=
true
;
//打卡无限制时 当前时间必须大于上班打卡时间 才能打下班卡
if
(
punchstart
==
0
&&
punchend
==
0
&&
(
atttype
==
2
||
atttype
==
4
||
atttype
==
6
))
{
String
xbdk
=
""
;
if
(
atttype
==
2
)
{
xbdk
=
String
.
valueOf
(
ash
.
get
(
0
).
getTime
());
}
else
if
(
atttype
==
4
){
xbdk
=
String
.
valueOf
(
ash
.
get
(
2
).
getTime
());
}
else
{
xbdk
=
String
.
valueOf
(
ash
.
get
(
4
).
getTime
());
}
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
xbdk
)));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd2
.
before
(
sd1
))
{
//小于
dak2
=
false
;
}
}
if
(!
dak2
)
{
dddbdk
=
false
;
}
if
(
dddbdk
)
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
if
(
attdate
.
getAttsch
().
size
()
>
0
&&
clockt
.
getShifid
()
>
0
){
//有无班次
if
(
attdate
.
getAttsch
().
size
()
>
0
&&
clockt
.
getShifid
()
>
0
){
//有无班次
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
clockt
.
getShifid
()));
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
clockt
.
getShifid
()));
...
@@ -601,15 +623,15 @@ public class ClockInController {
...
@@ -601,15 +623,15 @@ public class ClockInController {
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ash
=
attdateyesterday
.
getAttsch
();
List
<
AttSchedule
>
ash1
=
attdateyesterday
.
getAttsch
();
if
(
attdateyesterday
.
getAttsch
().
size
()
==
2
||
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
2
||
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime1
=
ash
.
get
(
1
).
getTime
();
yesendtime1
=
ash1
.
get
(
1
).
getTime
();
}
}
if
(
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime2
=
ash
.
get
(
3
).
getTime
();
yesendtime2
=
ash1
.
get
(
3
).
getTime
();
}
}
if
(
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime3
=
ash
.
get
(
5
).
getTime
();
yesendtime3
=
ash1
.
get
(
5
).
getTime
();
}
}
}
}
...
@@ -877,6 +899,11 @@ public class ClockInController {
...
@@ -877,6 +899,11 @@ public class ClockInController {
status_
=
2
;
status_
=
2
;
}
}
}
else
{
}
else
{
msg
=
"当前时间必须大于上班打卡时间 才能打下班卡"
;
sbyf
=
0
;
status_
=
2
;
}
}
else
{
msg
=
"当前是休息时间"
;
msg
=
"当前是休息时间"
;
sbyf
=
0
;
sbyf
=
0
;
status_
=
2
;
status_
=
2
;
...
@@ -1617,8 +1644,9 @@ public class ClockInController {
...
@@ -1617,8 +1644,9 @@ public class ClockInController {
}
else
{
}
else
{
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
long
starttime1
=
0
,
starttime1ks
=
0
,
starttime1js
=
0
,
endtime1
=
0
,
endtime1ks
=
0
,
endtime1js
=
0
,
starttime2
=
0
,
starttime2ks
=
0
,
starttime2js
=
0
,
endtime2
=
0
,
endtime2ks
=
0
,
endtime2js
=
0
,
starttime3
=
0
,
starttime3ks
=
0
,
starttime3js
=
0
,
endtime3
=
0
,
endtime3ks
=
0
,
endtime3js
=
0
;
endtime3
=
0
,
endtime3ks
=
0
,
endtime3js
=
0
;
List
<
AttSchedule
>
ash
=
null
;
if
(
attdate
.
getAttsch
().
size
()
>
0
)
{
if
(
attdate
.
getAttsch
().
size
()
>
0
)
{
List
<
AttSchedule
>
ash
=
attdate
.
getAttsch
();
ash
=
attdate
.
getAttsch
();
int
y
=
0
;
int
y
=
0
;
clockt
.
setShifid
(
ash
.
get
(
y
).
getId
());
clockt
.
setShifid
(
ash
.
get
(
y
).
getId
());
shifid
=
ash
.
get
(
y
).
getId
();
//班次id
shifid
=
ash
.
get
(
y
).
getId
();
//班次id
...
@@ -1893,7 +1921,27 @@ public class ClockInController {
...
@@ -1893,7 +1921,27 @@ public class ClockInController {
}
}
if
(
clockt
.
getShifid
()
!=
0
)
{
if
(
clockt
.
getShifid
()
!=
0
)
{
boolean
dddbdk
=
true
;
//
boolean
dak2
=
true
;
//打卡无限制时 当前时间必须大于上班打卡时间 才能打下班卡
if
(
punchstart
==
0
&&
punchend
==
0
&&
(
atttype
==
2
||
atttype
==
4
||
atttype
==
6
))
{
String
xbdk
=
""
;
if
(
atttype
==
2
)
{
xbdk
=
String
.
valueOf
(
ash
.
get
(
0
).
getTime
());
}
else
if
(
atttype
==
4
){
xbdk
=
String
.
valueOf
(
ash
.
get
(
2
).
getTime
());
}
else
{
xbdk
=
String
.
valueOf
(
ash
.
get
(
4
).
getTime
());
}
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
xbdk
)));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd2
.
before
(
sd1
))
{
//小于
dak2
=
false
;
}
}
if
(!
dak2
)
{
dddbdk
=
false
;
}
if
(
dddbdk
)
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
if
(
attdate
.
getAttsch
().
size
()
>
0
&&
clockt
.
getShifid
()
>
0
){
//有无班次
if
(
attdate
.
getAttsch
().
size
()
>
0
&&
clockt
.
getShifid
()
>
0
){
//有无班次
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
clockt
.
getShifid
()));
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
clockt
.
getShifid
()));
...
@@ -1959,15 +2007,15 @@ public class ClockInController {
...
@@ -1959,15 +2007,15 @@ public class ClockInController {
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attdateyesterday
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ash
=
attdateyesterday
.
getAttsch
();
List
<
AttSchedule
>
ash1
=
attdateyesterday
.
getAttsch
();
if
(
attdateyesterday
.
getAttsch
().
size
()
==
2
||
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
2
||
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime1
=
ash
.
get
(
1
).
getTime
();
yesendtime1
=
ash1
.
get
(
1
).
getTime
();
}
}
if
(
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
4
||
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime2
=
ash
.
get
(
3
).
getTime
();
yesendtime2
=
ash1
.
get
(
3
).
getTime
();
}
}
if
(
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
if
(
attdateyesterday
.
getAttsch
().
size
()
==
6
)
{
yesendtime3
=
ash
.
get
(
5
).
getTime
();
yesendtime3
=
ash1
.
get
(
5
).
getTime
();
}
}
}
}
...
@@ -2237,6 +2285,11 @@ public class ClockInController {
...
@@ -2237,6 +2285,11 @@ public class ClockInController {
status_
=
2
;
status_
=
2
;
}
}
}
else
{
}
else
{
msg
=
"当前时间必须大于上班打卡时间 才能打下班卡"
;
sbyf
=
0
;
status_
=
2
;
}
}
else
{
msg
=
"当前是休息时间"
;
msg
=
"当前是休息时间"
;
sbyf
=
0
;
sbyf
=
0
;
status_
=
2
;
status_
=
2
;
...
...
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