Преглед на файлове

Merge remote-tracking branch 'origin/master'

syyang преди 2 години
родител
ревизия
d14f16799f

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

@@ -5,6 +5,8 @@ import com.business.slfh.app.appbase.controller.AppBaseController;
 import com.business.slfh.app.appbase.domain.AppPageModel;
 import com.business.slfh.manager.cameramanager.domain.TResCamera;
 import com.business.slfh.manager.cameramanager.service.ITResCameraService;
+import com.business.slfh.manager.canalmanager.domain.TResCanal;
+import com.business.slfh.manager.canalmanager.service.ITResCanalService;
 import com.business.slfh.manager.forestdevicemanager.domain.TResForestdevice;
 import com.business.slfh.manager.forestdevicemanager.service.ITResForestdeviceService;
 import com.business.slfh.manager.levelmanager.domain.TResLevel;
@@ -82,6 +84,8 @@ public class Visualization_Event_Controller extends AppBaseController {
     @Autowired
     private ITResSourcewaterService tResSourcewaterService;
     @Autowired
+    private ITResCanalService tResCanalService;
+    @Autowired
     private ITResForestdeviceService itResForestdeviceService;
 
     @RequestMapping("/getVisualizationEvent")
@@ -713,6 +717,13 @@ public class Visualization_Event_Controller extends AppBaseController {
         return tResSourcewaterService.selectTResSourcewaterList(tResSourcewater);
     }
 
+    @RequestMapping("/getCanalManager")
+    @ResponseBody
+    public List<TResCanal> getCanalManager(TResCanal tResCanal) {
+        tResCanal.setDeptId(userInfoUtil.getLoginUserInfo().getDeptId());
+        return tResCanalService.selectTResCanalList(tResCanal);
+    }
+
     @RequestMapping("/getForestDevice")
     @ResponseBody
     public List<TResForestdevice> getForestDevice(TResForestdevice forestdevice) {

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

@@ -1129,6 +1129,8 @@
             SELECT ID,NAME,LATITUDE,LONGITUDE,ADDRESS,CONTACT_USER,CONTACT_PHONE,DEPT_ID,'4' AS FOREST_TYPE FROM T_RES_STATIONTEAM
               UNION
             SELECT ID,NAME,LATITUDE,LONGITUDE,ADDRESS,CONTACT_USER,CONTACT_PHONE,DEPT_ID,'5' AS FOREST_TYPE FROM T_RES_STATIONWEATHER
+              UNION
+            SELECT ID,NAME,LATITUDE,LONGITUDE,ADDRESS,CONTACT_USER,CONTACT_PHONE,DEPT_ID,'6' AS FOREST_TYPE FROM T_RES_WATERINTAKE
         ) d
         WHERE 1=1
         AND d.DEPT_ID IN (

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

@@ -318,27 +318,25 @@
 <!--事件 左侧导航 开始-->
 <div class="left_nav">
     <label><input type="checkbox" checked name="leftNav" id="slfh" />森林防火</label>
-    <label><input type="checkbox"  name="leftNav" id="lwt" />热感云台</label>
-    <label><input type="checkbox"  name="leftNav" id="bch" >病虫害</label>
-    <label><input type="checkbox"  name="leftNav" id="lklf" />乱砍滥伐</label>
+    <!--<label><input type="checkbox"  name="leftNav" id="bch" >病虫害</label>-->
+    <!--<label><input type="checkbox"  name="leftNav" id="lklf" />乱砍滥伐</label>-->
+    <label><input type="checkbox"  name="leftNav" id="jgfs" />秸秆焚烧</label>
+    <label><input type="checkbox"  name="leftNav" id="fxfk" />防汛防控</label>
+    <label><input type="checkbox"  name="leftNav" id="ysdw" />野生动物</label>
     <!--<label><input type="checkbox"  name="leftNav" id="tscs" />偷沙采石</label>-->
     <!--<label><input type="checkbox"  name="leftNav" id="toud" />偷盗</label>-->
-
+    <!--<label><input type="checkbox"  name="leftNav" id="lyj" />林业局</label>-->
     <!--<label><input type="checkbox"  name="leftNav" id="sxt" />警戒头</label>-->
+    <label><input type="checkbox"  name="leftNav" id="lwt" />热感云台</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="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="fhjcz" />防火检查站</label>
+    <label><input type="checkbox"  name="leftNav" id="jywz" />救援物资</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>
-    <label><input type="checkbox"  name="leftNav" id="jgfs" />秸秆焚烧</label>
-    <label><input type="checkbox"  name="leftNav" id="fxfk" />防汛防控</label>
-    <label><input type="checkbox"  name="leftNav" id="ysdw" />野生动物</label>
+    <label><input type="checkbox"  name="leftNav" id="sq" />水渠</label>
+    <label><input type="checkbox"  name="leftNav" id="qsk" />取水口</label>
 </div>
 <!--事件 左侧导航 结束-->
 <!--森林 左侧导航 开始-->

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

@@ -739,7 +739,7 @@
         });
     }
     function syMarker(option){
-        let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
+        let iconUrl = '[[@{/visualization/images/sy.png}]]';
         let icon = L.icon({
             iconUrl: iconUrl,
             iconSize: [65, 67],
@@ -767,6 +767,55 @@
             map.closePopup(pop);
         });
     }
