From 7d380dd36b81cbff5b2a3caa3046857699cedc37 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Tue, 31 May 2022 16:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E5=BD=93?= =?UTF-8?q?=E5=A4=A9=E6=A0=B9=E6=8D=AE=E4=BA=8B=E4=BB=B6=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/EventController.java | 16 +++++ .../monitormanage/mapper/EventMapper.java | 3 + .../monitormanage/service/MonitorService.java | 58 +++++++++++++++---- 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/hisense/monitormanage/controller/EventController.java b/src/main/java/com/hisense/monitormanage/controller/EventController.java index 6b1d48f..9a6d38a 100644 --- a/src/main/java/com/hisense/monitormanage/controller/EventController.java +++ b/src/main/java/com/hisense/monitormanage/controller/EventController.java @@ -181,4 +181,20 @@ public class EventController { return success; } + /** + * 查询当天根据事件名称查询事件 + * @param eventCnName + * @return + */ + @GetMapping("selectByTimeAndName") + @ApiOperation("查询当天根据事件名称查询事件") + @ApiImplicitParam(name = "eventCnName",value = "事件名称",required = true,dataType = "String") + public Result selectByTimeAndName(String eventCnName){ + List byName = eventMapper.selectByTimeAndName(eventCnName); + + Result success = Result.success(byName); + + return success; + } + } diff --git a/src/main/java/com/hisense/monitormanage/mapper/EventMapper.java b/src/main/java/com/hisense/monitormanage/mapper/EventMapper.java index cbb1d2d..3e75034 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/EventMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/EventMapper.java @@ -16,4 +16,7 @@ public interface EventMapper extends BaseMapper { @Select("select * from t_event where event_cn_name = #{eventCnName} and track_event = 'START'") List selectByName(@Param("eventCnName") String eventCnName); + + @Select("SELECT * FROM t_event where TO_DAYS(capture_time) = TO_DAYS(NOW()) AND event_cn_name = #{eventCnName} AND track_event = 'START'") + List selectByTimeAndName(@Param("eventCnName") String eventCnName); } diff --git a/src/main/java/com/hisense/monitormanage/service/MonitorService.java b/src/main/java/com/hisense/monitormanage/service/MonitorService.java index 228f380..6f9cae3 100644 --- a/src/main/java/com/hisense/monitormanage/service/MonitorService.java +++ b/src/main/java/com/hisense/monitormanage/service/MonitorService.java @@ -212,8 +212,11 @@ public class MonitorService { } } + /** + * 特定摊点8:20抓图 + */ @Scheduled(cron = "0 20 8 * * ? ") - public void screenShot3() { + public void boothEight() { try { log.info("[monitor-capture]: start capture1"); @@ -251,8 +254,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点8:50抓图 + */ @Scheduled(cron = "0 50 8 * * ? ") - public void screenShot4() { + public void boothEights() { try { log.info("[monitor-capture]: start capture1"); @@ -290,8 +296,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点9:50抓图 + */ @Scheduled(cron = "0 50 9 * * ? ") - public void screenShot5() { + public void boothNine() { try { log.info("[monitor-capture]: start capture1"); @@ -329,8 +338,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点9:20抓图 + */ @Scheduled(cron = "0 20 9 * * ? ") - public void screenShot6() { + public void boothNines() { try { log.info("[monitor-capture]: start capture1"); @@ -368,8 +380,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点11:20抓图 + */ @Scheduled(cron = "0 20 11 * * ? ") - public void screenShot7() { + public void boothEleven() { try { log.info("[monitor-capture]: start capture1"); @@ -407,8 +422,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点12:20抓图 + */ @Scheduled(cron = "0 20 12 * * ? ") - public void screenShot8() { + public void boothTwelve() { try { log.info("[monitor-capture]: start capture1"); @@ -446,8 +464,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点19:20抓图 + */ @Scheduled(cron = "0 20 19 * * ? ") - public void screenShot9() { + public void boothNineteen() { try { log.info("[monitor-capture]: start capture1"); @@ -485,8 +506,11 @@ public class MonitorService { exception.printStackTrace(); } } + /** + * 特定摊点20:20抓图 + */ @Scheduled(cron = "0 20 20 * * ? ") - public void screenShot10() { + public void boothTwenty() { try { log.info("[monitor-capture]: start capture1"); @@ -525,7 +549,7 @@ public class MonitorService { } } @Scheduled(cron = "0 0 8 1/1 * ?") - public void screenShot1() { + public void construction() { try { @@ -567,7 +591,7 @@ public class MonitorService { } @Scheduled(cron = "0 0 8/1 * * ?") - public void screenShot2() { + public void scenicSpotAndBathing() { try { @@ -712,6 +736,13 @@ public class MonitorService { } } + + /** + * 获取路径返回给前端 + * @param code + * @return + * @throws IOException + */ public String fileCode(String code)throws IOException{ String url = monitorDomain + "/videoService/realmonitor/uri?scheme=HLS&channelId=" + code; @@ -733,6 +764,13 @@ public class MonitorService { static public List cameras = new LinkedList(); + /** + * 调用接口获取摄像头和组织 + * @param parentId + * @param path + * @throws IOException + * @throws InterruptedException + */ public void videoService(String parentId, String path) throws IOException, InterruptedException { String url = monitorDomain + "/videoService/devicesManager/deviceTree?nodeType=1&typeCode=01;0;ALL;ALL&id=" + parentId;