From 959139e7a5d89e8498d731082a949310ae1c6fcf Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期五, 05 十二月 2025 14:32:29 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/utils/NotifyUtils.java | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/NotifyUtils.java b/src/main/java/com/zy/asrs/utils/NotifyUtils.java
index ba4e618..5ad1a73 100644
--- a/src/main/java/com/zy/asrs/utils/NotifyUtils.java
+++ b/src/main/java/com/zy/asrs/utils/NotifyUtils.java
@@ -1,6 +1,5 @@
package com.zy.asrs.utils;
-import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.SnowflakeIdWorker;
import com.zy.asrs.domain.NotifyDto;
@@ -55,10 +54,12 @@
public String getKey(String notifyType, Integer device) {
String key = null;
- if (notifyType.equals(String.valueOf(SlaveType.Shuttle))) {
- key = RedisKeyType.QUEUE_SHUTTLE.key + device;
- } else if (notifyType.equals(String.valueOf(SlaveType.ForkLift))) {
- key = RedisKeyType.QUEUE_FORK_LIFT.key + device;
+ if (notifyType.equals(String.valueOf(SlaveType.Crn))) {
+ key = RedisKeyType.QUEUE_CRN.key + device;
+ } else if (notifyType.equals(String.valueOf(SlaveType.Devp))) {
+ key = RedisKeyType.QUEUE_DEVP.key + device;
+ } else if (notifyType.equals(String.valueOf(SlaveType.Rgv))) {
+ key = RedisKeyType.QUEUE_RGV.key + device;
} else if (notifyType.equals("task")) {
key = RedisKeyType.QUEUE_TASK.key + device;
} else {
@@ -69,6 +70,16 @@
}
private boolean append(String notifyType, Integer device, String taskNo, String superTaskNo, NotifyMsgType msgType, String data) {
+ boolean notifyEnable = true;
+ Config notifyEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "notifyEnable"));
+ if (notifyEnableConfig != null) {
+ notifyEnable = notifyEnableConfig.getValue().equals("Y");
+ }
+
+ if (!notifyEnable) {
+ return false;
+ }
+
String key = getKey(notifyType, device);
if (key == null) {
return false;
--
Gitblit v1.9.1