Commit 61bc0f656815676b618e394cae2c3f70b2e11167

Authored by xp.Huang
2 parents b790166a a705a9de

Merge remote-tracking branch 'origin/master_dev' into master_dev

... ... @@ -225,13 +225,13 @@ class ReactState {
225 225 if (triggerMatched.get() && conditionMatched.get() && !actionData.equals(msgData)) {
226 226 actionData = msgData;
227 227 log.debug(String.format("设备【%s】的消息内容【%s】触发动作", deviceId, msgData));
228   - for (TkDoActionEntity item : actions) {
229   - if (ActionTypeEnum.MSG_NOTIFY.equals(item.getOutTarget())) {
230   - noticeMsg(ctx, msg, item, deviceId, detail, msg.getTs());
  228 + actions.forEach(act ->{
  229 + if (ActionTypeEnum.MSG_NOTIFY.equals(act.getOutTarget())) {
  230 + noticeMsg(ctx, msg, act, deviceId, detail, msg.getTs());
231 231 } else {
232   - pushMsg(ctx, msg, item);
  232 + pushMsg(ctx, msg, act);
233 233 }
234   - }
  234 + });
235 235 } else {
236 236 ctx.tellSuccess(msg);
237 237 }
... ... @@ -390,7 +390,9 @@ class ReactState {
390 390 DeviceId entityId = new DeviceId(UUID.fromString(deviceId));
391 391 ActionAlarmDTO actionAlarm =
392 392 JacksonUtil.convertValue(action.getDoContext(), ActionAlarmDTO.class);
393   -
  393 + if(actionAlarm.getAlarmLevel() == null){
  394 + return;
  395 + }
394 396 Alarm currentAlarm = new Alarm();
395 397 currentAlarm.setType(reactName);
396 398 currentAlarm.setStatus(AlarmStatus.ACTIVE_UNACK);
... ...