浏览代码

手机端查看视频
手机端收藏事件

Memory_LG 3 周之前
父节点
当前提交
66690a8644

+ 14 - 0
src/main/java/com/sooka/sponest/mobile/event/controller/AppEventController.java

@@ -378,4 +378,18 @@ public class AppEventController extends AppBaseController {
 
     }
 
+    @GetMapping("/getCollectList")
+    public AjaxResult getCollectList(AppEventCollect appEventCollect){
+        return appEventService.getCollectList(appEventCollect);
+    }
+    @PostMapping("/addCollect")
+    public AjaxResult addCollect(@RequestBody AppEventCollect appEventCollect){
+        return appEventService.addCollect(appEventCollect);
+    }
+
+    @PostMapping("/deleteCollect")
+    public AjaxResult deleteCollect(@RequestBody AppEventCollect appEventCollect){
+        return appEventService.deleteCollect(appEventCollect);
+    }
+
 }

+ 194 - 0
src/main/java/com/sooka/sponest/mobile/event/domain/AppEventCollect.java

@@ -0,0 +1,194 @@
+package com.sooka.sponest.mobile.event.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.datascope.base.domain.BaseBusinessEntity;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 事件收藏对象 centerevent_t_event_collect
+ *
+ * @author ruoyi
+ * @date 2025-06-24
+ */
+@Data
+public class AppEventCollect extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private String id;
+
+    /**
+     * 事件编号
+     */
+    private String eventCode;
+
+    /**
+     * 收藏人
+     */
+    private String userId;
+
+    /**
+     * 排序
+     */
+    private String sort;
+
+    public AppEventCollect() {
+
+    }
+
+    public AppEventCollect(String eventType, String eventTypeXl, String eventName, String eventDescription, String longitude, String latitude, String reportor, Date reportTime, String address) {
+        this.eventType = eventType;
+        this.eventTypeXl = eventTypeXl;
+        this.eventName = eventName;
+        this.eventDescription = eventDescription;
+        this.longitude = longitude;
+        this.latitude = latitude;
+        this.reportor = reportor;
+        this.reportTime = reportTime;
+        this.address = address;
+    }
+
+    /**
+     * 事件名称
+     */
+    @Excel(name = "事件名称")
+    @NotBlank(message = "事件名称不能为空")
+    private String eventName;
+
+    /**
+     * 事件描述
+     */
+    @Excel(name = "事件描述")
+    @NotBlank(message = "事件描述不能为空")
+    private String eventDescription;
+
+    /**
+     * 事件分类(大类)
+     */
+    @Excel(name = "事件分类")
+    @NotBlank(message = "事件分类大类不能为空")
+    private String eventType;
+    private String[] eventTypes;
+
+    /**
+     * 事件分类(小类)
+     */
+    @NotBlank(message = "事件分类小类不能为空")
+    private String eventTypeXl;
+    private List<String> eventTypeXls;// 选中分类
+    private List<String> defaultTypeXl;// 默认分类
+
+    /**
+     * 事件小类名称
+     */
+    private String eventTypeXlName;
+
+    /**
+     * 事件来源
+     */
+    @Excel(name = "事件来源", dictType = "reporting_source")
+    private String reportSource;
+
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    @NotBlank(message = "经度不能为空")
+    private String longitude;
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    @NotBlank(message = "纬度不能为空")
+    private String latitude;
+
+    /**
+     * 上报人
+     */
+    @Excel(name = "上报人")
+    private String reportor;
+
+    /**
+     * 上报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+//    @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date reportTime;
+    private String[] reportTimeRange;
+
+    /**
+     * 上报具体位置
+     */
+    private String address;
+
+    /**
+     * 事件状态key
+     */
+    @Excel(name = "事件状态")
+    private String eventStatus;
+
+    /**
+     * 事件状态value
+     */
+    private String eventStatusValue;
+
+    /**
+     * 是否被催办
+     */
+    @Excel(name = "是否被催办", dictType = "sys_isurge")
+    private String isUrged;
+
+    private Integer urgeCount;
+
+    /**
+     * 火灾半径
+     */
+    private String fireRadius;
+
+    /**
+     * 关联预案
+     */
+    private String reserve;
+
+    private String eventTypeLabel;
+
+    private String eventTypeXlLabel;
+
+    /**
+     * 数据状态(可用 、不可用 ) 字典
+     */
+    private String dataStatus;
+
+
+    /**
+     * 数据所属部门id
+     */
+    private Long deptId;
+
+    /**
+     * 数据所属部门名称
+     */
+    private String deptName;
+
+    private String statusFlag;
+
+    private String escalation;// 是否联系扑火队
+
+    private String isExamine;// 是否审核
+
+    private String isPush;// 是否推送
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date gdTime;// 归档时间
+
+    private List<CenterdataTAttach> attach;
+
+}

+ 6 - 0
src/main/java/com/sooka/sponest/mobile/event/service/AppEventService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.event.service;
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.event.domain.AppEventCollect;
 import com.sooka.sponest.mobile.event.domain.AppEventSalBO;
 import com.sooka.sponest.mobile.event.domain.AppEventSalVO;
 import com.sooka.sponest.mobile.event.domain.AppEventTypeBO;