+
+    /**
+     * 查询所有水渠
+     * */
+    function getSqMarkers(){
+        $.post("[[@{/visualization/event/getCanalManager}]]",function (res) {
+            console.log(res);
+            for(let i=0;i<res.length;i++) {
+                let json = {
+                    id: res[i].id,
+                    name: res[i].name,
+                    length: res[i].length,
+                    deptName: res[i].deptName,
+                    latitude: res[i].latitude,
+                    longitude: res[i].longitude
+                };
+                sqMarker(json);
+            }
+        });
+    }
+    function sqMarker(option){
+        let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
+        let icon = L.icon({
+            iconUrl: iconUrl,
+            iconSize: [65, 67],
+            iconAnchor: [37, 57]
+        });
+        let markName="sq"+option.id;
+        markName = L.marker(
+            [option.latitude , option.longitude],
+            {icon: icon}
+        );
+        resultLayer.addLayer(markName);
+
+        markName.on("mousemove", function () {
+            pop = L.popup({className:'div_tittle'})
+                .setLatLng([option.latitude,option.longitude])
+                .setContent(
+                    "<span class='slfh_tit'>水渠</span>"+
+                    "<h4>水渠名称:"+option.name+"</h4>"+
+                    "<p>渠道长度:"+option.length+"</p>"+
+                    "<p>所属林场:"+option.deptName+"</p>"
+                ).openOn(map);
+        });
+        markName.on("mouseout", function () {
+            map.closePopup(pop);
+        });
+    }
+
     /**
      * 查询所有救援物资
      * */
@@ -922,6 +971,9 @@
                 case 'jywz':
                     getJywzMarkers();
                     break;
+                case 'sq':
+                    getSqMarkers();
+                    break;
             }
         }
         //加载消防资源
@@ -967,7 +1019,7 @@
                     typeArr.push(2);//林场
                     break;
                 case 'jjd':
-                    typeArr.push(3);//降点
+                    typeArr.push(3);//降点
                     break;
                 case 'phd':
                     typeArr.push(4);//扑火队
@@ -975,6 +1027,9 @@
                 case 'qxz':
                     typeArr.push(5);//气象站
                     break;
+                case 'qsk':
+                    typeArr.push(6);//取水口
+                    break;
             }
         }
         console.log(typeArr);
@@ -1010,6 +1065,9 @@
                     case '5':
                         qxzMarker(json);//气象站
                         break;
+                    case '6':
+                        qskMarker(json);//取水口
+                        break;
                 }
             }
         });
@@ -1196,6 +1254,37 @@
         });
     }
 
+    function qskMarker(option){//取水口
+        let iconUrl = '[[@{/visualization/images/qxz.gif}]]';
+        let icon = L.icon({
+            iconUrl: iconUrl,
+            iconSize: [65, 67],
+            iconAnchor: [37, 57]
+        });
+        let markName="qsk"+option.id;
+        markName = L.marker(
+            [option.latitude , option.longitude],
+            {icon: icon}
+        );
+        resultLayer.addLayer(markName);
+
+        markName.on("mousemove", function () {
+            pop = L.popup({className:'div_tittle'})
+                .setLatLng([option.latitude,option.longitude])
+                .setContent(
+                    "<span class='slfh_tit'>取水口</span>"+
+                    "<h4>名称:"+option.name+"</h4>"+
+                    "<p>联系人:"+option.contact_USER+"</p>"+
+                    "<p>联系电话:"+option.contact_PHONE+"</p>"+
+                    "<p>地址:"+option.address+"</p>"
+
+                ).openOn(map);
+        });
+        markName.on("mouseout", function () {
+            map.closePopup(pop);
+        });
+    }
+
     function markMarkers(json,type,arr){
         featureIds.length = 0;
         if (type == 'reserveplan_type_1') {