Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

Administrator 2 gadi atpakaļ
vecāks
revīzija
339215c33e

+ 26 - 0
mybusiness/src/main/java/com/business/slfh/dahua/service/impl/DaHuaMessageServiceImpl.java

@@ -16,6 +16,7 @@ import com.business.slfh.manager.eventprocessmanager.mapper.TUEventprocessMapper
 import com.business.slfh.manager.firemanager.domain.TUEventFire;
 import com.business.slfh.manager.firemanager.mapper.TUEventFireMapper;
 import com.business.slfh.manager.firemanager.service.ITUEventFireService;
+import com.business.slfh.manager.othersmanager.domain.TUEventOthers;
 import com.business.slfh.manager.othersmanager.mapper.TUEventOthersMapper;
 import com.business.slfh.tools.JiGuangPushUtil;
 import com.business.slfh.tools.UUID_Tools;
@@ -369,6 +370,26 @@ public class DaHuaMessageServiceImpl implements IDahuaMessageService {
                 tUEventFire.setEventStatus("event_status_6");
             }
 
+            //上报秸秆焚烧
+            TUEventOthers tuEventOthers = new TUEventOthers();
+            tuEventOthers.setCreateTime(new Date());
+            tuEventOthers.setReportTime(alarmDate);
+            tuEventOthers.setDeptId(tResCamera.getDeptId());//部门ID
+            tuEventOthers.setDeptName(tResCamera.getDeptName());//部门名称
+            tuEventOthers.setReportType("report_type_2");//机器上报
+            tuEventOthers.setName(tResCamera.getName());//事件标题
+            tuEventOthers.setReportor("机器上报");//上报人
+            tuEventOthers.setReportContent(content);
+            tuEventOthers.setLongitude(gpsX);
+            tuEventOthers.setLatitude(gpsY);
+            tuEventOthers.setReserveplanType("reserveplan_type_6");
+            if (gpsX != null && !gpsX.equals("") && gpsY != null && !gpsY.equals("")) {
+                //保存火险信息到数据库
+                tuEventOthers.setEventStatus("event_status_1");
+            } else {
+                tuEventOthers.setEventStatus("event_status_6");
+            }
+
 
             //查询图片
             DahuaUtil dahuaUtil = new DahuaUtil();
@@ -378,6 +399,7 @@ public class DaHuaMessageServiceImpl implements IDahuaMessageService {
 
             String eid = UUID_Tools.getUUID();
             tUEventFire.setId(eid);//事件ID
+            tuEventOthers.setId(eid);
             JSONObject jso = JSON.parseObject(al);
             String pics = JSON.parseObject(jso.getJSONObject("data").getJSONArray("alarms").get(0).toString()).getString("picture");
             String[] p = pics.split(";");
@@ -391,6 +413,7 @@ public class DaHuaMessageServiceImpl implements IDahuaMessageService {
             }
 
             saveFire(tUEventFire, null);
+            saveJgfs(tuEventOthers);
             TResAttach tResAttach = new TResAttach();
             tResAttach.setId(UUID.fastUUID().toString());
             tResAttach.setBusId(eid);
@@ -477,6 +500,9 @@ public class DaHuaMessageServiceImpl implements IDahuaMessageService {
 
     }
 
+    private void saveJgfs(TUEventOthers tUEventOthers) {
+        tuEventOthersMapper.insertTUEventOthers(tUEventOthers);
+    }
 
 }
 

+ 12 - 0
mybusiness/src/main/java/com/business/slfh/manager/waterintake/service/impl/TResWaterintakeServiceImpl.java

@@ -3,13 +3,18 @@ package com.business.slfh.manager.waterintake.service.impl;
 import java.util.List;
 
 import com.business.slfh.manager.waterintake.mapper.TResWaterintakeMapper;
+import com.business.slfh.tools.UUID_Tools;
+import com.business.slfh.tools.UserInfoUtil;
 import com.sooka.common.core.text.Convert;
 import com.sooka.common.utils.DateUtils;
+import com.sooka.system.domain.SysUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.business.slfh.manager.waterintake.domain.TResWaterintake;
 import com.business.slfh.manager.waterintake.service.ITResWaterintakeService;
 
