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
47d9311a
Commit
47d9311a
authored
Aug 10, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时数据、历史数据接口调整,设备巡检详情接口调整
parent
ea9efa47
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
634 additions
and
589 deletions
+634
-589
TDeviceReportDataController.java
...ontroller/dataMonitoring/TDeviceReportDataController.java
+10
-7
TInspectionPlanController.java
...ontroller/deviceInspection/TInspectionPlanController.java
+1
-1
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
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
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
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
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/dataMonitoring/TDeviceReportDataController.java
View file @
47d9311a
package
com
.
zehong
.
web
.
controller
.
dataMonitoring
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -38,10 +41,10 @@ public class TDeviceReportDataController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDeviceReportData
tDeviceReportData
)
public
TableDataInfo
list
(
DeviceReportDataForm
deviceReportDataForm
)
{
startPage
();
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
return
getDataTable
(
list
);
}
...
...
@@ -50,10 +53,10 @@ public class TDeviceReportDataController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:realtimeList')"
)
@GetMapping
(
"/realtimeList"
)
public
TableDataInfo
realtimeList
(
TDeviceReportData
tDeviceReportData
)
public
TableDataInfo
realtimeList
(
DeviceReportDataForm
deviceReportDataForm
)
{
startPage
();
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectRealtimeDataList
(
deviceReportDataForm
);
return
getDataTable
(
list
);
}
...
...
@@ -63,10 +66,10 @@ public class TDeviceReportDataController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('dataMonitoring:reportData:export')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDeviceReportData
tDeviceReportData
)
public
AjaxResult
export
(
DeviceReportDataForm
deviceReportDataForm
)
{
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
ExcelUtil
<
TDeviceReportData
>
util
=
new
ExcelUtil
<
TDeviceReportData
>(
TDeviceReportData
.
class
);
List
<
DeviceReportDataVo
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
deviceReportDataForm
);
ExcelUtil
<
DeviceReportDataVo
>
util
=
new
ExcelUtil
<
DeviceReportDataVo
>(
DeviceReportDataVo
.
class
);
return
util
.
exportExcel
(
list
,
"设备监控数据"
);
}
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/deviceInspection/TInspectionPlanController.java
View file @
47d9311a
...
...
@@ -68,7 +68,7 @@ public class TInspectionPlanController extends BaseController
@GetMapping
(
value
=
"/{planId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"planId"
)
int
planId
)
throws
Exception
{
TInspectionPlan
plan
=
null
;
InspectionPlanVo
plan
=
null
;
try
{
plan
=
tInspectionPlanService
.
selectTInspectionPlanById
(
planId
);
}
catch
(
Exception
e
)
{
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TDeviceReportData.java
View file @
47d9311a
...
...
@@ -23,7 +23,7 @@ public class TDeviceReportData extends BaseEntity
/** 设备id */
@Excel
(
name
=
"设备id"
)
private
Lo
ng
deviceNum
;
private
Stri
ng
deviceNum
;
/** 标况累计量 */
@Excel
(
name
=
"标况累计量"
)
...
...
@@ -54,8 +54,8 @@ public class TDeviceReportData extends BaseEntity
private
BigDecimal
pressure
;
/** 上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd
HH:mm:ss
"
)
private
Date
reportTime
;
/** 通讯状态 */
...
...
@@ -75,12 +75,12 @@ public class TDeviceReportData extends BaseEntity
{
return
deviceReportDataId
;
}
public
void
setDeviceNum
(
Long
deviceNum
)
public
void
setDeviceNum
(
String
deviceNum
)
{
this
.
deviceNum
=
deviceNum
;
}
public
Long
getDeviceNum
()
public
String
getDeviceNum
()
{
return
deviceNum
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/form/DeviceAlarmForm.java
0 → 100644
View file @
47d9311a
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 @
47d9311a
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/DeviceReportDataVo.java
0 → 100644
View file @
47d9311a
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 @
47d9311a
...
...
@@ -40,6 +40,13 @@ public class InspectionPlanVo extends BaseEntity
/** 工单id */
private
String
orderId
;
/** 指定执行人员姓名 */
private
String
appointInspectorName
;
/** 下发时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
allotTime
;
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
startTime
;
...
...
@@ -122,6 +129,22 @@ public class InspectionPlanVo extends BaseEntity
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
)
{
this
.
startTime
=
startTime
;
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TDeviceReportDataMapper.java
View file @
47d9311a
...
...
@@ -2,6 +2,8 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
/**
* 设备监控Mapper接口
...
...
@@ -17,15 +19,23 @@ public interface TDeviceReportDataMapper
* @param deviceReportDataId 设备监控ID
* @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 设备监控集合
*/
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 @
47d9311a
...
...
@@ -2,6 +2,8 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.domain.form.DeviceReportDataForm
;
import
com.zehong.system.domain.vo.DeviceReportDataVo
;
/**
* 设备监控Service接口
...
...
@@ -17,15 +19,23 @@ public interface ITDeviceReportDataService
* @param deviceReportDataId 设备监控ID
* @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 设备监控集合
*/
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 @
47d9311a
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.domain.form.InspectionPlanForm
;
import
com.zehong.system.domain.vo.InspectionPlanVo
;
/**
* 巡检计划Service接口
...
...
@@ -18,7 +19,7 @@ public interface ITInspectionPlanService
* @param planId 巡检计划ID
* @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/TDeviceReportDataServiceImpl.java
View file @
47d9311a
...
...
@@ -2,6 +2,8 @@ package com.zehong.system.service.impl;
import
java.util.List
;
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.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceReportDataMapper
;
...
...
@@ -27,7 +29,7 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
* @return 设备监控
*/
@Override
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
)
public
DeviceReportDataVo
selectTDeviceReportDataById
(
Long
deviceReportDataId
)
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataById
(
deviceReportDataId
);
}
...
...
@@ -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 设备监控
*/
@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 @
47d9311a
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
com.zehong.common.core.domain.entity.SysUser
;
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.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.stereotype.Service
;
import
com.zehong.system.mapper.TInspectionPlanMapper
;
import
com.zehong.system.domain.TInspectionPlan
;
import
com.zehong.system.service.ITInspectionPlanService
;
/**
...
...
@@ -28,6 +29,14 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
private
TInspectionPlanMapper
tInspectionPlanMapper
;
@Autowired
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
* @return 巡检计划
*/
@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 @
47d9311a
...
...
@@ -4,9 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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=
"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=
"workingConditionAccumulation"
column=
"working_condition_accumulation"
/>
<result
property=
"residualQuantity"
column=
"residual_quantity"
/>
...
...
@@ -22,28 +26,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<select
id=
"selectTDeviceReportDataList"
parameterType=
"TDeviceReportData"
resultMap=
"TDeviceReportDataResult"
>
<include
refid=
"selectTDeviceReportDataVo"
/>
<select
id=
"selectTDeviceReportDataList"
parameterType=
"DeviceReportDataForm"
resultMap=
"TDeviceReportDataResult"
>
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>
<if
test=
"deviceNum != null "
>
and device_num = #{deviceNum}
</if>
<if
test=
"standardConditionAccumulation != null "
>
and standard_condition_accumulation = #{standardConditionAccumulation}
</if>
<if
test=
"workingConditionAccumulation != null "
>
and working_condition_accumulation = #{workingConditionAccumulation}
</if>
<if
test=
"residualQuantity != null "
>
and residual_quantity = #{residualQuantity}
</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=
"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>
</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"
>
<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}
</select>
...
...
gassafety-web/src/views/dataMonitoring/realtimeData/index.vue
View file @
47d9311a
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/dataMonitoring/reportData/index.vue
View file @
47d9311a
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/deviceInspection/inspectionPlan/index.vue
View file @
47d9311a
...
...
@@ -89,8 +89,8 @@
<
el
-
table
-
column
label
=
"计划描述"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
prop
=
"planStatus"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
if
=
"scope.row.planStatus == 0"
>
未
下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 1"
>
已
下发
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 0"
>
未
生成工单
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 1"
>
已
生成工单
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 2"
>
进行中
<
/span
>
<
span
v
-
if
=
"scope.row.planStatus == 3"
>
已完成
<
/span
>
<
/template
>
...
...
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