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
844789d2
Commit
844789d2
authored
Aug 23, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图隐患信息列表接口调整
parent
7a637053
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
125 additions
and
27 deletions
+125
-27
THiddenTroubleController.java
...b/controller/riskManagement/THiddenTroubleController.java
+1
-1
HiddenTroubleVo.java
...ain/java/com/zehong/system/domain/vo/HiddenTroubleVo.java
+4
-3
ITHiddenTroubleService.java
...ava/com/zehong/system/service/ITHiddenTroubleService.java
+1
-1
THiddenTroubleServiceImpl.java
...zehong/system/service/impl/THiddenTroubleServiceImpl.java
+115
-7
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+1
-1
index.vue
...fety-web/src/views/riskManagement/hiddenTrouble/index.vue
+3
-14
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/riskManagement/THiddenTroubleController.java
View file @
844789d2
...
...
@@ -55,7 +55,7 @@ public class THiddenTroubleController extends BaseController
@GetMapping
(
"/getMapHiddenTroublelist"
)
public
AjaxResult
getMapHiddenTroublelist
()
{
List
<
THiddenTrouble
>
list
=
tHiddenTroubleService
.
getMapTHiddenTroubleList
();
List
<
HiddenTroubleVo
>
list
=
tHiddenTroubleService
.
getMapTHiddenTroubleList
();
return
AjaxResult
.
success
(
list
);
}
...
...
gassafety-system/src/main/java/com/zehong/system/domain/vo/HiddenTroubleVo.java
View file @
844789d2
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.domain.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.system.domain.TOrderFeedback
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
@@ -45,7 +46,7 @@ public class HiddenTroubleVo extends BaseEntity
private
Date
allotTime
;
/** 反馈信息列表 */
private
List
<
OrderFeedbackVo
>
feedbackList
;
private
List
<
TOrderFeedback
>
feedbackList
;
/** 设备id */
@Excel
(
name
=
"设备id"
)
...
...
@@ -165,11 +166,11 @@ public class HiddenTroubleVo extends BaseEntity
this
.
allotTime
=
allotTime
;
}
public
List
<
OrderFeedbackVo
>
getFeedbackList
()
{
public
List
<
TOrderFeedback
>
getFeedbackList
()
{
return
feedbackList
;
}
public
void
setFeedbackList
(
List
<
OrderFeedbackVo
>
feedbackList
)
{
public
void
setFeedbackList
(
List
<
TOrderFeedback
>
feedbackList
)
{
this
.
feedbackList
=
feedbackList
;
}
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITHiddenTroubleService.java
View file @
844789d2
...
...
@@ -34,7 +34,7 @@ public interface ITHiddenTroubleService
* @param
* @return 隐患信息集合
*/
public
List
<
THiddenTrouble
>
getMapTHiddenTroubleList
();
public
List
<
HiddenTroubleVo
>
getMapTHiddenTroubleList
();
/**
* 新增隐患信息
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/THiddenTroubleServiceImpl.java
View file @
844789d2
...
...
@@ -3,16 +3,17 @@ package com.zehong.system.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.
system.domain.TDeviceInfo
;
import
com.zehong.system.domain.
TPipe
;
import
com.zehong.
common.utils.StringUtils
;
import
com.zehong.system.domain.
*
;
import
com.zehong.system.domain.vo.HiddenTroubleVo
;
import
com.zehong.system.mapper.*
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.domain.THiddenTrouble
;
import
com.zehong.system.service.ITHiddenTroubleService
;
/**
...
...
@@ -36,6 +37,8 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
private
TWorkOrderMapper
tWorkOrderMapper
;
@Autowired
private
TOrderFeedbackMapper
tOrderFeedbackMapper
;
@Autowired
private
ISysDictTypeService
iSysDictTypeService
;
/**
* 查询隐患信息
...
...
@@ -44,12 +47,42 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息
*/
@Override
public
HiddenTroubleVo
selectTHiddenTroubleById
(
int
troubleId
)
public
HiddenTroubleVo
selectTHiddenTroubleById
(
int
troubleId
)
throws
Exception
{
HiddenTroubleVo
hiddenTroubleVo
=
new
HiddenTroubleVo
();
THiddenTrouble
tHiddenTrouble
=
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
troubleId
);
BeanUtils
.
copyProperties
(
tHiddenTrouble
,
hiddenTroubleVo
);
SysUser
sysUser
=
sysUserMapper
.
selectUserById
(
tHiddenTrouble
.
getReportMan
());
hiddenTroubleVo
.
setReportManName
(
sysUser
.
getNickName
());
if
(
StringUtils
.
isNotEmpty
(
tHiddenTrouble
.
getTroubleType
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
tHiddenTrouble
.
getTroubleType
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleType
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
tHiddenTrouble
.
getTroubleLevel
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_level"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
tHiddenTrouble
.
getTroubleLevel
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleLevel
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
tHiddenTrouble
.
getDealStatus
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_deal_status"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
tHiddenTrouble
.
getDealStatus
()
==
null
){
hiddenTroubleVo
.
setDealStatus
(
"暂未处理"
);
}
else
if
(
tHiddenTrouble
.
getDealStatus
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setDealStatus
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
tHiddenTrouble
.
getDeviceId
()
!=
null
){
if
(
"0"
.
equals
(
tHiddenTrouble
.
getDeviceType
())){
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
tHiddenTrouble
.
getDeviceId
());
...
...
@@ -59,6 +92,20 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
hiddenTroubleVo
.
setDeviceName
(
device
.
getDeviceName
());
}
}
if
(
tHiddenTrouble
.
getOrderId
()
!=
null
&&
!
""
.
equals
(
tHiddenTrouble
.
getOrderId
()))
{
TWorkOrder
tWorkOrder
=
tWorkOrderMapper
.
selectTWorkOrderById
(
tHiddenTrouble
.
getOrderId
());
hiddenTroubleVo
.
setAllotTime
(
tWorkOrder
.
getAllotTime
());
// 获取巡检员姓名
SysUser
appointInspector
=
sysUserMapper
.
selectUserById
(
tWorkOrder
.
getAppointInspector
());
hiddenTroubleVo
.
setAppointInspectorName
(
appointInspector
.
getNickName
());
List
<
TOrderFeedback
>
orderFeedbackList
=
tOrderFeedbackMapper
.
selectTOrderFeedbackByOrderId
(
tHiddenTrouble
.
getOrderId
());
if
(
orderFeedbackList
.
size
()
!=
0
){
hiddenTroubleVo
.
setFeedbackList
(
orderFeedbackList
);
}
}
return
hiddenTroubleVo
;
}
...
...
@@ -80,8 +127,26 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
BeanUtils
.
copyProperties
(
trouble
,
hiddenTroubleVo
);
SysUser
sysUser
=
sysUserMapper
.
selectUserById
(
trouble
.
getReportMan
());
hiddenTroubleVo
.
setReportManName
(
sysUser
.
getNickName
());
if
(
sysUser
!=
null
)
{
hiddenTroubleVo
.
setReportManName
(
sysUser
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
trouble
.
getTroubleType
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
trouble
.
getTroubleType
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleType
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
trouble
.
getTroubleLevel
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_level"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
trouble
.
getTroubleLevel
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleLevel
(
sysDictData
.
getDictLabel
());
}
}
}
list
.
add
(
hiddenTroubleVo
);
}
}
...
...
@@ -95,9 +160,52 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息集合
*/
@Override
public
List
<
THiddenTrouble
>
getMapTHiddenTroubleList
()
public
List
<
HiddenTroubleVo
>
getMapTHiddenTroubleList
()
{
return
tHiddenTroubleMapper
.
getMapTHiddenTroubleList
();
List
<
HiddenTroubleVo
>
list
=
new
ArrayList
<>();
List
<
THiddenTrouble
>
troubleList
=
tHiddenTroubleMapper
.
getMapTHiddenTroubleList
();
if
(
troubleList
.
size
()
!=
0
)
{
for
(
THiddenTrouble
temp
:
troubleList
)
{
HiddenTroubleVo
hiddenTroubleVo
=
new
HiddenTroubleVo
();
BeanUtils
.
copyProperties
(
temp
,
hiddenTroubleVo
);
SysUser
sysUser
=
sysUserMapper
.
selectUserById
(
temp
.
getReportMan
());
if
(
sysUser
!=
null
)
{
hiddenTroubleVo
.
setReportManName
(
sysUser
.
getNickName
());
}
if
(
StringUtils
.
isNotEmpty
(
temp
.
getTroubleType
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
temp
.
getTroubleType
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleType
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
temp
.
getTroubleLevel
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_trouble_level"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
temp
.
getTroubleLevel
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setTroubleLevel
(
sysDictData
.
getDictLabel
());
}
}
}
if
(
StringUtils
.
isNotEmpty
(
temp
.
getDealStatus
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_deal_status"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
temp
.
getDealStatus
()
==
null
){
hiddenTroubleVo
.
setDealStatus
(
"暂未处理"
);
}
else
if
(
temp
.
getDealStatus
().
equals
(
sysDictData
.
getDictValue
()))
{
hiddenTroubleVo
.
setDealStatus
(
sysDictData
.
getDictLabel
());
}
}
}
list
.
add
(
hiddenTroubleVo
);
}
}
return
list
;
}
/**
...
...
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
844789d2
...
...
@@ -104,7 +104,7 @@
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span>
<span
v-if=
"(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''"
>
未处理
</span>
scope.row.orderId != null && scope.row.orderId != ''"
>
暂
未处理
</span>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
...
...
gassafety-web/src/views/riskManagement/hiddenTrouble/index.vue
View file @
844789d2
...
...
@@ -41,19 +41,8 @@
<el-table
v-loading=
"loading"
:data=
"hiddenTroubleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"troubleName"
/>
<el-table-column
label=
"隐患类型"
align=
"center"
prop=
"troubleType"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.troubleType == 1"
>
设备老化
</span>
<span
v-if=
"scope.row.troubleType == 2"
>
质保过期
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患级别"
align=
"center"
prop=
"troubleLevel"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.troubleLevel == 1"
>
Ⅰ级
</span>
<span
v-if=
"scope.row.troubleLevel == 2"
>
Ⅱ级
</span>
<span
v-if=
"scope.row.troubleLevel == 3"
>
Ⅲ级
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患类型"
align=
"center"
prop=
"troubleType"
/>
<el-table-column
label=
"隐患级别"
align=
"center"
prop=
"troubleLevel"
/>
<el-table-column
label=
"图片"
align=
"center"
prop=
"pictureUrl"
>
<template
slot-scope=
"scope"
>
<el-image
:src=
"scope.row.pictureUrl"
:preview-src-list=
"[scope.row.pictureUrl]"
v-if=
"scope.row.pictureUrl != '' && scope.row.pictureUrl != null"
style=
"width: 16px;"
></el-image>
...
...
@@ -66,7 +55,7 @@
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未生成工单
</span>
<span
v-if=
"(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''"
>
未处理
</span>
scope.row.orderId != null && scope.row.orderId != ''"
>
暂
未处理
</span>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
<span
v-if=
"scope.row.dealStatus == 2"
>
已处理完成
</span>
<span
v-if=
"scope.row.dealStatus == 3"
>
未处理完成
</span>
...
...
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