Browse Source

更新消防

limeng 4 years ago
parent
commit
588bd1383c

+ 3 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/controller/Visualization_Event_Controller.java

@@ -105,6 +105,8 @@ public class Visualization_Event_Controller extends AppBaseController {
 
         //上报总数
         int Visualization_Report_Event_Count = visualization_event_service.Visualization_Report_Event_Count();
+        //各类时间数量
+        List <Visualization_Event_Count> Visualization_Event_Each_Count = visualization_event_service.Visualization_Event_Each_Count();
         //事件总数
         int Visualization_All_Event_Count = visualization_event_service.Visualization_All_Event_Count();
         //人员总数
@@ -124,6 +126,7 @@ public class Visualization_Event_Controller extends AppBaseController {
         event.setUSER_DEPTID(DEPTID);
         List<Visualization_Event> Visualization_Pending_List = visualization_event_service.Visualization_Pending_List(event);
         map.put("Visualization_Report_Event_Count", Visualization_Report_Event_Count);
+        map.put("Visualization_Event_Each_Count", Visualization_Event_Each_Count);
         map.put("Visualization_All_Event_Count", Visualization_All_Event_Count);
         map.put("Visualization_User_Count", Visualization_User_Count);
         map.put("Visualization_Car_Count", Visualization_Car_Count);

+ 15 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/domain/Visualization_Event_Count.java

@@ -0,0 +1,15 @@
+package com.business.slfh.visualization.event.domain;
+
+import com.sooka.common.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * @author limeng
+ * @date 2021年05月28日 15:14
+ */
+@Data
+public class Visualization_Event_Count extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+    private String COUNT;
+    private String RESERVEPLAN_TYPE;
+}

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/mapper/Visualization_Event_Mapper.java

@@ -59,4 +59,5 @@ public interface Visualization_Event_Mapper {
     void insertWrjGj(Visualizaiton_UAV uav);
     void deleteWrjGjs();
     List<Visualizaiton_UAV> getWrjGjs();
+    List<Visualization_Event_Count> Visualization_Event_Each_Count(@Param("DEPT_ID") String DEPT_ID);
 }

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/service/Visualization_Event_Service.java

@@ -55,4 +55,5 @@ public interface Visualization_Event_Service {
     void updateEventSign(String eventId,String reservePlanType);
     int getRoleMenu();
     List<Visualization_XF_Resources> getXfResources(String [] typeArr,String DEPT_ID);
+    List<Visualization_Event_Count> Visualization_Event_Each_Count();
 }

+ 4 - 0
mybusiness/src/main/java/com/business/slfh/visualization/event/service/impl/Visualization_Event_Service_Impl.java

@@ -230,5 +230,9 @@ public class Visualization_Event_Service_Impl extends BaseService implements Vis
     public List<Visualizaiton_UAV> getWrjGjs(){
         return Visualization_Event_Mapper.getWrjGjs();
     }
+    @Override
+    public List<Visualization_Event_Count> Visualization_Event_Each_Count(){
+        return Visualization_Event_Mapper.Visualization_Event_Each_Count(userInfoUtil.getLoginUserInfo().getDeptId().toString());
+    }
 
 }

+ 39 - 0
mybusiness/src/main/resources/mapper/grid/visualization/Visualization_Event_Mapper.xml

@@ -236,6 +236,10 @@
         <result property="DEPT_ID" column="DEPT_ID"/>
         <result property="FOREST_TYPE" column="FOREST_TYPE"/>
     </resultMap>
+    <resultMap id="Visualization_Event_Count" type="Visualization_Event_Count">
+        <result property="COUNT" column="COUNT"/>
+        <result property="RESERVEPLAN_TYPE" column="RESERVEPLAN_TYPE"/>
+    </resultMap>
 
 
     <sql id="Columns">
@@ -331,6 +335,41 @@
         ) AS t
     </select>
 
+    <select id="Visualization_Event_Each_Count" resultType="Visualization_Event_Count">
+        SELECT
+            COUNT(t.id) COUNT,RESERVEPLAN_TYPE
+        FROM
+        (
+            (
+                SELECT
+                    id,'reserveplan_type_1' as reserveplan_type
+                FROM
+                    t_u_event_fire
+                WHERE
+                    1 = 1
+                AND DEPT_ID IN (
+                    <include refid="Depts">
+                        <property name="dept_id" value="#{DEPT_ID}"/>
+                    </include>
+                )
+            )
+              UNION
+            (
+                SELECT
+                    id,reserveplan_type
+                FROM
+                    t_u_event_others
+                WHERE
+                    1 = 1
+                AND DEPT_ID IN (
+                    <include refid="Depts">
+                        <property name="dept_id" value="#{DEPT_ID}"/>
+                    </include>
+                )
+            )
+        ) AS t GROUP BY reserveplan_type
+    </select>
+
     <select id="Visualization_All_Event_Count" resultType="Integer">
         SELECT
           COUNT(t.id) AllEvent

+ 14 - 14
mybusiness/src/main/resources/templates/business/visualization/event.html

@@ -309,20 +309,20 @@
 <!--事件 左侧导航 开始-->
 <div class="left_nav">
     <label><input type="checkbox" checked name="leftNav" id="slfh" />森林防火</label>
