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
95f89f8d
Commit
95f89f8d
authored
Oct 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
d464941b
466ff09c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
BigScreenTask.java
...ejoin/amos/boot/module/jxiop/biz/tasks/BigScreenTask.java
+55
-0
application-dev.properties
...gscreen-biz/src/main/resources/application-dev.properties
+3
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tasks/BigScreenTask.java
0 → 100644
View file @
95f89f8d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
tasks
;
import
cn.hutool.http.HttpUtil
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationBasicServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationDataTaskImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @description: 定时获取场站最新数据
* @author: tw
* @createDate: 2023/7/3
*/
@Component
@EnableScheduling
@Slf4j
public
class
BigScreenTask
{
@Autowired
StationDataTaskImpl
stationDataTask
;
@Autowired
StationBasicServiceImpl
stationBasicService
;
@Value
(
"${idx.predict.serviceUrl:http://139.9.173.44:8095/jxdj/predict-data}"
)
private
String
predictServiceUrl
;
/**
* 生成预测数据,平台大屏预测折线图使用,原有iframe集成算法预测数据PC端使用,
* 但是大屏也需使用此功能,由于算法折线图样式与大屏风格不一致,故新画页面查询算法的预测表,
* 但是算法服务只有调用查询,才生成数据,所以必须调用,否则大屏查询无预测数据
*/
@Scheduled
(
cron
=
"0 0/2 * * * ?"
)
public
void
predictDataCreate
()
{
List
<
StationBasicDto
>
stations
=
stationBasicService
.
getBaseMapper
().
getStationBasicListAll
();
stations
.
forEach
(
s
->
{
try
{
String
url
=
String
.
format
(
"%s?code=%s"
,
predictServiceUrl
,
s
.
getProjectOrgCode
());
HttpUtil
.
get
(
url
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用算法定时生成大屏评估预测数据失败:机构{},错误信息:{}"
,
s
.
getProjectOrgCode
(),
e
.
getMessage
());
}
});
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-dev.properties
View file @
95f89f8d
...
@@ -131,3 +131,6 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
...
@@ -131,3 +131,6 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
fan.statuts.stattuspath
=
upload/jxiop/device_status
fan.statuts.stattuspath
=
upload/jxiop/device_status
pictureUrl
=
upload/jxiop/syz/
pictureUrl
=
upload/jxiop/syz/
# Ԥ
idx.predict.serviceUrl
=
http://139.9.173.44:8095/jxdj/predict-data
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