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

还原代码修改

parent a426793f
package com.zehong.system.service.impl; 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.TPipe;
import com.zehong.system.domain.vo.DeviceInfoVo; import com.zehong.system.domain.vo.DeviceInfoVo;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.mapper.TPipeMapper; import com.zehong.system.mapper.TPipeMapper;
import com.zehong.system.service.ITDeviceInfoService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
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.domain.TDeviceInfo; import java.util.ArrayList;
import com.zehong.system.service.ITDeviceInfoService; import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 设备信息Service业务层处理 * 设备信息Service业务层处理
...@@ -33,9 +36,22 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -33,9 +36,22 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @return 设备信息 * @return 设备信息
*/ */
@Override @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;
} }
/** /**
...@@ -59,6 +75,15 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -59,6 +75,15 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
TPipe pipe = tPipeMapper.selectTPipeById(device.getPipeId()); TPipe pipe = tPipeMapper.selectTPipeById(device.getPipeId());
deviceInfoVo.setPipeName(pipe.getPipeName()); 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); list.add(deviceInfoVo);
} }
} }
......
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