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
f8c02037
Commit
f8c02037
authored
Feb 04, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复监盘报错
parent
128fd2bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
25 deletions
+43
-25
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+13
-10
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+0
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+4
-1
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+18
-13
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+8
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
f8c02037
...
...
@@ -1936,17 +1936,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Double
powerOfDay
=
0.0000
;
Double
powerOfMonth
=
0.0000
;
Double
powerOfAnnual
=
0.0000
;
if
(
ObjectUtils
.
isEmpty
(
query
)){
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
}
else
{
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
}
if
(
result
!=
null
)
{
if
(
ObjectUtils
.
isEmpty
(
query
)){
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
}
else
{
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
}
}
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"日发电量"
,
powerOfDay
);
hashMap
.
put
(
"月发电量"
,
powerOfMonth
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
f8c02037
This diff is collapsed.
Click to expand it.
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 @
f8c02037
...
...
@@ -567,7 +567,10 @@ public class CommonServiceImpl {
public
Double
getSumByEquipmentIndxName
(
List
<
ESEquipments
>
equipments
,
String
indexName
)
{
Double
result
=
0.00
;
result
=
equipments
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
equals
(
indexName
)).
filter
(
esEquipments
->
esEquipments
.
getValueF
()
!=
null
).
mapToDouble
(
ESEquipments:
:
getValueF
).
sum
();
if
(
equipments
!=
null
)
{
result
=
equipments
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
equals
(
indexName
)).
filter
(
esEquipments
->
esEquipments
.
getValueF
()
!=
null
).
mapToDouble
(
ESEquipments:
:
getValueF
).
sum
();
}
return
result
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
f8c02037
...
...
@@ -149,7 +149,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
private
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Autowired
private
UserEmpowerMapper
userEmpowerMapper
;
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
...
...
@@ -301,14 +301,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
TreeDto
getTreeInfo
(
String
sequenceNbr
,
ReginParams
reginParams
)
{
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
String
companyLevel
=
""
;
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
String
companyLevel
=
""
;
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
new
QueryWrapper
<
StdUserEmpower
>().
eq
(
"amos_user_id"
,
userId
).
eq
(
"permission_type"
,
"YTH"
));
if
(
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
// throw new BadRequest("您当前未配置数据权限!");
}
else
{
}
else
{
String
permissionOrgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
Map
<
String
,
String
>
companyInfo
=
userEmpowerMapper
.
getCompanyInfoByOrgCode
(
permissionOrgCode
);
companyLevel
=
companyInfo
.
get
(
"level"
).
toString
();
Map
<
String
,
String
>
companyInfo
=
userEmpowerMapper
.
getCompanyInfoByOrgCode
(
permissionOrgCode
);
companyLevel
=
companyInfo
.
get
(
"level"
).
toString
();
}
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
sequenceNbr
);
List
<
Integer
>
integers
=
JSON
.
parseArray
(
stationBasic
.
getBelongArea
(),
Integer
.
class
);
...
...
@@ -350,11 +351,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
gfzTreeDto
.
setChildren
(
gfz
);
List
<
TreeDto
>
treeDtos
=
Arrays
.
asList
(
fdzTreeDto
,
gfzTreeDto
);
treeDto
.
setChildren
(
treeDtos
);
if
(
companyLevel
.
equals
(
"station"
)){
List
<
TreeDto
>
children
=
stationListByRegionCode
.
stream
().
filter
(
t
->
t
.
getCode
().
equals
(
sequenceNbr
)).
collect
(
Collectors
.
toList
());
if
(
stationBasic
.
getStationType
().
equals
(
"FDZ"
)){
treeDto
=
fdzTreeDto
;
}
else
{
if
(
companyLevel
.
equals
(
"station"
))
{
List
<
TreeDto
>
children
=
stationListByRegionCode
.
stream
().
filter
(
t
->
t
.
getCode
().
equals
(
sequenceNbr
))
.
collect
(
Collectors
.
toList
());
if
(
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
treeDto
=
fdzTreeDto
;
}
else
{
treeDto
=
gfzTreeDto
;
}
treeDto
.
setChildren
(
children
);
...
...
@@ -372,8 +374,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return
new
ArrayList
<
ESEquipmentsDTO
>();
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"风机状态"
,
"有功功率"
,
"发电状态"
,
"报警状态"
,
"停机状态"
,
"故障状态"
,
"待机状态"
,
"维护状态"
,
"发电机转速"
,
"正常发电状态"
,
"30秒平均风速"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"风机状态"
,
"有功功率"
,
"发电状态"
,
"报警状态"
,
"停机状态"
,
"故障状态"
,
"待机状态"
,
"维护状态"
,
"发电机转速"
,
"正常发电状态"
,
"30秒平均风速"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
...
...
@@ -2398,6 +2400,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Override
public
Map
<
String
,
Object
>
partofWaring3D
(
String
stationId
,
String
equipNum
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
stationId
==
null
||
equipNum
==
null
||
"null"
.
equals
(
stationId
)
||
"equipNum"
.
equals
(
equipNum
))
{
return
resultMap
;
}
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
f8c02037
...
...
@@ -893,7 +893,14 @@ public class MonitoringServiceImpl {
total
.
set
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
));
}
}
stationCacheInfoDto
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
total
.
get
())
*
100
/
getPlanGenByStationIdAndMonth
(
stationCacheInfoDto
.
getStationId
())));
Double
PlanGen
=
getPlanGenByStationIdAndMonth
(
stationCacheInfoDto
.
getStationId
());
if
(
PlanGen
!=
null
)
{
stationCacheInfoDto
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
total
.
get
())
*
100
/
PlanGen
));
}
else
{
stationCacheInfoDto
.
setAddress
(
"0.0"
);
}
});
List
<
StationCacheInfoDto
>
sorted
=
stationCacheInfoDtoList
.
stream
().
sorted
(
Comparator
.
comparing
(
StationCacheInfoDto:
:
getAddress
,
Comparator
.
comparingDouble
(
Double:
:
parseDouble
)).
reversed
()).
collect
(
Collectors
.
toList
());
sorted
.
forEach
(
stationBasic
->
{
...
...
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