lyq vor 1 Jahr
Ursprung
Commit
3892355cd5

+ 8 - 4
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CenterEventViewController.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteDeptService;
 import com.ruoyi.system.api.RemoteDeptService;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudTodayEventsBO;
 import com.sooka.sponest.event.centereventteventcatalogue.domain.bo.VisuForestCloudTodayEventsBO;
@@ -14,10 +15,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 /**
 /**
  * @program: sooka
  * @program: sooka
@@ -133,4 +131,10 @@ public class CenterEventViewController extends BaseController {
 //        visuForestCloudMapVO.setIsHgj(result.getData().toString());
 //        visuForestCloudMapVO.setIsHgj(result.getData().toString());
         visuForestCloudMapVO.setIsHgj("false");
         visuForestCloudMapVO.setIsHgj("false");
     }
     }
+
+    @GetMapping("/listAll")
+    public TableDataInfo listAll(VisuForestCloudMapVO visuForestCloudMapVO) {
+        startPage();
+        return getDataTable(centerEventViewService.listAll(visuForestCloudMapVO));
+    }
 }
 }

+ 12 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/VisuForestCloudMapEventListBO.java

@@ -2,9 +2,14 @@ package com.sooka.sponest.event.centereventteventcatalogue.domain.bo;
 
 
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
 @Data
 @Data
 public class VisuForestCloudMapEventListBO {
 public class VisuForestCloudMapEventListBO {
 
 
+    private String eventId;
+
     private String eventCode;
     private String eventCode;
 
 
     private String eventName;
     private String eventName;
@@ -28,8 +33,15 @@ public class VisuForestCloudMapEventListBO {
     private Integer urgeCount;
     private Integer urgeCount;
 
 
     private String picturePath;
     private String picturePath;
+    private List<String> picturePathList = new ArrayList<>();
 
 
     private String pictureSource;
     private String pictureSource;
 
 
     private String pictureType;
     private String pictureType;
+
+    private String version;
+
+    private String address;
+
+    private String cameraCode;
 }
 }

+ 4 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/mapper/CenterEventViewMapper.java

@@ -33,4 +33,8 @@ public interface CenterEventViewMapper {
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
 
 
     VisuForestEventTodayEventListBO eventPush(VisuForestCloudMapVO visuForestCloudMapVO);
     VisuForestEventTodayEventListBO eventPush(VisuForestCloudMapVO visuForestCloudMapVO);
+
+    List<VisuForestCloudMapEventListBO> listAll(VisuForestCloudMapVO visuForestCloudMapVO);
+
+    List<VisuForestCloudMapEventListBO> getEventFileAll(VisuForestCloudMapVO visuForestCloudMapVO);
 }
 }

+ 2 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/ICenterEventViewService.java

@@ -33,4 +33,6 @@ public interface ICenterEventViewService {
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
     List<VisuForestEventTodayEventListBO> getNearEvent(VisuForestCloudMapVO visuForestCloudMapVO);
 
 
     VisuForestEventTodayEventListBO eventPush(VisuForestCloudMapVO visuForestCloudMapVO);
     VisuForestEventTodayEventListBO eventPush(VisuForestCloudMapVO visuForestCloudMapVO);
+
+    List<VisuForestCloudMapEventListBO> listAll(VisuForestCloudMapVO visuForestCloudMapVO);
 }
 }

+ 26 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CenterEventViewServiceImpl.java

@@ -276,4 +276,30 @@ public class CenterEventViewServiceImpl extends BaseService implements ICenterEv
         });
         });
         return event;
         return event;
     }
     }
+
+    @Override
+    public List<VisuForestCloudMapEventListBO> listAll(VisuForestCloudMapVO visuForestCloudMapVO) {
+        setSookaDataBase(visuForestCloudMapVO);
+        List<VisuForestCloudMapEventListBO> result = centerEventViewMapper.listAll(visuForestCloudMapVO);
+        if (StringUtils.isEmpty(result)) {
+            return result;
+        }
+        Map<String, String> keyMap = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigMap(Arrays.asList(FILE_PREFIX_LOCAL, FILE_PREFIX_HIK1, FILE_PREFIX_HIK2, FILE_PREFIX_DH1, FILE_PREFIX_DH2)).getData();
+        String token = RemoteApiUtil.getInstance().getToken();// 大华token
+        List<String> eventCodes = result.stream().map(VisuForestCloudMapEventListBO::getEventCode).collect(Collectors.toList());
+        visuForestCloudMapVO.setEventStatus(eventCodes);
+        List<VisuForestCloudMapEventListBO> attachs = centerEventViewMapper.getEventFileAll(visuForestCloudMapVO);
+        result.forEach(event -> {
+            for (VisuForestCloudMapEventListBO attach : attachs) {
+                if (event.getEventCode().equals(attach.getEventCode())) {
+                    if ("DH_1".equals(attach.getPictureSource())) {
+                        event.getPicturePathList().add(FilePrefixUtils.getUrlPrefix(attach.getPictureSource(), keyMap) + attach.getPicturePath() + "?token=" + token);
+                    } else {
+                        event.getPicturePathList().add(FilePrefixUtils.getUrlPrefix(attach.getPictureSource(), keyMap) + attach.getPicturePath());
+                    }
+                }
+            }
+        });
+        return result;
+    }
 }
 }

+ 30 - 0
src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml

@@ -409,4 +409,34 @@
         where a.event_code = #{eventCode} ${params.dataScope}
         where a.event_code = #{eventCode} ${params.dataScope}
         group by a.event_code
         group by a.event_code
     </select>
     </select>
+
+    <select id="listAll" parameterType="VisuForestCloudMapVO" resultType="VisuForestCloudMapEventListBO">
+        select a.id eventId, event_code eventCode, event_name eventName, version, address, b.camera_code cameraCode
+        from centerevent_t_eventcatalogue a
+        left join onest_monitor.centermonitor_t_camera b on a.create_by = b.id
+        where event_status_value = 'forest_event_status_1' and report_source = 'reporting_source_1'
+        <if test="eventName != null and eventName != ''">
+            and event_name like concat('%', #{eventName},'%')
+        </if>
+        <if test="day != null and day != ''">
+            and DATE_FORMAT(a.create_time,'%Y-%m-%d') = #{day}
+        </if>
+        order by a.create_time desc
+    </select>
+
+    <select id="getEventFileAll" resultType="VisuForestCloudMapEventListBO">
+        select event_code eventCode,attach_path picturePath,bus_source pictureSource,file_type pictureType from (
+        select SUBSTRING_INDEX(GROUP_CONCAT(id order by create_time),',',1) id,event_code
+        from centerevent_t_fire_log
+        <where>
+            <if test="eventStatus != null and eventStatus.size > 0">
+                and event_code in
+                <foreach item="item" collection="eventStatus" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        group by event_code) l
+        left join ${database_data}.centerdata_t_attach f on f.bus_id = l.id
+    </select>
 </mapper>
 </mapper>