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
37255a65
Commit
37255a65
authored
Aug 02, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
9241b970
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+3
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+17
-18
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 @
37255a65
...
...
@@ -493,10 +493,11 @@ public class MonitorFanIdxController extends BaseController {
@GetMapping
(
"/electricQuantity"
)
public
ResponseModel
<
ResultsData
>
getElectricQuantityList
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
@RequestParam
(
value
=
"stationType"
,
required
=
false
)
String
stationType
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
ResultsData
resultsData
=
monitorFanIndicatorImpl
.
getElectricQuantityList
(
current
,
size
,
gatewayId
);
ResultsData
resultsData
=
monitorFanIndicatorImpl
.
getElectricQuantityList
(
current
,
size
,
gatewayId
,
stationType
);
return
ResponseHelper
.
buildResponse
(
resultsData
);
}
...
...
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 @
37255a65
...
...
@@ -1037,41 +1037,40 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
ResultsData
getElectricQuantityList
(
int
current
,
int
size
,
String
gatewayId
)
{
public
ResultsData
getElectricQuantityList
(
int
current
,
int
size
,
String
gatewayId
,
String
stationType
)
{
String
sql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE frontModule ='电量表计' and displayName != '' and displayName != '检修状态' "
;
List
<
IndicatorsDto
>
windSqlList
=
influxDButils
.
getListDataAll
(
sql
,
IndicatorsDto
.
class
);
Map
<
String
,
List
<
IndicatorsDto
>>
maps
=
windSqlList
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndicatorsDto:
:
getSystemType
));
ArrayList
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
Set
<
ColModel
>
listColModel
=
new
LinkedHashSet
<>();
List
<
ColModel
>
listColModels
=
new
ArrayList
<>();
ColModel
name
=
new
ColModel
(
"name"
,
"name"
,
"测量点"
,
"测量点"
,
"dataGrid"
,
"name"
);
listColModel
.
add
(
name
);
for
(
Map
.
Entry
<
String
,
List
<
IndicatorsDto
>>
stringListEntry
:
maps
.
entrySet
())
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"name"
,
stringListEntry
.
getKey
());
for
(
IndicatorsDto
indicatorsDto
:
stringListEntry
.
getValue
())
{
stringStringHashMap
.
put
(
ElectricQuantity
.
getCode
(
indicatorsDto
.
getDisplayName
()),
String
.
format
(
"%.2f"
,
ObjectUtils
.
isEmpty
(
indicatorsDto
.
getValue
())?
0.0
:
Double
.
parseDouble
(
indicatorsDto
.
getValue
())));
String
key
=
ElectricQuantity
.
getCode
(
indicatorsDto
.
getDisplayName
());
ColModel
keyName
=
new
ColModel
(
key
,
key
,
indicatorsDto
.
getDisplayName
(),
indicatorsDto
.
getDisplayName
(),
"dataGrid"
,
key
);
listColModel
.
add
(
keyName
);
}
resultList
.
add
(
stringStringHashMap
);
}
listColModels
.
addAll
(
listColModel
);
//构建平台数据
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resultList
);
// ColModel colModelStationName = new ColModel("zxzyg", "zxzyg", "正向总有功", "正向总有功", "dataGrid", "zxzyg");
// ColModel colModelEventDesc = new ColModel("fxzyg", "fxzyg", "反向总有功", "反向总有功", "dataGrid", "fxzyg");
// ColModel colModelAlarmGroupName = new ColModel("zxzwg", "zxzwg", "正向总无功", "正向总无功", "dataGrid", "zxzwg");
// ColModel colModelEventTime = new ColModel("fxzwg", "fxzwg", "反向总无功", "反向总无功", "dataGrid", "fxzwg");
//List<ColModel> listColModel = Arrays.asList(colModelEventMovement, colModelStationName, colModelEventDesc, colModelAlarmGroupName, colModelEventTime);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModels
);
ColModel
colModelEventMovement
=
new
ColModel
(
"name"
,
"name"
,
"测量点"
,
"测量点"
,
"dataGrid"
,
"name"
);
ColModel
colModelStationName
=
new
ColModel
(
"zxzyg"
,
"zxzyg"
,
"正向总有功"
,
"正向总有功"
,
"dataGrid"
,
"zxzyg"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"fxzyg"
,
"fxzyg"
,
"反向总有功"
,
"反向总有功"
,
"dataGrid"
,
"fxzyg"
);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"zxzwg"
,
"zxzwg"
,
"正向总无功"
,
"正向总无功"
,
"dataGrid"
,
"zxzwg"
);
ColModel
colModelEventTime
=
new
ColModel
(
"fxzwg"
,
"fxzwg"
,
"反向总无功"
,
"反向总无功"
,
"dataGrid"
,
"fxzwg"
);
if
(
null
!=
stationType
){
colModelEventMovement
=
new
ColModel
(
"name"
,
"name"
,
"测量点"
,
"测量点"
,
"dataGrid"
,
"name"
);
colModelStationName
=
new
ColModel
(
"zgxwg"
,
"zgxwg"
,
"总感性无功"
,
"总感性无功"
,
"dataGrid"
,
"zgxwg"
);
colModelEventDesc
=
new
ColModel
(
"zzxwg"
,
"zzxwg"
,
"总正向有功"
,
"总正向有功"
,
"dataGrid"
,
"zzxwg"
);
colModelAlarmGroupName
=
new
ColModel
(
"zrxwg"
,
"zrxwg"
,
"总容性无功"
,
"总容性无功"
,
"dataGrid"
,
"zrxwg"
);
colModelEventTime
=
new
ColModel
(
"zfxyg"
,
"zfxyg"
,
"总反向有功"
,
"总反向有功"
,
"dataGrid"
,
"zfxyg"
);
}
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelAlarmGroupName
,
colModelEventTime
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
public
void
getAnalogQuantityInfo
(
String
gatewayId
,
String
stationId
,
String
routeName
)
{
if
(
StringUtils
.
isNotEmpty
(
gatewayId
))
{
Map
<
String
,
String
>
map
=
monitorFanIndicatorregionMapper
.
getMajorBoosterStationInfoBySort
(
gatewayId
,
routeName
);
...
...
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