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
6bd093d1
Commit
6bd093d1
authored
Jul 25, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加光伏接口
parent
54cae241
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
6 deletions
+53
-6
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+48
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+5
-4
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 @
6bd093d1
...
...
@@ -335,11 +335,14 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"模拟量接口Api"
)
@GetMapping
(
"/getAnalogQuantity"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
getAnalogQuantity
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
String
frontModule
)
{
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
getAnalogQuantity
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
String
frontModule
,
@RequestParam
(
required
=
false
)
String
systemType
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
if
(
null
==
systemType
){
systemType
=
"模拟量"
;
}
List
<
Map
<
String
,
Object
>>
statusMonitoring
=
monitorFanIndicator
.
getAnalogQuantity
(
gatewayId
,
frontModule
);
List
<
Map
<
String
,
Object
>>
statusMonitoring
=
monitorFanIndicator
.
getAnalogQuantity
(
gatewayId
,
frontModule
,
systemType
);
IPage
<
Map
<
String
,
Object
>>
result
=
new
Page
<>();
result
.
setRecords
(
statusMonitoring
);
result
.
setCurrent
(
1
);
...
...
@@ -539,4 +542,47 @@ public class MonitorFanIdxController extends BaseController {
return
ResponseHelper
.
buildResponse
(
resultsData
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"光伏-总概览"
)
@GetMapping
(
"/solarPowerOverview"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
solarPowerData
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
[]
columnList
=
new
String
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
for
(
String
column
:
columnList
)
{
Double
result
=
commonService
.
getTotalByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
result
);
}
for
(
String
column
:
columnLists
)
{
Double
result
=
commonService
.
getAvgvalueByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
result
);
}
String
num
=
monitorFanIndicator
.
getFJCount
(
gatewayId
);
columnMap
.
put
(
"风机台数"
,
num
);
Double
capacityl
=
commonService
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
columnMap
.
put
(
"装机容量"
,
capacityl
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"title1"
,
Float
.
valueOf
(
columnMap
.
get
(
"装机容量"
).
toString
()));
data
.
put
(
"title2"
,
Float
.
valueOf
(
columnMap
.
get
(
"日发电量"
).
toString
()));
data
.
put
(
"title3"
,
columnMap
.
get
(
"风机台数"
).
toString
().
replace
(
".0"
,
""
));
data
.
put
(
"title4"
,
Float
.
valueOf
(
columnMap
.
get
(
"月发电量"
).
toString
()));
data
.
put
(
"title5"
,
7.47
);
//辐照强度
data
.
put
(
"title6"
,
Float
.
valueOf
(
columnMap
.
get
(
"年发电量"
).
toString
()));
data
.
put
(
"title7"
,
Float
.
valueOf
(
columnMap
.
get
(
"有功功率"
).
toString
()));
data
.
put
(
"title8"
,
7.47
);
//日利用小时
data
.
put
(
"title9"
,
7.47
);
//总辐射日累计
data
.
put
(
"title0"
,
7.47
);
//综合效率
return
ResponseHelper
.
buildResponse
(
data
);
}
}
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 @
6bd093d1
...
...
@@ -474,7 +474,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return
indicatorsDtoList
.
get
(
0
).
getValue
();
}
return
null
;
return
"0"
;
}
...
...
@@ -716,6 +716,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"data"
,
listDatum
.
getDisplayName
());
statusMap
.
put
(
"state"
,
listDatum
.
getState
().
equals
(
"true"
)?
1
:
0
);
statusMap
.
put
(
"status"
,
listDatum
.
getState
().
equals
(
"true"
)?
1
:
0
);
statusMap
.
put
(
"title"
,
listDatum
.
getState
().
equals
(
"true"
)?
"断"
:
"通"
);
statusMaps
.
add
(
statusMap
);
}
...
...
@@ -723,14 +724,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
List
<
Map
<
String
,
Object
>>
getAnalogQuantity
(
String
gatewayId
,
String
frontModule
){
String
sql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE frontModule =~/"
+
frontModule
+
"/ and systemType = '
模拟量
' and displayName != ''"
;
public
List
<
Map
<
String
,
Object
>>
getAnalogQuantity
(
String
gatewayId
,
String
frontModule
,
String
systemType
){
String
sql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE frontModule =~/"
+
frontModule
+
"/ and systemType = '
"
+
systemType
+
"
' and displayName != ''"
;
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
for
(
IndicatorsDto
listDatum
:
listData
)
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"title"
,
listDatum
.
getValue
()+
" "
+
listDatum
.
getUnit
());
statusMap
.
put
(
"title"
,
listDatum
.
getValue
()
.
equals
(
""
)?
0
:
listDatum
.
getValue
()
+
" "
+
listDatum
.
getUnit
());
statusMap
.
put
(
"title1"
,
listDatum
.
getDisplayName
());
statusMaps
.
add
(
statusMap
);
}
...
...
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