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
a388b8f2
Commit
a388b8f2
authored
Jul 03, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加分片
parent
9c1f0f39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
StationDataTaskImpl.java
...ot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
+20
-7
application.properties
...iop-monitor-biz/src/main/resources/application.properties
+5
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/StationDataTaskImpl.java
View file @
a388b8f2
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IStationDataTask;
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.service.IStationDataTask;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -27,6 +28,9 @@ public class StationDataTaskImpl implements IStationDataTask {
...
@@ -27,6 +28,9 @@ public class StationDataTaskImpl implements IStationDataTask {
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
MonitorFanIndicatorImpl
monitorFanIndicatorImpl
;
@Value
(
"${station.section}"
)
private
int
stationSection
;
@Override
@Override
public
List
<
StationTaksDto
>
getListStationBasic
()
{
public
List
<
StationTaksDto
>
getListStationBasic
()
{
List
<
StationTaksDto
>
stationTaksDtoList
=
new
ArrayList
<>();
List
<
StationTaksDto
>
stationTaksDtoList
=
new
ArrayList
<>();
...
@@ -57,21 +61,30 @@ public class StationDataTaskImpl implements IStationDataTask {
...
@@ -57,21 +61,30 @@ public class StationDataTaskImpl implements IStationDataTask {
@Async
(
"jxiopAsyncExecutor"
)
@Async
(
"jxiopAsyncExecutor"
)
@Override
@Override
public
void
getIndexDto
(
DeviceDto
deviceDto
)
{
public
void
getIndexDto
(
DeviceDto
deviceDto
)
{
//每个分机的指标数据
//每个分机的指标数据
List
<
IndexDto
>
list
=
null
;
List
<
IndexDto
>
list
=
null
;
if
(
list
!=
null
&&
list
.
size
()>
0
){
if
(
list
!=
null
&&
list
.
size
()>
0
){
//对数据切片处理
//对数据切片处理 默认创建
List
<
List
<
IndexDto
>>
listfp
=
Lists
.
partition
(
list
,
100
);
if
(
stationSection
>
list
.
size
()){
for
(
List
<
IndexDto
>
indexDtos
:
listfp
)
{
monitorFanIndicatorImpl
.
UpdateMonitorFanIndicator
(
list
);
//每个分级信息处理
}
else
{
monitorFanIndicatorImpl
.
UpdateMonitorFanIndicator
(
indexDtos
);
//进行分片处理
}
List
<
List
<
IndexDto
>>
listfp
=
Lists
.
partition
(
list
,
list
.
size
()%
stationSection
);
for
(
List
<
IndexDto
>
indexDtos
:
listfp
)
{
//每个分级信息处理
monitorFanIndicatorImpl
.
UpdateMonitorFanIndicator
(
indexDtos
);
}
}
}
}
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application.properties
View file @
a388b8f2
...
@@ -65,3 +65,7 @@ spring.http.encoding.force=true
...
@@ -65,3 +65,7 @@ spring.http.encoding.force=true
privilege.fegin.name
=
AMOS-API-PRIVILEGE
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
#场站实时数据
station.task.cron
=
#风机更新数据切片量
station.section
=
10
\ No newline at end of file
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