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
b6799545
Commit
b6799545
authored
4 years ago
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!577
parents
da49692d
d52e2363
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
9 deletions
+23
-9
src/main/java/cn/timer/api/controller/kqgl/.DS_Store
+0
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/.DS_Store
+0
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+17
-5
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
+1
-1
src/main/resources/application-test.yml
+1
-1
src/main/resources/application.yml
+2
-0
src/main/resources/logback-spring.xml
+1
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/.DS_Store
0 → 100644
View file @
b6799545
File added
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/.DS_Store
0 → 100644
View file @
b6799545
File added
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
b6799545
...
...
@@ -10,6 +10,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Locale
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
...
...
@@ -61,6 +62,7 @@ import cn.timer.api.utils.DateUtil;
*/
@Configuration
//1.主要用于标记配置类,兼备Component的效果。
@EnableScheduling
// 2.开启定时任务
@Slf4j
public
class
AttendanceTaskTiming
{
@Autowired
...
...
@@ -78,7 +80,7 @@ public class AttendanceTaskTiming{
@Autowired
private
ScheduleMapper
schedulemapper
;
static
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
,
Locale
.
CHINA
);
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
...
...
@@ -89,7 +91,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0
23 15
* * ?")
// @Scheduled(cron = "0
*/2 *
* * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
// @Scheduled(cron = "0 0 6,20 * * ?")
public
void
AttendanceTask
()
throws
ParseException
{
...
...
@@ -231,6 +233,7 @@ public class AttendanceTaskTiming{
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
List
<
KqglAssoTeshu
>
bxdklist
=
kqglassoteshumapper
.
ShouldSpecialDatessetByKqzid
(
attgro
.
getId
(),
ttstr
,
1
);
//当前月 必须打卡日期
int
bxdk
=
bxdklist
.
size
();
String
[]
bxdkss
=
new
String
[
bxdk
];
////特殊-必须打卡天数(工作日)
int
b
=
0
;
for
(
KqglAssoTeshu
bxd
:
bxdklist
)
{
...
...
@@ -268,17 +271,25 @@ public class AttendanceTaskTiming{
sdf1
.
setLenient
(
false
);
int
y
=
0
,
q
=
0
,
jj
=
0
,
xx
=
0
;
//jj:节假日
String
[]
zdxx
=
new
String
[
31
];
//法定休息的具体天数(yyyy-MM-dd)
for
(
int
i
=
1
;
i
<=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
);
i
++){
int
wd
=
ClockInTool
.
getDaysByYearMonth
(
year
,
month
);
for
(
int
i
=
1
;
i
<=
wd
;
i
++){
boolean
xixi
=
true
;
Date
date1
=
sdf1
.
parse
(
yemo
+
"-"
+
i
);
for
(
int
u
=
0
;
u
<
week
.
length
;
u
++){
if
(
sdf2
.
format
(
date1
).
equals
(
week
[
u
])){
String
webbuf
=
sdf2
.
format
(
date1
);
if
(
webbuf
.
equals
(
week
[
u
])){
q
++;
y
++;
if
(
Arrays
.
asList
(
appmaps
).
contains
(
String
.
valueOf
(
sdf1
.
format
(
date1
)))){
y
=
y
-
1
;
}
log
.
error
(
"getIsFdjjr: "
+
attgro
.
getIsFdjjr
());
if
(
attgro
.
getIsFdjjr
().
equals
(
1111
))
{
if
(
Arrays
.
asList
(
holidays
).
contains
(
String
.
valueOf
(
sdf1
.
format
(
date1
)))){
y
=
y
-
1
;
...
...
@@ -308,6 +319,7 @@ public class AttendanceTaskTiming{
daysOff
=
xiuxi
;
daysOnDuty
=
y
+
bxdk
;
log
.
error
(
"bxdk数据为:"
+
bxdk
);
int
w
=
0
,
x
=
0
;
int
zj
=
6
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
b6799545
...
...
@@ -77,7 +77,7 @@ public class LastMonthtimingExport {
@Autowired
private
ScheduleMapper
schedulemapper
;
static
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
,
Locale
.
CHINA
);
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
View file @
b6799545
...
...
@@ -63,7 +63,7 @@ import cn.timer.api.utils.DateUtil;
public
class
RealTimeUpdate
{
static
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
);
static
SimpleDateFormat
sdf2
=
new
SimpleDateFormat
(
"EEE"
,
Locale
.
CHINA
);
static
String
tablename
=
null
;
@Autowired
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/application-test.yml
View file @
b6799545
...
...
@@ -154,7 +154,7 @@ pagehelper:
logging
:
level
:
root
:
info
cn.timer.api.dao
:
error
cn.timer.api.dao
:
debug
pattern
:
console
:
'
--%p--%m%n'
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/application.yml
View file @
b6799545
spring
:
profiles
:
# active: test
active
:
'
@environment@'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/resources/logback-spring.xml
View file @
b6799545
...
...
@@ -6,7 +6,7 @@
<!--3、设置变量 用来定义变量值的标签, 有两个属性,name和value;其中name的值是变量的名称,value的值时变量定义的值。 通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<!--<property name="log.path" value="/logs/logback.log" /> -->
<!--<property name="log.path" value="/logs/logback" /> -->
<property
name=
"logback.logdir"
value=
"
/deploy/logs
/"
/>
<property
name=
"logback.logdir"
value=
"
..
/"
/>
<property
name=
"logback.appname"
value=
"8timer-api"
/>
<!--4、appender用来格式化日志输出节点,有俩个属性name和class,class用来指定哪种输出策略,常用就是控制台输出策略和文件输出策略。
控制台输出 ConsoleAppender 输出到文件 RollingFileAppender -->
...
...
This diff is collapsed.
Click to expand it.
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