|
@@ -299,6 +299,10 @@ public class IotDeviceServiceImpl implements IotDeviceService {
|
|
if (CollUtil.isNotEmpty(iotDeviceDOS)) {
|
|
if (CollUtil.isNotEmpty(iotDeviceDOS)) {
|
|
throw new ServiceException(IOT_DEVICE_EXISTED);
|
|
throw new ServiceException(IOT_DEVICE_EXISTED);
|
|
}
|
|
}
|
|
|
|
+ List<IotDeviceDO> iotDeviceDOSS = iotDeviceMapper.selectList("yf_device_code", createReqVO.getYfDeviceCode());
|
|
|
|
+ if (CollUtil.isNotEmpty(iotDeviceDOSS)) {
|
|
|
|
+ throw new ServiceException(IOT_DEVICE_EXISTED);
|
|
|
|
+ }
|
|
// 插入
|
|
// 插入
|
|
IotDeviceDO iotDevice = BeanUtils.toBean(createReqVO, IotDeviceDO.class);
|
|
IotDeviceDO iotDevice = BeanUtils.toBean(createReqVO, IotDeviceDO.class);
|
|
iotDevice.setSortColumn(NumberUtils.extractNumber(iotDevice.getDeviceCode()));
|
|
iotDevice.setSortColumn(NumberUtils.extractNumber(iotDevice.getDeviceCode()));
|