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
a313256c
Commit
a313256c
authored
Oct 22, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
2379e2c7
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
97 additions
and
67 deletions
+97
-67
AmosJxiopAnalyseApplication.java
...in/java/com/yeejoin/amos/AmosJxiopAnalyseApplication.java
+1
-1
Constants.java
...om/yeejoin/amos/boot/module/jxiop/api/util/Constants.java
+1
-1
EnergyAccessService.java
...os/boot/module/jxiop/biz/service/EnergyAccessService.java
+2
-1
EnergyAccessServiceImpl.java
...odule/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
+7
-3
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+6
-2
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+17
-15
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+3
-1
application.properties
...p-bigscreen-biz/src/main/resources/application.properties
+2
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+35
-30
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+16
-10
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+2
-0
application.properties
...iop-monitor-biz/src/main/resources/application.properties
+5
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/AmosJxiopAnalyseApplication.java
View file @
a313256c
...
...
@@ -89,7 +89,7 @@ public class AmosJxiopAnalyseApplication {
return
;
}
// 订阅固化周期性数据成功的消息
emqKeeper
.
subscript
(
"sync_esdata_to_tdengine_notice
1
"
,
1
,
syncESDataToTdengineMqttListener
);
emqKeeper
.
subscript
(
"sync_esdata_to_tdengine_notice"
,
1
,
syncESDataToTdengineMqttListener
);
// 订阅业务固化同步数据成功消息
//emqKeeper.subscript("sync_iotdata_to_tdengine_notice", 1, syncDasSuccessMqttListener);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/util/Constants.java
View file @
a313256c
...
...
@@ -70,7 +70,7 @@ public class Constants {
*/
public
static
final
String
JXIOP_DICT_CERTIFICATES
=
"jxIop:dict:certificates"
;
public
static
final
String
BASE_URL
=
"http://iiet-jepcc.powerchina.cn:8088/screen_api"
;
//
public static final String BASE_URL = "http://iiet-jepcc.powerchina.cn:8088/screen_api";
public
static
final
String
REQUEST_GET
=
"GET"
;
public
static
final
String
REQUEST_POST
=
"POST"
;
public
static
final
String
get_province_item_url
=
"method=scene_screen.data_interface.get_province_item"
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/EnergyAccessService.java
View file @
a313256c
...
...
@@ -5,7 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
java.util.Map
;
public
interface
EnergyAccessService
{
Page
<
Map
<
String
,
Object
>>
getInstalledCapacity
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
throws
Exception
;
Page
<
Map
<
String
,
Object
>>
getInstalledCapacity
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
throws
Exception
;
Page
<
Map
<
String
,
Object
>>
getQuotaCompleteInfo
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
View file @
a313256c
...
...
@@ -6,12 +6,13 @@ import com.alibaba.fastjson.TypeReference;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.api.util.Constants
;
import
com.yeejoin.amos.boot.module.jxiop.api.util.HttpRequestUtil
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.EnergyAccessMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.EnergyAccessService
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.EnergyAccessMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -32,6 +33,9 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EnergyAccessServiceImpl
.
class
);
@Value
(
"${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}"
)
private
String
budunBaseURL
;
@Override
public
Page
<
Map
<
String
,
Object
>>
getInstalledCapacity
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
{
...
...
@@ -45,7 +49,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
logger
.
info
(
"获取并网容量接口查询本地返回结果:{}"
,
returnList
.
toString
());
}
else
{
//改为部盾接口
StringBuilder
requestUrl
=
new
StringBuilder
(
Constants
.
BASE_
URL
).
append
(
"?"
).
append
(
Constants
.
get_station_actual_installed_capacity
);
StringBuilder
requestUrl
=
new
StringBuilder
(
budunBase
URL
).
append
(
"?"
).
append
(
Constants
.
get_station_actual_installed_capacity
);
if
(
StringUtils
.
isNotEmpty
(
code
))
{
requestUrl
.
append
(
"&code="
).
append
(
code
);
}
...
...
@@ -102,7 +106,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
@Override
public
Page
<
Map
<
String
,
Object
>>
getQuotaCompleteInfo
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
{
//改为部盾接口
StringBuilder
requestUrl
=
new
StringBuilder
(
Constants
.
BASE_
URL
).
append
(
"?"
).
append
(
Constants
.
get_quota_complate_info
);
StringBuilder
requestUrl
=
new
StringBuilder
(
budunBase
URL
).
append
(
"?"
).
append
(
Constants
.
get_quota_complate_info
);
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
View file @
a313256c
...
...
@@ -30,6 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import
org.elasticsearch.search.aggregations.metrics.ParsedAvg
;
import
org.elasticsearch.search.aggregations.metrics.ParsedSum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.*
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
...
...
@@ -95,6 +96,9 @@ public class LargeScreenImpl {
private
final
String
YFD
=
"月发电量"
;
private
final
String
NFD
=
"年发电量"
;
@Value
(
"${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}"
)
private
String
budunBaseURL
;
/**
* 全国
*/
...
...
@@ -144,7 +148,7 @@ public class LargeScreenImpl {
// }
// 改为部盾接口
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_quota_info
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
...
...
@@ -474,7 +478,7 @@ public class LargeScreenImpl {
// mapdta.put("NJHWC", ybfbn);
// 改为部盾接口
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_quota_info
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
a313256c
...
...
@@ -60,6 +60,8 @@ public class MonitorServiceImpl implements MonitorService {
private
Resource
overview
;
@Value
(
"classpath:/json/overviewGF.json"
)
private
Resource
overviewGF
;
@Value
(
"${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}"
)
private
String
budunBaseURL
;
@Override
public
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
platformStationId
)
{
...
...
@@ -175,7 +177,7 @@ public class MonitorServiceImpl implements MonitorService {
areaName
=
Constants
.
areaChinese
;
}
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_month_generation_trend_url
+
"&areaName="
+
areaName
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_month_generation_trend_url
+
"&areaName="
+
areaName
;
List
<
String
>
list
=
new
ArrayList
<>();
List
<
Double
>
listData
=
new
ArrayList
<>();
List
<
BudunMonthTrendDto
>
budunMonthTrendDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BudunMonthTrendDto
.
class
);
...
...
@@ -200,7 +202,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public
Map
<
String
,
Object
>
gettimedateyfdqs
()
{
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_generated_quota_trend
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_generated_quota_trend
;
List
<
BundunCompleteDto
>
bundunCompleteDtoList
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BundunCompleteDto
.
class
);
Map
<
String
,
Object
>
mapjn
=
new
HashMap
<>();
...
...
@@ -223,7 +225,7 @@ public class MonitorServiceImpl implements MonitorService {
public
Map
<
String
,
Object
>
gettimedateyfd
()
{
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_month_generation_trend_url
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_month_generation_trend_url
;
List
<
String
>
list
=
new
ArrayList
<>();
List
<
Double
>
listData
=
new
ArrayList
<>();
List
<
BudunMonthTrendDto
>
budunMonthTrendDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BudunMonthTrendDto
.
class
);
...
...
@@ -248,7 +250,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public
Map
<
String
,
Object
>
gettimedateqyyfd
(
String
areaName
)
{
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_generated_quota_trend
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_generated_quota_trend
;
MapRegion
mapRegion
=
mapRegionMapper
.
selectOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"name"
,
areaName
));
if
(!
areaName
.
contains
(
Constants
.
areaChinese
))
{
areaName
=
areaName
+
Constants
.
areaChinese
;
...
...
@@ -279,7 +281,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public
SeriesData
getSeriesDataqg
()
{
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_day_generation_trend
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_day_generation_trend
;
List
<
BudunDayGenTrendDto
>
budunDayGenTrendDtoList
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BudunDayGenTrendDto
.
class
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
String
>
listdate
=
new
ArrayList
<>();
...
...
@@ -320,7 +322,7 @@ public class MonitorServiceImpl implements MonitorService {
if
(!
ObjectUtils
.
isEmpty
(
mapRegion
)
&&
!
ObjectUtils
.
isEmpty
(
mapRegion
.
getName
())
&&
!
mapRegion
.
getName
().
contains
(
Constants
.
areaChinese
))
{
areaName
=
mapRegion
.
getName
()
+
Constants
.
areaChinese
;
}
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_day_generation_trend
+
"&areaName="
+
areaName
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_day_generation_trend
+
"&areaName="
+
areaName
;
List
<
BudunDayGenTrendDto
>
budunDayGenTrendDtoList
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BudunDayGenTrendDto
.
class
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
String
>
listdate
=
new
ArrayList
<>();
...
...
@@ -360,7 +362,7 @@ public class MonitorServiceImpl implements MonitorService {
if
(!
ObjectUtils
.
isEmpty
(
mapRegion
)
&&
!
ObjectUtils
.
isEmpty
(
mapRegion
.
getName
())
&&
!
mapRegion
.
getName
().
contains
(
Constants
.
areaChinese
))
{
areaName
=
mapRegion
.
getName
()
+
Constants
.
areaChinese
;
}
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_area_item_url
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_area_item_url
;
if
(
areaCode
!=
null
)
{
requestUrl
=
requestUrl
+
"&areaName="
+
areaName
;
}
...
...
@@ -393,7 +395,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public
Page
<
Map
<
String
,
Object
>>
stationRanking
(
String
day
,
String
type
,
String
areaCode
)
{
String
areaName
=
""
;
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_hours_num_top
+
"&topValue=5&tabValue="
+
day
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_hours_num_top
+
"&topValue=5&tabValue="
+
day
;
if
(
areaCode
!=
null
)
{
MapRegion
mapRegion
=
mapRegionMapper
.
selectOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"area_code"
,
areaCode
));
if
(!
ObjectUtils
.
isEmpty
(
mapRegion
)
&&
!
ObjectUtils
.
isEmpty
(
mapRegion
.
getName
())
&&
!
mapRegion
.
getName
().
contains
(
Constants
.
areaChinese
))
{
...
...
@@ -444,7 +446,7 @@ public class MonitorServiceImpl implements MonitorService {
coreValuesDtoList
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
stringNames
.
stream
().
collect
(
Collectors
.
joining
(
","
)),
CommonConstans
.
ACTIVE_POWER
);
// 获取风场详情信息
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&stationId="
+
stationId
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&stationId="
+
stationId
;
List
<
BuDunStationDetailInfo
>
buDunStationDetailInfos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunStationDetailInfo
.
class
);
BuDunStationDetailInfo
buDunStationDetailInfo
=
buDunStationDetailInfos
.
stream
().
filter
(
buDunStationDetailInfo1
->
stationBasic
.
getStationName
().
contains
(
buDunStationDetailInfo1
.
getStation_name
().
replace
(
"电场"
,
""
).
replace
(
"电站"
,
""
))).
findFirst
().
orElse
(
null
);
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
...
...
@@ -497,7 +499,7 @@ public class MonitorServiceImpl implements MonitorService {
coreValuesDtoList
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
stringNames
.
stream
().
collect
(
Collectors
.
joining
(
","
)),
CommonConstans
.
ACTIVE_POWER
+
","
+
CommonConstans
.
TOTAL_RADIATION_SUM
);
// 获取风场详情信息
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&stationId="
+
stationId
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&stationId="
+
stationId
;
List
<
BuDunStationDetailInfo
>
buDunStationDetailInfos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunStationDetailInfo
.
class
);
BuDunStationDetailInfo
buDunStationDetailInfo
=
buDunStationDetailInfos
.
stream
().
filter
(
buDunStationDetailInfo1
->
stationBasic
.
getStationName
().
contains
(
buDunStationDetailInfo1
.
getStation_name
().
replace
(
"电场"
,
""
).
replace
(
"电站"
,
""
))).
findFirst
().
orElse
(
null
);
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
...
...
@@ -587,7 +589,7 @@ public class MonitorServiceImpl implements MonitorService {
// List<CoreValuesDto> coreValuesDtos = new ArrayList<>();
// coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null);
// // 构建请求URL并发起HTTP GET请求,获取相关数据
// String requestUrl =
Constants.BASE_
URL + "?" + Constants.get_area_item_url;
// String requestUrl =
budunBase
URL + "?" + Constants.get_area_item_url;
// List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
// // 如果有获取到数据,则更新map中的相应数据
// if (buDunGenDtos.size() > 0) {
...
...
@@ -645,7 +647,7 @@ public class MonitorServiceImpl implements MonitorService {
mapdta
.
put
(
"YJHWC"
,
0
d
);
mapdta
.
put
(
"NJHWC"
,
0
d
);
// 构建请求URL并发起HTTP GET请求,获取相关数据
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_area_item_url
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_area_item_url
;
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
// 如果有获取到数据,则更新map中的相应数据
if
(
buDunGenDtos
.
size
()
>
0
)
{
...
...
@@ -800,11 +802,11 @@ public class MonitorServiceImpl implements MonitorService {
Double
useHoursOfAnnualGF
=
0.00
;
//获取全国数据
String
nationalUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
;
String
nationalUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
;
//获取风电
String
nationalFanUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=fan"
;
String
nationalFanUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=fan"
;
//获取光伏
String
nationalPVUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=pv"
;
String
nationalPVUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=pv"
;
List
<
BuDunGenDto
>
nationalGendto
=
httpRequestUtil
.
getResPonse
(
nationalPVUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
List
<
BuDunGenDto
>
fanGendto
=
httpRequestUtil
.
getResPonse
(
nationalPVUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
List
<
BuDunGenDto
>
pvGendto
=
httpRequestUtil
.
getResPonse
(
nationalPVUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
...
...
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 @
a313256c
...
...
@@ -84,6 +84,8 @@ public class MonitoringServiceImpl {
@Autowired
private
HttpRequestUtil
httpRequestUtil
;
@Value
(
"${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}"
)
private
String
budunBaseURL
;
/**
* 根据场站编号获取该场站的装机容量
*
...
...
@@ -1107,7 +1109,7 @@ public class MonitoringServiceImpl {
//改为部盾接口
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_quota_info
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application.properties
View file @
a313256c
...
...
@@ -84,3 +84,4 @@ year.power.generation.cron=0 0/1 * * * ?
large.cron
=
0 0/5 * * * ?
forecast.url
=
http://10.20.1.29:8095/offline/time-series/decomposition
budun.baseurl
=
http://iiet-jepcc.powerchina.cn:8088/screen_api
\ No newline at end of file
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 @
a313256c
...
...
@@ -674,11 +674,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
values
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
indicatorData
.
getValueF
()));
Double
value
=
groupMap
.
get
(
indicatorData
.
getCreatedTime
());
if
(
Objects
.
isNull
(
value
)){
value
=
0.0
;
if
(
Objects
.
isNull
(
value
))
{
value
=
0.0
;
}
valueList
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
value
));
valueList
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
value
));
}
else
{
values
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
indicatorData
.
getValueF
()
*
CommonConstans
.
kwToMv
));
...
...
@@ -834,6 +833,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
void
schedAddAlarmEventData
(
String
gatewayId
,
String
stationId
,
String
stationName
,
long
currentsort
)
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
if
(
gatewayId
==
null
)
{
return
;
}
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"光字牌"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringValueKeyword
,
Arrays
.
asList
(
"false"
));
...
...
@@ -841,7 +843,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ESEquipments
.
class
);
List
<
AlarmEvent
>
newAlarmEvents
=
new
ArrayList
<>();
List
<
String
>
alarmsNames
=
new
ArrayList
<>();
if
(
indicatorsDtoList
==
null
)
{
return
;
}
for
(
ESEquipments
esEquipments
:
indicatorsDtoList
)
{
AlarmEvent
alarmEvent
=
new
AlarmEvent
();
alarmEvent
.
setEventDesc
(
esEquipments
.
getEquipmentIndexName
());
...
...
@@ -1198,8 +1202,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
void
getListByFJ
(
String
gatewayId
,
String
werks
,
String
stationId
)
{
if
(
werks
==
null
||
StringUtils
.
isEmpty
(
werks
))
{
if
(
werks
==
null
||
StringUtils
.
isEmpty
(
werks
))
{
return
;
}
HashMap
<
String
,
String
>
fanstatutsHashMap
=
new
HashMap
<>();
...
...
@@ -1209,8 +1212,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
listDataAll
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
if
(
listDataAll
==
null
||
listDataAll
.
isEmpty
())
{
if
(
listDataAll
==
null
||
listDataAll
.
isEmpty
())
{
return
;
}
Map
<
String
,
Object
>
listDataWindSpeed
=
listDataAll
.
stream
()
...
...
@@ -1224,20 +1226,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// List<Map<String, Object>> dataMaps = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
// .getStationInfoMapByStationWerks(werks, tpriDmpDatabook.getDataid().toString());
List
<
Map
<
String
,
Object
>>
dataMapss
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
.
getStationInfoMapByStationWerksNew
(
werks
,
tpriDmpDatabook
.
getDataid
().
toString
());
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
List
<
Map
<
String
,
Object
>>
dataMaps
=
new
ArrayList
<>();
dataResult
.
keySet
().
forEach
(
m
->{
String
equipNum
=
dataResult
.
get
(
m
).
stream
()
.
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
+
"#"
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
)
.
orElse
(
""
);
dataResult
.
keySet
().
forEach
(
m
->
{
String
equipNum
=
dataResult
.
get
(
m
).
stream
().
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
+
"#"
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
).
orElse
(
""
);
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
dataMaps
.
add
(
hashMap
);
});
...
...
@@ -2141,6 +2141,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
void
getEquipSwitchStatus
(
StationBasic
stationBasic
)
{
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
if
(
gatewayId
==
null
)
{
return
;
}
Long
stationId
=
stationBasic
.
getSequenceNbr
();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
...
...
@@ -2329,6 +2332,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
void
getListByNbq
(
String
gatewayId
,
String
werks
,
String
stationId
)
{
if
(
gatewayId
==
null
)
{
return
;
}
HashMap
<
String
,
String
>
equipStatesMap
=
getPvNBQStationBy
(
gatewayId
);
ArrayList
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
List
<
String
>>
queryConditon
=
new
HashMap
<>();
...
...
@@ -2376,24 +2382,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// .getStationInfoMapByStationGFWerks(werks, "集电线");
List
<
Map
<
String
,
Object
>>
dataMapss
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
.
getStationInfoMapByStationGFWerksNew
(
werks
,
"集电线"
);
.
getStationInfoMapByStationGFWerksNew
(
werks
,
"集电线"
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
List
<
Map
<
String
,
Object
>>
dataMaps
=
new
ArrayList
<>();
dataResult
.
keySet
().
forEach
(
m
->{
String
equipNum
=
dataResult
.
get
(
m
).
stream
()
.
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
)
.
orElse
(
""
);
dataResult
.
keySet
().
forEach
(
m
->
{
String
equipNum
=
dataResult
.
get
(
m
).
stream
().
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
).
orElse
(
""
);
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
dataMaps
.
add
(
hashMap
);
});
int
i
=
0
;
// 逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据
for
(
Map
<
String
,
Object
>
dataMap
:
dataMaps
)
{
...
...
@@ -2793,6 +2795,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
HashMap
<
String
,
String
>
getPvNBQStationBy
(
String
gatewayId
)
{
HashMap
<
String
,
String
>
result
=
new
HashMap
<>();
if
(
gatewayId
==
null
)
{
return
result
;
}
Map
<
String
,
List
<
String
>>
queryCondition
=
new
HashMap
<>();
queryCondition
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"运行"
));
queryCondition
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
a313256c
...
...
@@ -16,11 +16,14 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.optional.qual.Present
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.elasticsearch.search.aggregations.Aggregation
;
import
org.elasticsearch.search.aggregations.Aggregations
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.metrics.ParsedSum
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -45,6 +48,9 @@ public class MonitorServiceImpl implements MonitorService {
private
final
StationCoordinateMapper
stationCoordinateMapper
;
private
final
MapRegionMapper
mapRegionMapper
;
private
final
HttpRequestUtil
httpRequestUtil
;
@Value
(
"${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}"
)
private
String
budunBaseURL
;
@Override
public
void
getTotalData
()
{
...
...
@@ -121,11 +127,11 @@ public class MonitorServiceImpl implements MonitorService {
Double
useHoursOfAnnualGF
=
0.00
;
// 获取全国数据
String
nationalUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
;
String
nationalUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
;
// 获取风电
String
nationalFanUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=fan"
;
String
nationalFanUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=fan"
;
// 获取光伏
String
nationalPVUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=pv"
;
String
nationalPVUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&type=pv"
;
List
<
BuDunGenDto
>
nationalGendto
=
httpRequestUtil
.
getResPonse
(
nationalUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
List
<
BuDunGenDto
>
fanGendto
=
httpRequestUtil
.
getResPonse
(
nationalFanUrl
,
Constants
.
REQUEST_GET
,
""
,
...
...
@@ -286,7 +292,7 @@ public class MonitorServiceImpl implements MonitorService {
}
}
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&provinceName"
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&provinceName"
+
provinceName
;
List
<
BuDunStationDetailInfo
>
buDunStationDetailInfos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunStationDetailInfo
.
class
);
...
...
@@ -450,7 +456,7 @@ public class MonitorServiceImpl implements MonitorService {
AtomicReference
<
Double
>
fdzannualPower
=
new
AtomicReference
<>(
0.0
);
AtomicReference
<
Double
>
gfzannualPower
=
new
AtomicReference
<>(
0.0
);
List
<
CoreValuesDto
>
coreValuesDtos
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
null
,
null
);
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&provinceName="
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_station_item
+
"&provinceName="
+
provinceName
;
List
<
BuDunStationDetailInfo
>
buDunStationDetailInfos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunStationDetailInfo
.
class
);
...
...
@@ -489,7 +495,7 @@ public class MonitorServiceImpl implements MonitorService {
completionOfPowerIndicatorsDtoList
.
add
(
completionOfPowerIndicatorsDto
);
});
}
String
provincelUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&provinceName="
String
provincelUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_province_item_url
+
"&provinceName="
+
provinceName
;
List
<
BuDunGenDto
>
provinceDtos
=
httpRequestUtil
.
getResPonse
(
provincelUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
...
...
@@ -615,7 +621,7 @@ public class MonitorServiceImpl implements MonitorService {
Page
<
HashMap
<
String
,
String
>>
hashMapPage
=
new
Page
<>(
1
,
99
);
List
<
HashMap
<
String
,
String
>>
hashMapList
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
stationCacheInfoDtoList
=
new
ArrayList
<>();
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_area_item_url
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_area_item_url
;
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
if
(!
areaName
.
contains
(
Constants
.
areaChinese
))
{
areaName
=
areaName
+
Constants
.
areaChinese
;
...
...
@@ -660,7 +666,7 @@ public class MonitorServiceImpl implements MonitorService {
public
Page
<
SocialContributionDto
>
getSocialContributionDtoList
(
String
areaName
,
String
stationId
)
{
AtomicReference
<
Double
>
total
=
new
AtomicReference
<>(
0.0
);
List
<
StationBasic
>
stationBasicListAll
=
new
ArrayList
<>();
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_area_item_url
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_area_item_url
;
if
(!
ObjectUtils
.
isEmpty
(
stationId
))
{
stationBasicListAll
.
add
(
stationBasicMapper
.
selectById
(
stationId
));
}
else
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
...
...
@@ -716,7 +722,7 @@ public class MonitorServiceImpl implements MonitorService {
public
Page
<
HashMap
<
String
,
String
>>
getPowerGenerationTrendsOfCompletionTopFive
(
String
areaName
)
{
Page
<
HashMap
<
String
,
String
>>
hashMapPage
=
new
Page
<>(
1
,
5
);
List
<
HashMap
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_month_top_url
+
"&topValue=5"
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_month_top_url
+
"&topValue=5"
;
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
if
(!
areaName
.
contains
(
Constants
.
areaChinese
))
{
areaName
=
areaName
+
Constants
.
areaChinese
;
...
...
@@ -782,7 +788,7 @@ public class MonitorServiceImpl implements MonitorService {
List
<
HashMap
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
List
<
StationBasic
>
fdzList
=
new
ArrayList
<>();
List
<
StationBasic
>
gfdzlist
=
new
ArrayList
<>();
String
requestUrl
=
Constants
.
BASE_
URL
+
"?"
+
Constants
.
get_hours_num_top
+
"&topValue=3&tabValue="
+
tabValue
;
String
requestUrl
=
budunBase
URL
+
"?"
+
Constants
.
get_hours_num_top
+
"&topValue=3&tabValue="
+
tabValue
;
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
if
(!
areaName
.
contains
(
Constants
.
areaChinese
))
{
areaName
=
areaName
+
Constants
.
areaChinese
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
a313256c
...
...
@@ -31,6 +31,8 @@ import java.util.*;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
@Service
public
class
MonitoringServiceImpl
{
Logger
logger
=
LoggerFactory
.
getLogger
(
MonitoringServiceImpl
.
class
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application.properties
View file @
a313256c
...
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-MONITOR-CT
server.servlet.context-path
=
/jxiop-monitor
server.port
=
33200
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
1
spring.profiles.active
=
dev
2
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
#logging.config=classpath:logback-${spring.profiles.active}.xml
...
...
@@ -94,4 +94,6 @@ spring.elasticsearch.rest.read-timeout=30000
amos.system.user.user-name
=
cz
amos.system.user.password
=
a1234567
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
\ No newline at end of file
amos.system.user.app-key
=
AMOS_STUDIO
budun.baseurl
=
http://iiet-jepcc.powerchina.cn:8088/screen_api
\ No newline at end of file
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