Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
033f6fee
Commit
033f6fee
authored
Sep 14, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
008562e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+7
-3
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/CommonServiceImpl.java
View file @
033f6fee
...
@@ -219,11 +219,15 @@ public class CommonServiceImpl {
...
@@ -219,11 +219,15 @@ public class CommonServiceImpl {
* @deprecated 获取指标值总和
* @deprecated 获取指标值总和
*/
*/
public
Double
getTotalByIndicatior
(
String
gatewayId
,
String
indicator
)
{
public
Double
getTotalByIndicatior
(
String
gatewayId
,
String
indicator
)
{
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
//用于组装-es查询条件
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
result
=
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Double
totalvalue
=
0.00
;
Double
totalvalue
=
0.00
;
try
{
try
{
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
totalvalue
=
result
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
getValueDouble
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueDouble
().
toString
())).
sum
();
totalvalue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
totalvalue
;
return
totalvalue
;
}
}
...
...
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