-    <label><input type="checkbox" checked name="leftNav" id="bch" >病虫害</label>
-    <label><input type="checkbox" checked name="leftNav" id="lwt" />瞭望台</label>
-    <label><input type="checkbox" checked name="leftNav" id="sxt" />警戒头</label>
-    <label><input type="checkbox" checked name="leftNav" id="toud" />偷盗</label>
-    <label><input type="checkbox" checked name="leftNav" id="lklf" />乱砍滥伐</label>
-    <label><input type="checkbox" checked name="leftNav" id="tscs" />偷沙采石</label>
-    <label><input type="checkbox" checked name="leftNav" id="phd" />扑火队</label>
-    <label><input type="checkbox" checked name="leftNav" id="jjd" />机降点</label>
-    <label><input type="checkbox" checked name="leftNav" id="qxz" />气象站</label>
-    <label><input type="checkbox" checked name="leftNav" id="fhjcz" />防火检查站</label>
-    <label><input type="checkbox" checked name="leftNav" id="lyj" />林业局</label>
-    <label><input type="checkbox" checked name="leftNav" id="lc" />林场</label>
-    <label><input type="checkbox" checked name="leftNav" id="sy" />水源</label>
-    <label><input type="checkbox" checked name="leftNav" id="jywz" />救援物资</label>
+    <label><input type="checkbox"  name="leftNav" id="bch" >病虫害</label>
+    <label><input type="checkbox"  name="leftNav" id="lwt" />瞭望台</label>
+    <label><input type="checkbox"  name="leftNav" id="sxt" />警戒头</label>
+    <label><input type="checkbox"  name="leftNav" id="toud" />偷盗</label>
+    <label><input type="checkbox"  name="leftNav" id="lklf" />乱砍滥伐</label>
+    <label><input type="checkbox"  name="leftNav" id="tscs" />偷沙采石</label>
+    <label><input type="checkbox"  name="leftNav" id="phd" />扑火队</label>
+    <label><input type="checkbox"  name="leftNav" id="jjd" />机降点</label>
+    <label><input type="checkbox"  name="leftNav" id="qxz" />气象站</label>
+    <label><input type="checkbox"  name="leftNav" id="fhjcz" />防火检查站</label>
+    <label><input type="checkbox"  name="leftNav" id="lyj" />林业局</label>
+    <label><input type="checkbox"  name="leftNav" id="lc" />林场</label>
+    <label><input type="checkbox"  name="leftNav" id="sy" />水源</label>
+    <label><input type="checkbox"  name="leftNav" id="jywz" />救援物资</label>
 </div>
 <!--事件 左侧导航 结束-->
 <!--森林 左侧导航 开始-->

+ 18 - 15
mybusiness/src/main/resources/templates/business/visualization/frame.html

@@ -21,15 +21,16 @@
         <div class="jk_txt" >
             <h2 class="jk_sj"><i th:text="${Visualization_Report_Event_Count}"/></h2>
             <span>上报总数</span>
-            <div id="jk_hover"  >
+            <div id="jk_hover">
                 <ul>
-                    <li>火险已上报</li>
-                    <li>火险已上报</li>
-                    <li>火险已上报</li>
-                    <li>火险已上报</li>
-                    <li>火险已上报</li>
-                    <li>火险已上报</li>
-
+                    <li th:each="veec : ${Visualization_Event_Each_Count}">
+                        <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_1'">森林防火:</span>
+                        <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_2'">病虫害:</span>
+                        <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_3'">偷盗偷猎:</span>
+                        <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_4'">乱砍乱伐:</span>
+                        <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_5'">偷砂采石:</span>
+                        [[${veec.COUNT}]]
+                    </li>
                 </ul>
             </div>
         </div>
@@ -42,14 +43,16 @@
             <h2 class="jk_sj"><i th:text="${Visualization_All_Event_Count}"/></h2>
             <span>事件总数</span>
         </div>
-        <div id="jk_hover2"  >
+        <div id="jk_hover2">
             <ul>
-                <li>火险已上报</li>
-                <li>火险已上报</li>
-                <li>火险已上报</li>
-                <li>火险已上报</li>
-                <li>火险已上报</li>
-                <li>火险已上报</li>
+                <li th:each="veec : ${Visualization_Event_Each_Count}">
+                    <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_1'">森林防火:</span>
+                    <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_2'">病虫害:</span>
+                    <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_3'">偷盗偷猎:</span>
+                    <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_4'">乱砍乱伐:</span>
+                    <span th:if="${veec.RESERVEPLAN_TYPE} eq 'reserveplan_type_5'">偷砂采石:</span>
+                    [[${veec.COUNT}]]
+                </li>
             </ul>
         </div>
     </div>

+ 5 - 5
mybusiness/src/main/resources/templates/business/visualization/map.html

@@ -65,11 +65,11 @@
 
     function initMarker(){
         clearLayers();
-        getSxtMarkers();
-        getLwtMarkers();
-        getSyMarkers();
-        getJywzMarkers();
-        getXfResources(["fhjcz","lyj","lc","jjd","phd","qxz"]);
+        // getSxtMarkers();
+        // getLwtMarkers();
+        // getSyMarkers();
+        // getJywzMarkers();
+        // getXfResources(["fhjcz","lyj","lc","jjd","phd","qxz"]);
         var eventName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("eventName");
         var deptId = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeId");
         var deptName = parent.$("#qt_iframe")[0].contentWindow.getFrameElementValue("treeName");