@@ -30,4 +31,9 @@ public interface AppEventService {
 
     AjaxResult selectCentereventTFireLogById(String id);
 
+    AjaxResult getCollectList(AppEventCollect appEventCollect);
+
+    AjaxResult addCollect(AppEventCollect appEventCollect);
+
+    AjaxResult deleteCollect(AppEventCollect appEventCollect);
 }

+ 26 - 0
src/main/java/com/sooka/sponest/mobile/event/service/impl/AppEventServiceImpl.java

@@ -3,6 +3,9 @@ package com.sooka.sponest.mobile.event.service.impl;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.file.FilePrefixUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.PageDomain;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.core.web.page.TableSupport;
 import com.sooka.sponest.mobile.event.domain.*;
 import com.sooka.sponest.mobile.event.service.AppEventService;
 import com.sooka.sponest.mobile.remoteapi.RemoteDataBaseService;
@@ -191,4 +194,27 @@ public class AppEventServiceImpl implements AppEventService {
         log.setAttachsMp(appDataTAttachList1);
         return AjaxResult.success(log);
     }
+
+    @Override
+    public AjaxResult getCollectList(AppEventCollect appEventCollect) {
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        TableDataInfo collectList = remoteEventBaseService.getCollectList(pageNum, pageSize, appEventCollect.getUserId(), appEventCollect.getEventName(), appEventCollect.getReportTimeRange());
+        if(collectList.getCode() == 200){
+            return AjaxResult.success(collectList.getRows());
+        }else{
+            return AjaxResult.error(collectList.getCode(), collectList.getMsg());
+        }
+    }
+
+    @Override
+    public AjaxResult addCollect(AppEventCollect appEventCollect) {
+        return remoteEventBaseService.addCollect(appEventCollect);
+    }
+
+    @Override
+    public AjaxResult deleteCollect(AppEventCollect appEventCollect) {
+        return remoteEventBaseService.deleteCollect(appEventCollect.getId());
+    }
 }

+ 12 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteEventBaseService.java

@@ -1,8 +1,11 @@
 package com.sooka.sponest.mobile.remoteapi;
 
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.VisuFireSendingSMSVo;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.VisuForestCloudMapVO;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
@@ -249,4 +252,13 @@ public interface RemoteEventBaseService {
      */
     @PostMapping(value = "/spread",headers = {"Content-Type=application/json"})
     public AjaxResult addspread(@RequestBody String centereventTFireSpread);
+
+    @GetMapping("/collect/list")
+    public TableDataInfo getCollectList(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("userId") String userIdm, @RequestParam("eventName") String eventName, @RequestParam("reportTimeRange") String[] reportTimeRange);
+
+    @PostMapping("/collect")
+    public AjaxResult addCollect(@RequestBody AppEventCollect centereventTEventCollect);
+
+    @DeleteMapping("/collect/{ids}")
+    public AjaxResult deleteCollect(@PathVariable("ids") String ids);
 }

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteMonitorBaseService.java

@@ -93,4 +93,7 @@ public interface RemoteMonitorBaseService {
     @GetMapping("/broadcast/selectByBroadcastId/{id}")
     @LogFeignCall
     AjaxResult selectByBroadcastId(@PathVariable("id")String id);
+
+    @GetMapping("/camera/getCameraPreviewURL/{channelCode}")
+    AjaxResult getCameraPreviewURL(@PathVariable("channelCode") String channelCode);
 }

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteMonitorBaseServiceFallbackFactory.java

@@ -115,6 +115,11 @@ public class RemoteMonitorBaseServiceFallbackFactory implements FallbackFactory<
             public AjaxResult selectByBroadcastId(String id) {
                 return null;
             }
+
+            @Override
+            public AjaxResult getCameraPreviewURL(String cameraCode) {
+                return null;
+            }
         };
     }
 }

+ 8 - 6
src/main/java/com/sooka/sponest/mobile/system/camera/service/impl/AppCameraServiceImpl.java

@@ -1,5 +1,7 @@
 package com.sooka.sponest.mobile.system.camera.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.mobile.remoteapi.RemoteMonitorBaseService;
 import com.sooka.sponest.mobile.system.camera.domain.*;
@@ -82,12 +84,12 @@ public class AppCameraServiceImpl implements AppCameraService {
                 break;
             }
         }
-//        if(!"1".equals(appCameraDetailsBO.getCameraFactory())){
-//            AjaxResult ar = remoteMonitorBaseService.getCameraPreviewURL(channelCode);
-//            String videoStream = JSONObject.parseObject(ar.get("msg").toString()).getJSONObject("data").getString("url");
-//            appCameraListBO.setVideoStream(videoStream);
-//            return appCameraListBO;
-//        }
+        if(!"1".equals(appCameraDetailsBO.getCameraFactory())){
+            AjaxResult ar = remoteMonitorBaseService.getCameraPreviewURL(channelCode);
+            LinkedHashMap data = (LinkedHashMap) ar.get("data");
+            appCameraListBO.setVideoStream(String.valueOf(data.get("url")));
+            return appCameraListBO;
+        }
         return appCameraListBO;
     }