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
bf2cdc70
Commit
bf2cdc70
authored
Jul 08, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://39.100.92.250:5000/moa/amos-boot-biz
into develop_tzs_register
parents
e260441a
b7e8e230
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
29 deletions
+19
-29
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+19
-29
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
bf2cdc70
...
...
@@ -59,6 +59,7 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
...
...
@@ -814,6 +815,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
builder
.
query
(
boolMust
);
List
<
Map
<
String
,
Object
>>
statics
=
new
ArrayList
<>();
JSONArray
equList
=
(
JSONArray
)
filterParams
.
get
(
"EQU_LIST"
);
if
(
ObjectUtils
.
isEmpty
(
equList
)
||
equList
.
contains
(
"8000"
)
||
equList
.
contains
(
"all"
))
{
// 获取压力管道长度
BigDecimal
pipeLength
=
getPipeLength
(
boolMust
,
builder
);
Map
<
String
,
Object
>
pipeMap
=
new
HashMap
<>();
pipeMap
.
put
(
"name"
,
"压力管道(千米)"
);
pipeMap
.
put
(
"value"
,
pipeLength
.
divide
(
new
BigDecimal
(
1000
)));
statics
.
add
(
pipeMap
);
}
builder
.
from
((
current
-
1
)
*
size
);
builder
.
size
(
size
);
...
...
@@ -833,17 +844,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
dto
.
put
(
"WHETHER_VEHICLE_CYLINDER"
,
ObjectUtils
.
isEmpty
(
dto
.
get
(
"WHETHER_VEHICLE_CYLINDER"
))
?
""
:
"1"
.
equals
(
dto
.
get
(
"WHETHER_VEHICLE_CYLINDER"
))
?
"是"
:
"否"
);
dto
.
put
(
"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL"
,
ObjectUtils
.
isEmpty
(
dto
.
get
(
"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL"
))
?
""
:
"1"
.
equals
(
dto
.
get
(
"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL"
))
?
"是"
:
"否"
);
dto
.
put
(
"whetherSphericalTank"
,
ObjectUtils
.
isEmpty
(
dto
.
get
(
"whetherSphericalTank"
))
?
""
:
"1"
.
equals
(
dto
.
get
(
"whetherSphericalTank"
))
?
"是"
:
"否"
);
// if (dto.get("EQU_LIST_CODE").equals("8000")) {
// JSONArray techParams = (JSONArray) dto.get("techParams");
// if (!ObjectUtils.isEmpty(techParams)) {
// Object obj = techParams.stream().filter(item -> JSONObject.parseObject(JSONObject.toJSONString(item)).get("paramKey").equals("pipeLength")).findFirst().get();
// JSONObject jsonParam = JSONObject.parseObject(JSONObject.toJSONString(obj));
// if (jsonParam.containsKey("doubleValue")) {
// String pipeLength = JSONObject.parseObject(JSONObject.toJSONString(obj)).get("doubleValue").toString();
// pipeLong += Double.parseDouble(pipeLength);
// }
// }
// }
list
.
add
(
dto
);
}
totle
=
Objects
.
requireNonNull
(
response
.
getInternalResponse
().
hits
().
getTotalHits
()).
value
;
...
...
@@ -854,7 +854,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
throw
new
RuntimeException
(
e
);
}
List
<
Map
<
String
,
Object
>>
statics
=
new
ArrayList
<>();
Map
<
String
,
Object
>
sum
=
new
HashMap
<>();
sum
.
put
(
"name"
,
"设备总数(台套)"
);
sum
.
put
(
"value"
,
totle
);
...
...
@@ -867,19 +867,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
filterParams
.
put
(
"EQU_LIST"
,
jsonArray
);
}
JSONArray
equList
=
(
JSONArray
)
filterParams
.
get
(
"EQU_LIST"
);
if
(
equList
.
contains
(
"8000"
)
||
equList
.
contains
(
"all"
)
||
ObjectUtils
.
isEmpty
(
equList
))
{
// 压力管道长度
Map
<
String
,
Object
>
pipeMaps
=
new
HashMap
<>();
stCommonService
.
staticsCenterMapCountDataForPipeline
(
pipeMaps
,
orgCode
,
true
,
false
);
// 获取压力管道长度
// getPipeLength(pipeMaps, boolMust, builder, filterParams);
Map
<
String
,
Object
>
pipeMap
=
new
HashMap
<>();
pipeMap
.
put
(
"name"
,
"压力管道(千米)"
);
pipeMap
.
put
(
"value"
,
pipeMaps
.
get
(
"pressurePipelines"
));
statics
.
add
(
pipeMap
);
}
if
(
equList
.
contains
(
"2000"
)
||
equList
.
contains
(
"all"
)
||
ObjectUtils
.
isEmpty
(
equList
))
{
if
(
ObjectUtils
.
isEmpty
(
equList
)
||
equList
.
contains
(
"2000"
)
||
equList
.
contains
(
"all"
))
{
// 气瓶数量
Map
<
String
,
Object
>
gasMap
=
new
HashMap
<>();
gasMap
.
put
(
"name"
,
"气瓶(个)"
);
...
...
@@ -895,10 +883,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
result
;
}
private
double
getPipeLength
(
BoolQueryBuilder
boolMust
,
SearchSourceBuilder
builder
,
SearchSourceBuilder
searchSourceB
uilder
)
{
private
BigDecimal
getPipeLength
(
BoolQueryBuilder
boolMust
,
SearchSourceBuilder
b
uilder
)
{
SearchRequest
request
=
new
SearchRequest
();
double
pipeLong
=
0L
;
BigDecimal
pipeLong
=
BigDecimal
.
ZERO
;
builder
.
query
(
boolMust
);
builder
.
from
(
0
);
builder
.
size
(
10000000
);
request
.
source
(
builder
);
try
{
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
...
...
@@ -911,8 +901,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
Object
obj
=
techParams
.
stream
().
filter
(
item
->
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
item
)).
get
(
"paramKey"
).
equals
(
"pipeLength"
)).
findFirst
().
get
();
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
if
(
jsonParam
.
containsKey
(
"doubleValue"
))
{
String
pipeLength
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
))
.
get
(
"doubleValue"
).
toString
();
pipeLong
+=
Double
.
parseDouble
(
pipeLength
);
String
pipeLength
=
jsonParam
.
get
(
"doubleValue"
).
toString
();
pipeLong
=
pipeLong
.
add
(
new
BigDecimal
(
pipeLength
)
);
}
}
}
...
...
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