xh 1 week ago
parent
commit
156239ad66
  1. 2
      cc-admin-master/yudao-module-hand-mqtt/src/main/java/cn/iocoder/yudao/module/mqtt/processor/DeviceMessageProcessor.java
  2. 2
      cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/HandDetectorService.java
  3. 5
      cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/HandDetectorServiceImpl.java
  4. 3
      cc-admin-master/yudao-module-hand/src/main/java/cn/iocoder/yudao/module/hand/service/impl/PersonnelServiceImpl.java
  5. 4
      cc-admin-master/yudao-server/src/main/resources/application-local.yaml

2
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) // 2. 查人(查同组所有设备的SN)
List<HandDetectorDO> listAll = handDetectorService.getListAll(redisData.getDeptId(), redisData.getTenantId());
List<HandDetectorDO> listAll = handDetectorService.getListAll(redisData.getDeptId(), redisData.getTenantId(),redisData.getSn());
if (listAll == null || listAll.isEmpty()) return; if (listAll == null || listAll.isEmpty()) return;
alarmExecutor.execute(() -> { alarmExecutor.execute(() -> {

2
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); void dataMigrate(HandDetectorSaveReqVO updateReqVO);
List<HandDetectorDO> getListAll(Long deptId,Long tenantId);
List<HandDetectorDO> getListAll(Long deptId,Long tenantId, String sn);
} }

5
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 @Override
@TenantIgnore @TenantIgnore
public List<HandDetectorDO> getListAll(Long deptId,Long tenantId) {
public List<HandDetectorDO> getListAll(Long deptId,Long tenantId,String sn) {
QueryWrapper<HandDetectorDO> queryWrapper = new QueryWrapper<>(); QueryWrapper<HandDetectorDO> queryWrapper = new QueryWrapper<>();
if (deptId != null){ if (deptId != null){
queryWrapper.eq("dept_id", deptId); queryWrapper.eq("dept_id", deptId);
} }
if (sn != null) {
queryWrapper.ne("sn", sn);
}
queryWrapper.eq("tenant_id", tenantId); queryWrapper.eq("tenant_id", tenantId);
return handDetectorMapper.selectList(queryWrapper); return handDetectorMapper.selectList(queryWrapper);
} }

3
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("name", updateReqVO.getName()); // 假设需要同步姓名
handDetectorUpdateWrapper.set("dept_id", updateReqVO.getDeptId());
handDetectorUpdateWrapper.set("person_id", updateReqVO.getId()); // 假设需要同步部门ID handDetectorUpdateWrapper.set("person_id", updateReqVO.getId()); // 假设需要同步部门ID
handDetectorMapper.update(null, handDetectorUpdateWrapper);
handDetectorMapper.update(handDetectorUpdateWrapper);
} }

4
cc-admin-master/yudao-server/src/main/resources/application-local.yaml

@ -114,7 +114,7 @@ spring:
password: rabbit # RabbitMQ 服务的密码 password: rabbit # RabbitMQ 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类 # Kafka 配置项,对应 KafkaProperties 配置类
kafka: 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: properties:
security.protocol: SASL_PLAINTEXT security.protocol: SASL_PLAINTEXT
sasl.mechanism: SCRAM-SHA-512 sasl.mechanism: SCRAM-SHA-512
@ -221,7 +221,7 @@ pf4j:
pluginsDir: ../plugins pluginsDir: ../plugins
mqtt: mqtt:
enable: false
enable: true
url: tcp://zdmq.zdhlcn.com:2883 url: tcp://zdmq.zdhlcn.com:2883
username: mobileqt username: mobileqt
password: DVSwxQwY<x password: DVSwxQwY<x

Loading…
Cancel
Save