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
f26fb104
Commit
f26fb104
authored
Dec 28, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
江苏远睿设备问题修改 gengdidi
parent
df2a27bf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
35 deletions
+74
-35
TDeviceReportData.java
...main/java/com/zehong/system/domain/TDeviceReportData.java
+11
-0
DeviceReportDataVo.java
.../java/com/zehong/system/domain/vo/DeviceReportDataVo.java
+10
-0
TDeviceReportDataMapper.xml
.../main/resources/mapper/system/TDeviceReportDataMapper.xml
+4
-1
index.vue
...afety-web/src/views/dataMonitoring/realtimeData/index.vue
+6
-1
index.vue
...ety-web/src/views/dataMonitoring/realtimedetail/index.vue
+37
-32
index.vue
gassafety-web/src/views/dataMonitoring/reportData/index.vue
+6
-1
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/TDeviceReportData.java
View file @
f26fb104
...
@@ -66,6 +66,9 @@ public class TDeviceReportData extends BaseEntity
...
@@ -66,6 +66,9 @@ public class TDeviceReportData extends BaseEntity
@Excel
(
name
=
"设备状态"
)
@Excel
(
name
=
"设备状态"
)
private
String
deviceStatus
;
private
String
deviceStatus
;
/**上报设备名称*/
private
String
reportDeviceName
;
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
{
{
this
.
deviceReportDataId
=
deviceReportDataId
;
this
.
deviceReportDataId
=
deviceReportDataId
;
...
@@ -175,6 +178,14 @@ public class TDeviceReportData extends BaseEntity
...
@@ -175,6 +178,14 @@ public class TDeviceReportData extends BaseEntity
return
deviceStatus
;
return
deviceStatus
;
}
}
public
String
getReportDeviceName
()
{
return
reportDeviceName
;
}
public
void
setReportDeviceName
(
String
reportDeviceName
)
{
this
.
reportDeviceName
=
reportDeviceName
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/DeviceReportDataVo.java
View file @
f26fb104
...
@@ -96,6 +96,9 @@ public class DeviceReportDataVo extends BaseEntity
...
@@ -96,6 +96,9 @@ public class DeviceReportDataVo extends BaseEntity
@Excel
(
name
=
"设备状态"
)
@Excel
(
name
=
"设备状态"
)
private
String
deviceStatus
;
private
String
deviceStatus
;
/**上报设备名称*/
private
String
reportDeviceName
;
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
{
{
this
.
deviceReportDataId
=
deviceReportDataId
;
this
.
deviceReportDataId
=
deviceReportDataId
;
...
@@ -271,4 +274,11 @@ public class DeviceReportDataVo extends BaseEntity
...
@@ -271,4 +274,11 @@ public class DeviceReportDataVo extends BaseEntity
return
deviceStatus
;
return
deviceStatus
;
}
}
public
String
getReportDeviceName
()
{
return
reportDeviceName
;
}
public
void
setReportDeviceName
(
String
reportDeviceName
)
{
this
.
reportDeviceName
=
reportDeviceName
;
}
}
}
gassafety-system/src/main/resources/mapper/system/TDeviceReportDataMapper.xml
View file @
f26fb104
...
@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"reportDeviceName"
column=
"report_device_name"
></result>
</resultMap>
</resultMap>
<sql
id=
"selectTDeviceReportDataVo"
>
<sql
id=
"selectTDeviceReportDataVo"
>
...
@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.communication_status,
t.communication_status,
t.create_time,
t.create_time,
t.update_time,
t.update_time,
t.device_status AS report_device_name,
d.device_id,
d.device_id,
d.device_name,
d.device_name,
d.device_code,
d.device_code,
...
@@ -104,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -104,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t.communication_status,
t.communication_status,
t.create_time,
t.create_time,
t.update_time,
t.update_time,
t.device_status AS report_device_name,
d.device_id,
d.device_id,
d.device_name,
d.device_name,
d.device_code,
d.device_code,
...
@@ -146,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -146,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</select>
<select
id=
"selectTDeviceReportDataByDeviceNum"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
<select
id=
"selectTDeviceReportDataByDeviceNum"
parameterType=
"String"
resultMap=
"TDeviceReportDataResult"
>
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
select report_time, device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, communication_status, device_status, create_time, update_time
,device_status AS reportDeviceName
from t_device_report_data
from t_device_report_data
where device_num = #{deviceNum}
where device_num = #{deviceNum}
ORDER BY create_time DESC
ORDER BY create_time DESC
...
...
gassafety-web/src/views/dataMonitoring/realtimeData/index.vue
View file @
f26fb104
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<el-table-column
label=
"标况累计量(m³)"
align=
"center"
prop=
"standardConditionAccumulation"
/>
<el-table-column
label=
"标况累计量(m³)"
align=
"center"
prop=
"standardConditionAccumulation"
/>
<el-table-column
label=
"工况累计量(m³)"
align=
"center"
prop=
"workingConditionAccumulation"
/>
<el-table-column
label=
"工况累计量(m³)"
align=
"center"
prop=
"workingConditionAccumulation"
/>
<el-table-column
label=
"剩余量(m³)"
align=
"center"
prop=
"residualQuantity"
/>
<el-table-column
label=
"剩余量(m³)"
align=
"center"
prop=
"residualQuantity"
/>
<el-table-column
label=
"标况流量(m³/h)"
align=
"center"
prop=
"standardConditionFlow"
/>
<el-table-column
label=
"标况流量(m³/h)"
align=
"center"
prop=
"standardConditionFlow"
width=
"150px"
/>
<el-table-column
label=
"工况流量(m³/h)"
align=
"center"
prop=
"workingConditionFlow"
/>
<el-table-column
label=
"工况流量(m³/h)"
align=
"center"
prop=
"workingConditionFlow"
/>
<el-table-column
label=
"温度(℃)"
align=
"center"
prop=
"temperature"
/>
<el-table-column
label=
"温度(℃)"
align=
"center"
prop=
"temperature"
/>
<el-table-column
label=
"压力(KPa)"
align=
"center"
prop=
"pressure"
/>
<el-table-column
label=
"压力(KPa)"
align=
"center"
prop=
"pressure"
/>
...
@@ -136,6 +136,11 @@ export default {
...
@@ -136,6 +136,11 @@ export default {
this
.
loading
=
true
;
this
.
loading
=
true
;
console
.
log
();
console
.
log
();
realtimeData
(
this
.
queryParams
).
then
(
response
=>
{
realtimeData
(
this
.
queryParams
).
then
(
response
=>
{
for
(
var
i
=
0
;
i
<
response
.
rows
.
length
;
i
++
){
if
(
"江苏远睿气体腰轮流量计"
==
response
.
rows
[
i
].
reportDeviceName
){
response
.
rows
[
i
].
standardConditionFlow
+=
" (Nm³ /h)"
;
}
}
this
.
dataList
=
response
.
rows
;
this
.
dataList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
...
...
gassafety-web/src/views/dataMonitoring/realtimedetail/index.vue
View file @
f26fb104
...
@@ -255,7 +255,7 @@
...
@@ -255,7 +255,7 @@
boundaryGap
:
false
,
//控制日期是否在中间显示
boundaryGap
:
false
,
//控制日期是否在中间显示
axisLabel
:
{
axisLabel
:
{
show
:
true
,
//是否显示日期
show
:
true
,
//是否显示日期
interval
:
'auto'
,
//强制显示全部
interval
:
'auto'
,
//强制显示全部
rotate
:
40
,
//倾斜的角度
rotate
:
40
,
//倾斜的角度
textStyle
:
{
textStyle
:
{
color
:
'#000'
,
//日期的颜色
color
:
'#000'
,
//日期的颜色
...
@@ -351,7 +351,7 @@
...
@@ -351,7 +351,7 @@
boundaryGap
:
false
,
//控制日期是否在中间显示
boundaryGap
:
false
,
//控制日期是否在中间显示
axisLabel
:
{
axisLabel
:
{
show
:
true
,
//是否显示日期
show
:
true
,
//是否显示日期
interval
:
'auto'
,
//强制显示全部
interval
:
'auto'
,
//强制显示全部
rotate
:
40
,
//倾斜的角度
rotate
:
40
,
//倾斜的角度
textStyle
:
{
textStyle
:
{
color
:
'#000'
,
//日期的颜色
color
:
'#000'
,
//日期的颜色
...
@@ -443,7 +443,7 @@
...
@@ -443,7 +443,7 @@
boundaryGap
:
false
,
//控制日期是否在中间显示
boundaryGap
:
false
,
//控制日期是否在中间显示
axisLabel
:
{
axisLabel
:
{
show
:
true
,
//是否显示日期
show
:
true
,
//是否显示日期
// interval: 0, //强制显示全部
// interval: 0, //强制显示全部
rotate
:
40
,
//倾斜的角度
rotate
:
40
,
//倾斜的角度
textStyle
:
{
textStyle
:
{
color
:
'#000'
,
//日期的颜色
color
:
'#000'
,
//日期的颜色
...
@@ -517,7 +517,7 @@
...
@@ -517,7 +517,7 @@
boundaryGap
:
false
,
//控制日期是否在中间显示
boundaryGap
:
false
,
//控制日期是否在中间显示
axisLabel
:
{
axisLabel
:
{
show
:
true
,
//是否显示日期
show
:
true
,
//是否显示日期
// interval: 0, //强制显示全部
// interval: 0, //强制显示全部
rotate
:
40
,
//倾斜的角度
rotate
:
40
,
//倾斜的角度
textStyle
:
{
textStyle
:
{
color
:
'#000'
,
//日期的颜色
color
:
'#000'
,
//日期的颜色
...
@@ -584,12 +584,16 @@
...
@@ -584,12 +584,16 @@
getData
()
{
getData
()
{
getData
(
this
.
deviceId
).
then
(
response
=>
{
getData
(
this
.
deviceId
).
then
(
response
=>
{
if
(
"江苏远睿气体腰轮流量计"
==
response
.
data
.
reportDeviceName
){
response
.
data
.
standardConditionFlow
+=
" (Nm³ /h)"
;
}
const
{
deviceName
,
deviceCode
,
deviceType
,
standardConditionAccumulation
,
const
{
deviceName
,
deviceCode
,
deviceType
,
standardConditionAccumulation
,
workingConditionAccumulation
,
residualQuantity
,
standardConditionFlow
,
workingConditionFlow
,
temperature
,
pressure
,
createTime
,
deviceStatus
}
=
response
.
data
;
workingConditionAccumulation
,
residualQuantity
,
standardConditionFlow
,
workingConditionFlow
,
temperature
,
pressure
,
createTime
,
deviceStatus
}
=
response
.
data
;
const
obj1
=
{
deviceName
,
deviceCode
,
deviceType
,
standardConditionAccumulation
};
const
obj1
=
{
deviceName
,
deviceCode
,
deviceType
,
standardConditionAccumulation
};
const
obj2
=
{
workingConditionAccumulation
,
residualQuantity
,
standardConditionFlow
,
workingConditionFlow
};
const
obj2
=
{
workingConditionAccumulation
,
residualQuantity
,
standardConditionFlow
,
workingConditionFlow
};
const
obj3
=
{
temperature
,
pressure
,
createTime
,
deviceStatus
};
const
obj3
=
{
temperature
,
pressure
,
createTime
,
deviceStatus
};
this
.
dataListdetail1
.
push
(
obj1
);
this
.
dataListdetail1
.
push
(
obj1
);
this
.
dataListdetail2
.
push
(
obj2
);
this
.
dataListdetail2
.
push
(
obj2
);
this
.
dataListdetail3
.
push
(
obj3
);
this
.
dataListdetail3
.
push
(
obj3
);
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
...
@@ -608,8 +612,8 @@
...
@@ -608,8 +612,8 @@
if
(
"4"
==
deviceType
){
if
(
"4"
==
deviceType
){
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
PRESSUREGAGE
,
this
.
form
,
"false"
)
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
PRESSUREGAGE
,
this
.
form
,
"false"
)
}
}
var
getData1
=
[];
var
getData1
=
[];
var
getData2
=
[];
var
getData2
=
[];
...
@@ -619,17 +623,18 @@
...
@@ -619,17 +623,18 @@
var
getData6
=
[];
var
getData6
=
[];
var
getData7
=
[];
var
getData7
=
[];
//先进行赋值
//先进行赋值
for
(
let
i
=
0
;
i
<
this
.
form
.
deviceReportDataList
.
length
;
i
++
)
{
if
(
null
!=
this
.
form
.
deviceReportDataList
)
{
getData1
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
standardConditionFlow
)
for
(
let
i
=
0
;
i
<
this
.
form
.
deviceReportDataList
.
length
;
i
++
)
{
getData2
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
working
ConditionFlow
)
getData1
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
standard
ConditionFlow
)
getData3
.
push
(
this
.
dateFtt
(
"hh:mm:ss"
,
new
Date
(
this
.
form
.
deviceReportDataList
[
i
].
createTime
))
)
getData2
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
workingConditionFlow
)
getData4
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
standardConditionAccumulation
)
getData3
.
push
(
this
.
dateFtt
(
"hh:mm:ss"
,
new
Date
(
this
.
form
.
deviceReportDataList
[
i
].
createTime
))
)
getData5
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
working
ConditionAccumulation
)
getData4
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
standard
ConditionAccumulation
)
getData6
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
temperature
)
getData5
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
workingConditionAccumulation
)
getData7
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
press
ure
)
getData6
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
temperat
ure
)
getData7
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
pressure
)
}
}
}
this
.
initData
(
getData1
,
getData2
,
getData3
);
this
.
initData
(
getData1
,
getData2
,
getData3
);
this
.
drawPieChart
(
getData4
,
getData5
,
getData3
);
this
.
drawPieChart
(
getData4
,
getData5
,
getData3
);
this
.
main3
(
getData6
,
getData3
);
this
.
main3
(
getData6
,
getData3
);
...
@@ -657,22 +662,22 @@
...
@@ -657,22 +662,22 @@
}
}
});
});
},
},
dateFtt
(
fmt
,
date
)
{
//author: meizz
dateFtt
(
fmt
,
date
)
{
//author: meizz
var
o
=
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//月份
"M+"
:
date
.
getMonth
()
+
1
,
//月份
"d+"
:
date
.
getDate
(),
//日
"d+"
:
date
.
getDate
(),
//日
"h+"
:
date
.
getHours
(),
//小时
"h+"
:
date
.
getHours
(),
//小时
"m+"
:
date
.
getMinutes
(),
//分
"m+"
:
date
.
getMinutes
(),
//分
"s+"
:
date
.
getSeconds
(),
//秒
"s+"
:
date
.
getSeconds
(),
//秒
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//季度
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//季度
"S"
:
date
.
getMilliseconds
()
//毫秒
"S"
:
date
.
getMilliseconds
()
//毫秒
};
};
if
(
/
(
y+
)
/
.
test
(
fmt
))
if
(
/
(
y+
)
/
.
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
return
fmt
;
return
fmt
;
}
}
}
}
...
...
gassafety-web/src/views/dataMonitoring/reportData/index.vue
View file @
f26fb104
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<el-table-column
label=
"标况累计量(m³)"
align=
"center"
prop=
"standardConditionAccumulation"
/>
<el-table-column
label=
"标况累计量(m³)"
align=
"center"
prop=
"standardConditionAccumulation"
/>
<el-table-column
label=
"工况累计量(m³)"
align=
"center"
prop=
"workingConditionAccumulation"
/>
<el-table-column
label=
"工况累计量(m³)"
align=
"center"
prop=
"workingConditionAccumulation"
/>
<el-table-column
label=
"剩余量(m³)"
align=
"center"
prop=
"residualQuantity"
/>
<el-table-column
label=
"剩余量(m³)"
align=
"center"
prop=
"residualQuantity"
/>
<el-table-column
label=
"标况流量(m³/h)"
align=
"center"
prop=
"standardConditionFlow"
/>
<el-table-column
label=
"标况流量(m³/h)"
align=
"center"
prop=
"standardConditionFlow"
width=
"150px"
/>
<el-table-column
label=
"工况流量(m³/h)"
align=
"center"
prop=
"workingConditionFlow"
/>
<el-table-column
label=
"工况流量(m³/h)"
align=
"center"
prop=
"workingConditionFlow"
/>
<el-table-column
label=
"温度(℃)"
align=
"center"
prop=
"temperature"
/>
<el-table-column
label=
"温度(℃)"
align=
"center"
prop=
"temperature"
/>
<el-table-column
label=
"压力(KPa)"
align=
"center"
prop=
"pressure"
/>
<el-table-column
label=
"压力(KPa)"
align=
"center"
prop=
"pressure"
/>
...
@@ -146,6 +146,11 @@ export default {
...
@@ -146,6 +146,11 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listData
(
this
.
queryParams
).
then
(
response
=>
{
listData
(
this
.
queryParams
).
then
(
response
=>
{
for
(
var
i
=
0
;
i
<
response
.
rows
.
length
;
i
++
){
if
(
"江苏远睿气体腰轮流量计"
==
response
.
rows
[
i
].
reportDeviceName
){
response
.
rows
[
i
].
standardConditionFlow
+=
" (Nm³ /h)"
;
}
}
this
.
dataList
=
response
.
rows
;
this
.
dataList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
...
...
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