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
dabd903f
Commit
dabd903f
authored
Jul 11, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部盾采集
parent
e9d326ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
19 deletions
+22
-19
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+20
-18
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+2
-1
No files found.
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 @
dabd903f
...
...
@@ -135,18 +135,19 @@ public class LargeScreenImpl {
String
requestUrl
=
Constants
.
BASE_URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
String
formattedDate
=
yesterday
.
format
(
formatter
);
JSONObject
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
if
(
data
!=
null
)
{
// 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
if
(
data
.
getDouble
(
"sum_irradiance"
)
!=
null
&&
data
.
getDouble
(
"sum_irradiance"
)
==
0
)
{
// 计算昨天日期
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
formattedDate
=
yesterday
.
format
(
formatter
);
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
}
//
// 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
//
if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
//
// 计算昨天日期
//
LocalDate yesterday = currentDate.minusDays(1);
//
formattedDate = yesterday.format(formatter);
//
data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
//
Constants.REQUEST_GET, "", Constants.resovleRule_data);
//
}
mapdta
.
put
(
"SS"
,
data
.
getDouble
(
"average_wind_speed"
));
mapdta
.
put
(
"ZFS"
,
data
.
getDouble
(
"avg_irradiance"
));
mapdta
.
put
(
"ZFSLJ"
,
data
.
getDouble
(
"sum_irradiance"
));
...
...
@@ -243,7 +244,7 @@ public class LargeScreenImpl {
}
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
@PostConstruct
//
@PostConstruct
private
void
sendQYYXZBMqtt
()
{
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
Map
<
String
,
List
<
StationCacheInfoDto
>>
belongAreaList
=
listStationCacheInfoDto
.
stream
()
...
...
@@ -406,7 +407,8 @@ public class LargeScreenImpl {
String
requestUrl
=
Constants
.
BASE_URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
String
formattedDate
=
yesterday
.
format
(
formatter
);
JSONObject
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
+
"&code="
+
s
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.0000"
);
...
...
@@ -430,13 +432,13 @@ public class LargeScreenImpl {
}
// 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
if
(
data
.
getDouble
(
"sum_irradiance"
)
!=
null
&&
data
.
getDouble
(
"sum_irradiance"
)
==
0
)
{
// 计算昨天日期
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
formattedDate
=
yesterday
.
format
(
formatter
);
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
+
"&code="
+
s
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
}
//
if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
//
// 计算昨天日期
//
LocalDate yesterday = currentDate.minusDays(1);
//
formattedDate = yesterday.format(formatter);
//
data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate+"&code="+s, Constants.REQUEST_GET,
//
"", Constants.resovleRule_data);
//
}
mapdta
.
put
(
"SS"
,
data
.
getString
(
"average_wind_speed"
));
mapdta
.
put
(
"ZFS"
,
data
.
getString
(
"avg_irradiance"
));
mapdta
.
put
(
"ZFSLJ"
,
data
.
getString
(
"sum_irradiance"
));
...
...
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 @
dabd903f
...
...
@@ -1110,7 +1110,8 @@ public class MonitoringServiceImpl {
String
requestUrl
=
Constants
.
BASE_URL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
String
formattedDate
=
yesterday
.
format
(
formatter
);
JSONObject
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.0000"
);
...
...
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