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
f11e0b65
Commit
f11e0b65
authored
Jul 02, 2020
by
lal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
f46d98e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+20
-3
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
f11e0b65
...
@@ -475,6 +475,13 @@ public class ClockInController {
...
@@ -475,6 +475,13 @@ public class ClockInController {
int
dkcs_
=
shif
.
getSxbcs
();
//上下班打卡次数
int
dkcs_
=
shif
.
getSxbcs
();
//上下班打卡次数
int
iswzwd
=
shif
.
getIsWzwd
();
//是否开启晚走晚到(0:否;1:是)
int
iswzwd
=
shif
.
getIsWzwd
();
//是否开启晚走晚到(0:否;1:是)
long
rest_time
=
0
;
if
(
shif
.
getStartTime
()
!=
null
&&
shif
.
getEndTime
()
!=
null
)
{
long
kaishixiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
putime
+
" "
+
shif
.
getStartTime
()+
":00"
));
long
jieshuxiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
putime
+
" "
+
shif
.
getEndTime
()+
":00"
));
rest_time
=
(
jieshuxiuxi
-
kaishixiuxi
)/
1000
/
60
;
//休息时间
}
double
xbwz1
=
0
,
xbwz2
=
0
,
xbwz3
=
0
;
double
xbwz1
=
0
,
xbwz2
=
0
,
xbwz3
=
0
;
int
sbwd1
=
0
,
sbwd2
=
0
,
sbwd3
=
0
;
int
sbwd1
=
0
,
sbwd2
=
0
,
sbwd3
=
0
;
...
@@ -620,7 +627,7 @@ public class ClockInController {
...
@@ -620,7 +627,7 @@ public class ClockInController {
}
}
}
}
if
(
dkmc
.
getSbdk1
()
!=
null
){
if
(
dkmc
.
getSbdk1
()
!=
null
){
Long
time
=
(
time_
-
dkmc
.
getSbdk1
())/
1000
/
60
;
Long
time
=
(
time_
-
dkmc
.
getSbdk1
())/
1000
/
60
-
rest_time
;
pcd
.
setGzsc
(
Math
.
abs
(
Double
.
valueOf
(
time
.
toString
())));
//只打一次卡时计算工作时长
pcd
.
setGzsc
(
Math
.
abs
(
Double
.
valueOf
(
time
.
toString
())));
//只打一次卡时计算工作时长
}
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
pcd
);
//修改打卡记录
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
pcd
);
//修改打卡记录
...
@@ -661,7 +668,12 @@ public class ClockInController {
...
@@ -661,7 +668,12 @@ public class ClockInController {
Long
time
=
(
time_
-
dkmc
.
getSbdk2
())/
1000
/
60
;
Long
time
=
(
time_
-
dkmc
.
getSbdk2
())/
1000
/
60
;
BigDecimal
om
=
new
BigDecimal
(
dkmc
.
getGzsc
());
BigDecimal
om
=
new
BigDecimal
(
dkmc
.
getGzsc
());
BigDecimal
on
=
new
BigDecimal
(
time
);
BigDecimal
on
=
new
BigDecimal
(
time
);
double
worktime
=
Math
.
abs
(
om
.
add
(
on
).
doubleValue
());
BigDecimal
worktime_
=
new
BigDecimal
(
Math
.
abs
(
om
.
add
(
on
).
doubleValue
()));
BigDecimal
xx
=
new
BigDecimal
(
rest_time
);
double
worktime
=
Math
.
abs
(
worktime_
.
subtract
(
xx
).
doubleValue
());
pcd
.
setGzsc
(
worktime
);
pcd
.
setGzsc
(
worktime
);
}
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
pcd
);
//修改打卡记录
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
pcd
);
//修改打卡记录
...
@@ -699,7 +711,12 @@ public class ClockInController {
...
@@ -699,7 +711,12 @@ public class ClockInController {
Long
time
=
(
time_
-
dkmc
.
getSbdk3
())/
1000
/
60
;
Long
time
=
(
time_
-
dkmc
.
getSbdk3
())/
1000
/
60
;
BigDecimal
om
=
new
BigDecimal
(
dkmc
.
getGzsc
());
//第二次
BigDecimal
om
=
new
BigDecimal
(
dkmc
.
getGzsc
());
//第二次
BigDecimal
on
=
new
BigDecimal
(
time
);
BigDecimal
on
=
new
BigDecimal
(
time
);
double
worktime
=
Math
.
abs
(
om
.
add
(
on
).
doubleValue
());
BigDecimal
worktime_
=
new
BigDecimal
(
Math
.
abs
(
om
.
add
(
on
).
doubleValue
()));
BigDecimal
xx
=
new
BigDecimal
(
rest_time
);
double
worktime
=
Math
.
abs
(
worktime_
.
subtract
(
xx
).
doubleValue
());
pcd
.
setGzsc
(
worktime
);
pcd
.
setGzsc
(
worktime
);
}
}
}
}
...
...
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