|
|
@ -472,7 +472,7 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit |
|
|
|
private void validEmInfo(EmInfoAddVo em_info) { |
|
|
|
private void validEmInfo(EmInfoAddVo em_info) { |
|
|
|
// 验证设备名称
|
|
|
|
// 验证设备名称
|
|
|
|
List<EmInfoEntity> existName = this.list( |
|
|
|
List<EmInfoEntity> existName = this.list( |
|
|
|
Wrappers.<EmInfoEntity>lambdaQuery().eq(EmInfoEntity::getName, em_info.getInfo().getName()) |
|
|
|
Wrappers.<EmInfoEntity>lambdaQuery().eq(EmInfoEntity::getName, em_info.getInfo().getName()).eq(EmInfoEntity::getDepartment, em_info.getInfo().getDepartment()) |
|
|
|
); |
|
|
|
); |
|
|
|
Assert.isTrue(CollectionUtil.isEmpty(existName),()-> { |
|
|
|
Assert.isTrue(CollectionUtil.isEmpty(existName),()-> { |
|
|
|
throw new ServiceException("设备名称已存在"); |
|
|
|
throw new ServiceException("设备名称已存在"); |
|
|
|