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
a1ef3006
Commit
a1ef3006
authored
Aug 02, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单详情设备列表添加管道
parent
f41b507e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
26 deletions
+64
-26
TDeviceInfoController.java
...m/zehong/web/controller/device/TDeviceInfoController.java
+2
-3
WorkOrderVo.java
...rc/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
+12
-1
ITDeviceInfoService.java
...n/java/com/zehong/system/service/ITDeviceInfoService.java
+3
-2
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+20
-7
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+18
-5
detail.vue
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
+9
-8
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TDeviceInfoController.java
View file @
a1ef3006
...
...
@@ -3,7 +3,6 @@ package com.zehong.web.controller.device;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
...
...
@@ -55,9 +54,9 @@ public class TDeviceInfoController extends BaseController
* 获取设备下拉树列表
*/
@PutMapping
(
"/deviceTree"
)
public
AjaxResult
deviceTree
(
@RequestBody
List
<
TDeviceInfo
>
deviceInfoList
)
public
AjaxResult
deviceTree
(
@RequestBody
Map
<
Object
,
List
>
param
)
{
return
AjaxResult
.
success
(
tDeviceInfoService
.
buildDeviceTreeSelect
(
deviceInfoList
));
return
AjaxResult
.
success
(
tDeviceInfoService
.
buildDeviceTreeSelect
(
param
));
}
/**
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/WorkOrderVo.java
View file @
a1ef3006
...
...
@@ -3,7 +3,7 @@ package com.zehong.system.domain.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.T
OrderFeedback
;
import
com.zehong.system.domain.T
Pipe
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
@@ -42,6 +42,9 @@ public class WorkOrderVo extends BaseEntity
/** 设备列表 */
private
List
<
TDeviceInfo
>
deviceInfoList
;
/** 管道列表 */
private
List
<
TPipe
>
pipeList
;
/** 反馈信息列表 */
private
List
<
OrderFeedbackVo
>
feedbackList
;
...
...
@@ -156,6 +159,14 @@ public class WorkOrderVo extends BaseEntity
this
.
deviceInfoList
=
deviceInfoList
;
}
public
List
<
TPipe
>
getPipeList
()
{
return
pipeList
;
}
public
void
setPipeList
(
List
<
TPipe
>
pipeList
)
{
this
.
pipeList
=
pipeList
;
}
public
List
<
OrderFeedbackVo
>
getFeedbackList
()
{
return
feedbackList
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITDeviceInfoService.java
View file @
a1ef3006
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
com.zehong.common.core.domain.TreeSelect
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
/**
* 设备信息Service接口
...
...
@@ -34,10 +35,10 @@ public interface ITDeviceInfoService
/**
* 构建前端所需要下拉树结构
*
* @param
deviceInfoList 设备列表
* @param
param 参数集合
* @return 下拉树结构列表
*/
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
List
<
TDeviceInfo
>
deviceInfoList
);
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
Map
<
Object
,
List
>
param
);
/**
* 统计各设备类型的设备总数
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
a1ef3006
...
...
@@ -5,6 +5,7 @@ import java.util.stream.Collectors;
import
com.zehong.common.core.domain.TreeSelect
;
import
com.zehong.common.core.domain.entity.SysDept
;
import
com.zehong.system.domain.TPipe
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
...
...
@@ -51,20 +52,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 构建前端所需要下拉树结构
*
* @param
deviceInfoList 部门列表
* @param
param 参数集合
* @return 下拉树结构列表
*/
@Override
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
List
<
TDeviceInfo
>
deviceInfoList
)
public
List
<
Map
<
Object
,
Object
>>
buildDeviceTreeSelect
(
Map
<
Object
,
List
>
param
)
{
List
<
Map
<
Object
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
Object
,
Object
>>
deviceList
=
param
.
get
(
"key1"
);
List
<
Map
<
Object
,
Object
>>
pipeList
=
param
.
get
(
"key2"
);
for
(
TDeviceInfo
deviceInfo
:
deviceInfoList
)
{
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
deviceInfo
.
getDeviceId
());
map
.
put
(
"label"
,
deviceInfo
.
getDeviceName
());
if
(
deviceList
.
size
()
!=
0
)
{
for
(
Map
<
Object
,
Object
>
temp
:
deviceList
)
{
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
temp
.
get
(
"deviceId"
));
map
.
put
(
"label"
,
temp
.
get
(
"deviceName"
));
list
.
add
(
map
);
}
}
list
.
add
(
map
);
if
(
pipeList
.
size
()
!=
0
){
for
(
Map
<
Object
,
Object
>
temp
:
pipeList
){
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
temp
.
get
(
"pipeId"
));
map
.
put
(
"label"
,
temp
.
get
(
"pipeName"
));
list
.
add
(
map
);
}
}
return
list
;
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
a1ef3006
...
...
@@ -73,6 +73,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
int
resourceId
=
tWorkOrder
.
getResourceId
();
List
<
TDeviceInfo
>
deviceInfoList
=
new
ArrayList
<>();
List
<
TPipe
>
pipeList
=
new
ArrayList
<>();
if
(
"1"
.
equals
(
orderType
)){
...
...
@@ -82,11 +83,22 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
List
<
TInspectionData
>
totalList
=
tInspectionDataMapper
.
selectTInspectionDataList
(
data
);
workOrderVo
.
setDeviceNum
(
totalList
.
size
());
TDeviceInfo
deviceInfo
=
null
;
for
(
TInspectionData
temp
:
totalList
){
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
temp
.
getDeviceId
());
if
(
deviceInfo
!=
null
){
deviceInfoList
.
add
(
deviceInfo
);
if
(
totalList
.
size
()
!=
0
)
{
TDeviceInfo
deviceInfo
=
null
;
TPipe
pipe
=
null
;
for
(
TInspectionData
temp
:
totalList
)
{
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
);
}
}
}
}
...
...
@@ -136,6 +148,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
}
}
workOrderVo
.
setDeviceInfoList
(
deviceInfoList
);
workOrderVo
.
setPipeList
(
pipeList
);
List
<
TOrderFeedback
>
feedbackList
=
tOrderFeedbackMapper
.
selectTOrderFeedbackByOrderId
(
tWorkOrder
.
getOrderId
());
List
<
OrderFeedbackVo
>
feedbackVoList
=
new
ArrayList
<>();
...
...
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
View file @
a1ef3006
...
...
@@ -104,7 +104,7 @@
<el-divider></el-divider>
<!-- 反馈信息 -->
<!--
<div
style=
"width: 100%;font-weight: 600;"
v-if=
"activity.deviceType != '' && activity.deviceType != null"
>
-->
<div
style=
"width: 100%;font-weight: 600;"
>
<div
style=
"width: 100%;font-weight: 600;"
>
<div
style=
"color: #31EAEA;width: 100%;height: 40px;"
>
<ul><li>
反馈信息
</li></ul>
</div>
...
...
@@ -122,7 +122,7 @@
<span
v-if=
"activity.deviceType == 3"
>
流量计
</span>
<span
v-if=
"activity.deviceType == 4"
>
压力表
</span>
</p>
<p>
是否有隐患:
<span
v-if=
"activity.isHiddenDanger == 1"
>
是
</span>
<span
v-if=
"activity.isHiddenDanger == 2"
>
否
</span>
...
...
@@ -141,7 +141,7 @@
<div
style=
"float: left;margin-left: 50px; width: 250px;"
>
<p>
设备名称:
{{
activity
.
deviceName
}}
</p>
<p>
反馈时间:
{{
activity
.
feedbackTime
}}
</p>
</div>
</div>
</div>
...
...
@@ -321,8 +321,8 @@ export default {
}
this
.
showAndHide
=
false
;
}
//$timeline.toggleRowExpansion(row,true)
},
...
...
@@ -349,7 +349,6 @@ export default {
getBasicsInfo
(){
getBasicsInfo
(
this
.
orderId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
console
.
log
(
this
.
form
.
feedbackList
,
"00000000000"
)
this
.
active
=
parseInt
(
response
.
data
.
orderStatus
)
+
1
;
if
(
this
.
form
.
deviceInfoList
.
length
>
0
){
this
.
gaoMap
.
resetMapCenter
([
this
.
form
.
deviceInfoList
[
0
].
longitude
,
this
.
form
.
deviceInfoList
[
0
].
latitude
]);
...
...
@@ -361,8 +360,10 @@ export default {
if
(
this
.
form
.
orderType
==
'1'
)
{
// 获取设备列表树
let
data
=
this
.
form
.
deviceInfoList
;
console
.
log
(
data
,
"===="
);
let
data
=
{
key1
:
this
.
form
.
deviceInfoList
,
key2
:
this
.
form
.
pipeList
};
deviceTree
(
data
).
then
(
response
=>
{
this
.
deviceOptions
[
0
].
childList
=
response
.
data
;
});
...
...
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