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
Hide 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;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -58,11 +62,22 @@ public class PipeInterfaceController {
public
DeviceList
selectDeviceData
(){
//调压箱数据查询方法
List
<
DeviceData
>
deviceData
=
iPipeInterfaceService
.
selectDeviceData
();
//查询全部数据方法
List
<
PressureFlow
>
pressureFlows1
=
iPipeInterfaceService
.
selectPressureFlow
(
"1"
);
//最后返回的封装类型
DeviceList
deviceList
=
new
DeviceList
();
//调压箱数据循环
for
(
int
i
=
0
;
i
<
deviceData
.
size
();
i
++){
//查询下级设备数据
List
<
PressureFlow
>
pressureFlows
=
iPipeInterfaceService
.
selectPressureFlow
(
deviceData
.
get
(
i
).
getDeviceId
());
deviceData
.
get
(
i
).
setPressureFlows
(
pressureFlows
);
for
(
int
s
=
0
;
s
<
pressureFlows1
.
size
();
s
++){
//判断调压箱id与下级数据调压箱id是否相等
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
);
}
deviceList
.
setData
(
deviceData
);
...
...
@@ -151,8 +166,6 @@ public class PipeInterfaceController {
pipeDates
.
get
(
i
).
setPressureFlows
(
pressureFlows
);
}
deviceDataList
.
setData
(
pipeDates
);
return
deviceDataList
;
}
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/domain/PressureFlow.java
View file @
031cc36d
...
...
@@ -12,6 +12,16 @@ public class PressureFlow {
private
String
reportTime
;
private
String
deviceId
;
public
String
getDeviceId
()
{
return
deviceId
;
}
public
void
setDeviceId
(
String
deviceId
)
{
this
.
deviceId
=
deviceId
;
}
public
String
getDeviceNo
()
{
return
deviceNo
;
}
...
...
@@ -60,6 +70,7 @@ public class PressureFlow {
", deviceState='"
+
deviceState
+
'\''
+
", deviceNum='"
+
deviceNum
+
'\''
+
", reportTime='"
+
reportTime
+
'\''
+
", deviceId='"
+
deviceId
+
'\''
+
'}'
;
}
}
gassafetyprogress-system/src/main/resources/mapper/system/PipeInterfaceMapper.xml
View file @
031cc36d
...
...
@@ -103,8 +103,8 @@
<!--查询下级设备数据-->
<select
id=
"selectPressureFlow"
parameterType=
"DeviceData"
resultMap=
"PressureFlowResult"
>
select device_model,device_type,create_time from t_relation_device_detail_info
where
relation_device_id=#{deviceId} and
relation_device_type='1'
select device_model,device_type,create_time
,relation_device_id
from t_relation_device_detail_info
where relation_device_type='1'
</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