Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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-progress
Commits
031cc36d
Commit
031cc36d
authored
Feb 28, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-2-28 吴卿华
parent
fac29628
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
PipeInterfaceController.java
...ong/web/controller/supervise/PipeInterfaceController.java
+18
-5
PressureFlow.java
.../src/main/java/com/zehong/system/domain/PressureFlow.java
+11
-0
PipeInterfaceMapper.xml
.../src/main/resources/mapper/system/PipeInterfaceMapper.xml
+2
-2
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/PipeInterfaceController.java
View file @
031cc36d
...
@@ -6,6 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -6,6 +6,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -58,11 +62,22 @@ public class PipeInterfaceController {
...
@@ -58,11 +62,22 @@ public class PipeInterfaceController {
public
DeviceList
selectDeviceData
(){
public
DeviceList
selectDeviceData
(){
//调压箱数据查询方法
//调压箱数据查询方法
List
<
DeviceData
>
deviceData
=
iPipeInterfaceService
.
selectDeviceData
();
List
<
DeviceData
>
deviceData
=
iPipeInterfaceService
.
selectDeviceData
();
//查询全部数据方法
List
<
PressureFlow
>
pressureFlows1
=
iPipeInterfaceService
.
selectPressureFlow
(
"1"
);
//最后返回的封装类型
DeviceList
deviceList
=
new
DeviceList
();
DeviceList
deviceList
=
new
DeviceList
();
//调压箱数据循环
for
(
int
i
=
0
;
i
<
deviceData
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
deviceData
.
size
();
i
++){
//查询下级设备数据
for
(
int
s
=
0
;
s
<
pressureFlows1
.
size
();
s
++){
List
<
PressureFlow
>
pressureFlows
=
iPipeInterfaceService
.
selectPressureFlow
(
deviceData
.
get
(
i
).
getDeviceId
());
//判断调压箱id与下级数据调压箱id是否相等
deviceData
.
get
(
i
).
setPressureFlows
(
pressureFlows
);
if
(
pressureFlows1
.
get
(
s
).
getDeviceId
()==
deviceData
.
get
(
i
).
getDeviceId
()){
//临时存下级数据id
List
<
PressureFlow
>
pressList
=
new
ArrayList
<>();
//下级数据添加进临时存储数据的数组中
pressList
.
add
(
pressureFlows1
.
get
(
s
));
deviceData
.
get
(
i
).
setPressureFlows
(
pressList
);
}
}
deviceData
.
get
(
i
).
setIconType
(
2
);
deviceData
.
get
(
i
).
setIconType
(
2
);
}
}
deviceList
.
setData
(
deviceData
);
deviceList
.
setData
(
deviceData
);
...
@@ -151,8 +166,6 @@ public class PipeInterfaceController {
...
@@ -151,8 +166,6 @@ public class PipeInterfaceController {
pipeDates
.
get
(
i
).
setPressureFlows
(
pressureFlows
);
pipeDates
.
get
(
i
).
setPressureFlows
(
pressureFlows
);
}
}
deviceDataList
.
setData
(
pipeDates
);
deviceDataList
.
setData
(
pipeDates
);
return
deviceDataList
;
return
deviceDataList
;
}
}
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/domain/PressureFlow.java
View file @
031cc36d
...
@@ -12,6 +12,16 @@ public class PressureFlow {
...
@@ -12,6 +12,16 @@ public class PressureFlow {
private
String
reportTime
;
private
String
reportTime
;
private
String
deviceId
;
public
String
getDeviceId
()
{
return
deviceId
;
}
public
void
setDeviceId
(
String
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
String
getDeviceNo
()
{
public
String
getDeviceNo
()
{
return
deviceNo
;
return
deviceNo
;
}
}
...
@@ -60,6 +70,7 @@ public class PressureFlow {
...
@@ -60,6 +70,7 @@ public class PressureFlow {
", deviceState='"
+
deviceState
+
'\''
+
", deviceState='"
+
deviceState
+
'\''
+
", deviceNum='"
+
deviceNum
+
'\''
+
", deviceNum='"
+
deviceNum
+
'\''
+
", reportTime='"
+
reportTime
+
'\''
+
", reportTime='"
+
reportTime
+
'\''
+
", deviceId='"
+
deviceId
+
'\''
+
'}'
;
'}'
;
}
}
}
}
gassafetyprogress-system/src/main/resources/mapper/system/PipeInterfaceMapper.xml
View file @
031cc36d
...
@@ -103,8 +103,8 @@
...
@@ -103,8 +103,8 @@
<!--查询下级设备数据-->
<!--查询下级设备数据-->
<select
id=
"selectPressureFlow"
parameterType=
"DeviceData"
resultMap=
"PressureFlowResult"
>
<select
id=
"selectPressureFlow"
parameterType=
"DeviceData"
resultMap=
"PressureFlowResult"
>
select device_model,device_type,create_time from t_relation_device_detail_info
select device_model,device_type,create_time
,relation_device_id
from t_relation_device_detail_info
where
relation_device_id=#{deviceId} and
relation_device_type='1'
where relation_device_type='1'
</select>
</select>
<!--场站信息查询方法-->
<!--场站信息查询方法-->
...
...
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