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
08119240
Commit
08119240
authored
May 22, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
40633759
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
8 deletions
+30
-8
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+14
-5
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+0
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+2
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+2
-2
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+11
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
08119240
...
...
@@ -151,7 +151,7 @@ public class ClockInController {
String
staputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchstart
);
//应打卡开始时间
String
entputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
punchend
);
//应打卡结束时间
String
DKputime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
time_
);
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
);
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
// 手动抛出异常
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
08119240
...
...
@@ -269,13 +269,20 @@ public class ClockInTool {
* @return true在时间段内,false不在时间段内
* @throws Exception
*/
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
)
throws
Exception
{
public
static
boolean
hourMinuteBetween
(
String
nowDate
,
String
startDate
,
String
endDate
,
String
date_format
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"HH:mm"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
date_format
);
Date
now
=
format
.
parse
(
nowDate
);
Date
start
=
format
.
parse
(
startDate
);
Date
end
=
format
.
parse
(
endDate
);
Date
now
=
null
;
Date
start
=
null
;
Date
end
=
null
;
try
{
now
=
format
.
parse
(
nowDate
);
start
=
format
.
parse
(
startDate
);
end
=
format
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
long
nowTime
=
now
.
getTime
();
long
startTime
=
start
.
getTime
();
...
...
@@ -334,6 +341,8 @@ public class ClockInTool {
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm:ss"
);
}
else
if
(
num
==
2
)
{
df2
=
new
SimpleDateFormat
(
"HH:mm"
);
}
else
if
(
num
==
3
)
{
df2
=
new
SimpleDateFormat
(
"yyyy-MM-dd' 'HH:mm"
);
}
return
df2
.
format
(
date1
);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
08119240
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
08119240
...
...
@@ -19,4 +19,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary
SecondaryValue
(
int
userid
,
int
approvaltype
,
String
time
);
List
<
KqglAssoRelationSummary
>
SpecificLeave
(
int
userid
,
int
approvaltype
,
String
apptime
);
List
<
KqglAssoRelationSummary
>
LeaveInvestigation
(
int
userid
,
int
approvaltype
,
String
apptime
);
}
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
08119240
...
...
@@ -102,8 +102,8 @@
<select
id=
"selectAdditionalList"
resultMap=
"AdditionalMap"
>
SELECT emp.emp_num as empnum,
emp.`name` as empname,
IFNULL(c.name,
''
) as department,
gw.`name`
as position
IFNULL(c.name,
null
) as department,
IFNULL(gw.`name`,null)
as position
from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
...
...
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
08119240
...
...
@@ -65,6 +65,17 @@
and SUBSTR(res.app_time,1,7) = #{apptime}
</select>
<select
id=
"LeaveInvestigation"
resultMap=
"BaseResultMap"
>
select res.start_time,
res.end_time
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.start_time,res.end_time;
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
...
...
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