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
fbbe7b46
Commit
fbbe7b46
authored
Feb 03, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:稳压泵诊断分析接口修改
parent
5b82d50b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
IotFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
+2
-2
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+13
-13
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
View file @
fbbe7b46
...
...
@@ -34,8 +34,8 @@ public interface IotFeign {
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"top"
)
String
top
,
@RequestParam
(
value
=
"productKey"
)
String
productKey
,
@RequestParam
(
value
=
"deviceName"
)
String
deviceName
,
@RequestParam
(
"FHS_
FirePump_RunStatus
"
)
String
key
,
@RequestParam
(
required
=
false
,
value
=
"deviceName"
)
String
deviceName
,
@RequestParam
(
"FHS_
PressurePump_Start
"
)
String
key
,
@RequestParam
(
required
=
false
,
value
=
"fieldKey"
)
String
fieldKey
);
@RequestMapping
(
value
=
"v1/livedata/common/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
fbbe7b46
...
...
@@ -318,16 +318,16 @@ public class EmergencyServiceImpl implements IEmergencyService {
AtomicInteger
halfNum
=
new
AtomicInteger
();
AtomicInteger
twoNum
=
new
AtomicInteger
();
if
(!
CollectionUtils
.
isEmpty
(
specificList
))
{
AtomicReference
<
String
>
prefix
=
null
;
specificList
.
forEach
(
x
->
{
String
prefix
=
null
;
for
(
Map
<
String
,
Object
>
x
:
specificList
)
{
Object
iotCode
=
x
.
get
(
"iotCode"
);
String
suffix
=
null
;
if
(
x
.
get
(
"iotCode"
)
!=
null
&&
iotCode
.
toString
().
length
()
>
8
)
{
prefix
.
set
(
iotCode
.
toString
().
substring
(
0
,
8
)
);
prefix
=
iotCode
.
toString
().
substring
(
0
,
8
);
suffix
=
iotCode
.
toString
().
substring
(
8
);
try
{
ResponseModel
halfResponseModel
=
iotFeign
.
selectList
(
appKey
,
product
,
token
,
half
,
nowStrLong
,
prefix
.
get
()
,
suffix
,
pressurePumpStart
);
ResponseModel
twoResponseModel
=
iotFeign
.
selectList
(
appKey
,
product
,
token
,
two
,
nowStrLong
,
prefix
.
get
()
,
suffix
,
pressurePumpStart
);
ResponseModel
halfResponseModel
=
iotFeign
.
selectList
(
appKey
,
product
,
token
,
half
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
ResponseModel
twoResponseModel
=
iotFeign
.
selectList
(
appKey
,
product
,
token
,
two
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
if
(
200
==
halfResponseModel
.
getStatus
())
{
String
json
=
JSON
.
toJSONString
(
halfResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
halfDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json
);
...
...
@@ -344,8 +344,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
e
.
printStackTrace
();
}
}
}
);
ResponseModel
intervalResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
String
.
valueOf
(
prefix
)
,
null
,
null
,
pressurePumpStart
);
}
ResponseModel
intervalResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
prefix
,
null
,
null
,
pressurePumpStart
);
String
intervalTime
=
nowStrLong
;
String
durationTime
=
nowStrLong
;
if
(
200
==
intervalResponseModel
.
getStatus
())
{
...
...
@@ -354,7 +354,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
if
(!
CollectionUtils
.
isEmpty
(
intervalDataList
))
{
String
value
=
intervalDataList
.
get
(
0
).
get
(
pressurePumpStart
);
if
(
"true"
.
equals
(
value
))
{
ResponseModel
stopResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
String
.
valueOf
(
prefix
)
,
null
,
"false"
,
pressurePumpStart
);
ResponseModel
stopResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
prefix
,
null
,
"false"
,
pressurePumpStart
);
if
(
200
==
stopResponseModel
.
getStatus
())
{
String
stopJson
=
JSON
.
toJSONString
(
stopResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
stopDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
stopJson
);
...
...
@@ -363,7 +363,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
// 停泵前的前5分钟,判断管网压力状态
try
{
String
stop5BeforeTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddMinutes
(
DateUtils
.
convertStrToDate
(
intervalTime
,
"yyyy-MM-dd HH:mm:ss"
),
-
5
),
"yyyy-MM-dd HH:mm:ss"
);
ResponseModel
pipeResponseModel
=
iotFeign
.
selectListNew
(
appKey
,
product
,
token
,
String
.
valueOf
(
prefix
)
,
stop5BeforeTime
,
intervalTime
,
null
,
"FHS_PipePressureDetector_PipePressure"
);
ResponseModel
pipeResponseModel
=
iotFeign
.
selectListNew
(
appKey
,
product
,
token
,
prefix
,
stop5BeforeTime
,
intervalTime
,
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
);
...
...
@@ -378,7 +378,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
}
}
}
ResponseModel
startResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"2"
,
String
.
valueOf
(
prefix
)
,
null
,
"true"
,
pressurePumpStart
);
ResponseModel
startResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"2"
,
prefix
,
null
,
"true"
,
pressurePumpStart
);
if
(
200
==
startResponseModel
.
getStatus
())
{
String
startJson
=
JSON
.
toJSONString
(
startResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
startDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
startJson
);
...
...
@@ -387,7 +387,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
}
}
}
else
{
ResponseModel
startResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
String
.
valueOf
(
prefix
)
,
null
,
"true"
,
pressurePumpStart
);
ResponseModel
startResponseModel
=
iotFeign
.
selectOne
(
appKey
,
product
,
token
,
"1"
,
prefix
,
null
,
"true"
,
pressurePumpStart
);
if
(
200
==
startResponseModel
.
getStatus
())
{
String
startJson
=
JSON
.
toJSONString
(
startResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
startDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
startJson
);
...
...
@@ -399,8 +399,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
}
}
}
intervalMap
.
put
(
"value"
,
DateUtils
.
getDurationMinutes
(
nowStrLong
,
intervalTime
,
"yyyy-MM-dd HH:mm:ss"
));
durationlMap
.
put
(
"value"
,
DateUtils
.
getDurationMinutes
(
nowStrLong
,
durationTime
,
"yyyy-MM-dd HH:mm:ss"
));
intervalMap
.
put
(
"value"
,
DateUtils
.
getDurationMinutes
(
intervalTime
,
nowStrLong
,
"yyyy-MM-dd HH:mm:ss"
));
durationlMap
.
put
(
"value"
,
DateUtils
.
getDurationMinutes
(
durationTime
,
nowStrLong
,
"yyyy-MM-dd HH:mm:ss"
));
}
else
{
intervalMap
.
put
(
"value"
,
0
);
durationlMap
.
put
(
"value"
,
0
);
...
...
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