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
efef5190
Commit
efef5190
authored
Oct 19, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
6829778f
8b4b8aac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
51 deletions
+55
-51
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+2
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+53
-49
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 @
efef5190
...
...
@@ -270,8 +270,8 @@ public class DemoController extends BaseController {
//更新显示名称
equipmentsJxiopDocMysql
.
setDisplayName
(
pointImportDto
.
getDisplayName
());
esEquipments
.
setDisplayName
(
pointImportDto
.
getDisplayName
());
//更新单位
if
(!
ObjectUtils
.
isEmpty
(
pointImportDto
.
getUnit
())){
//更新单位
如果单位为空或者单位超过周期性数据存储长度则丢弃单位更新操作
if
(!
ObjectUtils
.
isEmpty
(
pointImportDto
.
getUnit
())
&&(
pointImportDto
.
getUnit
().
toCharArray
().
length
<
24
)
){
equipmentsJxiopDocMysql
.
setUnit
(
pointImportDto
.
getUnit
());
esEquipments
.
setUnit
(
pointImportDto
.
getUnit
());
}
...
...
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 @
efef5190
...
...
@@ -117,8 +117,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
private
List
<
Map
>
list
;
@Override
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
...
...
@@ -217,13 +215,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeMap
.
put
(
"systemType"
,
systemType
);
}
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
String
>
needDisplayDisplayNameFrontModule
=
Arrays
.
asList
(
"箱变"
);
List
<
String
>
needDisplayDisplayNameSystemType
=
Arrays
.
asList
(
"实时运行数据"
);
result
.
stream
().
forEach
(
e
->
{
e
.
setValue
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
e
.
getValueF
()));
});
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
if
(
needDisplayDisplayNameSystemType
.
contains
(
systemType
)
&&
needDisplayDisplayNameFrontModule
.
contains
(
frontModule
))
{
Integer
traceIdCount
=
result
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
result
=
result
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
result
.
sort
(
Comparator
.
comparing
(
ESEquipments:
:
getTraceId
,
Comparator
.
comparingInt
(
Integer:
:
parseInt
)));
}
else
{
Collections
.
sort
(
result
,
(
e1
,
e2
)
->
{
...
...
@@ -292,11 +290,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
StationBasic
getOneByStationNumber
(
String
stationId
)
{
return
stationBasicMapper
.
selectById
(
stationId
);
}
...
...
@@ -549,8 +542,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
String
>
axisData
=
new
ArrayList
<>();
Integer
size
=
indicatorDataListWindSpeed
.
size
()
>
indicatorDataListActivePower
.
size
()
?
indicatorDataListActivePower
.
size
()
:
indicatorDataListWindSpeed
.
size
();
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
windSpeeds
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
valueOf
(
indicatorDataListWindSpeed
.
get
(
i
).
getValue
())));
activePowers
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
valueOf
(
indicatorDataListActivePower
.
get
(
i
).
getValue
())));
windSpeeds
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
valueOf
(
indicatorDataListWindSpeed
.
get
(
i
).
getValue
())));
activePowers
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
valueOf
(
indicatorDataListActivePower
.
get
(
i
).
getValue
())));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListWindSpeed
.
get
(
i
).
getCreatedTime
(),
"HH:mm"
));
}
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
...
...
@@ -827,22 +820,22 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeMap
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
systemType
);
}
List
<
ESEquipments
>
indicatorsDtoList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
Integer
traceIdCount
=
indicatorsDtoList
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
indicatorsDtoList
=
indicatorsDtoList
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
Integer
traceIdCount
=
indicatorsDtoList
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
indicatorsDtoList
=
indicatorsDtoList
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
}
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
for
(
ESEquipments
listDatum
:
indicatorsDtoList
)
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"traceId"
,
listDatum
.
getTraceId
());
statusMap
.
put
(
"traceId"
,
listDatum
.
getTraceId
());
String
data
=
listDatum
.
getDisplayName
();
if
(
StringUtils
.
isEmpty
(
data
)
||
(!
ObjectUtils
.
isEmpty
(
listDatum
.
getEquipmentNumber
())
&&
data
.
equals
(
listDatum
.
getEquipmentNumber
())))
{
data
=
listDatum
.
getEquipmentIndexName
();
}
statusMap
.
put
(
"displayName"
,
listDatum
.
getDisplayName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"unit"
,
listDatum
.
getUnit
());
statusMap
.
put
(
"value"
,
listDatum
.
getValue
());
statusMap
.
put
(
"displayName"
,
listDatum
.
getDisplayName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"unit"
,
listDatum
.
getUnit
());
statusMap
.
put
(
"value"
,
listDatum
.
getValue
());
statusMap
.
put
(
"addres"
,
listDatum
.
getAddress
());
statusMap
.
put
(
"id"
,
listDatum
.
getId
());
statusMap
.
put
(
"data"
,
data
);
...
...
@@ -856,7 +849,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
// Collator instance = Collator.getInstance(Local);
String
sortField
;
if
(
traceIdCount
==
statusMaps
.
size
())
{
if
(
traceIdCount
==
statusMaps
.
size
())
{
sortField
=
"traceId"
;
}
else
{
sortField
=
"addres"
;
...
...
@@ -878,18 +871,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
ESEquipments
>
listData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
!
esEquipments
.
getDisplayName
().
equals
(
""
)).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
Integer
traceIdCount
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
listData
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
Integer
traceIdCount
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
listData
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
}
for
(
ESEquipments
listDatum
:
listData
)
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"traceId"
,
listDatum
.
getTraceId
());
statusMap
.
put
(
"displayName"
,
listDatum
.
getDisplayName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"unit"
,
listDatum
.
getUnit
());
statusMap
.
put
(
"value"
,
listDatum
.
getValue
());
statusMap
.
put
(
"traceId"
,
listDatum
.
getTraceId
());
statusMap
.
put
(
"displayName"
,
listDatum
.
getDisplayName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"equipmentIndexName"
,
listDatum
.
getEquipmentIndexName
());
statusMap
.
put
(
"unit"
,
listDatum
.
getUnit
());
statusMap
.
put
(
"value"
,
listDatum
.
getValue
());
statusMap
.
put
(
"id"
,
listDatum
.
getId
());
if
(
StringUtils
.
isEmpty
(
listDatum
.
getValue
()))
{
statusMap
.
put
(
"title"
,
0.00
+
(
StringUtils
.
isNotEmpty
(
listDatum
.
getUnit
())
?
listDatum
.
getUnit
()
:
""
));
...
...
@@ -901,7 +894,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
String
sortField
;
if
(
traceIdCount
==
statusMaps
.
size
())
{
if
(
traceIdCount
==
statusMaps
.
size
())
{
sortField
=
"traceId"
;
statusMaps
.
sort
(
Comparator
.
comparingInt
(
o
->
Integer
.
parseInt
(
o
.
get
(
sortField
).
toString
())));
}
else
{
...
...
@@ -1274,6 +1267,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondition
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondition
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondition
,
null
,
ESEquipments
.
class
);
esEquipmentsList
.
forEach
(
esEquipments
->
{
if
(
StringUtils
.
isEmpty
(
esEquipments
.
getEquipmentNumber
()))
{
esEquipments
.
setDisplayName
(
getDisplayNameNotContainUnit
(
esEquipments
.
getDisplayName
()));
}
});
List
<
ESEquipments
>
xianData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getFrontModule
().
equals
(
"220kVⅠ母PT"
)
||
esEquipments
.
getFrontModule
().
equals
(
"35kVⅠ母PT"
)).
collect
(
Collectors
.
toList
());
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
xianData
.
forEach
(
item
->
{
...
...
@@ -1398,6 +1396,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondition
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondition
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondition
,
null
,
ESEquipments
.
class
);
esEquipmentsList
.
forEach
(
esEquipments
->
{
if
(
StringUtils
.
isEmpty
(
esEquipments
.
getEquipmentNumber
()))
{
esEquipments
.
setDisplayName
(
getDisplayNameNotContainUnit
(
esEquipments
.
getDisplayName
()));
}
});
List
<
String
>
displayName
=
Arrays
.
asList
(
"Ua"
,
"Ub"
,
"Uc"
);
// 10kVⅡ段母线数据
List
<
ESEquipments
>
xianData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
esEquipments
.
getFrontModule
().
contains
(
"35kVⅠ母PT"
)
&&
!
displayName
.
contains
(
esEquipments
.
getDisplayName
())).
collect
(
Collectors
.
toList
());
...
...
@@ -1614,7 +1617,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
ESEquipments
>
list1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
resultMap
.
put
(
"status"
,
AlarmDesc
.
getCode
(
list1
.
get
(
0
).
getEquipmentIndexName
()));
// queryEquipNum = "#" + Integer.parseInt(equipNames[0]);
queryEquipNum
=
equipNames
[
0
]
+
equipNames
[
1
]
+
1
;
queryEquipNum
=
equipNames
[
0
]
+
equipNames
[
1
]
+
1
;
}
}
else
{
queryEquipNum
=
"#"
+
Integer
.
parseInt
(
equipmentNumber
)
+
""
;
...
...
@@ -1825,7 +1828,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
lsv
=
lsv
+
Math
.
pow
(
esEquipments
.
getValueF
()
-
avageValue
,
2
);
}
}
lsv
=
lsv
/
indicatorsDtos
.
size
();
lsv
=
lsv
/
indicatorsDtos
.
size
();
lsv
=
Math
.
sqrt
(
lsv
);
}
resultMap
.
put
(
"lsv"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
lsv
));
...
...
@@ -2161,24 +2164,24 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
Page
<
Map
<
String
,
Object
>>
getxbdata
(
String
frontModule
,
String
fanGatewayId
,
String
equipmentNumber
,
long
current
,
long
size
)
{
public
Page
<
Map
<
String
,
Object
>>
getxbdata
(
String
frontModule
,
String
fanGatewayId
,
String
equipmentNumber
,
long
current
,
long
size
)
{
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
queryCodntion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
fanGatewayId
));
queryCodntion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"高压开关合闸"
,
"QF1低压断路器合闸"
,
"QF2低压断路器合闸"
));
queryCodntion
.
put
(
CommonConstans
.
QueryStringEquipmentNumber
,
Arrays
.
asList
(
equipmentNumber
));
List
<
ESEquipments
>
alldata
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCodntion
,
null
,
ESEquipments
.
class
,
null
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
ESEquipments
alldatum
:
alldata
)
{
if
(
"高压开关合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"gy"
,
"true"
.
equals
(
alldatum
.
getValue
())?
true
:
false
);
}
else
if
(
"QF1低压断路器合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"1_dy"
,
"true"
.
equals
(
alldatum
.
getValue
())?
true
:
false
);
}
else
if
(
"QF2低压断路器合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"2_dy"
,
"true"
.
equals
(
alldatum
.
getValue
())?
true
:
false
);
if
(
"高压开关合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"gy"
,
"true"
.
equals
(
alldatum
.
getValue
())
?
true
:
false
);
}
else
if
(
"QF1低压断路器合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"1_dy"
,
"true"
.
equals
(
alldatum
.
getValue
())
?
true
:
false
);
}
else
if
(
"QF2低压断路器合闸"
.
equals
(
alldatum
.
getEquipmentIndexName
()))
{
map
.
put
(
"2_dy"
,
"true"
.
equals
(
alldatum
.
getValue
())
?
true
:
false
);
}
}
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
List
<
Map
<
String
,
Object
>>
collect
=
new
ArrayList
();
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
List
<
Map
<
String
,
Object
>>
collect
=
new
ArrayList
();
collect
.
add
(
map
);
page
.
setTotal
(
1
);
page
.
setRecords
(
collect
);
...
...
@@ -2186,9 +2189,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
ResultsData
getDeaviAtionRate
(
String
gatewayId
,
String
zz
,
String
nbq
,
String
hlx
)
{
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
...
...
@@ -2226,10 +2226,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
c
=
-
c
;
}
double
pcv
=
c
/
avageValue
;
pcv
=
pcv
*
100
;
pcv
=
Math
.
round
(
pcv
);
pcv
=
pcv
*
100
;
pcv
=
Math
.
round
(
pcv
);
//pcv = Double.valueOf(String.format(CommonConstans.Twodecimalplaces, pcv));
resultMap
.
put
(
"pcv"
,
(
int
)
pcv
+
"%"
);
resultMap
.
put
(
"pcv"
,
(
int
)
pcv
+
"%"
);
resultList
.
add
(
resultMap
);
}
}
...
...
@@ -2365,5 +2365,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
});
return
result
;
}
public
String
getDisplayNameNotContainUnit
(
String
DisplayName
)
{
return
DisplayName
.
split
(
"\\("
)[
0
];
}
}
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