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
5b55792b
Commit
5b55792b
authored
Jul 04, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、获取片区指标完成情况接口处理rate小数位数
parent
c19ec00e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
EnergyAccessServiceImpl.java
...odule/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
+4
-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 @
5b55792b
...
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
...
...
@@ -111,7 +112,9 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
JSONObject
jsonObject
=
(
JSONObject
)
result
;
String
rate
=
jsonObject
.
getString
(
"rate"
);
if
(
StringUtils
.
isNotEmpty
(
rate
))
{
jsonObject
.
put
(
"rate"
,
rate
.
replace
(
"%"
,
""
));
rate
=
rate
.
replace
(
"%"
,
""
);
BigDecimal
bd
=
new
BigDecimal
(
rate
);
jsonObject
.
put
(
"rate"
,
bd
.
setScale
(
4
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(
"1"
.
equals
(
tp
))
{
oldName
=
jsonObject
.
getString
(
"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