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
a426793f
Commit
a426793f
authored
Aug 17, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码还原 gengdidi
parent
e9e89cc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
29 deletions
+2
-29
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+2
-29
No files found.
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
a426793f
...
...
@@ -2,12 +2,9 @@ package com.zehong.system.service.impl;
import
java.util.*
;
import
com.zehong.common.core.domain.entity.SysDictData
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.DeviceInfoVo
;
import
com.zehong.system.mapper.TPipeMapper
;
import
com.zehong.system.service.ISysDictTypeService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -28,8 +25,6 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
private
TDeviceInfoMapper
tDeviceInfoMapper
;
@Autowired
private
TPipeMapper
tPipeMapper
;
@Autowired
private
ISysDictTypeService
iSysDictTypeService
;
/**
* 查询设备信息
...
...
@@ -38,22 +33,9 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @return 设备信息
*/
@Override
public
DeviceInfoV
o
selectTDeviceInfoById
(
int
deviceId
)
public
TDeviceInf
o
selectTDeviceInfoById
(
int
deviceId
)
{
DeviceInfoVo
deviceInfoVo
=
new
DeviceInfoVo
();
TDeviceInfo
tDeviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoById
(
deviceId
);
BeanUtils
.
copyProperties
(
tDeviceInfo
,
deviceInfoVo
);
if
(
StringUtils
.
isNotEmpty
(
tDeviceInfo
.
getDeviceType
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_device_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
tDeviceInfo
.
getDeviceType
().
equals
(
sysDictData
.
getDictValue
()))
{
deviceInfoVo
.
setDeviceType
(
sysDictData
.
getDictLabel
());
}
}
}
return
deviceInfoVo
;
return
tDeviceInfoMapper
.
selectTDeviceInfoById
(
deviceId
);
}
/**
...
...
@@ -77,15 +59,6 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
device
.
getPipeId
());
deviceInfoVo
.
setPipeName
(
pipe
.
getPipeName
());
if
(
StringUtils
.
isNotEmpty
(
device
.
getDeviceType
()))
{
List
<
SysDictData
>
sysDictDataList
=
iSysDictTypeService
.
selectDictDataByType
(
"t_device_type"
);
for
(
SysDictData
sysDictData
:
sysDictDataList
)
{
if
(
device
.
getDeviceType
().
equals
(
sysDictData
.
getDictValue
()))
{
deviceInfoVo
.
setDeviceType
(
sysDictData
.
getDictLabel
());
}
}
}
list
.
add
(
deviceInfoVo
);
}
}
...
...
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