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
1433c184
Commit
1433c184
authored
Sep 18, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 风机曲线图右侧数值接口 修改风机曲线光伏打点接口 修改逆变器状态颜色
parent
b25328ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
17 deletions
+85
-17
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+1
-1
TemporaryDataMapper.java
...os/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
+4
-1
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+59
-15
TemporaryDataMapper.xml
...src/main/resources/mapper/cluster/TemporaryDataMapper.xml
+21
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
1433c184
...
...
@@ -695,7 +695,7 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"详情基础信息"
)
@GetMapping
(
"/getStatisticsInfo"
)
public
ResponseModel
<
Map
<
String
,
String
>>
getStatisticsInfo
(
@RequestParam
(
value
=
"equipmentIndexName"
,
required
=
false
)
String
equipmentIndexName
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getStatisticsInfo
(
@RequestParam
(
value
=
"equipmentIndexName"
,
required
=
false
)
String
equipmentIndexName
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"stationType"
,
required
=
false
)
String
stationType
)
{
// StationBasic stationBasic = stationBasicMapper.selectById(stationId);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/TemporaryDataMapper.java
View file @
1433c184
...
...
@@ -12,7 +12,10 @@ import java.util.Map;
public
interface
TemporaryDataMapper
extends
BaseMapper
<
TemporaryData
>
{
List
<
Map
<
String
,
String
>>
timingTemporarysSorageData
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
timingTemporarysSorageData
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
timingTemporarysSorageDataByIndexName
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
,
@RequestParam
(
value
=
"equipmentIndexName"
)
String
equipmentIndexName
);
Map
<
String
,
String
>
getStatisticsInfo
(
@RequestParam
(
value
=
"gatewayId"
)
String
gatewayId
,
...
...
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 @
1433c184
...
...
@@ -306,9 +306,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
colorMap
.
put
(
"正常运行"
,
"#00aa00"
);
colorMap
.
put
(
"报警运行"
,
"#ffc400"
);
colorMap
.
put
(
"停机状态"
,
"#0055ff"
);
colorMap
.
put
(
"故障状态"
,
"#
00aaff
"
);
colorMap
.
put
(
"故障状态"
,
"#
ff0000
"
);
colorMap
.
put
(
"限功率"
,
"#a3f5aa"
);
colorMap
.
put
(
"待机状态"
,
"#
ff0000
"
);
colorMap
.
put
(
"待机状态"
,
"#
00aaff
"
);
colorMap
.
put
(
"维护状态"
,
"#ff00ff"
);
colorMap
.
put
(
"通讯中断"
,
"#7d8e95"
);
list
.
forEach
(
item
->
{
...
...
@@ -421,18 +421,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
Map
<
String
,
Object
>
getDetailsWindSpeedAll
(
String
gatewayId
)
{
List
<
Map
<
String
,
String
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageData
(
gatewayId
);
List
<
Map
<
String
,
Object
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageData
(
gatewayId
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
valueList
=
new
ArrayList
<>();
Set
<
String
>
time
=
new
TreeSet
<>();
for
(
Map
<
String
,
String
>
stringStringMap
:
list
)
{
if
(
stringStringMap
.
get
(
"equipmentIndexName"
).
equals
(
"有功功率"
))
{
values
.
add
(
stringStringMap
.
get
(
"value"
));
for
(
Map
<
String
,
Object
>
stringStringMap
:
list
)
{
if
(
stringStringMap
.
get
(
"equipmentIndexName"
).
toString
().
equals
(
"有功功率"
))
{
values
.
add
(
stringStringMap
.
get
(
"value"
)
.
toString
()
);
}
else
{
valueList
.
add
(
stringStringMap
.
get
(
"value"
));
time
.
add
(
stringStringMap
.
get
(
"createdTime"
));
valueList
.
add
(
stringStringMap
.
get
(
"value"
)
.
toString
()
);
time
.
add
(
stringStringMap
.
get
(
"createdTime"
)
.
toString
()
);
}
}
...
...
@@ -663,9 +663,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
void
schedSolarPower
(
String
gatewayId
,
long
timeInMillis
)
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringDisplayName
,
Arrays
.
asList
(
"总辐射累计"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringDisplayName
Keyword
,
Arrays
.
asList
(
"总辐射累计"
));
List
<
ESEquipments
>
indicatorsDtoList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringDisplayName
,
Arrays
.
asList
(
"有功功率"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringDisplayName
Keyword
,
Arrays
.
asList
(
"有功功率"
));
List
<
ESEquipments
>
indicatorsDtoLists
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
TemporaryData
>
temporaryDatas
=
new
ArrayList
<>();
List
<
TemporaryData
>
temporaryDatass
=
new
ArrayList
<>();
...
...
@@ -802,9 +802,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeCodtion
.
put
(
CommonConstans
.
QueryStringDisplayName
+
".keyword"
,
"合位"
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeCodtion
);
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
Collections
.
sort
(
listData
,
(
e1
,
e2
)
->
{
return
instance
.
compare
(
e1
.
getFrontModule
(),
e2
.
getFrontModule
());
});
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
Map
<
String
,
List
<
ESEquipments
>>
collect
=
listData
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getFrontModule
,
LinkedHashMap:
:
new
,
Collectors
.
toList
()));
for
(
String
s
:
collect
.
keySet
())
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
if
(
frontModule
.
equals
(
"前光"
))
{
...
...
@@ -1466,7 +1470,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return
resultMap
;
}
public
Map
<
String
,
String
>
getStatisticsInfo
(
String
equipmentIndexName
,
String
stationId
)
{
public
Map
<
String
,
Object
>
getStatisticsInfo
(
String
equipmentIndexName
,
String
stationId
)
{
StationCacheInfoDto
stationCacheInfoDto
=
commonServiceImpl
.
getStationCacheInfoDtoByStationId
(
stationId
);
String
gatewayId
=
stationCacheInfoDto
.
getFanGatewayId
();
if
(!
"FDZ"
.
equals
(
stationCacheInfoDto
.
getStationType
()))
{
...
...
@@ -1477,9 +1481,49 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
String
load
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
parseDouble
(
String
.
valueOf
(
listData
.
get
(
0
).
getValueDouble
()))
/
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
Map
<
String
,
String
>
result
=
temporaryDataMapper
.
getStatisticsInfo
(
gatewayId
,
equipmentIndexName
);
result
.
put
(
"load"
,
load
);
return
result
;
List
<
Map
<
String
,
Object
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageDataByIndexName
(
gatewayId
,
equipmentIndexName
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
values
=
new
ArrayList
<>();
Set
<
String
>
time
=
new
TreeSet
<>();
String
v
=
list
.
get
(
0
).
get
(
"value"
).
toString
();
double
min
=
Double
.
parseDouble
(
v
);
double
max
=
Double
.
parseDouble
(
v
);
double
mean
=
0.0
;
String
minTime
=
list
.
get
(
0
).
get
(
"createdTime"
).
toString
();
String
maxTime
=
list
.
get
(
0
).
get
(
"createdTime"
).
toString
();
for
(
Map
<
String
,
Object
>
stringStringMap
:
list
)
{
double
value
=
Double
.
parseDouble
(
stringStringMap
.
get
(
"value"
).
toString
());
values
.
add
(
String
.
format
(
"%.2f"
,
value
));
if
(
value
<
min
){
min
=
value
;
minTime
=
stringStringMap
.
get
(
"createdTime"
).
toString
();
}
else
if
(
value
>
max
){
max
=
value
;
maxTime
=
stringStringMap
.
get
(
"createdTime"
).
toString
();
}
time
.
add
(
stringStringMap
.
get
(
"createdTime"
).
toString
());
}
for
(
String
value
:
values
)
{
mean
+=
Double
.
parseDouble
(
value
);
}
mean
=
Double
.
parseDouble
(
String
.
format
(
"%.2f"
,
mean
/
values
.
size
()));
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
map
.
put
(
"mean"
,
mean
);
map
.
put
(
"max"
,
max
);
map
.
put
(
"min"
,
min
);
map
.
put
(
"maxTime"
,
maxTime
);
map
.
put
(
"minTime"
,
minTime
);
map
.
put
(
"load"
,
load
);
return
map
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/TemporaryDataMapper.xml
View file @
1433c184
...
...
@@ -19,6 +19,27 @@
</if>
</where>
GROUP BY batch_no ,equipmentIndexName;
</select>
<select
id=
"timingTemporarysSorageDataByIndexName"
resultType=
"map"
>
SELECT avg(value) as value ,
created_time as createdTime ,
equipmentIndexName
FROM
`temporary_data`
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gatewayId = #{gatewayId}
</if>
<if
test=
"gatewayId == null and gatewayId == ''"
>
equipmentNumber is not null and equipmentIndexName is not null
</if>
<if
test=
"equipmentIndexName != null and equipmentIndexName != ''"
>
and equipmentIndexName =#{equipmentIndexName}
</if>
</where>
GROUP BY batch_no ,equipmentIndexName;
</select>
...
...
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