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
8504aa20
Commit
8504aa20
authored
Aug 10, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/gengdidi/gassafety
into master
parents
941c740f
7e565c7d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
954 additions
and
740 deletions
+954
-740
TDeviceAlarmController.java
...web/controller/dataMonitoring/TDeviceAlarmController.java
+7
-32
TDeviceReportDataController.java
...ontroller/dataMonitoring/TDeviceReportDataController.java
+10
-7
TInspectionPlanController.java
...ontroller/deviceInspection/TInspectionPlanController.java
+1
-1
WebSocketController.java
.../zehong/web/controller/websocket/WebSocketController.java
+1
-17
TDeviceReportData.java
...main/java/com/zehong/system/domain/TDeviceReportData.java
+5
-5
DeviceAlarmForm.java
...n/java/com/zehong/system/domain/form/DeviceAlarmForm.java
+95
-0
DeviceReportDataForm.java
...a/com/zehong/system/domain/form/DeviceReportDataForm.java
+92
-0
DeviceAlarmVo.java
.../main/java/com/zehong/system/domain/vo/DeviceAlarmVo.java
+17
-0
DeviceReportDataVo.java
.../java/com/zehong/system/domain/vo/DeviceReportDataVo.java
+226
-0
InspectionPlanVo.java
...in/java/com/zehong/system/domain/vo/InspectionPlanVo.java
+23
-0
TDeviceReportDataMapper.java
...ava/com/zehong/system/mapper/TDeviceReportDataMapper.java
+13
-3
ITDeviceReportDataService.java
.../com/zehong/system/service/ITDeviceReportDataService.java
+13
-3
ITInspectionPlanService.java
...va/com/zehong/system/service/ITInspectionPlanService.java
+2
-1
TDeviceAlarmServiceImpl.java
...m/zehong/system/service/impl/TDeviceAlarmServiceImpl.java
+18
-1
TDeviceReportDataServiceImpl.java
...ong/system/service/impl/TDeviceReportDataServiceImpl.java
+18
-4
TInspectionPlanServiceImpl.java
...ehong/system/service/impl/TInspectionPlanServiceImpl.java
+54
-6
TDeviceReportDataMapper.xml
.../main/resources/mapper/system/TDeviceReportDataMapper.xml
+37
-15
deviceAlarm.js
gassafety-web/src/api/dataMonitoring/deviceAlarm.js
+1
-1
lljWran.png
gassafety-web/src/assets/images/lljWran.png
+0
-0
ylbWran.png
gassafety-web/src/assets/images/ylbWran.png
+0
-0
flowMeter.vue
gassafety-web/src/components/PopWindow/flowMeter.vue
+1
-1
pipelineView.vue
gassafety-web/src/components/PopWindow/pipelineView.vue
+9
-10
pressureGage.vue
gassafety-web/src/components/PopWindow/pressureGage.vue
+1
-1
regulatorBox.vue
gassafety-web/src/components/PopWindow/regulatorBox.vue
+1
-1
valveWell.vue
gassafety-web/src/components/PopWindow/valveWell.vue
+1
-1
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+13
-2
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+5
-5
workerManInfowindow.vue
...y-web/src/components/PopWindowGis/workerManInfowindow.vue
+22
-23
workerManView.vue
gassafety-web/src/components/PopWindowGis/workerManView.vue
+1
-1
app.js
gassafety-web/src/store/modules/app.js
+0
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+78
-48
index.vue
...afety-web/src/views/dataMonitoring/realtimeData/index.vue
+20
-270
index.vue
gassafety-web/src/views/dataMonitoring/reportData/index.vue
+23
-272
index.vue
...y-web/src/views/deviceInspection/inspectionPlan/index.vue
+2
-2
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+1
-1
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+143
-5
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/dataMonitoring/TDeviceAlarmController.java
View file @
8504aa20
package
com
.
zehong
.
web
.
controller
.
dataMonitoring
;
package
com
.
zehong
.
web
.
controller
.
dataMonitoring
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TDeviceAlarm
;
import
com.zehong.system.domain.TDeviceAlarm
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.service.ITDeviceAlarmService
;
import
com.zehong.system.service.ITDeviceAlarmService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.zehong.common.core.page.TableDataInfo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* 报警信息Controller
* 报警信息Controller
...
@@ -38,8 +27,6 @@ public class TDeviceAlarmController extends BaseController
...
@@ -38,8 +27,6 @@ public class TDeviceAlarmController extends BaseController
@Autowired
@Autowired
private
ITDeviceAlarmService
tDeviceAlarmService
;
private
ITDeviceAlarmService
tDeviceAlarmService
;
@Autowired
private
ISysDictTypeService
iSysDictTypeService
;
/**
/**
* 查询报警信息列表
* 查询报警信息列表
...
@@ -52,18 +39,6 @@ public class TDeviceAlarmController extends BaseController
...
@@ -52,18 +39,6 @@ public class TDeviceAlarmController extends BaseController
List
<
DeviceAlarmVo
>
list
=
null
;
List
<
DeviceAlarmVo
>
list
=
null
;
try
{
try
{
list
=
tDeviceAlarmService
.
selectTDeviceAlarmList
(
tDeviceAlarm
);
list
=
tDeviceAlarmService
.
selectTDeviceAlarmList
(
tDeviceAlarm
);
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_alarm_type"
);
for
(
DeviceAlarmVo
deviceAlarmVo
:
list
){
for
(
SysDictData
sysDictData
:
sysDictDataList
){
if
(
StringUtils
.
isNotEmpty
(
deviceAlarmVo
.
getAlarmType
())){
if
(
deviceAlarmVo
.
getAlarmType
().
equals
(
sysDictData
.
getDictValue
())){
deviceAlarmVo
.
setAlarmType
(
sysDictData
.
getDictLabel
());
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
Exception
(
"查询报警信息列表出错"
);
throw
new
Exception
(
"查询报警信息列表出错"
);
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/dataMonitoring/TDeviceReportDataController.java
View file @
8504aa20
package
com
.
zehong
.
web
.
controller
.
dataMonitoring
;
package
com
.
zehong
.
web
.
controller
.
dataMonitoring
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -38,10 +41,10 @@ public class TDeviceReportDataController extends BaseController
...
@@ -38,10 +41,10 @@ public class TDeviceReportDataController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:list')"
)
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDeviceReportData
tDeviceReportData
)
public
TableDataInfo
list
(
DeviceReportDataForm
deviceReportDataForm
)
{
{
startPage
();
startPage
();
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -50,10 +53,10 @@ public class TDeviceReportDataController extends BaseController
...
@@ -50,10 +53,10 @@ public class TDeviceReportDataController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:realtimeList')"
)
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:realtimeList')"
)
@GetMapping
(
"/realtimeList"
)
@GetMapping
(
"/realtimeList"
)
public
TableDataInfo
realtimeList
(
TDeviceReportData
tDeviceReportData
)
public
TableDataInfo
realtimeList
(
DeviceReportDataForm
deviceReportDataForm
)
{
{
startPage
();
startPage
();
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectRealtimeDataList
(
deviceReportDataForm
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -63,10 +66,10 @@ public class TDeviceReportDataController extends BaseController
...
@@ -63,10 +66,10 @@ public class TDeviceReportDataController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:export')"
)
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:export')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDeviceReportData
tDeviceReportData
)
public
AjaxResult
export
(
DeviceReportDataForm
deviceReportDataForm
)
{
{
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
ExcelUtil
<
TDeviceReportData
>
util
=
new
ExcelUtil
<
TDeviceReportData
>(
TDeviceReportData
.
class
);
ExcelUtil
<
DeviceReportDataVo
>
util
=
new
ExcelUtil
<
DeviceReportDataVo
>(
DeviceReportDataVo
.
class
);
return
util
.
exportExcel
(
list
,
"设备监控数据"
);
return
util
.
exportExcel
(
list
,
"设备监控数据"
);
}
}
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/deviceInspection/TInspectionPlanController.java
View file @
8504aa20
...
@@ -68,7 +68,7 @@ public class TInspectionPlanController extends BaseController
...
@@ -68,7 +68,7 @@ public class TInspectionPlanController extends BaseController
@GetMapping
(
value
=
"/{planId}"
)
@GetMapping
(
value
=
"/{planId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"planId"
)
int
planId
)
throws
Exception
public
AjaxResult
getInfo
(
@PathVariable
(
"planId"
)
int
planId
)
throws
Exception
{
{
TInspectionPlan
plan
=
null
;
InspectionPlanVo
plan
=
null
;
try
{
try
{
plan
=
tInspectionPlanService
.
selectTInspectionPlanById
(
planId
);
plan
=
tInspectionPlanService
.
selectTInspectionPlanById
(
planId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/websocket/WebSocketController.java
View file @
8504aa20
...
@@ -3,8 +3,6 @@ package com.zehong.web.controller.websocket;
...
@@ -3,8 +3,6 @@ package com.zehong.web.controller.websocket;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.service.ITDeviceAlarmService
;
import
com.zehong.system.service.ITDeviceAlarmService
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
com.zehong.system.service.ITPipeService
;
import
com.zehong.system.service.WebSocketServer
;
import
com.zehong.system.service.WebSocketServer
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -25,26 +23,12 @@ public class WebSocketController {
...
@@ -25,26 +23,12 @@ public class WebSocketController {
@Autowired
@Autowired
private
ITDeviceAlarmService
itDeviceAlarmService
;
private
ITDeviceAlarmService
itDeviceAlarmService
;
@Autowired
private
ITDeviceInfoService
itDeviceInfoService
;
@Autowired
private
ITPipeService
itPipeService
;
private
final
static
String
PIPE_TYPE
=
"0"
;
@GetMapping
(
"/send"
)
@GetMapping
(
"/send"
)
public
void
send
(
int
alarmId
){
public
void
send
(
int
alarmId
){
try
{
try
{
DeviceAlarmVo
alarm
=
itDeviceAlarmService
.
selectTDeviceAlarmById
(
alarmId
);
DeviceAlarmVo
alarm
=
itDeviceAlarmService
.
selectTDeviceAlarmById
(
alarmId
);
JSONObject
json
=
new
JSONObject
();
webSocketServer
.
batchSendMessage
(
JSONObject
.
toJSONString
(
alarm
));
json
.
put
(
"alarmInfo"
,
alarm
);
if
(
PIPE_TYPE
.
equals
(
alarm
.
getAlarmType
())){
json
.
put
(
"deviceInfo"
,
itPipeService
.
selectTPipeById
(
alarm
.
getDeviceId
()));
}
else
{
json
.
put
(
"deviceInfo"
,
itDeviceInfoService
.
selectTDeviceInfoById
(
alarm
.
getDeviceId
()));
}
webSocketServer
.
batchSendMessage
(
alarm
.
toString
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"wesocket发送失败!"
);
log
.
error
(
"wesocket发送失败!"
);
}
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TDeviceReportData.java
View file @
8504aa20
...
@@ -23,7 +23,7 @@ public class TDeviceReportData extends BaseEntity
...
@@ -23,7 +23,7 @@ public class TDeviceReportData extends BaseEntity
/** 设备id */
/** 设备id */
@Excel
(
name
=
"设备id"
)
@Excel
(
name
=
"设备id"
)
private
Lo
ng
deviceNum
;
private
Stri
ng
deviceNum
;
/** 标况累计量 */
/** 标况累计量 */
@Excel
(
name
=
"标况累计量"
)
@Excel
(
name
=
"标况累计量"
)
...
@@ -54,8 +54,8 @@ public class TDeviceReportData extends BaseEntity
...
@@ -54,8 +54,8 @@ public class TDeviceReportData extends BaseEntity
private
BigDecimal
pressure
;
private
BigDecimal
pressure
;
/** 上报时间 */
/** 上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
private
Date
reportTime
;
private
Date
reportTime
;
/** 通讯状态 */
/** 通讯状态 */
...
@@ -75,12 +75,12 @@ public class TDeviceReportData extends BaseEntity
...
@@ -75,12 +75,12 @@ public class TDeviceReportData extends BaseEntity
{
{
return
deviceReportDataId
;
return
deviceReportDataId
;
}
}
public
void
setDeviceNum
(
Long
deviceNum
)
public
void
setDeviceNum
(
String
deviceNum
)
{
{
this
.
deviceNum
=
deviceNum
;
this
.
deviceNum
=
deviceNum
;
}
}
public
Long
getDeviceNum
()
public
String
getDeviceNum
()
{
{
return
deviceNum
;
return
deviceNum
;
}
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/form/DeviceAlarmForm.java
0 → 100644
View file @
8504aa20
package
com
.
zehong
.
system
.
domain
.
form
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
/**
* 报警信息对象 t_device_alarm
*
* @author zehong
* @date 2021-07-21
*/
public
class
DeviceAlarmForm
extends
BaseEntity
{
/** 设备编号 */
private
String
deviceCode
;
/** 管道编号 */
private
String
pipeCode
;
/** 报警类型 */
private
String
alarmType
;
/** 报警开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime1
;
/** 报警结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime1
;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
private
String
dealStatus
;
public
String
getDeviceCode
()
{
return
deviceCode
;
}
public
void
setDeviceCode
(
String
deviceCode
)
{
this
.
deviceCode
=
deviceCode
;
}
public
String
getPipeCode
()
{
return
pipeCode
;
}
public
void
setPipeCode
(
String
pipeCode
)
{
this
.
pipeCode
=
pipeCode
;
}
public
void
setAlarmType
(
String
alarmType
)
{
this
.
alarmType
=
alarmType
;
}
public
String
getAlarmType
()
{
return
alarmType
;
}
public
void
setStartTime1
(
Date
startTime1
)
{
this
.
startTime1
=
startTime1
;
}
public
Date
getStartTime1
()
{
return
startTime1
;
}
public
void
setEndTime1
(
Date
endTime1
)
{
this
.
endTime1
=
endTime1
;
}
public
Date
getEndTime1
()
{
return
endTime1
;
}
public
void
setDealStatus
(
String
dealStatus
)
{
this
.
dealStatus
=
dealStatus
;
}
public
String
getDealStatus
()
{
return
dealStatus
;
}
}
gassafety-system/src/main/java/com/zehong/system/domain/form/DeviceReportDataForm.java
0 → 100644
View file @
8504aa20
package
com
.
zehong
.
system
.
domain
.
form
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 设备监控对象 t_device_report_data
*
* @author zehong
* @date 2021-08-09
*/
public
class
DeviceReportDataForm
extends
BaseEntity
{
/** 设备编号 */
private
String
deviceCode
;
/** 设备类型 */
private
String
deviceType
;
/** 开始上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startReportTime
;
/** 结束上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endReportTime
;
/** 通讯状态 */
private
String
communicationStatus
;
/** 设备状态 */
private
String
deviceStatus
;
public
String
getDeviceCode
()
{
return
deviceCode
;
}
public
void
setDeviceCode
(
String
deviceCode
)
{
this
.
deviceCode
=
deviceCode
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
Date
getStartReportTime
()
{
return
startReportTime
;
}
public
void
setStartReportTime
(
Date
startReportTime
)
{
this
.
startReportTime
=
startReportTime
;
}
public
Date
getEndReportTime
()
{
return
endReportTime
;
}
public
void
setEndReportTime
(
Date
endReportTime
)
{
this
.
endReportTime
=
endReportTime
;
}
public
void
setCommunicationStatus
(
String
communicationStatus
)
{
this
.
communicationStatus
=
communicationStatus
;
}
public
String
getCommunicationStatus
()
{
return
communicationStatus
;
}
public
void
setDeviceStatus
(
String
deviceStatus
)
{
this
.
deviceStatus
=
deviceStatus
;
}
public
String
getDeviceStatus
()
{
return
deviceStatus
;
}
}
\ No newline at end of file
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceAlarmVo.java
View file @
8504aa20
...
@@ -167,4 +167,21 @@ public class DeviceAlarmVo extends BaseEntity
...
@@ -167,4 +167,21 @@ public class DeviceAlarmVo extends BaseEntity
return
dealStatus
;
return
dealStatus
;
}
}
@Override
public
String
toString
()
{
return
"DeviceAlarmVo{"
+
"alarmId="
+
alarmId
+
", deviceId="
+
deviceId
+
", deviceType='"
+
deviceType
+
'\''
+
", deviceName='"
+
deviceName
+
'\''
+
", deviceCode='"
+
deviceCode
+
'\''
+
", iotNo='"
+
iotNo
+
'\''
+
", orderId='"
+
orderId
+
'\''
+
", alarmType='"
+
alarmType
+
'\''
+
", alarmValue='"
+
alarmValue
+
'\''
+
", startTime="
+
startTime
+
", endTime="
+
endTime
+
", dealStatus='"
+
dealStatus
+
'\''
+
'}'
;
}
}
}
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceReportDataVo.java
0 → 100644
View file @
8504aa20
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 设备监控对象 t_device_report_data
*
* @author zehong
* @date 2021-08-09
*/
public
class
DeviceReportDataVo
extends
BaseEntity
{
/** 设备上报id */
private
Long
deviceReportDataId
;
/** 设备物联网编号 */
@Excel
(
name
=
"设备物联网编号"
)
private
String
deviceNum
;
/** 设备编号 */
@Excel
(
name
=
"设备编号"
)
private
String
deviceCode
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
/** 设备类型 */
@Excel
(
name
=
"设备类型"
)
private
String
deviceType
;
/** 设备型号 */
@Excel
(
name
=
"设备型号"
)
private
String
deviceModel
;
/** 标况累计量 */
@Excel
(
name
=
"标况累计量"
)
private
BigDecimal
standardConditionAccumulation
;
/** 工况累计量 */
@Excel
(
name
=
"工况累计量"
)
private
BigDecimal
workingConditionAccumulation
;
/** 剩余量 */
@Excel
(
name
=
"剩余量"
)
private
BigDecimal
residualQuantity
;
/** 标况流量 */
@Excel
(
name
=
"标况流量"
)
private
BigDecimal
standardConditionFlow
;
/** 工况流量 */
@Excel
(
name
=
"工况流量"
)
private
BigDecimal
workingConditionFlow
;
/** 温度 */
@Excel
(
name
=
"温度"
)
private
BigDecimal
temperature
;
/** 压力 */
@Excel
(
name
=
"压力"
)
private
BigDecimal
pressure
;
/** 上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportTime
;
/** 通讯状态 */
@Excel
(
name
=
"通讯状态"
)
private
String
communicationStatus
;
/** 设备状态 */
@Excel
(
name
=
"设备状态"
)
private
String
deviceStatus
;
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
{
this
.
deviceReportDataId
=
deviceReportDataId
;
}
public
Long
getDeviceReportDataId
()
{
return
deviceReportDataId
;
}
public
void
setDeviceNum
(
String
deviceNum
)
{
this
.
deviceNum
=
deviceNum
;
}
public
String
getDeviceNum
()
{
return
deviceNum
;
}
public
String
getDeviceCode
()
{
return
deviceCode
;
}
public
void
setDeviceCode
(
String
deviceCode
)
{
this
.
deviceCode
=
deviceCode
;
}
public
String
getDeviceName
()
{
return
deviceName
;
}
public
void
setDeviceName
(
String
deviceName
)
{
this
.
deviceName
=
deviceName
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
String
getDeviceModel
()
{
return
deviceModel
;
}
public
void
setDeviceModel
(
String
deviceModel
)
{
this
.
deviceModel
=
deviceModel
;
}
public
void
setStandardConditionAccumulation
(
BigDecimal
standardConditionAccumulation
)
{
this
.
standardConditionAccumulation
=
standardConditionAccumulation
;
}
public
BigDecimal
getStandardConditionAccumulation
()
{
return
standardConditionAccumulation
;
}
public
void
setWorkingConditionAccumulation
(
BigDecimal
workingConditionAccumulation
)
{
this
.
workingConditionAccumulation
=
workingConditionAccumulation
;
}
public
BigDecimal
getWorkingConditionAccumulation
()
{
return
workingConditionAccumulation
;
}
public
void
setResidualQuantity
(
BigDecimal
residualQuantity
)
{
this
.
residualQuantity
=
residualQuantity
;
}
public
BigDecimal
getResidualQuantity
()
{
return
residualQuantity
;
}
public
void
setStandardConditionFlow
(
BigDecimal
standardConditionFlow
)
{
this
.
standardConditionFlow
=
standardConditionFlow
;
}
public
BigDecimal
getStandardConditionFlow
()
{
return
standardConditionFlow
;
}
public
void
setWorkingConditionFlow
(
BigDecimal
workingConditionFlow
)
{
this
.
workingConditionFlow
=
workingConditionFlow
;
}
public
BigDecimal
getWorkingConditionFlow
()
{
return
workingConditionFlow
;
}
public
void
setTemperature
(
BigDecimal
temperature
)
{
this
.
temperature
=
temperature
;
}
public
BigDecimal
getTemperature
()
{
return
temperature
;
}
public
void
setPressure
(
BigDecimal
pressure
)
{
this
.
pressure
=
pressure
;
}
public
BigDecimal
getPressure
()
{
return
pressure
;
}
public
void
setReportTime
(
Date
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
Date
getReportTime
()
{
return
reportTime
;
}
public
void
setCommunicationStatus
(
String
communicationStatus
)
{
this
.
communicationStatus
=
communicationStatus
;
}
public
String
getCommunicationStatus
()
{
return
communicationStatus
;
}
public
void
setDeviceStatus
(
String
deviceStatus
)
{
this
.
deviceStatus
=
deviceStatus
;
}
public
String
getDeviceStatus
()
{
return
deviceStatus
;
}
}
gassafety-system/src/main/java/com/zehong/system/domain/vo/InspectionPlanVo.java
View file @
8504aa20
...
@@ -40,6 +40,13 @@ public class InspectionPlanVo extends BaseEntity
...
@@ -40,6 +40,13 @@ public class InspectionPlanVo extends BaseEntity
/** 工单id */
/** 工单id */
private
String
orderId
;
private
String
orderId
;
/** 指定执行人员姓名 */
private
String
appointInspectorName
;
/** 下发时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
allotTime
;
/** 开始时间 */
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
private
Date
startTime
;
...
@@ -122,6 +129,22 @@ public class InspectionPlanVo extends BaseEntity
...
@@ -122,6 +129,22 @@ public class InspectionPlanVo extends BaseEntity
return
orderId
;
return
orderId
;
}
}
public
String
getAppointInspectorName
()
{
return
appointInspectorName
;
}
public
void
setAppointInspectorName
(
String
appointInspectorName
)
{
this
.
appointInspectorName
=
appointInspectorName
;
}
public
Date
getAllotTime
()
{
return
allotTime
;
}
public
void
setAllotTime
(
Date
allotTime
)
{
this
.
allotTime
=
allotTime
;
}
public
void
setStartTime
(
Date
startTime
)
public
void
setStartTime
(
Date
startTime
)
{
{
this
.
startTime
=
startTime
;
this
.
startTime
=
startTime
;
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TDeviceReportDataMapper.java
View file @
8504aa20
...
@@ -2,6 +2,8 @@ package com.zehong.system.mapper;
...
@@ -2,6 +2,8 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
/**
/**
* 设备监控Mapper接口
* 设备监控Mapper接口
...
@@ -17,15 +19,23 @@ public interface TDeviceReportDataMapper
...
@@ -17,15 +19,23 @@ public interface TDeviceReportDataMapper
* @param deviceReportDataId 设备监控ID
* @param deviceReportDataId 设备监控ID
* @return 设备监控
* @return 设备监控
*/
*/
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
public
DeviceReportDataVo
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
/**
/**
* 查询设备监控列表
* 查询设备监控列表
*
*
* @param tDeviceReportData 设备监控
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
*/
public
List
<
DeviceReportDataVo
>
selectTDeviceReportDataList
(
DeviceReportDataForm
deviceReportDataForm
);
/**
* 查询设备监控实时数据
*
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
* @return 设备监控集合
*/
*/
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
);
public
List
<
DeviceReportDataVo
>
selectRealtimeDataList
(
DeviceReportDataForm
deviceReportDataForm
);
/**
/**
* 新增设备监控
* 新增设备监控
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITDeviceReportDataService.java
View file @
8504aa20
...
@@ -2,6 +2,8 @@ package com.zehong.system.service;
...
@@ -2,6 +2,8 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
/**
/**
* 设备监控Service接口
* 设备监控Service接口
...
@@ -17,15 +19,23 @@ public interface ITDeviceReportDataService
...
@@ -17,15 +19,23 @@ public interface ITDeviceReportDataService
* @param deviceReportDataId 设备监控ID
* @param deviceReportDataId 设备监控ID
* @return 设备监控
* @return 设备监控
*/
*/
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
public
DeviceReportDataVo
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
/**
/**
* 查询设备监控列表
* 查询设备监控列表
*
*
* @param tDeviceReportData 设备监控
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
*/
public
List
<
DeviceReportDataVo
>
selectTDeviceReportDataList
(
DeviceReportDataForm
deviceReportDataForm
);
/**
* 查询设备监控实时数据
*
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
* @return 设备监控集合
*/
*/
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
);
public
List
<
DeviceReportDataVo
>
selectRealtimeDataList
(
DeviceReportDataForm
deviceReportDataForm
);
/**
/**
* 新增设备监控
* 新增设备监控
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITInspectionPlanService.java
View file @
8504aa20
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
/**
/**
* 巡检计划Service接口
* 巡检计划Service接口
...
@@ -18,7 +19,7 @@ public interface ITInspectionPlanService
...
@@ -18,7 +19,7 @@ public interface ITInspectionPlanService
* @param planId 巡检计划ID
* @param planId 巡检计划ID
* @return 巡检计划
* @return 巡检计划
*/
*/
public
TInspectionPlan
selectTInspectionPlanById
(
int
planId
)
throws
Exception
;
public
InspectionPlanVo
selectTInspectionPlanById
(
int
planId
)
throws
Exception
;
/**
/**
* 查询巡检计划列表
* 查询巡检计划列表
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceAlarmServiceImpl.java
View file @
8504aa20
...
@@ -2,12 +2,16 @@ package com.zehong.system.service.impl;
...
@@ -2,12 +2,16 @@ package com.zehong.system.service.impl;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.domain.vo.DeviceAlarmVo
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TPipeMapper
;
import
com.zehong.system.mapper.TPipeMapper
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -31,6 +35,9 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
...
@@ -31,6 +35,9 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
@Autowired
@Autowired
private
TPipeMapper
tPipeMapper
;
private
TPipeMapper
tPipeMapper
;
@Autowired
private
ISysDictTypeService
iSysDictTypeService
;
/**
/**
* 查询报警信息
* 查询报警信息
*
*
...
@@ -75,7 +82,7 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
...
@@ -75,7 +82,7 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
DeviceAlarmVo
deviceAlarmVo
=
new
DeviceAlarmVo
();
DeviceAlarmVo
deviceAlarmVo
=
new
DeviceAlarmVo
();
BeanUtils
.
copyProperties
(
alarm
,
deviceAlarmVo
);
BeanUtils
.
copyProperties
(
alarm
,
deviceAlarmVo
);
if
(
"0"
.
equals
(
tDeviceA
larm
.
getDeviceType
())){
if
(
"0"
.
equals
(
a
larm
.
getDeviceType
())){
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
alarm
.
getDeviceId
());
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
alarm
.
getDeviceId
());
if
(
pipe
!=
null
)
{
if
(
pipe
!=
null
)
{
deviceAlarmVo
.
setDeviceCode
(
pipe
.
getPipeCode
());
deviceAlarmVo
.
setDeviceCode
(
pipe
.
getPipeCode
());
...
@@ -89,6 +96,16 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
...
@@ -89,6 +96,16 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
}
}
}
}
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_alarm_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
){
if
(
StringUtils
.
isNotEmpty
(
alarm
.
getAlarmType
())){
if
(
alarm
.
getAlarmType
().
equals
(
sysDictData
.
getDictValue
())){
deviceAlarmVo
.
setAlarmType
(
sysDictData
.
getDictLabel
());
}
}
}
list
.
add
(
deviceAlarmVo
);
list
.
add
(
deviceAlarmVo
);
}
}
return
list
;
return
list
;
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceReportDataServiceImpl.java
View file @
8504aa20
...
@@ -2,6 +2,8 @@ package com.zehong.system.service.impl;
...
@@ -2,6 +2,8 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceReportDataMapper
;
import
com.zehong.system.mapper.TDeviceReportDataMapper
;
...
@@ -27,7 +29,7 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
...
@@ -27,7 +29,7 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
* @return 设备监控
* @return 设备监控
*/
*/
@Override
@Override
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
)
public
DeviceReportDataVo
selectTDeviceReportDataById
(
Long
deviceReportDataId
)
{
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataById
(
deviceReportDataId
);
return
tDeviceReportDataMapper
.
selectTDeviceReportDataById
(
deviceReportDataId
);
}
}
...
@@ -35,13 +37,25 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
...
@@ -35,13 +37,25 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
/**
/**
* 查询设备监控列表
* 查询设备监控列表
*
*
* @param tDeviceReportData 设备监控
* @param deviceReportDataForm 设备监控
* @return 设备监控
*/
@Override
public
List
<
DeviceReportDataVo
>
selectTDeviceReportDataList
(
DeviceReportDataForm
deviceReportDataForm
)
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
}
/**
* 查询设备监控实时数据
*
* @param deviceReportDataForm 设备监控
* @return 设备监控
* @return 设备监控
*/
*/
@Override
@Override
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
)
public
List
<
DeviceReportDataVo
>
selectRealtimeDataList
(
DeviceReportDataForm
deviceReportDataForm
)
{
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataList
(
tDeviceReportData
);
return
tDeviceReportDataMapper
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
}
}
/**
/**
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TInspectionPlanServiceImpl.java
View file @
8504aa20
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.
TInspectionData
;
import
com.zehong.system.domain.
*
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
import
com.zehong.system.mapper.TInspectionDataMapper
;
import
com.zehong.system.mapper.*
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TInspectionPlanMapper
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.service.ITInspectionPlanService
;
import
com.zehong.system.service.ITInspectionPlanService
;
/**
/**
...
@@ -28,6 +29,14 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
...
@@ -28,6 +29,14 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
private
TInspectionPlanMapper
tInspectionPlanMapper
;
private
TInspectionPlanMapper
tInspectionPlanMapper
;
@Autowired
@Autowired
private
TInspectionDataMapper
tInspectionDataMapper
;
private
TInspectionDataMapper
tInspectionDataMapper
;
@Autowired
private
SysUserMapper
sysUserMapper
;
@Autowired
private
TWorkOrderMapper
tWorkOrderMapper
;
@Autowired
private
TPipeMapper
tPipeMapper
;
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
/**
/**
* 查询巡检计划
* 查询巡检计划
...
@@ -36,9 +45,48 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
...
@@ -36,9 +45,48 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
* @return 巡检计划
* @return 巡检计划
*/
*/
@Override
@Override
public
TInspectionPlan
selectTInspectionPlanById
(
int
planId
)
throws
Exception
public
InspectionPlanVo
selectTInspectionPlanById
(
int
planId
)
throws
Exception
{
{
return
tInspectionPlanMapper
.
selectTInspectionPlanById
(
planId
);
InspectionPlanVo
inspectionPlanVo
=
new
InspectionPlanVo
();
TInspectionPlan
tInspectionPlan
=
tInspectionPlanMapper
.
selectTInspectionPlanById
(
planId
);
BeanUtils
.
copyProperties
(
tInspectionPlan
,
inspectionPlanVo
);
if
(
tInspectionPlan
.
getOrderId
()
!=
null
&&
""
.
equals
(
tInspectionPlan
.
getOrderId
()))
{
TWorkOrder
tWorkOrder
=
tWorkOrderMapper
.
selectTWorkOrderById
(
tInspectionPlan
.
getOrderId
());
inspectionPlanVo
.
setAllotTime
(
tWorkOrder
.
getAllotTime
());
// 获取巡检员姓名
SysUser
appointInspector
=
sysUserMapper
.
selectUserById
(
tWorkOrder
.
getAppointInspector
());
inspectionPlanVo
.
setAppointInspectorName
(
appointInspector
.
getNickName
());
}
List
<
TDeviceInfo
>
deviceInfoList
=
new
ArrayList
<>();
List
<
TPipe
>
pipeList
=
new
ArrayList
<>();
TInspectionData
tInspectionData
=
new
TInspectionData
();
tInspectionData
.
setPlanId
(
planId
);
List
<
TInspectionData
>
dataList
=
tInspectionDataMapper
.
selectTInspectionDataList
(
tInspectionData
);
if
(
dataList
.
size
()
!=
0
)
{
TDeviceInfo
deviceInfo
=
null
;
TPipe
pipe
=
null
;
for
(
TInspectionData
temp
:
dataList
)
{
if
(!
"0"
.
equals
(
temp
.
getDeviceType
()))
{
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
temp
.
getDeviceId
());
if
(
deviceInfo
!=
null
)
{
deviceInfoList
.
add
(
deviceInfo
);
}
}
else
{
pipe
=
tPipeMapper
.
selectTPipeById
(
temp
.
getDeviceId
());
if
(
pipe
!=
null
)
{
pipeList
.
add
(
pipe
);
}
}
}
}
inspectionPlanVo
.
setPipeList
(
pipeList
);
inspectionPlanVo
.
setDeviceList
(
deviceInfoList
);
return
inspectionPlanVo
;
}
}
/**
/**
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceReportDataMapper.xml
View file @
8504aa20
...
@@ -4,9 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -4,9 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TDeviceReportDataMapper"
>
<mapper
namespace=
"com.zehong.system.mapper.TDeviceReportDataMapper"
>
<resultMap
type=
"
TDeviceReportData
"
id=
"TDeviceReportDataResult"
>
<resultMap
type=
"
DeviceReportDataVo
"
id=
"TDeviceReportDataResult"
>
<result
property=
"deviceReportDataId"
column=
"device_report_data_id"
/>
<result
property=
"deviceReportDataId"
column=
"device_report_data_id"
/>
<result
property=
"deviceNum"
column=
"device_num"
/>
<result
property=
"deviceNum"
column=
"device_num"
/>
<result
property=
"deviceCode"
column=
"device_code"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
<result
property=
"deviceModel"
column=
"device_model"
/>
<result
property=
"standardConditionAccumulation"
column=
"standard_condition_accumulation"
/>
<result
property=
"standardConditionAccumulation"
column=
"standard_condition_accumulation"
/>
<result
property=
"workingConditionAccumulation"
column=
"working_condition_accumulation"
/>
<result
property=
"workingConditionAccumulation"
column=
"working_condition_accumulation"
/>
<result
property=
"residualQuantity"
column=
"residual_quantity"
/>
<result
property=
"residualQuantity"
column=
"residual_quantity"
/>
...
@@ -22,28 +26,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -22,28 +26,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectTDeviceReportDataVo"
>
<sql
id=
"selectTDeviceReportDataVo"
>
select device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, report_time, communication_status, device_status, create_time, update_time from t_device_report_data
select device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, report_time, communication_status, device_status, create_time, update_time
from t_device_report_data
</sql>
</sql>
<select
id=
"selectTDeviceReportDataList"
parameterType=
"TDeviceReportData"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"selectTDeviceReportDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResult"
>
<include
refid=
"selectTDeviceReportDataVo"
/>
select t.report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time,
d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
<where>
<where>
<if
test=
"deviceNum != null "
>
and device_num = #{deviceNum}
</if>
<if
test=
"deviceCode != null "
>
and d.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"standardConditionAccumulation != null "
>
and standard_condition_accumulation = #{standardConditionAccumulation}
</if>
<if
test=
"deviceType != null "
>
and d.device_type = #{deviceType}
</if>
<if
test=
"workingConditionAccumulation != null "
>
and working_condition_accumulation = #{workingConditionAccumulation}
</if>
<if
test=
"startReportTime != null "
>
and report_time
>
= #{startReportTime}
</if>
<if
test=
"residualQuantity != null "
>
and residual_quantity = #{residualQuantity}
</if>
<if
test=
"endReportTime != null "
>
and report_time
<
= #{endReportTime}
</if>
<if
test=
"standardConditionFlow != null "
>
and standard_condition_flow = #{standardConditionFlow}
</if>
<if
test=
"workingConditionFlow != null "
>
and working_condition_flow = #{workingConditionFlow}
</if>
<if
test=
"temperature != null "
>
and temperature = #{temperature}
</if>
<if
test=
"pressure != null "
>
and pressure = #{pressure}
</if>
<if
test=
"reportTime != null "
>
and report_time = #{reportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
</where>
</where>
</select>
</select>
<select
id=
"selectRealtimeDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResult"
>
select max(t.report_time), t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time,
d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
<where>
<if
test=
"deviceCode != null "
>
and d.device_code like concat('%',#{deviceCode},'%')
</if>
<if
test=
"deviceType != null "
>
and d.device_type = #{deviceType}
</if>
<if
test=
"startReportTime != null "
>
and report_time
>
= #{startReportTime}
</if>
<if
test=
"endReportTime != null "
>
and report_time
<
= #{endReportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
</where>
group by device_num
</select>
<select
id=
"selectTDeviceReportDataById"
parameterType=
"Long"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"selectTDeviceReportDataById"
parameterType=
"Long"
resultMap=
"TDeviceReportDataResult"
>
<include
refid=
"selectTDeviceReportDataVo"
/>
select t.report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time,
d.device_name, d.device_code, d.device_type, d.device_model
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
where device_report_data_id = #{deviceReportDataId}
where device_report_data_id = #{deviceReportDataId}
</select>
</select>
...
...
gassafety-web/src/api/dataMonitoring/deviceAlarm.js
View file @
8504aa20
...
@@ -59,6 +59,6 @@ export function selectAlarmDevice() {
...
@@ -59,6 +59,6 @@ export function selectAlarmDevice() {
return
request
({
return
request
({
url
:
'/dataMonitoring/deviceAlarm/selectAlarmDevice'
,
url
:
'/dataMonitoring/deviceAlarm/selectAlarmDevice'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
//
params: query
})
})
}
}
gassafety-web/src/assets/images/lljWran.png
0 → 100644
View file @
8504aa20
1.96 KB
gassafety-web/src/assets/images/ylbWran.png
0 → 100644
View file @
8504aa20
1.83 KB
gassafety-web/src/components/PopWindow/flowMeter.vue
View file @
8504aa20
...
@@ -118,8 +118,8 @@
...
@@ -118,8 +118,8 @@
</el-row>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
gassafety-web/src/components/PopWindow/pipelineView.vue
View file @
8504aa20
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
ref=
"editForm"
ref=
"editForm"
:model=
"editForm"
:model=
"editForm"
label-width=
"135px"
label-width=
"135px"
>
>
<el-col>
<el-col>
<el-form-item
v-show=
"false"
label=
"管道id"
prop=
"pipeId"
>
<el-form-item
v-show=
"false"
label=
"管道id"
prop=
"pipeId"
>
...
@@ -144,10 +143,10 @@
...
@@ -144,10 +143,10 @@
<
/el-row
>
<
/el-row
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"dialogVisible = false"
>
取
消
<
/el-button
>
<
el
-
button
:
loading
=
"okLoading"
type
=
"primary"
@
click
=
"ok"
<
el
-
button
:
loading
=
"okLoading"
type
=
"primary"
@
click
=
"ok"
>
确
定
<
/el-butto
n
>
确
定
<
/el-butto
n
>
>
<
el
-
button
@
click
=
"dialogVisible = false"
>
取
消
<
/el-button
>
<
/span
>
<
/span
>
<
/el-dialog
>
<
/el-dialog
>
<
/template
>
<
/template
>
...
@@ -224,14 +223,14 @@ export default {
...
@@ -224,14 +223,14 @@ export default {
}
,
}
,
}
;
}
;
}
,
}
,
computed
:{
computed
:
{
myTitle
(){
myTitle
()
{
if
(
this
.
editForm
.
pipeId
)
{
if
(
this
.
editForm
.
pipeId
)
{
return
`修改管道信息`
return
`修改管道信息`
;
}
else
{
}
else
{
return
`新增管道信息`
return
`新增管道信息`
;
}
}
}
}
,
}
,
}
,
created
()
{
created
()
{
console
.
log
(
"lineData"
,
this
.
lineData
,
this
.
lnglatsArr
,
this
.
pipeLength
);
console
.
log
(
"lineData"
,
this
.
lineData
,
this
.
lnglatsArr
,
this
.
pipeLength
);
...
@@ -241,7 +240,7 @@ export default {
...
@@ -241,7 +240,7 @@ export default {
// 如果是新建的里面天蝎过东西就存档
// 如果是新建的里面天蝎过东西就存档
console
.
log
(
"内部lineDate"
,
this
.
target
.
getExtData
());
console
.
log
(
"内部lineDate"
,
this
.
target
.
getExtData
());
const
{
lineData
}
=
this
.
target
.
getExtData
();
const
{
lineData
}
=
this
.
target
.
getExtData
();
console
.
log
(
lineData
)
console
.
log
(
lineData
)
;
if
(
lineData
)
{
if
(
lineData
)
{
this
.
editForm
=
{
...
lineData
}
;
this
.
editForm
=
{
...
lineData
}
;
}
}
...
...
gassafety-web/src/components/PopWindow/pressureGage.vue
View file @
8504aa20
...
@@ -118,8 +118,8 @@
...
@@ -118,8 +118,8 @@
</el-form>
</el-form>
</el-row>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
gassafety-web/src/components/PopWindow/regulatorBox.vue
View file @
8504aa20
...
@@ -111,8 +111,8 @@
...
@@ -111,8 +111,8 @@
</el-form>
</el-form>
</el-row>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
gassafety-web/src/components/PopWindow/valveWell.vue
View file @
8504aa20
...
@@ -110,8 +110,8 @@
...
@@ -110,8 +110,8 @@
</el-form>
</el-form>
</el-row>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
View file @
8504aa20
...
@@ -77,8 +77,8 @@
...
@@ -77,8 +77,8 @@
<!--
报警状态
-->
<!--
报警状态
-->
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-content"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态:
<
span
>
报警
<
/span></
div
>
<
div
>
报警状态:
<
span
>
报警
({{
alarmType
}}
)
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
div
>
详细信息:
<
span
>
{{
alarmValue
?
alarmValue
:
"-"
}}
<
/span></
div
>
<
/div
>
<
/div
>
<
div
class
=
"btn"
>
<
div
class
=
"btn"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
...
@@ -95,6 +95,11 @@ export default {
...
@@ -95,6 +95,11 @@ export default {
props
:
{
props
:
{
obj
:
{
typs
:
Object
}
,
obj
:
{
typs
:
Object
}
,
}
,
}
,
data
(){
return
{
}
}
,
created
()
{
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
console
.
log
(
"created"
,
this
.
obj
);
}
,
}
,
...
@@ -103,6 +108,12 @@ export default {
...
@@ -103,6 +108,12 @@ export default {
bigImageArr
()
{
bigImageArr
()
{
return
[
this
.
obj
.
iconUrl
];
return
[
this
.
obj
.
iconUrl
];
}
,
}
,
alarmType
(){
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmType
;
}
,
alarmValue
(){
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmValue
;
}
}
,
}
,
methods
:
{
methods
:
{
moment
,
moment
,
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
View file @
8504aa20
...
@@ -63,13 +63,13 @@
...
@@ -63,13 +63,13 @@
<!-- 报警状态 -->
<!-- 报警状态 -->
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div
class=
"warn-wrapper"
v-if=
"true"
>
<
!--
<
div
class=
"warn-content"
>
<div
class=
"warn-content"
>
<div>
报警状态:
<span>
报警
</span></div>
<div>
报警状态:
<span>
报警
(
{{
data
.
alarmType
}}
)
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
<div>
详细信息:
<span>
{{
data
.
alarmValue
?
data
.
alarmValue
:
"-"
}}
</span></div>
</div>
-->
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
<el-button
v-if=
"title=='压力表'|| title=='流量计' "
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
gassafety-web/src/components/PopWindowGis/workerManInfowindow.vue
View file @
8504aa20
<
template
>
<
template
>
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<span
class=
"left"
>
{{
data
.
userName
}}
:
</span>
<span
class=
"left"
>
姓名:
{{
data
.
userName
}}
</span>
<span
class=
"right"
>
{{
data
.
createTime
}}
</span>
<span
class=
"right"
>
时间:
{{
data
.
createTime
}}
</span>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:{
props
:
{
data
:{
data
:
{
type
:
Object
type
:
Object
,
}
},
},
created
()
{
console
.
log
(
"data"
,
this
.
data
);
},
},
created
(){
console
.
log
(
"data"
,
this
.
data
)
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
.wrapper
{
width
:
166px
;
//
width: 166px;
height
:
54px
;
height
:
54px
;
background
:
#0
D4F
88
;
background
:
#0
d4f
88
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#fff
;
color
:
#fff
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
7px
0
px
7px
8px
;
padding
:
7px
7
px
7px
8px
;
box-shadow
:
0
0
20px
-5px
#0
D4F
88
;
box-shadow
:
0
0
20px
-5px
#0
d4f
88
;
border-radius
:
4px
;
border-radius
:
4px
;
span
{
span
{
word-break
:
break-all
;
word-break
:
break-all
;
display
:
inline-
block
;
display
:
block
;
vertical-align
:
top
;
//
vertical-align: top;
&
.right
{
// &.right
{
width
:
90px
;
// width:
90px;
padding-left
:
4px
;
// padding-left:
4px;
}
//
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
gassafety-web/src/components/PopWindowGis/workerManView.vue
View file @
8504aa20
...
@@ -62,10 +62,10 @@
...
@@ -62,10 +62,10 @@
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
:loading=
"okLoading"
type=
"primary"
@
click=
"ok"
<el-button
:loading=
"okLoading"
type=
"primary"
@
click=
"ok"
>
确 定
>
确 定
</el-button>
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
gassafety-web/src/store/modules/app.js
View file @
8504aa20
...
@@ -26,7 +26,6 @@ const mutations = {
...
@@ -26,7 +26,6 @@ const mutations = {
},
},
TOGGLE_DEVICE
:
(
state
,
device
)
=>
{
TOGGLE_DEVICE
:
(
state
,
device
)
=>
{
state
.
device
=
device
state
.
device
=
device
console
.
log
(
123
)
},
},
SET_SIZE
:
(
state
,
size
)
=>
{
SET_SIZE
:
(
state
,
size
)
=>
{
state
.
size
=
size
state
.
size
=
size
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
8504aa20
...
@@ -47,7 +47,7 @@ class gaodeMap {
...
@@ -47,7 +47,7 @@ class gaodeMap {
myMap
=
null
;
myMap
=
null
;
showInfoWindow
=
null
;
showInfoWindow
=
null
;
// 工人轨迹用的窗口
// 工人轨迹用的窗口
markerPassedPolylineInfoWindow
=
null
;
markerPassedPolylineInfoWindow
=
null
;
//构造函数中设置中央点默认值
//构造函数中设置中央点默认值
constructor
(
center
)
{
constructor
(
center
)
{
...
@@ -216,6 +216,7 @@ class gaodeMap {
...
@@ -216,6 +216,7 @@ class gaodeMap {
// // e.target.content = this.getMarketContent(data);
// // e.target.content = this.getMarketContent(data);
// });
// });
marker
.
on
(
"mouseover"
,
e
=>
{
marker
.
on
(
"mouseover"
,
e
=>
{
that
.
markerType
=
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
data
);
e
.
target
.
content
=
this
.
getMarketContent
(
data
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
...
@@ -244,10 +245,11 @@ class gaodeMap {
...
@@ -244,10 +245,11 @@ class gaodeMap {
DEVICE_TYPE
.
INSPECTOR
!=
markerType
&&
DEVICE_TYPE
.
INSPECTOR
!=
markerType
&&
DEVICE_TYPE
.
SMALLINSPECTOR
!=
markerType
DEVICE_TYPE
.
SMALLINSPECTOR
!=
markerType
)
{
)
{
marker
.
content
=
this
.
getMarketContent
(
data
);
// marker.content = this.getMarketContent(data, markerInfoWindow
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
setExtData
(
data
);
marker
.
setExtData
(
data
);
that
.
deviceType
=
markerType
;
that
.
deviceType
=
markerType
;
let
editWindow
=
that
.
createInfowindow
(
"编辑"
);
let
editWindow
=
that
.
createInfowindow
(
"编辑"
);
editWindow
.
fileArr
=
editWindow
.
fileArr
=
...
@@ -325,7 +327,25 @@ class gaodeMap {
...
@@ -325,7 +327,25 @@ class gaodeMap {
}
}
function
infoOpen
(
e
)
{
function
infoOpen
(
e
)
{
// 删除克隆出来的线的clonedom
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
that
.
markerType
=
e
.
target
.
getExtData
().
deviceType
;
// 警告状态这样就要换infowindow
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
markerInfoWindowWarn
);
}
else
{
// 初始化为1的时候是没有的,所以需要判断一下
that
.
markerType
=
e
.
target
.
getExtData
().
deviceType
+
""
==
1
?
"2"
:
e
.
target
.
getExtData
().
deviceType
+
""
;
console
.
log
(
typeof
e
.
target
.
getExtData
().
deviceType
);
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
markerInfoWindow
);
}
let
options
=
map
.
getStatus
();
let
options
=
map
.
getStatus
();
options
.
scrollWheel
=
false
;
options
.
scrollWheel
=
false
;
...
@@ -366,8 +386,8 @@ class gaodeMap {
...
@@ -366,8 +386,8 @@ class gaodeMap {
* @param data
* @param data
* @returns {string}
* @returns {string}
*/
*/
getMarketContent
(
data
)
{
getMarketContent
(
data
,
markerInfoWindow
)
{
// let markerInfoWindow = markerInfoWindowWarn
;
console
.
log
(
"this.markerType"
,
this
.
markerType
)
;
switch
(
this
.
markerType
)
{
switch
(
this
.
markerType
)
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
const
dom
=
createPop
(
markerInfoWindow
,
{
const
dom
=
createPop
(
markerInfoWindow
,
{
...
@@ -522,7 +542,13 @@ class gaodeMap {
...
@@ -522,7 +542,13 @@ class gaodeMap {
}
}
}
}
}
}
changeMarkIcon
(
marker
,
iconUrl
){
let
icon
=
new
AMap
.
Icon
({
opacity
:
0.1
,
image
:
iconUrl
});
marker
.
setIcon
(
icon
);
}
workerManView
(
options
)
{
workerManView
(
options
)
{
// const {} =options;
// const {} =options;
const
notice
=
createPop
(
workerManView
,
{
const
notice
=
createPop
(
workerManView
,
{
...
@@ -576,10 +602,11 @@ class gaodeMap {
...
@@ -576,10 +602,11 @@ class gaodeMap {
});
});
// removeLineInfoWindow
// removeLineInfoWindow
marker
.
passedPolyline
.
on
(
"mouseover"
,
e
=>
{
marker
.
passedPolyline
.
on
(
"mouseover"
,
e
=>
{
const
dom
=
createPop
(
removeLineInfoWindow
,
{
const
dom
=
createPop
(
removeLineInfoWindow
,
{
map
:
this
,
marker
map
:
this
,
marker
});
});
marker
.
infoWindow
=
new
AMap
.
InfoWindow
({
marker
.
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
isCustom
:
true
,
...
@@ -594,7 +621,7 @@ class gaodeMap {
...
@@ -594,7 +621,7 @@ class gaodeMap {
// e.stopPropagation();
// e.stopPropagation();
// })
// })
this
.
markerPassedPolylineInfoWindow
=
infoWindow
;
this
.
markerPassedPolylineInfoWindow
=
marker
.
infoWindow
;
console
.
log
(
e
.
lnglat
);
console
.
log
(
e
.
lnglat
);
});
});
...
@@ -670,35 +697,18 @@ class gaodeMap {
...
@@ -670,35 +697,18 @@ class gaodeMap {
this
.
polyLines
.
push
(
polyline
);
this
.
polyLines
.
push
(
polyline
);
// 信息窗体
// 信息窗体
const
dom
=
createPop
(
lineInfoWindow
,
{
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
,
polyline
}
});
// console.log("domdomdomdomdom",dom)
//console.log("dom", dom.$el);
dom
.
$el
.
addEventListener
(
"mouseover"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
false
;
this
.
myMap
.
setStatus
(
options
);
});
dom
.
$el
.
addEventListener
(
"mouseout"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
});
let
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
autoMove
:
false
,
content
:
dom
.
$el
,
//信息船体偏移量
offset
:
new
AMap
.
Pixel
(
0
,
0
),
anchor
:
"left-top"
});
this
.
newLineAddEvent
(
polyline
);
this
.
newLineAddEvent
(
polyline
);
polyline
.
infoWindow
=
infoWindow
;
//添加事件
//添加事件
polyline
.
on
(
"mouseover"
,
e
=>
{
polyline
.
on
(
"mouseover"
,
e
=>
{
if
(
this
.
lineType
==
1
)
return
;
if
(
this
.
lineType
==
1
)
return
;
// 生成infoWindow
let
infoWindow
;
// 警告状态时
if
(
e
.
target
.
getExtData
().
lineData
.
alarmState
==
1
)
{
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindowWarn
,
item
);
}
else
{
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
);
}
infoWindow
.
open
(
map
,
e
.
lnglat
);
infoWindow
.
open
(
map
,
e
.
lnglat
);
// 上方导航的高
// 上方导航的高
const
topBar
=
81
;
const
topBar
=
81
;
...
@@ -741,24 +751,19 @@ class gaodeMap {
...
@@ -741,24 +751,19 @@ class gaodeMap {
//console.log("靠下了");
//console.log("靠下了");
Y
=
-
infoWindowHeight
-
20
;
Y
=
-
infoWindowHeight
-
20
;
}
}
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
{
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
}
else
{
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
}
console
.
log
(
polyline
.
getOptions
()
);
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
// 这个是为了盖住vue里的东西
// polyline.cloneDom = infoWindow.dom.cloneNode(true);
// polyline.cloneDom.style.top = infoWindow.dom.offsetTop + 80 + "px";
// polyline.cloneDom.style.left = infoWindow.dom.offsetLeft + 100 + "px";
// // 先删除之前的,后增加现在的
// this.removeCloneDom();
// document.body.appendChild(polyline.cloneDom);
// infoWindow.close();
// this.addCloneDome(polyline, infoWindow);
// infoWindow.close();
// 检测是否与底部bottondata碰撞
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
showInfoWindow
=
infoWindow
;
this
.
showInfoWindow
=
infoWindow
;
// const
// const
});
});
polyline
.
on
(
"mouseout"
,
e
=>
{
polyline
.
on
(
"mouseout"
,
e
=>
{
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
// infoWindow.close();
// infoWindow.close();
});
});
...
@@ -769,6 +774,31 @@ class gaodeMap {
...
@@ -769,6 +774,31 @@ class gaodeMap {
// 缩放地图到合适的视野级别
// 缩放地图到合适的视野级别
// map.setFitView();
// map.setFitView();
}
}
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
)
{
let
dom
=
createPop
(
lineInfoWindow
,
{
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
,
polyline
}
});
dom
.
$el
.
addEventListener
(
"mouseover"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
false
;
this
.
myMap
.
setStatus
(
options
);
});
dom
.
$el
.
addEventListener
(
"mouseout"
,
()
=>
{
let
options
=
this
.
myMap
.
getStatus
();
options
.
scrollWheel
=
true
;
this
.
myMap
.
setStatus
(
options
);
});
let
infoWindow
=
new
AMap
.
InfoWindow
({
isCustom
:
true
,
autoMove
:
false
,
content
:
dom
.
$el
,
//信息船体偏移量
offset
:
new
AMap
.
Pixel
(
0
,
0
),
anchor
:
"left-top"
});
polyline
.
infoWindow
=
infoWindow
;
return
infoWindow
;
}
// 碰撞检测
// 碰撞检测
boxCollision
(
infowindowDom
)
{
boxCollision
(
infowindowDom
)
{
// gis地图页面的bottomdata组件
// gis地图页面的bottomdata组件
...
@@ -828,8 +858,8 @@ class gaodeMap {
...
@@ -828,8 +858,8 @@ class gaodeMap {
this
.
markerInfoWindow
&&
this
.
markerInfoWindow
.
close
();
this
.
markerInfoWindow
&&
this
.
markerInfoWindow
.
close
();
this
.
workerManInfoWindow
&&
this
.
workerManInfoWindow
.
close
();
this
.
workerManInfoWindow
&&
this
.
workerManInfoWindow
.
close
();
// 工人的轨迹线条用的
// 工人的轨迹线条用的
this
.
markerPassedPolylineInfoWindow
&&
this
.
markerPassedPolylineInfoWindow
.
close
();
this
.
markerPassedPolylineInfoWindow
&&
this
.
markerPassedPolylineInfoWindow
.
close
();
}
}
// 关闭转化到vue的dom
// 关闭转化到vue的dom
removeCloneDom
()
{
removeCloneDom
()
{
...
...
gassafety-web/src/views/dataMonitoring/realtimeData/index.vue
View file @
8504aa20
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/dataMonitoring/reportData/index.vue
View file @
8504aa20
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
8504aa20
...
@@ -89,8 +89,8 @@
...
@@ -89,8 +89,8 @@
<
el
-
table
-
column
label
=
"计划描述"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"计划描述"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
prop
=
"planStatus"
>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
prop
=
"planStatus"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.planStatus == 0"
>
未
下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 0"
>
未
生成工单
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 1"
>
已
下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 1"
>
已
生成工单
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 2"
>
进行中
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 2"
>
进行中
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
/template
>
<
/template
>
...
...
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
8504aa20
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"top"
>
<div
class=
"top"
>
<span>
设备报警最新记录
</span>
<span>
设备报警最新记录
</span>
<span
@
click=
"repeatClick"
class=
"repeat"
>
刷新
</span>
<span
@
click=
"repeatClick"
class=
"repeat"
>
刷新
</span>
<span
@
click=
"moreClick"
class=
"more"
>
更多
</span>
<span
@
click=
"moreClick"
class=
"more"
>
更多
>>
</span>
</div>
</div>
<div
class=
"bottom right-bottom-data-left"
>
<div
class=
"bottom right-bottom-data-left"
>
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
8504aa20
...
@@ -110,6 +110,7 @@ import gaodeMap, {
...
@@ -110,6 +110,7 @@ import gaodeMap, {
DEVICE_TYPE
,
DEVICE_TYPE
,
mapOperateType
,
mapOperateType
,
}
from
"utils/gaodeMapView.js"
;
}
from
"utils/gaodeMapView.js"
;
import
{
selectAlarmDevice
}
from
"@/api/dataMonitoring/deviceAlarm.js"
;
import
{
getAllDeviceInfo
,
countDeviceByType
}
from
"@/api/device/deviceInfo"
;
import
{
getAllDeviceInfo
,
countDeviceByType
}
from
"@/api/device/deviceInfo"
;
import
RightBototmData
from
"./components/RightBototmData.vue"
;
import
RightBototmData
from
"./components/RightBototmData.vue"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
import
{
getInspectorLocations
}
from
"@/api/inspectorLocation/location"
;
...
@@ -190,11 +191,29 @@ export default {
...
@@ -190,11 +191,29 @@ export default {
window
.
addEventListener
(
"mousedown"
,
this
.
barClose
);
window
.
addEventListener
(
"mousedown"
,
this
.
barClose
);
gaoMap
.
addMouseTool
();
gaoMap
.
addMouseTool
();
gaoMap
.
searchTips
(
"tipinput"
);
gaoMap
.
searchTips
(
"tipinput"
);
this
.
getDeviceInfo
();
// 获取地图上设备资源
this
.
get
PipeList
();
this
.
get
Resource
();
// 右下角数据
// 右下角数据
跟值班人员
this
.
rightBottomData
();
this
.
rightBottomData
();
},
},
// 获取地图上的资源
getResource
()
{
this
.
getDeviceInfo
()
.
then
((
res
)
=>
{
if
(
res
==
200
)
{
console
.
log
(
res
);
return
this
.
getPipeList
();
}
})
.
then
((
res
)
=>
{
if
(
res
==
200
)
{
console
.
log
(
"管道"
,
res
);
// 获取报警资源
this
.
getSelectAlarmDevice
();
// selectAlarmDevice
}
});
},
// 右下角数据
// 右下角数据
async
rightBottomData
()
{
async
rightBottomData
()
{
this
.
gaoMap
.
view
=
this
;
this
.
gaoMap
.
view
=
this
;
...
@@ -284,6 +303,120 @@ export default {
...
@@ -284,6 +303,120 @@ export default {
this
.
gaoMap
.
mapOperateType
=
"add"
;
this
.
gaoMap
.
mapOperateType
=
"add"
;
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
removeMarkerDragg
();
},
},
// 获取报警资源,并且改变图上的状态
getSelectAlarmDevice
()
{
selectAlarmDevice
().
then
((
res
)
=>
{
if
(
res
.
length
>
0
)
{
console
.
log
(
"报警设备"
,
res
);
this
.
statusChange
(
res
);
}
});
},
// 遍历设备改变状态 polyLines markers
statusChange
(
list
)
{
// 过滤报警管道
const
polyLineArr
=
list
.
filter
((
item
)
=>
{
return
item
.
deviceType
==
"0"
;
});
// 过滤报警的其它设备
const
deviceArr
=
list
.
filter
((
item
)
=>
{
return
item
.
deviceType
!=
"0"
;
});
// 管道
if
(
polyLineArr
.
length
>
0
)
{
polyLineArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
const
{
deviceId
,
alarmType
,
alarmValue
,
endTime
}
=
item
;
// 获取polyLine
const
polyline
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
const
pipeId
=
item
.
getExtData
().
lineData
.
pipeId
;
return
deviceId
==
pipeId
;
})[
0
];
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
const
options
=
polyline
.
getExtData
();
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
if
(
endTime
)
{
options
.
lineData
.
alarmState
=
0
;
}
else
{
options
.
lineData
.
alarmState
=
1
;
}
// 报警类型
options
.
lineData
.
alarmType
=
alarmType
;
// 报警信息
options
.
lineData
.
alarmValue
=
alarmValue
;
polyline
.
setExtData
(
options
);
});
}
// 其他设备
if
(
deviceArr
.
length
>
0
)
{
deviceArr
.
forEach
((
item
)
=>
{
// 获取循报警设备的id
const
{
deviceId
,
alarmType
,
alarmValue
,
endTime
}
=
item
;
// 获取polyLine
const
device
=
this
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
const
id
=
item
.
getExtData
().
deviceId
;
return
deviceId
==
id
;
})[
0
];
const
options
=
device
.
getExtData
();
console
.
log
(
options
);
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
if
(
endTime
)
{
options
.
lineData
.
alarmState
=
0
;
}
else
{
options
.
lineData
.
alarmState
=
1
;
}
// 报警类型
options
.
alarmType
=
alarmType
;
// 报警信息
options
.
alarmValue
=
alarmValue
;
device
.
setExtData
(
options
);
// const imageName = device.getExtData()
// console.log(imageName)
console
.
log
(
"device.getExtData().deviceType============"
,
device
.
getExtData
().
deviceType
);
// 3是流量计 4是压力表
if
(
device
.
getExtData
().
deviceType
==
3
)
{
this
.
gaoMap
.
changeMarkIcon
(
device
,
require
(
`@/assets/images/lljWran.png`
)
);
}
else
if
(
device
.
getExtData
().
deviceType
==
4
)
{
this
.
gaoMap
.
changeMarkIcon
(
device
,
require
(
`@/assets/images/ylbWran.png`
)
);
}
});
}
this
.
socket
();
},
socket
()
{
this
.
ws
=
new
WebSocket
(
"ws://36.148.23.59:8901/gassafety/websocketServer"
);
// this.ws = new WebSocket(
// "ws://192.168.2.23:8903/gassafety/websocketServer"
// );
this
.
ws
.
onopen
=
(
evt
)
=>
{
console
.
log
(
"WebSockets=======gogogog"
);
this
.
ws
.
send
(
"WebSockets!========================="
);
};
this
.
ws
.
onmessage
=
(
evt
)
=>
{
console
.
log
(
"Received Message: "
+
evt
.
data
);
// ws.close();
this
.
statusChange
([
evt
.
data
]);
};
this
.
ws
.
onclose
=
()
=>
{
console
.
log
(
"ws协议关闭"
);
};
// this.ws.onclose = function (evt) {
// console.log("Connection closed.");
// };
},
// 选择新建项目哪个
// 选择新建项目哪个
createChange
(
e
,
item
)
{
createChange
(
e
,
item
)
{
...
@@ -312,6 +445,7 @@ export default {
...
@@ -312,6 +445,7 @@ export default {
// 清空所有正在编辑状态的线
// 清空所有正在编辑状态的线
this
.
gaoMap
.
linePolyEditorAllClose
();
this
.
gaoMap
.
linePolyEditorAllClose
();
},
},
// 新建按钮还原
// 新建按钮还原
createReset
()
{
createReset
()
{
this
.
iconClass
=
"icon-create"
;
this
.
iconClass
=
"icon-create"
;
...
@@ -374,7 +508,7 @@ export default {
...
@@ -374,7 +508,7 @@ export default {
},
},
getDeviceInfo
(
queryParams
)
{
getDeviceInfo
(
queryParams
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
getAllDeviceInfo
(
queryParams
).
then
((
response
)
=>
{
return
getAllDeviceInfo
(
queryParams
).
then
((
response
)
=>
{
if
(
response
.
code
==
200
)
{
if
(
response
.
code
==
200
)
{
for
(
var
i
=
0
;
i
<
response
.
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
response
.
data
.
length
;
i
++
)
{
if
(
"1"
==
response
.
data
[
i
].
deviceType
)
{
if
(
"1"
==
response
.
data
[
i
].
deviceType
)
{
...
@@ -395,14 +529,16 @@ export default {
...
@@ -395,14 +529,16 @@ export default {
}
}
}
}
this
.
loading
=
false
;
this
.
loading
=
false
;
return
response
.
code
;
});
});
},
},
getPipeList
(
queryParams
)
{
getPipeList
(
queryParams
)
{
pipeAllInfoList
(
queryParams
).
then
((
res
)
=>
{
return
pipeAllInfoList
(
queryParams
).
then
((
res
)
=>
{
console
.
log
(
"管道"
,
res
);
console
.
log
(
"管道"
,
res
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
gaoMap
.
addPolyline
(
res
.
data
);
this
.
gaoMap
.
addPolyline
(
res
.
data
);
}
}
return
res
.
code
;
});
});
},
},
//值班人员
//值班人员
...
@@ -488,6 +624,8 @@ export default {
...
@@ -488,6 +624,8 @@ export default {
beforeDestroy
()
{
beforeDestroy
()
{
console
.
log
(
"移除window事件"
);
console
.
log
(
"移除window事件"
);
window
.
removeEventListener
(
"click"
,
this
.
barClose
);
window
.
removeEventListener
(
"click"
,
this
.
barClose
);
// 关闭scoket
this
.
ws
.
close
();
},
},
};
};
</
script
>
</
script
>
...
...
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