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
60b854e9
Commit
60b854e9
authored
Jul 04, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏数据格式转换
parent
f12fde25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
EnergyAccessServiceImpl.java
...odule/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
+6
-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/EnergyAccessServiceImpl.java
View file @
60b854e9
...
@@ -14,6 +14,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -14,6 +14,7 @@ import org.springframework.util.CollectionUtils;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -110,9 +111,13 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
...
@@ -110,9 +111,13 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
String
oldName
=
""
;
String
oldName
=
""
;
JSONObject
jsonObject
=
(
JSONObject
)
result
;
JSONObject
jsonObject
=
(
JSONObject
)
result
;
String
rate
=
jsonObject
.
getString
(
"rate"
);
String
rate
=
jsonObject
.
getString
(
"rate"
);
String
newRate
=
""
;
if
(
StringUtils
.
isNotEmpty
(
rate
))
{
if
(
StringUtils
.
isNotEmpty
(
rate
))
{
jsonObject
.
put
(
"rate"
,
rate
.
replace
(
"%"
,
""
));
newRate
=
rate
.
replace
(
"%"
,
""
);
jsonObject
.
put
(
"rate"
,
newRate
);
}
}
jsonObject
.
put
(
"seriesData"
,
StringUtils
.
isNotEmpty
(
newRate
)
?
Arrays
.
asList
(
Double
.
parseDouble
(
newRate
))
:
0
D
);
jsonObject
.
put
(
"axisData"
,
Arrays
.
asList
(
"RATE"
));
if
(
"1"
.
equals
(
tp
))
{
if
(
"1"
.
equals
(
tp
))
{
oldName
=
jsonObject
.
getString
(
"station_name"
);
oldName
=
jsonObject
.
getString
(
"station_name"
);
jsonObject
.
remove
(
"station_name"
);
jsonObject
.
remove
(
"station_name"
);
...
...
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