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
0e9616bc
Commit
0e9616bc
authored
Aug 10, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
e77883dc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+2
-2
PowerGeneration.java
...amos/boot/module/jxiop/biz/scheduled/PowerGeneration.java
+3
-3
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
0e9616bc
...
@@ -371,8 +371,8 @@ public class DemoController extends BaseController {
...
@@ -371,8 +371,8 @@ public class DemoController extends BaseController {
public
Map
demoTest11
()
{
public
Map
demoTest11
()
{
List
<
QueryDto
>
queryDto
=
new
ArrayList
<>();
List
<
QueryDto
>
queryDto
=
new
ArrayList
<>();
QueryDto
ff1
=
new
QueryDto
(
"gatewayId"
,
"1668801435891929089"
);
QueryDto
ff1
=
new
QueryDto
(
"gatewayId
.keyword
"
,
"1668801435891929089"
);
QueryDto
ff2
=
new
QueryDto
(
"equipmentIndexName"
,
"有功功率"
);
QueryDto
ff2
=
new
QueryDto
(
"equipmentIndexName
.keyword
"
,
"有功功率"
);
queryDto
.
add
(
ff1
);
queryDto
.
add
(
ff1
);
queryDto
.
add
(
ff2
);
queryDto
.
add
(
ff2
);
Double
avg
=
commonServiceImpl
.
getavg
(
queryDto
,
"valueDouble"
,
ESEquipments
.
class
);
Double
avg
=
commonServiceImpl
.
getavg
(
queryDto
,
"valueDouble"
,
ESEquipments
.
class
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/scheduled/PowerGeneration.java
View file @
0e9616bc
...
@@ -39,7 +39,7 @@ public class PowerGeneration {
...
@@ -39,7 +39,7 @@ public class PowerGeneration {
private
final
String
yearType
=
"year"
;
private
final
String
yearType
=
"year"
;
//定时更新日发电量
//定时更新日发电量
@Scheduled
(
cron
=
"${daily.power.generation.cron}"
)
//
@Scheduled(cron = "${daily.power.generation.cron}")
public
void
addESDailyPowerGeneration
(){
public
void
addESDailyPowerGeneration
(){
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
for
(
StationCacheInfoDto
stationCacheInfoDto
:
list
)
{
for
(
StationCacheInfoDto
stationCacheInfoDto
:
list
)
{
...
@@ -52,7 +52,7 @@ public class PowerGeneration {
...
@@ -52,7 +52,7 @@ public class PowerGeneration {
}
}
//定时更新月发电量
//定时更新月发电量
@Scheduled
(
cron
=
"${moon.power.generation.cron}"
)
//
@Scheduled(cron = "${moon.power.generation.cron}")
public
void
addESMoonPowerGeneration
(){
public
void
addESMoonPowerGeneration
(){
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
...
@@ -67,7 +67,7 @@ public class PowerGeneration {
...
@@ -67,7 +67,7 @@ public class PowerGeneration {
}
}
//定时更新年发电量
//定时更新年发电量
@Scheduled
(
cron
=
"${year.power.generation.cron}"
)
//
@Scheduled(cron = "${year.power.generation.cron}")
public
void
addESYearPowerGeneration
(){
public
void
addESYearPowerGeneration
(){
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
list
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
0e9616bc
...
@@ -67,7 +67,7 @@ public class CommonServiceImpl {
...
@@ -67,7 +67,7 @@ public class CommonServiceImpl {
Double
value
=
null
;
Double
value
=
null
;
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
for
(
QueryDto
dto
:
queryDto
)
{
for
(
QueryDto
dto
:
queryDto
)
{
queryBuilder
.
must
(
QueryBuilders
.
match
Query
(
dto
.
getKey
(),
dto
.
getValue
()));
queryBuilder
.
must
(
QueryBuilders
.
term
Query
(
dto
.
getKey
(),
dto
.
getValue
()));
}
}
AvgAggregationBuilder
buyCountAvg
=
AggregationBuilders
.
avg
(
"buyCountAvg"
).
field
(
keyavg
);
AvgAggregationBuilder
buyCountAvg
=
AggregationBuilders
.
avg
(
"buyCountAvg"
).
field
(
keyavg
);
Query
query
=
new
NativeSearchQueryBuilder
()
Query
query
=
new
NativeSearchQueryBuilder
()
...
@@ -99,7 +99,7 @@ public class CommonServiceImpl {
...
@@ -99,7 +99,7 @@ public class CommonServiceImpl {
Double
value
=
null
;
Double
value
=
null
;
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
for
(
QueryDto
dto
:
queryDto
)
{
for
(
QueryDto
dto
:
queryDto
)
{
queryBuilder
.
must
(
QueryBuilders
.
match
Query
(
dto
.
getKey
(),
dto
.
getValue
()));
queryBuilder
.
must
(
QueryBuilders
.
term
Query
(
dto
.
getKey
(),
dto
.
getValue
()));
}
}
SumAggregationBuilder
buyCountSum
=
AggregationBuilders
.
sum
(
"buyCountSum"
).
field
(
keysum
);
SumAggregationBuilder
buyCountSum
=
AggregationBuilders
.
sum
(
"buyCountSum"
).
field
(
keysum
);
Query
query
=
new
NativeSearchQueryBuilder
()
Query
query
=
new
NativeSearchQueryBuilder
()
...
...
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