diff --git a/cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/DeviceMessageProcessor.java b/cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/DeviceMessageProcessor.java index fa0cdce..fc1dcd1 100644 --- a/cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/DeviceMessageProcessor.java +++ b/cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/DeviceMessageProcessor.java @@ -558,7 +558,7 @@ public class DeviceMessageProcessor { } // 2. 查人(查同组所有设备的SN) - List listAll = handDetectorService.getListAll(redisData.getDeptId(), redisData.getTenantId()); + List listAll = handDetectorService.getListAll(redisData.getDeptId(), redisData.getTenantId(),redisData.getSn()); if (listAll == null || listAll.isEmpty()) return; alarmExecutor.execute(() -> { diff --git a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/HandDetectorService.java b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/HandDetectorService.java index 1051ed4..ea6595b 100644 --- a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/HandDetectorService.java +++ b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/HandDetectorService.java @@ -75,5 +75,5 @@ public interface HandDetectorService { void dataMigrate(HandDetectorSaveReqVO updateReqVO); - List getListAll(Long deptId,Long tenantId); + List getListAll(Long deptId,Long tenantId, String sn); } \ No newline at end of file diff --git a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/HandDetectorServiceImpl.java b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/HandDetectorServiceImpl.java index 2ba1ff0..0f5bd8f 100644 --- a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/HandDetectorServiceImpl.java +++ b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/HandDetectorServiceImpl.java @@ -333,12 +333,15 @@ public class HandDetectorServiceImpl implements HandDetectorService { @Override @TenantIgnore - public List getListAll(Long deptId,Long tenantId) { + public List getListAll(Long deptId,Long tenantId,String sn) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (deptId != null){ queryWrapper.eq("dept_id", deptId); } + if (sn != null) { + queryWrapper.ne("sn", sn); + } queryWrapper.eq("tenant_id", tenantId); return handDetectorMapper.selectList(queryWrapper); } diff --git a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/PersonnelServiceImpl.java b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/PersonnelServiceImpl.java index f3368e1..4cd7e1c 100644 --- a/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/PersonnelServiceImpl.java +++ b/cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/PersonnelServiceImpl.java @@ -68,9 +68,10 @@ public class PersonnelServiceImpl implements PersonnelService { handDetectorUpdateWrapper.set("name", updateReqVO.getName()); // 假设需要同步姓名 + handDetectorUpdateWrapper.set("dept_id", updateReqVO.getDeptId()); handDetectorUpdateWrapper.set("person_id", updateReqVO.getId()); // 假设需要同步部门ID - handDetectorMapper.update(null, handDetectorUpdateWrapper); + handDetectorMapper.update(handDetectorUpdateWrapper); } diff --git a/cc-admin-master/yudao-server/src/main/resources/application-local.yaml b/cc-admin-master/yudao-server/src/main/resources/application-local.yaml index ca7e814..015c57b 100644 --- a/cc-admin-master/yudao-server/src/main/resources/application-local.yaml +++ b/cc-admin-master/yudao-server/src/main/resources/application-local.yaml @@ -114,7 +114,7 @@ spring: password: rabbit # RabbitMQ 服务的密码 # Kafka 配置项,对应 KafkaProperties 配置类 kafka: - bootstrap-servers: zdmq.zdhlcn.com:9092 # 或者内网地址 172.21.16.6:9091,或者测试地址video.zdhlcn.com:9092,zdmq.zdhlcn.com:9092 + bootstrap-servers: video.zdhlcn.com:9092 # 或者内网地址 172.21.16.6:9091,或者测试地址video.zdhlcn.com:9092,zdmq.zdhlcn.com:9092 properties: security.protocol: SASL_PLAINTEXT sasl.mechanism: SCRAM-SHA-512 @@ -221,7 +221,7 @@ pf4j: pluginsDir: ../plugins mqtt: - enable: false + enable: true url: tcp://zdmq.zdhlcn.com:2883 username: mobileqt password: DVSwxQwY