Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
c403e537
Commit
c403e537
authored
Sep 22, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加定时任务
parent
2dd4708f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
pom.xml
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
+1
-1
WindSpeedScheduled.java
...os/boot/module/hygf/biz/scheduled/WindSpeedScheduled.java
+14
-5
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+2
-0
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+2
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
View file @
c403e537
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<dependency>
<dependency>
<groupId>
com.qiyuesuo.sdk
</groupId>
<groupId>
com.qiyuesuo.sdk
</groupId>
<artifactId>
sdk-java
</artifactId>
<artifactId>
sdk-java
</artifactId>
<version>
3.
0.0
</version>
<version>
3.
6.3
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/scheduled/WindSpeedScheduled.java
View file @
c403e537
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
scheduled
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
scheduled
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.MonthPowerServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.MonthPowerServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpCollectorHistoryServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl
;
/**
/**
* @description:
* @description:
* @author: tw
* @author: tw
...
@@ -16,10 +19,16 @@ public class WindSpeedScheduled {
...
@@ -16,10 +19,16 @@ public class WindSpeedScheduled {
@Autowired
@Autowired
MonthPowerServiceImpl
monthPowerServiceImpl
;
MonthPowerServiceImpl
monthPowerServiceImpl
;
@Scheduled
(
cron
=
"${cheduled.crons}"
)
@Autowired
private
void
initData
(){
TdHygfJpCollectorHistoryServiceImpl
tdHygfJpCollectorHistoryServiceImpl
;
monthPowerServiceImpl
.
getMonthPower
();
}
@Autowired
TdHygfJpInvertorElecHistoryServiceImpl
tdHygfJpInvertorElecHistoryServiceImpl
;
@Scheduled
(
cron
=
"${cheduled.crons}"
)
private
void
initData
()
{
monthPowerServiceImpl
.
getMonthPower
();
tdHygfJpCollectorHistoryServiceImpl
.
syncData
();
tdHygfJpInvertorElecHistoryServiceImpl
.
syncData
();
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
View file @
c403e537
...
@@ -7,6 +7,7 @@ import java.util.List;
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -99,6 +100,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
...
@@ -99,6 +100,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
@Async
public
Object
syncData
()
{
public
Object
syncData
()
{
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DATE
,
-
1
);
cal
.
add
(
Calendar
.
DATE
,
-
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
View file @
c403e537
...
@@ -7,6 +7,7 @@ import java.util.List;
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -96,6 +97,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
...
@@ -96,6 +97,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
@Async
public
Object
syncData
()
{
public
Object
syncData
()
{
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DATE
,
-
1
);
cal
.
add
(
Calendar
.
DATE
,
-
1
);
...
...
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