+import javax.annotation.Resource;
+
 /**
  * 取水口Service业务层处理
  * 
@@ -21,6 +26,8 @@ public class TResWaterintakeServiceImpl implements ITResWaterintakeService
 {
     @Autowired
     private TResWaterintakeMapper tResWaterintakeMapper;
+    @Resource
+    private UserInfoUtil userInfoUtil;
 
     /**
      * 查询取水口
@@ -55,7 +62,12 @@ public class TResWaterintakeServiceImpl implements ITResWaterintakeService
     @Override
     public int insertTResWaterintake(TResWaterintake tResWaterintake)
     {
+        tResWaterintake.setId(UUID_Tools.getUUID());
         tResWaterintake.setCreateTime(DateUtils.getNowDate());
+        SysUser sysUser = userInfoUtil.getLoginUserInfo();
+        tResWaterintake.setCreateBy(sysUser.getUserName());
+        tResWaterintake.setCreateUserId(sysUser.getUserId());
+        tResWaterintake.setDeptId(sysUser.getDeptId());
         return tResWaterintakeMapper.insertTResWaterintake(tResWaterintake);
     }
 

+ 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 (

BIN
mybusiness/src/main/resources/static/visualization/images/hn_jywz.png


BIN
mybusiness/src/main/resources/static/visualization/images/hn_qsk.png


BIN
mybusiness/src/main/resources/static/visualization/images/hn_sq.png


+ 4 - 4
mybusiness/src/main/resources/templates/business/manager/superMap/choseLatLng.html

@@ -22,16 +22,16 @@
     var map = L.map('map', {
         zoomControl: false,
         preferCanvas: true,
-        // crs: L.CRS.EPSG4326,
+        crs: L.CRS.EPSG4326,
         center:centerPoint,
         maxZoom: 18,
-        zoom: 10
+        zoom: 9
     }).on({"click": callbackFunction}); //添加click事件
 
     var pointsLayer = L.featureGroup().addTo(map); //添加到地图
 
-    console.log("*****",basePath+"/ChinaDark")
-    L.supermap.tiledMapLayer(basePath+"/ChinaDark", {
+    console.log("*****",basePath+"/HuiNan")
+    L.supermap.tiledMapLayer(basePath+"/HuiNan", {
         noWrap: true
     }).addTo(map);//添加影像图
 

+ 2 - 2
mybusiness/src/main/resources/templates/business/manager/waterintake/add.html

@@ -47,7 +47,7 @@
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
         var prefix = ctx + "business/manager/waterintake"
-        $("#form-stationland-add").validate({
+        $("#form-waterintake-add").validate({
             focusCleanup: true,
             rules:{
                 contactPhone:{
@@ -58,7 +58,7 @@
 
         function submitHandler() {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/add", $('#form-stationland-add').serialize());
+                $.operate.save(prefix + "/add", $('#form-waterintake-add').serialize());
             }
         }
 

+ 2 - 2
mybusiness/src/main/resources/templates/business/manager/waterintake/edit.html

@@ -48,7 +48,7 @@
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
         var prefix = ctx + "business/manager/waterintake";
-        $("#form-stationland-edit").validate({
+        $("#form-waterintake-edit").validate({
             focusCleanup: true,
             rules:{
                 contactPhone:{
@@ -59,7 +59,7 @@
 
         function submitHandler() {
             if ($.validate.form()) {
-                $.operate.save(prefix + "/edit", $('#form-stationland-edit').serialize());
+                $.operate.save(prefix + "/edit", $('#form-waterintake-edit').serialize());
             }
         }
 

+ 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>
 <!--事件 左侧导航 结束-->
 <!--森林 左侧导航 开始-->

+ 92 - 3
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/hn_sq.png}]]';
+        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);
+        });
+    }
+
     /**
      * 查询所有救援物资
      * */
@@ -790,7 +839,7 @@
     }
 
     function jywzMarker(option){
-        let iconUrl = '[[@{/visualization/images/xfjcz.gif}]]';
+        let iconUrl = '[[@{/visualization/images/hn_jywz.png}]]';
         let icon = L.icon({
             iconUrl: iconUrl,
             iconSize: [65, 67],
@@ -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/hn_qsk.png}]]';
+        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') {