|
|
@@ -26,8 +26,10 @@ public class LocalBusConAlarmService extends AbstractConstantService<BusConAlarm
|
|
|
if(entity.getType()==null){
|
|
|
throw new CustomException("报警类型不能为空");
|
|
|
}
|
|
|
- if (this.getOne(new QueryWrapper<BusConAlarmEntity>().lambda().eq(BusConAlarmEntity::getCause,entity.getCause())
|
|
|
- .eq(BusConAlarmEntity::getType,entity.getType()))!=null) {
|
|
|
+ if (this.getOne(new QueryWrapper<BusConAlarmEntity>().lambda()
|
|
|
+ .eq(BusConAlarmEntity::getCause,entity.getCause())
|
|
|
+ .eq(StrUtil.isNotEmpty(entity.getTenantId()),BusConAlarmEntity::getTenantId,entity.getTenantId())
|
|
|
+ .eq(BusConAlarmEntity::getType,entity.getType()))!=null) {
|
|
|
throw new CustomException("报警原因不能重复");
|
|
|
}
|
|
|
}
|
|
|
@@ -45,6 +47,7 @@ public class LocalBusConAlarmService extends AbstractConstantService<BusConAlarm
|
|
|
}
|
|
|
if (this.getOne(new QueryWrapper<BusConAlarmEntity>().lambda().eq(BusConAlarmEntity::getCause,entity.getCause())
|
|
|
.ne(BusConAlarmEntity::getId,entity.getId())
|
|
|
+ .eq(StrUtil.isNotEmpty(entity.getTenantId()),BusConAlarmEntity::getTenantId,entity.getTenantId())
|
|
|
.eq(BusConAlarmEntity::getType,entity.getType()))!=null) {
|
|
|
throw new CustomException("报警原因不能重复");
|
|
|
}
|