Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
8de0c153
Commit
8de0c153
authored
Aug 24, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警信息详情展示设备或管道详情
parent
b651ddc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
51 deletions
+44
-51
DeviceAlarmVo.java
.../main/java/com/zehong/system/domain/vo/DeviceAlarmVo.java
+20
-43
TDeviceAlarmServiceImpl.java
...m/zehong/system/service/impl/TDeviceAlarmServiceImpl.java
+24
-8
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceAlarmVo.java
View file @
8de0c153
...
...
@@ -2,7 +2,9 @@ package com.zehong.system.domain.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.TPipe
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -33,21 +35,15 @@ public class DeviceAlarmVo extends BaseEntity
/** 设备编号 */
private
String
deviceCode
;
/** 经度 */
private
BigDecimal
longitude
;
/** 纬度 */
private
BigDecimal
latitude
;
/** 坐标 */
private
String
coordinates
;
/** 物联网编号 */
private
String
iotNo
;
/** 设备监控数据列表(用于详情折线图) */
private
List
<
TDeviceReportData
>
deviceReportDataList
;
/** 设备列表(用于展示设备详情) */
private
List
<
TDeviceInfo
>
deviceList
;
/** 管道列表(用于展示管道详情) */
private
List
<
TPipe
>
pipeList
;
/** 工单id */
private
String
orderId
;
...
...
@@ -112,44 +108,28 @@ public class DeviceAlarmVo extends BaseEntity
this
.
deviceCode
=
deviceCode
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
String
getCoordinates
()
{
return
coordinates
;
public
List
<
TDeviceReportData
>
getDeviceReportDataList
()
{
return
deviceReportDataList
;
}
public
void
set
Coordinates
(
String
coordinates
)
{
this
.
coordinates
=
coordinates
;
public
void
set
DeviceReportDataList
(
List
<
TDeviceReportData
>
deviceReportDataList
)
{
this
.
deviceReportDataList
=
deviceReportDataList
;
}
public
String
getIotNo
()
{
return
iotNo
;
public
List
<
TDeviceInfo
>
getDeviceList
()
{
return
deviceList
;
}
public
void
set
IotNo
(
String
iotNo
)
{
this
.
iotNo
=
iotNo
;
public
void
set
DeviceList
(
List
<
TDeviceInfo
>
deviceList
)
{
this
.
deviceList
=
deviceList
;
}
public
List
<
T
DeviceReportData
>
getDeviceReportData
List
()
{
return
deviceReportData
List
;
public
List
<
T
Pipe
>
getPipe
List
()
{
return
pipe
List
;
}
public
void
set
DeviceReportDataList
(
List
<
TDeviceReportData
>
deviceReportData
List
)
{
this
.
deviceReportDataList
=
deviceReportData
List
;
public
void
set
PipeList
(
List
<
TPipe
>
pipe
List
)
{
this
.
pipeList
=
pipe
List
;
}
public
void
setOrderId
(
String
orderId
)
...
...
@@ -218,9 +198,6 @@ public class DeviceAlarmVo extends BaseEntity
"alarmId="
+
alarmId
+
", deviceId="
+
deviceId
+
", deviceType='"
+
deviceType
+
'\''
+
", deviceName='"
+
deviceName
+
'\''
+
", deviceCode='"
+
deviceCode
+
'\''
+
", iotNo='"
+
iotNo
+
'\''
+
", orderId='"
+
orderId
+
'\''
+
", alarmType='"
+
alarmType
+
'\''
+
", alarmValue='"
+
alarmValue
+
'\''
+
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceAlarmServiceImpl.java
View file @
8de0c153
...
...
@@ -76,16 +76,24 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if
(
"0"
.
equals
(
tDeviceAlarm
.
getDeviceType
())){
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
tDeviceAlarm
.
getDeviceId
());
deviceAlarmVo
.
setDeviceCode
(
pipe
.
getPipeCode
());
deviceAlarmVo
.
setDeviceName
(
pipe
.
getPipeName
());
deviceAlarmVo
.
setCoordinates
(
pipe
.
getCoordinates
());
if
(
pipe
!=
null
)
{
deviceAlarmVo
.
setDeviceCode
(
pipe
.
getPipeCode
());
deviceAlarmVo
.
setDeviceName
(
pipe
.
getPipeName
());
List
<
TPipe
>
pipeList
=
new
ArrayList
<>();
pipeList
.
add
(
pipe
);
deviceAlarmVo
.
setPipeList
(
pipeList
);
}
}
else
{
TDeviceInfo
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
tDeviceAlarm
.
getDeviceId
());
deviceAlarmVo
.
setDeviceCode
(
deviceInfo
.
getDeviceCode
());
deviceAlarmVo
.
setDeviceName
(
deviceInfo
.
getDeviceName
());
deviceAlarmVo
.
setIotNo
(
deviceInfo
.
getIotNo
());
deviceAlarmVo
.
setLongitude
(
deviceInfo
.
getLongitude
());
deviceAlarmVo
.
setLatitude
(
deviceInfo
.
getLatitude
());
if
(
deviceInfo
!=
null
){
deviceAlarmVo
.
setDeviceCode
(
deviceInfo
.
getDeviceCode
());
deviceAlarmVo
.
setDeviceName
(
deviceInfo
.
getDeviceName
());
List
<
TDeviceInfo
>
deviceList
=
new
ArrayList
<>();
deviceList
.
add
(
deviceInfo
);
deviceAlarmVo
.
setDeviceList
(
deviceList
);
}
// 查询当前设备开始报警时间前后一小时的数据
TDeviceReportData
tDeviceReportData
=
new
TDeviceReportData
();
...
...
@@ -136,12 +144,20 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
if
(
pipe
!=
null
)
{
deviceAlarmVo
.
setDeviceCode
(
pipe
.
getPipeCode
());
deviceAlarmVo
.
setDeviceName
(
pipe
.
getPipeName
());
List
<
TPipe
>
pipeList
=
new
ArrayList
<>();
pipeList
.
add
(
pipe
);
deviceAlarmVo
.
setPipeList
(
pipeList
);
}
}
else
{
TDeviceInfo
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
alarm
.
getDeviceId
());
if
(
deviceInfo
!=
null
)
{
deviceAlarmVo
.
setDeviceCode
(
deviceInfo
.
getDeviceCode
());
deviceAlarmVo
.
setDeviceName
(
deviceInfo
.
getDeviceName
());
List
<
TDeviceInfo
>
deviceList
=
new
ArrayList
<>();
deviceList
.
add
(
deviceInfo
);
deviceAlarmVo
.
setDeviceList
(
deviceList
);
}
}
...
...
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