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
97f33bb8
Commit
97f33bb8
authored
Feb 09, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:稳压泵诊断分析bug修改
parent
ae3be219
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+18
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
97f33bb8
...
...
@@ -23,7 +23,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -360,6 +359,24 @@ public class EmergencyServiceImpl implements IEmergencyService {
if
(!
CollectionUtils
.
isEmpty
(
trueDataList
))
{
durationTime
=
intervalTime2
;
}
if
(!
CollectionUtils
.
isEmpty
(
falseDataList
))
{
try
{
String
stop5BeforeTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddMinutes
(
DateUtils
.
convertStrToDate
(
intervalTime1
,
"yyyy-MM-dd HH:mm:ss"
),
-
5
),
"yyyy-MM-dd HH:mm:ss"
);
ResponseModel
pipeResponseModel
=
iotFeign
.
selectListNew
(
appKey
,
product
,
token
,
prefix
,
null
,
stop5BeforeTime
,
intervalTime2
,
null
,
"FHS_PipePressureDetector_PipePressure"
);
if
(
200
==
pipeResponseModel
.
getStatus
())
{
String
pipeJson
=
JSON
.
toJSONString
(
pipeResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
pipeDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
pipeJson
);
List
<
Map
<
String
,
String
>>
collect1
=
pipeDataList
.
stream
().
filter
(
o
->
o
.
containsKey
(
"FHS_PipePressureDetector_PipePressure"
)).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect1
))
{
double
val1
=
Double
.
parseDouble
(
collect1
.
get
(
0
).
get
(
"FHS_PipePressureDetector_PipePressure"
));
double
val2
=
Double
.
parseDouble
(
collect1
.
get
(
collect1
.
size
()
-
1
).
get
(
"FHS_PipePressureDetector_PipePressure"
));
pipeMap
.
put
(
"value"
,
Math
.
abs
(
val1
-
val2
)
>
0.05
?
"异常"
:
"正常"
);
}
}
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
else
{
if
(!
CollectionUtils
.
isEmpty
(
falseDataList
)
&&
!
CollectionUtils
.
isEmpty
(
trueDataList
))
{
durationTime
=
trueDataList
.
get
(
0
).
get
(
"createdTime"
);
...
...
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