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
b188f137
Commit
b188f137
authored
Apr 08, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部盾接口返回解析dto调整。
parent
2e512a4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
BuDunGenDto.java
...m/yeejoin/amos/boot/module/jxiop/api/dto/BuDunGenDto.java
+2
-0
BudunStationValueDto.java
.../amos/boot/module/jxiop/api/dto/BudunStationValueDto.java
+1
-0
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+6
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BuDunGenDto.java
View file @
b188f137
...
@@ -7,6 +7,8 @@ public class BuDunGenDto {
...
@@ -7,6 +7,8 @@ public class BuDunGenDto {
private
Double
day
;
private
Double
day
;
private
Double
month
;
private
Double
month
;
private
Double
year
;
private
Double
year
;
private
Double
month_complete
;
private
Double
year_complete
;
private
Double
year_complete
;
private
Double
year_hour_number
;
private
Double
year_hour_number
;
private
Double
cumulative
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BudunStationValueDto.java
View file @
b188f137
...
@@ -5,6 +5,7 @@ import lombok.Data;
...
@@ -5,6 +5,7 @@ import lombok.Data;
@Data
@Data
public
class
BudunStationValueDto
{
public
class
BudunStationValueDto
{
private
String
station_name
;
private
String
station_name
;
private
Double
hours
;
private
Double
value
;
private
Double
value
;
private
Double
genValue
;
private
Double
genValue
;
}
}
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 @
b188f137
...
@@ -493,13 +493,14 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -493,13 +493,14 @@ public class MonitorServiceImpl implements MonitorService {
AtomicReference
<
Double
>
monthlyPower
=
new
AtomicReference
<>(
0.0
);
AtomicReference
<
Double
>
monthlyPower
=
new
AtomicReference
<>(
0.0
);
//年发电量
//年发电量
AtomicReference
<
Double
>
annualPower
=
new
AtomicReference
<>(
0.0
);
AtomicReference
<
Double
>
annualPower
=
new
AtomicReference
<>(
0.0
);
AtomicReference
<
Double
>
totalPower
=
new
AtomicReference
<>(
0.0
);
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
if
(
buDunGenDtos
.
size
()
>
0
)
{
if
(
buDunGenDtos
.
size
()
>
0
)
{
BuDunGenDto
buDunGenDto
=
buDunGenDtos
.
get
(
0
);
BuDunGenDto
buDunGenDto
=
buDunGenDtos
.
get
(
0
);
dailyPower
.
set
(
buDunGenDto
.
getDay
());
dailyPower
.
set
(
buDunGenDto
.
getDay
());
monthlyPower
.
set
(
buDunGenDto
.
getMonth
());
monthlyPower
.
set
(
buDunGenDto
.
getMonth
());
annualPower
.
set
(
buDunGenDto
.
getYear
());
annualPower
.
set
(
buDunGenDto
.
getYear
());
annualPower
.
set
(
buDunGenDto
.
getYear
());
totalPower
.
set
(
buDunGenDto
.
getCumulative
());
}
}
HashMap
<
String
,
String
>
dayHashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
dayHashMap
=
new
HashMap
<>();
dayHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
dailyPower
.
get
())
+
"万kWh"
);
dayHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
dailyPower
.
get
())
+
"万kWh"
);
...
@@ -508,7 +509,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -508,7 +509,7 @@ public class MonitorServiceImpl implements MonitorService {
HashMap
<
String
,
String
>
annualHashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
annualHashMap
=
new
HashMap
<>();
annualHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
annualPower
.
get
())
+
"万kWh"
);
annualHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
annualPower
.
get
())
+
"万kWh"
);
HashMap
<
String
,
String
>
totalHashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
totalHashMap
=
new
HashMap
<>();
totalHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
annu
alPower
.
get
())
+
"万kWh"
);
totalHashMap
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
tot
alPower
.
get
())
+
"万kWh"
);
hashMapList
.
add
(
dayHashMap
);
hashMapList
.
add
(
dayHashMap
);
hashMapList
.
add
(
monthHashMap
);
hashMapList
.
add
(
monthHashMap
);
hashMapList
.
add
(
annualHashMap
);
hashMapList
.
add
(
annualHashMap
);
...
@@ -532,7 +533,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -532,7 +533,7 @@ public class MonitorServiceImpl implements MonitorService {
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
if
(
buDunGenDtos
.
size
()
>
0
)
{
if
(
buDunGenDtos
.
size
()
>
0
)
{
BuDunGenDto
buDunGenDto
=
buDunGenDtos
.
get
(
0
);
BuDunGenDto
buDunGenDto
=
buDunGenDtos
.
get
(
0
);
total
.
set
(
buDunGenDto
.
get
Year
());
total
.
set
(
buDunGenDto
.
get
Cumulative
());
}
}
return
getSocialContributionDtoList
(
total
.
get
());
return
getSocialContributionDtoList
(
total
.
get
());
}
}
...
@@ -654,7 +655,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -654,7 +655,7 @@ public class MonitorServiceImpl implements MonitorService {
if
(
i
<
(
buDunPvFanDto
.
getFan
().
size
()))
{
if
(
i
<
(
buDunPvFanDto
.
getFan
().
size
()))
{
BudunStationValueDto
budunStationValueDto
=
buDunPvFanDto
.
getFan
().
get
(
i
);
BudunStationValueDto
budunStationValueDto
=
buDunPvFanDto
.
getFan
().
get
(
i
);
stringHashMap
.
put
(
"stationName1"
,
budunStationValueDto
.
getStation_name
());
stringHashMap
.
put
(
"stationName1"
,
budunStationValueDto
.
getStation_name
());
stringHashMap
.
put
(
"hours1"
,
budunStationValueDto
.
get
Value
()
+
"h"
);
stringHashMap
.
put
(
"hours1"
,
budunStationValueDto
.
get
Hours
()
+
"h"
);
}
else
{
}
else
{
stringHashMap
.
put
(
"stationName1"
,
""
);
stringHashMap
.
put
(
"stationName1"
,
""
);
stringHashMap
.
put
(
"hours1"
,
"0.00h"
);
stringHashMap
.
put
(
"hours1"
,
"0.00h"
);
...
@@ -662,7 +663,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -662,7 +663,7 @@ public class MonitorServiceImpl implements MonitorService {
if
(
i
<
(
buDunPvFanDto
.
getPv
().
size
()))
{
if
(
i
<
(
buDunPvFanDto
.
getPv
().
size
()))
{
BudunStationValueDto
budunStationValueDto
=
buDunPvFanDto
.
getPv
().
get
(
i
);
BudunStationValueDto
budunStationValueDto
=
buDunPvFanDto
.
getPv
().
get
(
i
);
stringHashMap
.
put
(
"stationName2"
,
budunStationValueDto
.
getStation_name
());
stringHashMap
.
put
(
"stationName2"
,
budunStationValueDto
.
getStation_name
());
stringHashMap
.
put
(
"hours2"
,
budunStationValueDto
.
get
Value
()
+
"h"
);
stringHashMap
.
put
(
"hours2"
,
budunStationValueDto
.
get
Hours
()
+
"h"
);
}
else
{
}
else
{
stringHashMap
.
put
(
"stationName2"
,
""
);
stringHashMap
.
put
(
"stationName2"
,
""
);
stringHashMap
.
put
(
"hours2"
,
"0.00h"
);
stringHashMap
.
put
(
"hours2"
,
"0.00h"
);
...
...
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