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
8bacc268
Commit
8bacc268
authored
Oct 10, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
三维地图弹框数据接口
parent
ad5ae215
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
1 deletion
+77
-1
StationBasic.java
...ejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
+6
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+22
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+6
-0
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+43
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
View file @
8bacc268
...
...
@@ -154,4 +154,10 @@ public class StationBasic extends BaseEntity {
//地图偏移量
@TableField
(
value
=
"title_pos"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
BigDecimal
>
titlePos
;
/**
* 赋码颜色
*/
@TableField
(
"qrcode_color"
)
private
String
qrcodeColor
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
8bacc268
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitorFanIndicatorImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.MonitoringServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.IOUtils
;
...
...
@@ -77,6 +78,8 @@ public class MonitorFanIdxController extends BaseController {
@Autowired
EmqKeeper
emqKeeper
;
@Autowired
MonitoringServiceImpl
monitoringService
;
@Autowired
private
ElasticsearchRestTemplate
elasticsearchTemplate
;
@Value
(
"classpath:/json/overview.json"
)
private
Resource
overview
;
...
...
@@ -105,6 +108,24 @@ public class MonitorFanIdxController extends BaseController {
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏三维地图信息弹框"
)
@GetMapping
(
"/getBasicInfonew"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getBasicInfonew
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
Map
<
String
,
String
>
date
=
monitoringService
.
getStationfs
(
stationBasic
);
Map
<
String
,
String
>
date1
=
monitoringService
.
getStationrl
(
stationBasic
);
list
.
add
(
date
);
list
.
add
(
date1
);
Map
<
String
,
Object
>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
"color"
,
stationBasic
.
getQrcodeColor
());
queryCondtion
.
put
(
"date"
,
list
);
return
ResponseHelper
.
buildResponse
(
queryCondtion
);
}
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "风机布置图 - 风机状态列表")
// @GetMapping("/getFanStatusList")
...
...
@@ -226,7 +247,7 @@ public class MonitorFanIdxController extends BaseController {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"30秒平均风速"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
result2
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result2
.
get
(
0
).
getValueF
(
)));
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getAvagerByEquipmentIndxName
(
result2
,
"30秒平均风速"
)
)));
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
8bacc268
...
...
@@ -95,6 +95,12 @@ public class CommonServiceImpl {
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
}
public
Double
getAvagerByEquipmentIndxName
(
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
).
average
().
getAsDouble
();
return
result
;
}
// public Double getNumByIndicatior(String gatewayId,String indicator){
// String sql = "SELECT * FROM indicators_"+gatewayId+" where equipmentIndexName=~/"+indicator+"$/";
// Double totalvalue = 0.0;
...
...
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 @
8bacc268
...
...
@@ -81,6 +81,49 @@ public class MonitoringServiceImpl {
return
ObjectUtils
.
isEmpty
(
installCapacity
)
?
0.00
:
installCapacity
;
}
/***
* 获取风站场站
*
* */
public
Map
<
String
,
String
>
getStationfs
(
StationBasic
stationBasic
)
{
String
value
=
"0"
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
if
(
stationBasic
.
getStationType
().
equals
(
"FDZ"
)){
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"30秒平均风速"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
result2
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
value
=
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getAvagerByEquipmentIndxName
(
result2
,
"30秒平均风速"
));
map
.
put
(
"name"
,
"风速/辐照度"
);
map
.
put
(
"value"
,
value
);
}
else
{
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
value
=
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
));
map
.
put
(
"name"
,
"风速/辐照度"
);
map
.
put
(
"value"
,
value
);
}
return
map
;
}
/***
* 电站容量
* */
public
Map
<
String
,
String
>
getStationrl
(
StationBasic
stationBasic
)
{
Double
installCapacity
=
0.0
;
installCapacity
=
this
.
SjglZsjZsbtzServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
String
value
=
ObjectUtils
.
isEmpty
(
installCapacity
)
?
"0.00"
:
String
.
format
(
"%.2f"
,
installCapacity
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
"容量"
);
map
.
put
(
"value"
,
value
);
return
map
;
}
/**
* 根据省份名称查询电站详情
*
...
...
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