Commit 170d3916 authored by 耿迪迪's avatar 耿迪迪

还原代码修改

parent a426793f
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 TDeviceInfo selectTDeviceInfoById(int deviceId)
public DeviceInfoVo 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 结果
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment