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
325ea20c
Commit
325ea20c
authored
Jan 09, 2021
by
leialin
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
6f32bee4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+16
-9
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+1
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
325ea20c
...
@@ -5,6 +5,8 @@ import java.text.Format;
...
@@ -5,6 +5,8 @@ import java.text.Format;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Calendar
;
...
@@ -52,15 +54,20 @@ public class ClockInTool {
...
@@ -52,15 +54,20 @@ public class ClockInTool {
// 获得上个月月份年份
// 获得上个月月份年份
public
static
String
getLastYearMonth
()
{
public
static
String
getLastYearMonth
()
{
Calendar
now
=
Calendar
.
getInstance
();
// Calendar now = Calendar.getInstance();
int
month
=
now
.
get
(
Calendar
.
MONTH
);
// int month = now.get(Calendar.MONTH);
String
m
;
// String m;
if
(
month
<
10
)
{
// if (month < 10) {
m
=
"0"
+
month
;
// m = "0" + month;
}
else
{
// } else {
m
=
month
+
""
;
// m = month + "";
}
// }
return
now
.
get
(
Calendar
.
YEAR
)
+
"-"
+
m
;
// return now.get(Calendar.YEAR) + "-" + m;
LocalDate
today
=
LocalDate
.
now
();
today
=
today
.
minusMonths
(
1
);
DateTimeFormatter
formatters
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
);
return
formatters
.
format
(
today
);
}
}
/**
/**
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
325ea20c
...
@@ -91,7 +91,7 @@ public class LastMonthtimingExport {
...
@@ -91,7 +91,7 @@ public class LastMonthtimingExport {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @Scheduled(cron = "0
22 14
* * ?")
// @Scheduled(cron = "0
55 11
* * ?")
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
...
...
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