Commit e904c2bc by 李小龙

fix:告警找不到长者

parent a0fc1bce
......@@ -50,6 +50,8 @@ public class PlatAuthorizationInterceptor implements HandlerInterceptor {
Set<String> codeSet = new HashSet<>();
if(userLoginVO!= null && CollectionUtils.isNotEmpty(userLoginVO.getButtonCodeList())) {
codeSet = new HashSet<>(userLoginVO.getButtonCodeList());
}else {
return true;
}
for (String e : annotation.code()) {
......
......@@ -11,6 +11,7 @@ import com.makeit.entity.platform.elder.PlatElder;
import com.makeit.enums.CommonEnum;
import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum;
import com.makeit.enums.redis.RedisConst;
import com.makeit.exception.BusinessException;
import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.utils.AlarmRedisDTO;
import com.makeit.utils.data.convert.JsonUtil;
......@@ -116,8 +117,7 @@ public class HeartAlarm implements IAlarm {
PlatDevice platDevice = platAlarmCheckDTO.getPlatDevice();
List<PlatElder> platElderList = platAlarmCheckDTO.getPlatElderList();
if (CollectionUtils.isEmpty(platElderList)) {
log.error("心率设备未关联长者,设备plat_id:" + platAlarmCheckDTO.getPlatDevice().getId());
return;
throw new BusinessException("心率设备未关联长者,设备plat_id:" + platAlarmCheckDTO.getPlatDevice().getId());
}
for (PlatElder platElder : platElderList) {
List<String> param = new ArrayList<>();
......
......@@ -381,7 +381,11 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
.eq(BaseBusEntity::getTenantId,tenantId)
;
List<PlatElder> list = platElderService.list(elderLambdaQueryWrapper);
platAlarmCheckDTO.setPlatElderList(list);
if(CollectionUtils.isNotEmpty(list)) {
platAlarmCheckDTO.setPlatElderList(list);
return;
}
}
String roomId = platRoomBedDevice.getRoomId();
......
......@@ -443,7 +443,7 @@ public class PlatUserServiceImpl extends ServiceImpl<PlatUserMapper, PlatUser>
String button = SysEnum.MenuTypeEnum.BUTTON.getValue();
menuList.forEach(e -> {
if (menu.equals(e.getCategory()) || button.equals(e.getCategory())) {
if ( button.equals(e.getCategory())) {
buttonList.add(e);
}
......
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 sign in to comment