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
170d3916
Commit
170d3916
authored
Aug 17, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还原代码修改
parent
a426793f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
15 deletions
+40
-15
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+40
-15
No files found.
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
170d3916
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.*
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TPipe
;
import
com.zehong.system.domain.vo.DeviceInfoVo
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TPipeMapper
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 设备信息Service业务层处理
*
*
* @author zehong
* @date 2021-07-09
*/
@Service
public
class
TDeviceInfoServiceImpl
implements
ITDeviceInfoService
public
class
TDeviceInfoServiceImpl
implements
ITDeviceInfoService
{
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
...
...
@@ -28,19 +31,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 查询设备信息
*
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
@Override
public
TDeviceInf
o
selectTDeviceInfoById
(
int
deviceId
)
public
DeviceInfoV
o
selectTDeviceInfoById
(
int
deviceId
)
{
return
tDeviceInfoMapper
.
selectTDeviceInfoById
(
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
;
}
/**
* 查询设备信息列表
*
*
* @param tDeviceInfo 设备信息
* @return 设备信息
*/
...
...
@@ -59,6 +75,15 @@ 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
);
}
}
...
...
@@ -198,7 +223,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 新增设备信息
*
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
...
...
@@ -210,7 +235,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 修改设备信息
*
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
...
...
@@ -222,7 +247,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 批量删除设备信息
*
*
* @param deviceIds 需要删除的设备信息ID
* @return 结果
*/
...
...
@@ -234,7 +259,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/**
* 删除设备信息信息
*
*
* @param deviceId 设备信息ID
* @return 结果
*/
...
...
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