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