From 1b138ab2995e7bca1161c7f3ab76dc90d0d21ba2 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Thu, 28 Aug 2025 09:09:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B5=81=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=86=85=E5=A4=96=E7=BD=91=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/sdk/zkmedia/ZLMediaKitServiceImpl.java | 6 ++++-- .../sdk/zkmedia/model/AddStreamProxyResp.java | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/ZLMediaKitServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/ZLMediaKitServiceImpl.java index 83d4ecf7..b2fd8c46 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/ZLMediaKitServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/ZLMediaKitServiceImpl.java @@ -80,6 +80,8 @@ public class ZLMediaKitServiceImpl implements ZLMediaKitService { if (resp == null) { resp = new AddStreamProxyResp(); } + resp.setApp(app); + resp.setStreamId(streamId); // RTMP 播放地址 resp.setRtmp(String.format(RTMP_PLAY_URL, zlmConfig.getIp(), zlmConfig.getRtmpPort(), app, streamId)); // RTSP 播放地址 @@ -88,9 +90,9 @@ public class ZLMediaKitServiceImpl implements ZLMediaKitService { resp.setFlv(String.format(HTTP_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); resp.setWsFlv(String.format(WS_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); // HLS 播放地址 - resp.setHls(String.format(HLS_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); +// resp.setHls(String.format(HLS_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); // MP4 播放地址 - resp.setMp4(String.format(MP4_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); +// resp.setMp4(String.format(MP4_FLV_PLAY_URL, zlmConfig.getIp(), zlmConfig.getHttpPort(), app, streamId)); return resp; } diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/model/AddStreamProxyResp.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/model/AddStreamProxyResp.java index 051e62a9..dbde518d 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/model/AddStreamProxyResp.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/zkmedia/model/AddStreamProxyResp.java @@ -9,15 +9,24 @@ public class AddStreamProxyResp implements Serializable { private String key; + /** + * 应用 + */ + private String app; + + /** + * 流id + */ + private String streamId; + private String rtsp; - private String rtmp; - private String flv; private String wsFlv; - private String mp4; - private String hls; + + + } From fbcc6ec713dfeeb578792c7c1a53c71128cd733b Mon Sep 17 00:00:00 2001 From: lsm Date: Thu, 28 Aug 2025 19:34:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20ruoyi-modules/Sis/src/?= =?UTF-8?q?main/java/org/dromara/sis/service/impl/ZeroSensationPassageServ?= =?UTF-8?q?iceImpl.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 放开黑名单上报 --- .../sis/service/impl/ZeroSensationPassageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java index aeb09875..7e950b65 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java @@ -79,7 +79,7 @@ public class ZeroSensationPassageServiceImpl implements IZeroSensationPassageSer } else { if (Objects.equals(authRecord.getRosterType(), RosterTypeEnum.BLACK_LIST.getCode())) { log.info("人员[{}]在黑名单中,暂不处理。", person); -// alarmEventsService.createAlarmRecord(deviceIp, 3, 1, "黑名单人员入内", smallImg, bigImg); + alarmEventsService.createAlarmRecord(deviceIp, 3, 1, "黑名单人员入内", smallImg, bigImg); return; } } From 0233dad442b881f0dfe333904f1c6b723728d310 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Thu, 28 Aug 2025 20:16:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9sis=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=97=B6=E5=8C=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-modules/Sis/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/Sis/Dockerfile b/ruoyi-modules/Sis/Dockerfile index b2372fc7..a821c055 100644 --- a/ruoyi-modules/Sis/Dockerfile +++ b/ruoyi-modules/Sis/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir -p /smartparks/Sis/logs \ WORKDIR /ruoyi/sis -ENV SERVER_PORT=10002 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" +ENV SERVER_PORT=10002 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="-Duser.timezone=Asia/Shanghai" EXPOSE ${SERVER_PORT} From 6d2741a8a5ff430c70c9ec8200ce9bbe1ec554c1 Mon Sep 17 00:00:00 2001 From: 15683799673 Date: Thu, 28 Aug 2025 20:40:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/sis/domain/enums/EventSmallTypeEnum.java | 2 ++ .../dromara/sis/service/ISisAlarmEventsService.java | 3 ++- .../sis/service/impl/SisAlarmEventsServiceImpl.java | 4 ++-- .../service/impl/ZeroSensationPassageServiceImpl.java | 11 ++++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/enums/EventSmallTypeEnum.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/enums/EventSmallTypeEnum.java index 72b116c5..ee4720b0 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/enums/EventSmallTypeEnum.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/enums/EventSmallTypeEnum.java @@ -35,6 +35,8 @@ public enum EventSmallTypeEnum { SMART_REPORT_YW(1023, "烟雾报警"), SMART_REPORT_RYSLCX(1024, "人员数量超限报警"), EQP_REPORT_SBSB(1025, "报警设备上报"), + BLACK_PERSON(1026, "黑名单人员"), + AUTHORIZATION_EXPIRED(1027, "门禁授权已过期"), /* -----------------------系统报警相关-------------------------------------*/ SYS_REPORT_WLGZ(2001, "网络连接故障"), SYS_REPORT_DLYC(2002, "用户登录异常"), diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisAlarmEventsService.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisAlarmEventsService.java index 768ccfff..f65b1a29 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisAlarmEventsService.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisAlarmEventsService.java @@ -5,6 +5,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.sis.domain.bo.SisAlarmEventsBo; import org.dromara.sis.domain.bo.alarm.AlarmAssignmentBo; import org.dromara.sis.domain.bo.alarm.AlarmCompleteBo; +import org.dromara.sis.domain.enums.EventSmallTypeEnum; import org.dromara.sis.domain.vo.SisAlarmEventsVo; import java.util.Collection; @@ -78,7 +79,7 @@ public interface ISisAlarmEventsService { /** * 异步生成告警记录 */ - void createAlarmRecord(String deviceIp, Integer level, Integer type, String msg, byte[] smallImg, byte[] bigImg); + void createAlarmRecord(String deviceIp, Integer level, EventSmallTypeEnum type, String msg, byte[] smallImg, byte[] bigImg); /** * 任务分配操作 diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisAlarmEventsServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisAlarmEventsServiceImpl.java index 1c1b215a..efe5de5b 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisAlarmEventsServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisAlarmEventsServiceImpl.java @@ -182,7 +182,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService { @Async @Override @Transactional(rollbackFor = Exception.class) - public void createAlarmRecord(String deviceIp, Integer level, Integer type, String msg, byte[] smallImg, byte[] bigImg) { + public void createAlarmRecord(String deviceIp, Integer level, EventSmallTypeEnum type, String msg, byte[] smallImg, byte[] bigImg) { // 校验设备信息 SisDeviceManage sisDeviceManage = deviceManageService.queryByDeviceIp(deviceIp); if (sisDeviceManage == null) { @@ -193,7 +193,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService { Date now = new Date(); SisAlarmEvents alarmEvents = new SisAlarmEvents(); alarmEvents.setBigType(EventBigTypeEnum.EQUIPMENT_UP.getCode()); - alarmEvents.setSmallType(EventSmallTypeEnum.SMART_REPORT_ZJCR.getCode()); + alarmEvents.setSmallType(type.getCode()); alarmEvents.setLevel(Long.valueOf(level)); alarmEvents.setDeviceIp(deviceIp); alarmEvents.setDeviceName(sisDeviceManage.getDeviceName()); diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java index 7e950b65..5eb7e30f 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/ZeroSensationPassageServiceImpl.java @@ -12,6 +12,7 @@ import org.apache.dubbo.config.annotation.DubboReference; import org.dromara.property.api.RemoteFloorService; import org.dromara.property.api.domain.vo.RemoteFloorVo; import org.dromara.sis.domain.enums.ControlTypeEnum; +import org.dromara.sis.domain.enums.EventSmallTypeEnum; import org.dromara.sis.domain.enums.RosterTypeEnum; import org.dromara.sis.domain.vo.*; import org.dromara.sis.sdk.e8.E8PlatformApi; @@ -62,8 +63,8 @@ public class ZeroSensationPassageServiceImpl implements IZeroSensationPassageSer HWResult result = huaWeiBoxApi.findPerson(smallImgBase64Str); if (result.getCode() != 200) { log.info("华为盒子比对失败,msg={}", result.getMessage()); - // 产生告警数据 - alarmEventsService.createAlarmRecord(deviceIp, 1, 1, "人脸比对失败", smallImg, bigImg); + // 产生告警数据 人脸比对失败,默认为 + alarmEventsService.createAlarmRecord(deviceIp, 2, EventSmallTypeEnum.SMART_REPORT_ZJCR, "人脸比对失败", smallImg, bigImg); return; } log.info("人脸比对执行完成,耗时:{}ms", interval.intervalMs()); @@ -74,19 +75,19 @@ public class ZeroSensationPassageServiceImpl implements IZeroSensationPassageSer if (authRecord == null) { log.info("人员[{}]没有授权记录,判定为陌生人", person); // 不是内部人员 产生紧急的告警信息 - alarmEventsService.createAlarmRecord(deviceIp, 1, 1, "陌生人员入内", smallImg, bigImg); + alarmEventsService.createAlarmRecord(deviceIp, 2, EventSmallTypeEnum.SMART_REPORT_ZJCR, "陌生人员入内", smallImg, bigImg); return; } else { if (Objects.equals(authRecord.getRosterType(), RosterTypeEnum.BLACK_LIST.getCode())) { log.info("人员[{}]在黑名单中,暂不处理。", person); - alarmEventsService.createAlarmRecord(deviceIp, 3, 1, "黑名单人员入内", smallImg, bigImg); + alarmEventsService.createAlarmRecord(deviceIp, 3, EventSmallTypeEnum.BLACK_PERSON, "黑名单人员入内", smallImg, bigImg); return; } } Date now = new Date(); if (DateUtil.compare(now, authRecord.getEndDate()) > 0) { -// alarmEventsService.createAlarmRecord(deviceIp, 3, 1, "人员授权信息已过期", smallImg, bigImg); + alarmEventsService.createAlarmRecord(deviceIp, 1, EventSmallTypeEnum.AUTHORIZATION_EXPIRED, "人员授权信息已过期", smallImg, bigImg); log.info("当前人脸已过期,暂不处理。"); return; }