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
202edb4d
Commit
202edb4d
authored
Sep 21, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改政务大类更地市的统计量值小数点保留两位
parent
9ed82039
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
IdxBizXnzsServiceImpl.java
...s/boot/module/cas/service/impl/IdxBizXnzsServiceImpl.java
+21
-11
No files found.
amos-boot-system-cas/amos-boot-module-cas-biz/src/main/java/com/yeejoin/amos/boot/module/cas/service/impl/IdxBizXnzsServiceImpl.java
View file @
202edb4d
...
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
...
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
springfox.documentation.spring.web.json.Json
;
import
springfox.documentation.spring.web.json.Json
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -64,11 +65,16 @@ public class IdxBizXnzsServiceImpl extends BaseService<IdxBizXnzsDto, IdxBizXnzs
...
@@ -64,11 +65,16 @@ public class IdxBizXnzsServiceImpl extends BaseService<IdxBizXnzsDto, IdxBizXnzs
i
=
i
+
1
;
i
=
i
+
1
;
Arrays
.
sort
(
doubles
);
Arrays
.
sort
(
doubles
);
json
.
add
(
doubles
[
0
]);
/**
json
.
add
((
doubles
[
0
]+
doubles
[
1
])/
2
);
* 添加箱线图数据
json
.
add
((
doubles
[
1
]+
doubles
[
2
])/
2
);
*/
json
.
add
((
doubles
[
2
]+
doubles
[
3
])/
2
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
//构造方法的字符格式这里如果小数不足2位,会以0补足.String
json
.
add
(
doubles
[
3
]);
json
.
add
(
decimalFormat
.
format
(
doubles
[
0
]));
json
.
add
(
decimalFormat
.
format
((
doubles
[
0
]+
doubles
[
1
])/
2
));
System
.
out
.
println
(
"---------------------------------"
+
Double
.
valueOf
((
doubles
[
0
]+
doubles
[
1
])/
2
));
json
.
add
(
decimalFormat
.
format
((
doubles
[
1
]+
doubles
[
2
])/
2
));
json
.
add
(
decimalFormat
.
format
((
doubles
[
2
]+
doubles
[
3
])/
2
));
json
.
add
(
decimalFormat
.
format
(
doubles
[
3
]));
firstJson
.
put
(
"value"
,
json
);
firstJson
.
put
(
"value"
,
json
);
firstJson
.
put
(
"itemStyle"
,
secondJson
);
firstJson
.
put
(
"itemStyle"
,
secondJson
);
seriesDataList
.
add
(
firstJson
);
seriesDataList
.
add
(
firstJson
);
...
@@ -135,12 +141,16 @@ public class IdxBizXnzsServiceImpl extends BaseService<IdxBizXnzsDto, IdxBizXnzs
...
@@ -135,12 +141,16 @@ public class IdxBizXnzsServiceImpl extends BaseService<IdxBizXnzsDto, IdxBizXnzs
/**
/**
* 添加箱线图数据
* 添加箱线图数据
*/
*/
json
.
add
(
ottf
[
0
]);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
//构造方法的字符格式这里如果小数不足2位,会以0补足.String
json
.
add
((
ottf
[
0
]+
ottf
[
1
])/
2
);
json
.
add
(
decimalFormat
.
format
(
ottf
[
0
]));
json
.
add
((
ottf
[
1
]+
ottf
[
2
])/
2
);
json
.
add
(
decimalFormat
.
format
((
ottf
[
0
]+
ottf
[
1
])/
2
));
json
.
add
((
ottf
[
2
]+
ottf
[
3
])/
2
);
json
.
add
(
decimalFormat
.
format
((
ottf
[
1
]+
ottf
[
2
])/
2
));
json
.
add
(
ottf
[
3
]);
json
.
add
(
decimalFormat
.
format
((
ottf
[
2
]+
ottf
[
3
])/
2
));
firstJson
.
put
(
"value"
,
json
);
json
.
add
(
decimalFormat
.
format
(
ottf
[
3
]));
firstJson
.
put
(
"value"
,
json
);
//format 返回的是字符串
firstJson
.
put
(
"itemStyle"
,
secondJson
);
firstJson
.
put
(
"itemStyle"
,
secondJson
);
seriesDataList
.
add
(
firstJson
);
seriesDataList
.
add
(
firstJson
);
...
...
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