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
e5fa710a
Commit
e5fa710a
authored
Mar 11, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-3-11 吴卿华 修改首页没有下级数据就不显示
parent
ec9b1ab2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
21 deletions
+111
-21
PipeInterfaceController.java
...ong/web/controller/supervise/PipeInterfaceController.java
+52
-21
PipeInterfaceMapper.java
...in/java/com/zehong/system/mapper/PipeInterfaceMapper.java
+13
-0
IPipeInterfaceService.java
...java/com/zehong/system/service/IPipeInterfaceService.java
+14
-0
PipeInterfaceServiceImpl.java
.../zehong/system/service/impl/PipeInterfaceServiceImpl.java
+21
-0
PipeInterfaceMapper.xml
.../src/main/resources/mapper/system/PipeInterfaceMapper.xml
+11
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/PipeInterfaceController.java
View file @
e5fa710a
...
...
@@ -62,27 +62,30 @@ public class PipeInterfaceController extends BaseController {
public
DeviceList
selectDeviceDatas
(){
//最后返回的封装类型
DeviceList
deviceList
=
new
DeviceList
();
List
<
DeviceData
>
list
=
new
ArrayList
<>();
//调压箱数据查询方法
List
<
DeviceData
>
deviceData
=
iPipeInterfaceService
.
selectDeviceData
();
//查询下级全部数据方法
List
<
PressureFlow
>
pressureFlows1
=
iPipeInterfaceService
.
selectPressureFlows
(
"1"
);
for
(
int
i
=
0
;
i
<
deviceData
.
size
();
i
++){
boolean
bo
=
false
;
for
(
int
s
=
0
;
s
<
pressureFlows1
.
size
();
s
++){
if
(
pressureFlows1
.
get
(
s
).
getDeviceId
().
equals
(
deviceData
.
get
(
i
).
getDeviceId
())){
bo
=
true
;
break
;
}
}
if
(
bo
){
deviceData
.
get
(
i
).
setIconType
(
2
);
list
.
add
(
deviceData
.
get
(
i
));
}
deviceList
.
setData
(
deviceData
);
}
deviceList
.
setData
(
list
);
return
deviceList
;
}
/**
* 查询下级 调压箱/阀门井
* @param deviceId
* @return
*/
@RequestBody
@RequestMapping
(
"/selectPressureFlowList"
)
public
List
<
PressureFlowList
>
selectPressureFlowList
(
String
deviceId
){
List
<
PressureFlowList
>
lists
=
new
ArrayList
<>();
return
lists
;
}
/**
* 查询下级设备关联数据接口
...
...
@@ -308,25 +311,40 @@ public class PipeInterfaceController extends BaseController {
TSiteStationInfoDataList
tSiteStationInfoDataList
=
new
TSiteStationInfoDataList
();
//场站信息查询方法
List
<
TSiteStationInfoData
>
tSiteStationInfoData
=
iPipeInterfaceService
.
selectTSiteStationInfoData
();
//查询下级全部数据方法
List
<
PressureFlow
>
pressureFlows1
=
iPipeInterfaceService
.
selectPressureFlows
(
"2"
);
List
<
TSiteStationInfoData
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
tSiteStationInfoData
.
size
();
i
++){
boolean
bo
=
false
;
for
(
int
s
=
0
;
s
<
pressureFlows1
.
size
();
s
++){
if
(
pressureFlows1
.
get
(
s
).
getDeviceId
()!=
null
){
if
(
pressureFlows1
.
get
(
s
).
getDeviceId
().
equals
(
tSiteStationInfoData
.
get
(
i
).
getSiteStationId
())){
bo
=
true
;
break
;
}
}
}
if
(
bo
){
tSiteStationInfoData
.
get
(
i
).
setIconType
(
4
);
list
.
add
(
tSiteStationInfoData
.
get
(
i
));
}
tSiteStationInfoDataList
.
setData
(
tSiteStationInfoData
);
}
tSiteStationInfoDataList
.
setData
(
list
);
return
tSiteStationInfoDataList
;
}
/**
* 查询场站下级设备关联数据接口
* @param
SiteStation
Id
* @param
device
Id
* @return
*/
@RequestBody
@RequestMapping
(
"/selecttSiteStationInfoData"
)
public
TSiteStationInfoDataList
selecttSiteStationInfoData
(
String
SiteStation
Id
){
public
TSiteStationInfoDataList
selecttSiteStationInfoData
(
String
device
Id
){
TSiteStationInfoDataList
tSiteStationInfoDataList
=
new
TSiteStationInfoDataList
();
List
<
TSiteStationInfoData
>
TSiteStationInfoDataList
=
new
ArrayList
<>();
//查询场站下级设备数据
List
<
PressureFlow
>
pressureFlows
=
iPipeInterfaceService
.
selecttSiteStationInfoDataList
(
SiteStation
Id
);
List
<
PressureFlow
>
pressureFlows
=
iPipeInterfaceService
.
selecttSiteStationInfoDataList
(
device
Id
);
//临时存储压力表数据数组
List
<
PressureFlow
>
pressureList
=
new
ArrayList
<>();
//临时存储流量计数据数组
...
...
@@ -521,12 +539,25 @@ public class PipeInterfaceController extends BaseController {
public
DeviceDataList
selectvalveData
(){
//最后返回的封装类型
DeviceDataList
deviceDataList
=
new
DeviceDataList
();
List
<
DeviceData
>
list
=
new
ArrayList
<>();
//查询阀门井数据
List
<
DeviceData
>
pipeDates
=
iPipeInterfaceService
.
selectvalveData
();
//查询下级全部数据方法
List
<
PressureFlow
>
pressureFlows1
=
iPipeInterfaceService
.
selectPressureFlows
(
"1"
);
for
(
int
i
=
0
;
i
<
pipeDates
.
size
();
i
++){
boolean
bo
=
false
;
for
(
int
s
=
0
;
s
<
pressureFlows1
.
size
();
s
++){
if
(
pressureFlows1
.
get
(
s
).
getDeviceId
().
equals
(
pipeDates
.
get
(
i
).
getDeviceId
())){
bo
=
true
;
break
;
}
}
if
(
bo
){
pipeDates
.
get
(
i
).
setIconType
(
3
);
list
.
add
(
pipeDates
.
get
(
i
));
}
deviceDataList
.
setData
(
pipeDates
);
}
deviceDataList
.
setData
(
list
);
return
deviceDataList
;
}
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/PipeInterfaceMapper.java
View file @
e5fa710a
...
...
@@ -109,4 +109,17 @@ public interface PipeInterfaceMapper {
* @return
*/
List
<
TAssociatedEquipment
>
selectSensingDevice
(
@Param
(
"devId"
)
String
devId
,
@Param
(
"relationDeviceType"
)
String
relationDeviceType
);
/**
* 查询上级设备是否有下级设备
* @param deviceId
*/
int
selectValveWellIsNUll
(
@Param
(
"deviceId"
)
String
deviceId
,
@Param
(
"type"
)
int
type
);
/**
* 查询下级全部数据方法
* @param type
* @return
*/
List
<
PressureFlow
>
selectPressureFlows
(
String
type
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/IPipeInterfaceService.java
View file @
e5fa710a
...
...
@@ -106,4 +106,18 @@ public interface IPipeInterfaceService {
* @return
*/
List
<
TAssociatedEquipment
>
selectSensingDevice
(
String
devId
,
String
relationDeviceType
);
/**
* 查询上级设备是否有下级设备
* @param deviceId
* @return
*/
int
selectValveWellIsNUll
(
String
deviceId
,
int
type
);
/**
* 查询下级全部数据方法
* @param type
* @return
*/
List
<
PressureFlow
>
selectPressureFlows
(
String
type
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/PipeInterfaceServiceImpl.java
View file @
e5fa710a
...
...
@@ -173,4 +173,25 @@ public class PipeInterfaceServiceImpl implements IPipeInterfaceService {
List
<
TAssociatedEquipment
>
tAssociatedEquipments
=
pipeInterfaceMapper
.
selectSensingDevice
(
devId
,
relationDeviceType
);
return
tAssociatedEquipments
;
}
/**
* 查询上级设备是否有下级设备
* @param deviceId
* @return
*/
@Override
public
int
selectValveWellIsNUll
(
String
deviceId
,
int
type
)
{
return
pipeInterfaceMapper
.
selectValveWellIsNUll
(
deviceId
,
type
);
}
/**
* 查询下级全部数据方法
* @param type
* @return
*/
@Override
public
List
<
PressureFlow
>
selectPressureFlows
(
String
type
)
{
List
<
PressureFlow
>
flows
=
pipeInterfaceMapper
.
selectPressureFlows
(
type
);
return
flows
;
}
}
gassafetyprogress-system/src/main/resources/mapper/system/PipeInterfaceMapper.xml
View file @
e5fa710a
...
...
@@ -201,4 +201,15 @@
where a.device_id=#{devId} and b.relation_device_type=#{relationDeviceType}
</select>
<!--查询上级设备是否有下级设备-->
<select
id=
"selectValveWellIsNUll"
resultType=
"java.lang.Integer"
>
select count(relation_device_detail_id) from t_relation_device_detail_info where relation_device_id = #{deviceId} and relation_device_type=#{type}
</select>
<!--查询下级全部数据方法-->
<select
id=
"selectPressureFlows"
resultMap=
"PressureFlowResult"
>
select device_model,device_type,create_time,relation_device_id,iot_no from t_relation_device_detail_info
where relation_device_type=#{type}
</select>
</mapper>
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