|
|
@ -485,10 +485,12 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询设备编码设备实例是否已存在
|
|
|
|
// 查询设备编码设备实例是否已存在
|
|
|
|
R<Boolean> existResult = deviceClient.isDeviceCodeExist(em_info.getInfo().getNumber()); |
|
|
|
if(Func.isNotEmpty(em_info.getInfo().getNumber())) { |
|
|
|
Assert.isTrue(existResult.isSuccess() && !existResult.getData(),() -> { |
|
|
|
R<Boolean> existResult = deviceClient.isDeviceCodeExist(em_info.getInfo().getNumber()); |
|
|
|
throw new ServiceException("该设备编码在设备实例中找到对应记录,保存失败!"); |
|
|
|
Assert.isTrue(existResult.isSuccess() && !existResult.getData(),() -> { |
|
|
|
}); |
|
|
|
throw new ServiceException("该设备编码在设备实例中找到对应记录,保存失败!"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
// 验证设备编号是否已存在
|
|
|
|
// 验证设备编号是否已存在
|
|
|
|
EmInfoEntity emInfoEntity = this.baseMapper.selectEmInfoByCode(em_info.getInfo().getNumber()); |
|
|
|
EmInfoEntity emInfoEntity = this.baseMapper.selectEmInfoByCode(em_info.getInfo().getNumber()); |
|
|
|
Assert.isTrue(ObjectUtil.isEmpty(emInfoEntity),() -> { |
|
|
|
Assert.isTrue(ObjectUtil.isEmpty(emInfoEntity),() -> { |
|
|
|