소스 검색

通榆添加重点工程和重点区域

wang_xy 1 년 전
부모
커밋
982632c875
27개의 변경된 파일2468개의 추가작업 그리고 36개의 파일을 삭제
  1. 127 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/KeyAreasController.java
  2. 127 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/KeyProjectController.java
  3. 47 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
  4. 28 7
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  5. 2 0
      ruoyi-admin/src/main/resources/templates/index.html
  6. 362 0
      ruoyi-admin/src/main/resources/templates/keyAreas.html
  7. 362 0
      ruoyi-admin/src/main/resources/templates/keyProject.html
  8. 49 0
      ruoyi-admin/src/main/resources/templates/system/areas/add.html
  9. 110 0
      ruoyi-admin/src/main/resources/templates/system/areas/areas.html
  10. 50 0
      ruoyi-admin/src/main/resources/templates/system/areas/edit.html
  11. 49 0
      ruoyi-admin/src/main/resources/templates/system/project/add.html
  12. 50 0
      ruoyi-admin/src/main/resources/templates/system/project/edit.html
  13. 110 0
      ruoyi-admin/src/main/resources/templates/system/project/project.html
  14. 106 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/KeyAreas.java
  15. 106 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/KeyProject.java
  16. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/KeyAreasMapper.java
  17. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/KeyProjectMapper.java
  18. 30 13
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
  19. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IKeyAreasService.java
  20. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IKeyProjectService.java
  21. 27 13
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
  22. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KeyAreasServiceImpl.java
  23. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KeyProjectServiceImpl.java
  24. 108 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
  25. 79 0
      ruoyi-system/src/main/resources/mapper/system/KeyAreasMapper.xml
  26. 79 0
      ruoyi-system/src/main/resources/mapper/system/KeyProjectMapper.xml
  27. 24 0
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 127 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/KeyAreasController.java

@@ -0,0 +1,127 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.KeyAreas;
+import com.ruoyi.system.service.IKeyAreasService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 重点区域Controller
+ *
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+@Controller
+@RequestMapping("/system/areas")
+public class KeyAreasController extends BaseController
+{
+    private String prefix = "system/areas";
+
+    @Autowired
+    private IKeyAreasService keyAreasService;
+
+    @RequiresPermissions("system:areas:view")
+    @GetMapping()
+    public String areas()
+    {
+        return prefix + "/areas";
+    }
+
+    /**
+     * 查询重点区域列表
+     */
+    @RequiresPermissions("system:areas:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(KeyAreas keyAreas)
+    {
+        startPage();
+        List<KeyAreas> list = keyAreasService.selectKeyAreasList(keyAreas);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出重点区域列表
+     */
+    @RequiresPermissions("system:areas:export")
+    @Log(title = "重点区域", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(KeyAreas keyAreas)
+    {
+        List<KeyAreas> list = keyAreasService.selectKeyAreasList(keyAreas);
+        ExcelUtil<KeyAreas> util = new ExcelUtil<KeyAreas>(KeyAreas.class);
+        return util.exportExcel(list, "重点区域数据");
+    }
+
+    /**
+     * 新增重点区域
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存重点区域
+     */
+    @RequiresPermissions("system:areas:add")
+    @Log(title = "重点区域", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(KeyAreas keyAreas)
+    {
+        return toAjax(keyAreasService.insertKeyAreas(keyAreas));
+    }
+
+    /**
+     * 修改重点区域
+     */
+    @RequiresPermissions("system:areas:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        KeyAreas keyAreas = keyAreasService.selectKeyAreasById(id);
+        mmap.put("keyAreas", keyAreas);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存重点区域
+     */
+    @RequiresPermissions("system:areas:edit")
+    @Log(title = "重点区域", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(KeyAreas keyAreas)
+    {
+        return toAjax(keyAreasService.updateKeyAreas(keyAreas));
+    }
+
+    /**
+     * 删除重点区域
+     */
+    @RequiresPermissions("system:areas:remove")
+    @Log(title = "重点区域", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(keyAreasService.deleteKeyAreasByIds(ids));
+    }
+}

+ 127 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/KeyProjectController.java

@@ -0,0 +1,127 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.KeyProject;
+import com.ruoyi.system.service.IKeyProjectService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 重点工程Controller
+ *
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+@Controller
+@RequestMapping("/system/project")
+public class KeyProjectController extends BaseController
+{
+    private String prefix = "system/project";
+
+    @Autowired
+    private IKeyProjectService keyProjectService;
+
+    @RequiresPermissions("system:project:view")
+    @GetMapping()
+    public String project()
+    {
+        return prefix + "/project";
+    }
+
+    /**
+     * 查询重点工程列表
+     */
+    @RequiresPermissions("system:project:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(KeyProject keyProject)
+    {
+        startPage();
+        List<KeyProject> list = keyProjectService.selectKeyProjectList(keyProject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出重点工程列表
+     */
+    @RequiresPermissions("system:project:export")
+    @Log(title = "重点工程", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(KeyProject keyProject)
+    {
+        List<KeyProject> list = keyProjectService.selectKeyProjectList(keyProject);
+        ExcelUtil<KeyProject> util = new ExcelUtil<KeyProject>(KeyProject.class);
+        return util.exportExcel(list, "重点工程数据");
+    }
+
+    /**
+     * 新增重点工程
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存重点工程
+     */
+    @RequiresPermissions("system:project:add")
+    @Log(title = "重点工程", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(KeyProject keyProject)
+    {
+        return toAjax(keyProjectService.insertKeyProject(keyProject));
+    }
+
+    /**
+     * 修改重点工程
+     */
+    @RequiresPermissions("system:project:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        KeyProject keyProject = keyProjectService.selectKeyProjectById(id);
+        mmap.put("keyProject", keyProject);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存重点工程
+     */
+    @RequiresPermissions("system:project:edit")
+    @Log(title = "重点工程", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(KeyProject keyProject)
+    {
+        return toAjax(keyProjectService.updateKeyProject(keyProject));
+    }
+
+    /**
+     * 删除重点工程
+     */
+    @RequiresPermissions("system:project:remove")
+    @Log(title = "重点工程", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(keyProjectService.deleteKeyProjectByIds(ids));
+    }
+}

+ 47 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.system;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.system.service.ISysDeptService;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.UsernamePasswordToken;
@@ -37,6 +39,9 @@ public class SysLoginController extends BaseController
     @Autowired
     private ConfigService configService;
 
+    @Autowired
+    private ISysDeptService deptService;
+
 
     @GetMapping("/video")
     public String video(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)
@@ -58,6 +63,48 @@ public class SysLoginController extends BaseController
             return "login";
         }
     }
+    @GetMapping("/keyAreas")
+    public String keyAreas(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)
+    {
+        UsernamePasswordToken token = new UsernamePasswordToken("admin", "admin123", false);
+        Subject subject = SecurityUtils.getSubject();
+        try
+        {
+            subject.login(token);
+            mmap.put("keyAreas",deptService.keyAreas());
+            return "keyAreas";
+        }
+        catch (AuthenticationException e)
+        {
+            String msg = "用户或密码错误";
+            if (StringUtils.isNotEmpty(e.getMessage()))
+            {
+                msg = e.getMessage();
+            }
+            return "login";
+        }
+    }
+    @GetMapping("/keyProject")
+    public String keyProject(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)
+    {
+        UsernamePasswordToken token = new UsernamePasswordToken("admin", "admin123", false);
+        Subject subject = SecurityUtils.getSubject();
+        try
+        {
+            subject.login(token);
+            mmap.put("keyProject",deptService.keyProject());
+            return "keyProject";
+        }
+        catch (AuthenticationException e)
+        {
+            String msg = "用户或密码错误";
+            if (StringUtils.isNotEmpty(e.getMessage()))
+            {
+                msg = e.getMessage();
+            }
+            return "login";
+        }
+    }
 
     @GetMapping("/login")
     public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)

+ 28 - 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.system;
 
 import java.util.List;
 import java.util.stream.Collectors;
+
+import com.ruoyi.common.core.domain.entity.*;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,9 +20,6 @@ import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.Ztree;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysRole;
-import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.enums.BusinessType;
@@ -36,7 +35,7 @@ import com.ruoyi.system.service.ISysUserService;
 
 /**
  * 用户信息
- * 
+ *
  * @author ruoyi
  */
 @Controller
@@ -50,7 +49,7 @@ public class SysUserController extends BaseController
 
     @Autowired
     private ISysRoleService roleService;
-    
+
     @Autowired
     private ISysDeptService deptService;
 
@@ -318,8 +317,30 @@ public class SysUserController extends BaseController
     }
 
     /**
+     * 加载重点工程列表
+     */
+    @GetMapping("/keyProject")
+    @ResponseBody
+    public List<Ztree> keyProject()
+    {
+        List<Ztree> ztrees = deptService.keyProject();
+        return ztrees;
+    }
+
+    /**
+     * 加载重点区域列表
+     */
+    @GetMapping("/keyAreas")
+    @ResponseBody
+    public List<Ztree> keyAreas()
+    {
+        List<Ztree> ztrees = deptService.keyAreas();
+        return ztrees;
+    }
+
+    /**
      * 选择部门树
-     * 
+     *
      * @param deptId 部门ID
      */
     @RequiresPermissions("system:user:list")
@@ -329,4 +350,4 @@ public class SysUserController extends BaseController
         mmap.put("dept", deptService.selectDeptById(deptId));
         return prefix + "/deptTree";
     }
-}
+}

+ 2 - 0
ruoyi-admin/src/main/resources/templates/index.html

@@ -193,6 +193,8 @@
                     </a>
                 </div>
                 <ul class="nav navbar-top-links navbar-right welcome-message">
+                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="重点工程" th:href="@{/keyProject}" target="_blank"><i class="fa fa-question-circle"></i> 重点工程</a></li>
+                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="重点区域" th:href="@{/keyAreas}" target="_blank"><i class="fa fa-question-circle"></i> 重点区域</a></li>
                     <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="视联网" th:href="@{/video}" target="_blank"><i class="fa fa-question-circle"></i> 视联</a></li>
                     <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="#" id="lockScreen"><i class="fa fa-lock"></i> 锁屏</a></li>
 	                <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="#" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏</a></li>

+ 362 - 0
ruoyi-admin/src/main/resources/templates/keyAreas.html

@@ -0,0 +1,362 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>preview_demo</title>
+    <th:block th:include="include :: header('用户列表')" />
+    <th:block th:include="include :: ztree-css" />
+</head>
+
+<style>
+    .playWnd {
+        margin: 0;
+        width:100%;                   /*播放容器的宽和高设定*/
+        height: 100%;
+        border: 0 solid red;
+    }
+</style>
+<body class="gray-bg">
+
+<!--<div class="ui-layout-west">-->
+    <!---->
+<!--</div>-->
+
+<div class="ui-layout-center" style="height: 100%">
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-2" style="height: 100%">
+                <div class="box box-main" style="height: 100%">
+                    <div class="box-header">
+                        <div class="treeSearchInput" id="search" style="padding: 0">
+                            <label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
+                            <button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
+                        </div>
+                        <div class="treeExpandCollapse">
+                            <a href="#" onclick="$.tree.expand()">展开</a> /
+                            <a href="#" onclick="$.tree.collapse()">折叠</a>
+                        </div>
+                    </div>
+                    <div class="ui-layout-content">
+                        <div id="tree" class="ztree"></div>
+                    </div>
+                </div>
+            </div>
+            <div class="col-sm-8">
+                <!--视频窗口展示-->
+                <div id="playWnd" class="playWnd" style="left: 109px; top: 133px;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+
+
+<!--三个必要的js文件引入-->
+<script src="../static/video/jquery-1.12.4.min.js" th:src="@{/video/jquery-1.12.4.min.js}"></script>
+<script src="../static/video/jsencrypt.min.js" th:src="@{/video/jsencrypt.min.js}"></script>
+<script src="../static/video/web-control_1.2.5.min.js" th:src="@{/video/web-control_1.2.5.min.js}"></script>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: ztree-js" />
+
+<script type="text/javascript">
+
+    var nWidth = $(window).width(),
+        nHeight = $(window).height();
+
+    //页面加载时创建播放实例初始化
+    $(function() {
+        queryDeptTree();
+        initPlugin();
+    });
+
+    function queryDeptTree()
+    {
+        var url = ctx + "system/user/keyAreas";
+        var options = {
+            url: url,
+            // expandLevel: 2,
+            // expandAll: true,
+            onClick : zOnClick
+        };
+        $.tree.init(options);
+        function zOnClick(event, treeId, treeNode) {
+            console.log('--treeNode--', treeNode);
+
+            var data = treeNode.data;
+
+
+            var cameraIndexCode = data.cameraCode;
+            if (!cameraIndexCode) {
+                return;
+            }
+
+            cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
+            cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
+
+            var streamMode = 0;                                     //主子码流标识:0-主码流,1-子码流
+            var transMode = 1;                                      //传输协议:0-UDP,1-TCP
+            var gpuMode = 0;                                        //是否启用GPU硬解,0-不启用,1-启用
+            var wndId = -1;                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+
+            oWebControl.JS_RequestInterface({
+                funcName: "startPreview",
+                argument: JSON.stringify({
+                    cameraIndexCode: cameraIndexCode,                //监控点编号
+                    streamMode: streamMode,                         //主子码流标识
+                    transMode: transMode,                           //传输协议
+                    gpuMode: gpuMode,                               //是否开启GPU硬解
+                    wndId:wndId                                     //可指定播放窗口
+                })
+            });
+
+            $.ajax({
+                url: ctx+'hik/previewUrl',
+                data: {
+                    'cameraCode': cameraIndexCode,
+                    'presetPoints': data.presetPoints
+                },
+                cache: false,
+                type: 'POST',
+                success: function (result) {
+                    if (result.code === web_status.SUCCESS) {
+
+                    } else if (result.code === web_status.WARNING) {
+                        // $.modal.alertWarning(result.msg)
+                    } else {
+                        // $.modal.alertError(result.msg);
+                    }
+                },
+                complete: function () {
+                }
+            });
+        }
+    }
+
+    //声明公用变量
+    var initCount = 0;
+    var pubKey = '';
+
+    // 创建播放实例
+    function initPlugin () {
+        oWebControl = new WebControl({
+            szPluginContainer: "playWnd",                       // 指定容器id
+            iServicePortStart: 15900,                           // 指定起止端口号,建议使用该值
+            iServicePortEnd: 15900,
+            szClassId:"23BF3B0A-2C56-4D97-9C03-0CB103AA8F11",   // 用于IE10使用ActiveX的clsid
+            cbConnectSuccess: function () {                     // 创建WebControl实例成功
+                oWebControl.JS_StartService("window", {         // WebControl实例创建成功后需要启动服务
+                    dllPath: "./VideoPluginConnect.dll"         // 值"./VideoPluginConnect.dll"写死
+                }).then(function () {                           // 启动插件服务成功
+                    oWebControl.JS_SetWindowControlCallback({   // 设置消息回调
+                        cbIntegrationCallBack: cbIntegrationCallBack
+                    });
+
+                    oWebControl.JS_CreateWnd("playWnd", nWidth - 400, nHeight).then(function () { //JS_CreateWnd创建视频播放窗口,宽高可设定
+                        init();  // 创建播放实例成功后初始化
+                    });
+
+                }, function () { // 启动插件服务失败
+                });
+            },
+            cbConnectError: function () { // 创建WebControl实例失败
+                oWebControl = null;
+                $("#playWnd").html("插件未启动,正在尝试启动,请稍候...");
+                WebControl.JS_WakeUp("VideoWebPlugin://"); // 程序未启动时执行error函数,采用wakeup来启动程序
+                initCount ++;
+                if (initCount < 3) {
+                    setTimeout(function () {
+                        initPlugin();
+                    }, 3000)
+                } else {
+                    $("#playWnd").html("插件启动失败,请检查插件是否安装!");
+                }
+            },
+            cbConnectClose: function (bNormalClose) {
+                // 异常断开:bNormalClose = false
+                // JS_Disconnect正常断开:bNormalClose = true
+                console.log("cbConnectClose");
+                oWebControl = null;
+                $("#playWnd").html("插件未启动,正在尝试启动,请稍候...");
+                WebControl.JS_WakeUp("VideoWebPlugin://");
+                initCount ++;
+                if (initCount < 3) {
+                    setTimeout(function () {
+                        initPlugin();
+                    }, 3000)
+                } else {
+                    $("#playWnd").html("插件启动失败,请检查插件是否安装!");
+                }
+            }
+        });
+    }
+
+    // 设置窗口控制回调
+    function setCallbacks() {
+        oWebControl.JS_SetWindowControlCallback({
+            cbIntegrationCallBack: cbIntegrationCallBack
+        });
+    }
+
+    // 推送消息
+    function cbIntegrationCallBack(oData) {
+        showCBInfo(JSON.stringify(oData.responseMsg));
+    }
+
+    //初始化
+    function init()
+    {
+        getPubKey(function () {
+
+            ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
+            var appkey = "24699060";                           //综合安防管理平台提供的appkey,必填
+            var secret = setEncrypt("tt1pMbsrlwGZUWucdAPw");   //综合安防管理平台提供的secret,必填
+            var ip = "36.49.108.22";                           //综合安防管理平台IP地址,必填
+            var playMode = 0;                                  //初始播放模式:0-预览,1-回放
+            var port = 1443;                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+            var snapDir = "D:\\SnapDir";                       //抓图存储路径
+            var videoDir = "D:\\VideoDir";                     //紧急录像或录像剪辑存储路径
+            var layout = "1x1";                                //playMode指定模式的布局
+            var enableHTTPS = 1;                               //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
+            var encryptedFields = 'secret';					   //加密字段,默认加密领域为secret
+            var showToolbar = 1;                               //是否显示工具栏,0-不显示,非0-显示
+            var showSmart = 1;                                 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
+            var buttonIDs = "0,16,256,257,258,259,260,512,513,514,515,516,517,768,769";  //自定义工具条按钮
+            ////////////////////////////////// 请自行修改以上变量值	////////////////////////////////////
+
+            oWebControl.JS_RequestInterface({
+                funcName: "init",
+                argument: JSON.stringify({
+                    appkey: appkey,                            //API网关提供的appkey
+                    secret: secret,                            //API网关提供的secret
+                    ip: ip,                                    //API网关IP地址
+                    playMode: playMode,                        //播放模式(决定显示预览还是回放界面)
+                    port: port,                                //端口
+                    snapDir: snapDir,                          //抓图存储路径
+                    videoDir: videoDir,                        //紧急录像或录像剪辑存储路径
+                    layout: layout,                            //布局
+                    enableHTTPS: enableHTTPS,                  //是否启用HTTPS协议
+                    encryptedFields: encryptedFields,          //加密字段
+                    showToolbar: showToolbar,                  //是否显示工具栏
+                    showSmart: showSmart,                      //是否显示智能信息
+                    buttonIDs: buttonIDs                       //自定义工具条按钮
+                })
+            }).then(function (oData) {
+                oWebControl.JS_Resize(nWidth - 400, nHeight);  // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
+            });
+        });
+    }
+
+    //获取公钥
+    function getPubKey (callback) {
+        oWebControl.JS_RequestInterface({
+            funcName: "getRSAPubKey",
+            argument: JSON.stringify({
+                keyLength: 1024
+            })
+        }).then(function (oData) {
+            console.log(oData);
+            if (oData.responseMsg.data) {
+                pubKey = oData.responseMsg.data;
+                callback()
+            }
+        })
+    }
+
+    //RSA加密
+    function setEncrypt (value) {
+        var encrypt = new JSEncrypt();
+        encrypt.setPublicKey(pubKey);
+        return encrypt.encrypt(value);
+    }
+
+    // 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
+    $(window).resize(function () {
+        if (oWebControl != null) {
+            oWebControl.JS_Resize(nWidth - 400, nHeight);
+            setWndCover();
+        }
+    });
+
+    // 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
+    $(window).scroll(function () {
+        if (oWebControl != null) {
+            oWebControl.JS_Resize(nWidth - 400, nHeight);
+            setWndCover();
+        }
+    });
+
+
+    // 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
+    function setWndCover() {
+        var iWidth = $(window).width();
+        var iHeight = $(window).height();
+        var oDivRect = $("#playWnd").get(0).getBoundingClientRect();
+
+        var iCoverLeft = (oDivRect.left < 0) ? Math.abs(oDivRect.left): 0;
+        var iCoverTop = (oDivRect.top < 0) ? Math.abs(oDivRect.top): 0;
+        var iCoverRight = (oDivRect.right - iWidth > 0) ? Math.round(oDivRect.right - iWidth) : 0;
+        var iCoverBottom = (oDivRect.bottom - iHeight > 0) ? Math.round(oDivRect.bottom - iHeight) : 0;
+
+        iCoverLeft = (iCoverLeft > nWidth - 400) ? nWidth - 400 : iCoverLeft;
+        iCoverTop = (iCoverTop > nHeight) ? nHeight : iCoverTop;
+        iCoverRight = (iCoverRight > nWidth - 400) ? nWidth - 400 : iCoverRight;
+        iCoverBottom = (iCoverBottom > nHeight) ? nHeight : iCoverBottom;
+
+        oWebControl.JS_RepairPartWindow(0, 0, 1001, nHeight);    // 多1个像素点防止还原后边界缺失一个像素条
+        if (iCoverLeft != 0) {
+            oWebControl.JS_CuttingPartWindow(0, 0, iCoverLeft, nHeight);
+        }
+        if (iCoverTop != 0) {
+            oWebControl.JS_CuttingPartWindow(0, 0, 1001, iCoverTop);    // 多剪掉一个像素条,防止出现剪掉一部分窗口后出现一个像素条
+        }
+        if (iCoverRight != 0) {
+            oWebControl.JS_CuttingPartWindow(nWidth - 400 - iCoverRight, 0, iCoverRight, nHeight);
+        }
+        if (iCoverBottom != 0) {
+            oWebControl.JS_CuttingPartWindow(0, nHeight - iCoverBottom, nWidth - 400, iCoverBottom);
+        }
+    }
+
+    //视频预览功能
+    $("#startPreview").click(function () {
+        var cameraIndexCode  = $("#cameraIndexCode").val();     //获取输入的监控点编号值,必填
+        var streamMode = 0;                                     //主子码流标识:0-主码流,1-子码流
+        var transMode = 1;                                      //传输协议:0-UDP,1-TCP
+        var gpuMode = 0;                                        //是否启用GPU硬解,0-不启用,1-启用
+        var wndId = -1;                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+
+        cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
+        cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
+
+        oWebControl.JS_RequestInterface({
+            funcName: "startPreview",
+            argument: JSON.stringify({
+                cameraIndexCode:cameraIndexCode,                //监控点编号
+                streamMode: streamMode,                         //主子码流标识
+                transMode: transMode,                           //传输协议
+                gpuMode: gpuMode,                               //是否开启GPU硬解
+                wndId:wndId                                     //可指定播放窗口
+            })
+        })
+    });
+
+    //停止全部预览
+    $("#stopAllPreview").click(function () {
+        oWebControl.JS_RequestInterface({
+            funcName: "stopAllPreview"
+        });
+    });
+
+    // 标签关闭
+    $(window).unload(function () {
+        if (oWebControl != null){
+            oWebControl.JS_HideWnd();   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+            oWebControl.JS_Disconnect().then(function(){  // 断开与插件服务连接成功
+                },
+                function() {  // 断开与插件服务连接失败
+                });
+        }
+    });
+
+</script>
+</html>

+ 362 - 0
ruoyi-admin/src/main/resources/templates/keyProject.html

@@ -0,0 +1,362 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8">
+    <title>preview_demo</title>
+    <th:block th:include="include :: header('用户列表')" />
+    <th:block th:include="include :: ztree-css" />
+</head>
+
+<style>
+    .playWnd {
+        margin: 0;
+        width:100%;                   /*播放容器的宽和高设定*/
+        height: 100%;
+        border: 0 solid red;
+    }
+</style>
+<body class="gray-bg">
+
+<!--<div class="ui-layout-west">-->
+    <!---->
+<!--</div>-->
+
+<div class="ui-layout-center" style="height: 100%">
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-2" style="height: 100%">
+                <div class="box box-main" style="height: 100%">
+                    <div class="box-header">
+                        <div class="treeSearchInput" id="search" style="padding: 0">
+                            <label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
+                            <button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
+                        </div>
+                        <div class="treeExpandCollapse">
+                            <a href="#" onclick="$.tree.expand()">展开</a> /
+                            <a href="#" onclick="$.tree.collapse()">折叠</a>
+                        </div>
+                    </div>
+                    <div class="ui-layout-content">
+                        <div id="tree" class="ztree"></div>
+                    </div>
+                </div>
+            </div>
+            <div class="col-sm-8">
+                <!--视频窗口展示-->
+                <div id="playWnd" class="playWnd" style="left: 109px; top: 133px;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+
+
+<!--三个必要的js文件引入-->
+<script src="../static/video/jquery-1.12.4.min.js" th:src="@{/video/jquery-1.12.4.min.js}"></script>
+<script src="../static/video/jsencrypt.min.js" th:src="@{/video/jsencrypt.min.js}"></script>
+<script src="../static/video/web-control_1.2.5.min.js" th:src="@{/video/web-control_1.2.5.min.js}"></script>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: ztree-js" />
+
+<script type="text/javascript">
+
+    var nWidth = $(window).width(),
+        nHeight = $(window).height();
+
+    //页面加载时创建播放实例初始化
+    $(function() {
+        queryDeptTree();
+        initPlugin();
+    });
+
+    function queryDeptTree()
+    {
+        var url = ctx + "system/user/keyProject";
+        var options = {
+            url: url,
+            // expandLevel: 2,
+            // expandAll: true,
+            onClick : zOnClick
+        };
+        $.tree.init(options);
+        function zOnClick(event, treeId, treeNode) {
+            console.log('--treeNode--', treeNode);
+
+            var data = treeNode.data;
+
+
+            var cameraIndexCode = data.cameraCode;
+            if (!cameraIndexCode) {
+                return;
+            }
+
+            cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
+            cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
+
+            var streamMode = 0;                                     //主子码流标识:0-主码流,1-子码流
+            var transMode = 1;                                      //传输协议:0-UDP,1-TCP
+            var gpuMode = 0;                                        //是否启用GPU硬解,0-不启用,1-启用
+            var wndId = -1;                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+
+            oWebControl.JS_RequestInterface({
+                funcName: "startPreview",
+                argument: JSON.stringify({
+                    cameraIndexCode: cameraIndexCode,                //监控点编号
+                    streamMode: streamMode,                         //主子码流标识
+                    transMode: transMode,                           //传输协议
+                    gpuMode: gpuMode,                               //是否开启GPU硬解
+                    wndId:wndId                                     //可指定播放窗口
+                })
+            });
+
+            $.ajax({
+                url: ctx+'hik/previewUrl',
+                data: {
+                    'cameraCode': cameraIndexCode,
+                    'presetPoints': data.presetPoints
+                },
+                cache: false,
+                type: 'POST',
+                success: function (result) {
+                    if (result.code === web_status.SUCCESS) {
+
+                    } else if (result.code === web_status.WARNING) {
+                        // $.modal.alertWarning(result.msg)
+                    } else {
+                        // $.modal.alertError(result.msg);
+                    }
+                },
+                complete: function () {
+                }
+            });
+        }
+    }
+
+    //声明公用变量
+    var initCount = 0;
+    var pubKey = '';
+
+    // 创建播放实例
+    function initPlugin () {
+        oWebControl = new WebControl({
+            szPluginContainer: "playWnd",                       // 指定容器id
+            iServicePortStart: 15900,                           // 指定起止端口号,建议使用该值
+            iServicePortEnd: 15900,
+            szClassId:"23BF3B0A-2C56-4D97-9C03-0CB103AA8F11",   // 用于IE10使用ActiveX的clsid
+            cbConnectSuccess: function () {                     // 创建WebControl实例成功
+                oWebControl.JS_StartService("window", {         // WebControl实例创建成功后需要启动服务
+                    dllPath: "./VideoPluginConnect.dll"         // 值"./VideoPluginConnect.dll"写死
+                }).then(function () {                           // 启动插件服务成功
+                    oWebControl.JS_SetWindowControlCallback({   // 设置消息回调
+                        cbIntegrationCallBack: cbIntegrationCallBack
+                    });
+
+                    oWebControl.JS_CreateWnd("playWnd", nWidth - 400, nHeight).then(function () { //JS_CreateWnd创建视频播放窗口,宽高可设定
+                        init();  // 创建播放实例成功后初始化
+                    });
+
+                }, function () { // 启动插件服务失败
+                });
+            },
+            cbConnectError: function () { // 创建WebControl实例失败
+                oWebControl = null;
+                $("#playWnd").html("插件未启动,正在尝试启动,请稍候...");
+                WebControl.JS_WakeUp("VideoWebPlugin://"); // 程序未启动时执行error函数,采用wakeup来启动程序
+                initCount ++;
+                if (initCount < 3) {
+                    setTimeout(function () {
+                        initPlugin();
+                    }, 3000)
+                } else {
+                    $("#playWnd").html("插件启动失败,请检查插件是否安装!");
+                }
+            },
+            cbConnectClose: function (bNormalClose) {
+                // 异常断开:bNormalClose = false
+                // JS_Disconnect正常断开:bNormalClose = true
+                console.log("cbConnectClose");
+                oWebControl = null;
+                $("#playWnd").html("插件未启动,正在尝试启动,请稍候...");
+                WebControl.JS_WakeUp("VideoWebPlugin://");
+                initCount ++;
+                if (initCount < 3) {
+                    setTimeout(function () {
+                        initPlugin();
+                    }, 3000)
+                } else {
+                    $("#playWnd").html("插件启动失败,请检查插件是否安装!");
+                }
+            }
+        });
+    }
+
+    // 设置窗口控制回调
+    function setCallbacks() {
+        oWebControl.JS_SetWindowControlCallback({
+            cbIntegrationCallBack: cbIntegrationCallBack
+        });
+    }
+
+    // 推送消息
+    function cbIntegrationCallBack(oData) {
+        showCBInfo(JSON.stringify(oData.responseMsg));
+    }
+
+    //初始化
+    function init()
+    {
+        getPubKey(function () {
+
+            ////////////////////////////////// 请自行修改以下变量值	////////////////////////////////////
+            var appkey = "24699060";                           //综合安防管理平台提供的appkey,必填
+            var secret = setEncrypt("tt1pMbsrlwGZUWucdAPw");   //综合安防管理平台提供的secret,必填
+            var ip = "36.49.108.22";                           //综合安防管理平台IP地址,必填
+            var playMode = 0;                                  //初始播放模式:0-预览,1-回放
+            var port = 1443;                                    //综合安防管理平台端口,若启用HTTPS协议,默认443
+            var snapDir = "D:\\SnapDir";                       //抓图存储路径
+            var videoDir = "D:\\VideoDir";                     //紧急录像或录像剪辑存储路径
+            var layout = "1x1";                                //playMode指定模式的布局
+            var enableHTTPS = 1;                               //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
+            var encryptedFields = 'secret';					   //加密字段,默认加密领域为secret
+            var showToolbar = 1;                               //是否显示工具栏,0-不显示,非0-显示
+            var showSmart = 1;                                 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
+            var buttonIDs = "0,16,256,257,258,259,260,512,513,514,515,516,517,768,769";  //自定义工具条按钮
+            ////////////////////////////////// 请自行修改以上变量值	////////////////////////////////////
+
+            oWebControl.JS_RequestInterface({
+                funcName: "init",
+                argument: JSON.stringify({
+                    appkey: appkey,                            //API网关提供的appkey
+                    secret: secret,                            //API网关提供的secret
+                    ip: ip,                                    //API网关IP地址
+                    playMode: playMode,                        //播放模式(决定显示预览还是回放界面)
+                    port: port,                                //端口
+                    snapDir: snapDir,                          //抓图存储路径
+                    videoDir: videoDir,                        //紧急录像或录像剪辑存储路径
+                    layout: layout,                            //布局
+                    enableHTTPS: enableHTTPS,                  //是否启用HTTPS协议
+                    encryptedFields: encryptedFields,          //加密字段
+                    showToolbar: showToolbar,                  //是否显示工具栏
+                    showSmart: showSmart,                      //是否显示智能信息
+                    buttonIDs: buttonIDs                       //自定义工具条按钮
+                })
+            }).then(function (oData) {
+                oWebControl.JS_Resize(nWidth - 400, nHeight);  // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
+            });
+        });
+    }
+
+    //获取公钥
+    function getPubKey (callback) {
+        oWebControl.JS_RequestInterface({
+            funcName: "getRSAPubKey",
+            argument: JSON.stringify({
+                keyLength: 1024
+            })
+        }).then(function (oData) {
+            console.log(oData);
+            if (oData.responseMsg.data) {
+                pubKey = oData.responseMsg.data;
+                callback()
+            }
+        })
+    }
+
+    //RSA加密
+    function setEncrypt (value) {
+        var encrypt = new JSEncrypt();
+        encrypt.setPublicKey(pubKey);
+        return encrypt.encrypt(value);
+    }
+
+    // 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
+    $(window).resize(function () {
+        if (oWebControl != null) {
+            oWebControl.JS_Resize(nWidth - 400, nHeight);
+            setWndCover();
+        }
+    });
+
+    // 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
+    $(window).scroll(function () {
+        if (oWebControl != null) {
+            oWebControl.JS_Resize(nWidth - 400, nHeight);
+            setWndCover();
+        }
+    });
+
+
+    // 设置窗口裁剪,当因滚动条滚动导致窗口需要被遮住的情况下需要JS_CuttingPartWindow部分窗口
+    function setWndCover() {
+        var iWidth = $(window).width();
+        var iHeight = $(window).height();
+        var oDivRect = $("#playWnd").get(0).getBoundingClientRect();
+
+        var iCoverLeft = (oDivRect.left < 0) ? Math.abs(oDivRect.left): 0;
+        var iCoverTop = (oDivRect.top < 0) ? Math.abs(oDivRect.top): 0;
+        var iCoverRight = (oDivRect.right - iWidth > 0) ? Math.round(oDivRect.right - iWidth) : 0;
+        var iCoverBottom = (oDivRect.bottom - iHeight > 0) ? Math.round(oDivRect.bottom - iHeight) : 0;
+
+        iCoverLeft = (iCoverLeft > nWidth - 400) ? nWidth - 400 : iCoverLeft;
+        iCoverTop = (iCoverTop > nHeight) ? nHeight : iCoverTop;
+        iCoverRight = (iCoverRight > nWidth - 400) ? nWidth - 400 : iCoverRight;
+        iCoverBottom = (iCoverBottom > nHeight) ? nHeight : iCoverBottom;
+
+        oWebControl.JS_RepairPartWindow(0, 0, 1001, nHeight);    // 多1个像素点防止还原后边界缺失一个像素条
+        if (iCoverLeft != 0) {
+            oWebControl.JS_CuttingPartWindow(0, 0, iCoverLeft, nHeight);
+        }
+        if (iCoverTop != 0) {
+            oWebControl.JS_CuttingPartWindow(0, 0, 1001, iCoverTop);    // 多剪掉一个像素条,防止出现剪掉一部分窗口后出现一个像素条
+        }
+        if (iCoverRight != 0) {
+            oWebControl.JS_CuttingPartWindow(nWidth - 400 - iCoverRight, 0, iCoverRight, nHeight);
+        }
+        if (iCoverBottom != 0) {
+            oWebControl.JS_CuttingPartWindow(0, nHeight - iCoverBottom, nWidth - 400, iCoverBottom);
+        }
+    }
+
+    //视频预览功能
+    $("#startPreview").click(function () {
+        var cameraIndexCode  = $("#cameraIndexCode").val();     //获取输入的监控点编号值,必填
+        var streamMode = 0;                                     //主子码流标识:0-主码流,1-子码流
+        var transMode = 1;                                      //传输协议:0-UDP,1-TCP
+        var gpuMode = 0;                                        //是否启用GPU硬解,0-不启用,1-启用
+        var wndId = -1;                                         //播放窗口序号(在2x2以上布局下可指定播放窗口)
+
+        cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, "");
+        cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, "");
+
+        oWebControl.JS_RequestInterface({
+            funcName: "startPreview",
+            argument: JSON.stringify({
+                cameraIndexCode:cameraIndexCode,                //监控点编号
+                streamMode: streamMode,                         //主子码流标识
+                transMode: transMode,                           //传输协议
+                gpuMode: gpuMode,                               //是否开启GPU硬解
+                wndId:wndId                                     //可指定播放窗口
+            })
+        })
+    });
+
+    //停止全部预览
+    $("#stopAllPreview").click(function () {
+        oWebControl.JS_RequestInterface({
+            funcName: "stopAllPreview"
+        });
+    });
+
+    // 标签关闭
+    $(window).unload(function () {
+        if (oWebControl != null){
+            oWebControl.JS_HideWnd();   // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
+            oWebControl.JS_Disconnect().then(function(){  // 断开与插件服务连接成功
+                },
+                function() {  // 断开与插件服务连接失败
+                });
+        }
+    });
+
+</script>
+</html>

+ 49 - 0
ruoyi-admin/src/main/resources/templates/system/areas/add.html

@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增重点区域')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-areas-add">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">区域名称:</label>
+                <div class="col-sm-8">
+                    <input name="areasName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">摄像头名称:</label>
+                <div class="col-sm-8">
+                    <input name="cameraName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">唯一标识:</label>
+                <div class="col-sm-8">
+                    <input name="cameraCode" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">预置号:</label>
+                <div class="col-sm-8">
+                    <input name="presetPoints" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/areas"
+        $("#form-areas-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-areas-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 110 - 0
ruoyi-admin/src/main/resources/templates/system/areas/areas.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('重点区域列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>区域名称:</label>
+                                <input type="text" name="areasName"/>
+                            </li>
+                            <li>
+                                <label>摄像头名称:</label>
+                                <input type="text" name="cameraName"/>
+                            </li>
+                            <li>
+                                <label>唯一标识:</label>
+                                <input type="text" name="cameraCode"/>
+                            </li>
+                            <li>
+                                <label>预置号:</label>
+                                <input type="text" name="presetPoints"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:areas:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:areas:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:areas:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:areas:export">
+                    <i class="fa fa-download"></i> 导出
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('system:areas:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:areas:remove')}]];
+        var prefix = ctx + "system/areas";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "重点区域",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: '',
+                    visible: false
+                },
+                {
+                    field: 'areasName',
+                    title: '区域名称'
+                },
+                {
+                    field: 'cameraName',
+                    title: '摄像头名称'
+                },
+                {
+                    field: 'cameraCode',
+                    title: '唯一标识'
+                },
+                {
+                    field: 'presetPoints',
+                    title: '预置号'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 50 - 0
ruoyi-admin/src/main/resources/templates/system/areas/edit.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改重点区域')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-areas-edit" th:object="${keyAreas}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">区域名称:</label>
+                <div class="col-sm-8">
+                    <input name="areasName" th:field="*{areasName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">摄像头名称:</label>
+                <div class="col-sm-8">
+                    <input name="cameraName" th:field="*{cameraName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">唯一标识:</label>
+                <div class="col-sm-8">
+                    <input name="cameraCode" th:field="*{cameraCode}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">预置号:</label>
+                <div class="col-sm-8">
+                    <input name="presetPoints" th:field="*{presetPoints}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/areas";
+        $("#form-areas-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-areas-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 49 - 0
ruoyi-admin/src/main/resources/templates/system/project/add.html

@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增重点工程')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-project-add">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">工程名称:</label>
+                <div class="col-sm-8">
+                    <input name="projectName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">摄像头名称:</label>
+                <div class="col-sm-8">
+                    <input name="cameraName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">唯一标识:</label>
+                <div class="col-sm-8">
+                    <input name="cameraCode" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">预置号:</label>
+                <div class="col-sm-8">
+                    <input name="presetPoints" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/project"
+        $("#form-project-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-project-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 50 - 0
ruoyi-admin/src/main/resources/templates/system/project/edit.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改重点工程')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-project-edit" th:object="${keyProject}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">工程名称:</label>
+                <div class="col-sm-8">
+                    <input name="projectName" th:field="*{projectName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">摄像头名称:</label>
+                <div class="col-sm-8">
+                    <input name="cameraName" th:field="*{cameraName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">唯一标识:</label>
+                <div class="col-sm-8">
+                    <input name="cameraCode" th:field="*{cameraCode}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">预置号:</label>
+                <div class="col-sm-8">
+                    <input name="presetPoints" th:field="*{presetPoints}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/project";
+        $("#form-project-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-project-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 110 - 0
ruoyi-admin/src/main/resources/templates/system/project/project.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('重点工程列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>工程名称:</label>
+                                <input type="text" name="projectName"/>
+                            </li>
+                            <li>
+                                <label>摄像头名称:</label>
+                                <input type="text" name="cameraName"/>
+                            </li>
+                            <li>
+                                <label>唯一标识:</label>
+                                <input type="text" name="cameraCode"/>
+                            </li>
+                            <li>
+                                <label>预置号:</label>
+                                <input type="text" name="presetPoints"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:project:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:project:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:project:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:project:export">
+                    <i class="fa fa-download"></i> 导出
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('system:project:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:project:remove')}]];
+        var prefix = ctx + "system/project";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "重点工程",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field: 'id',
+                    title: '',
+                    visible: false
+                },
+                {
+                    field: 'projectName',
+                    title: '工程名称'
+                },
+                {
+                    field: 'cameraName',
+                    title: '摄像头名称'
+                },
+                {
+                    field: 'cameraCode',
+                    title: '唯一标识'
+                },
+                {
+                    field: 'presetPoints',
+                    title: '预置号'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 106 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/KeyAreas.java

@@ -0,0 +1,106 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 重点区域对象 key_areas
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public class KeyAreas extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    private Long id;
+
+    /** 父部门id */
+    private Long parentId;
+
+    /**  */
+    @Excel(name = "")
+    private String areasName;
+
+    /** 摄像头名称 */
+    @Excel(name = "摄像头名称")
+    private String cameraName;
+
+    /** 唯一标识 */
+    @Excel(name = "唯一标识")
+    private String cameraCode;
+
+    /** 预置号 */
+    @Excel(name = "预置号")
+    private Integer presetPoints;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setParentId(Long parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Long getParentId() 
+    {
+        return parentId;
+    }
+    public void setAreasName(String areasName) 
+    {
+        this.areasName = areasName;
+    }
+
+    public String getAreasName() 
+    {
+        return areasName;
+    }
+    public void setCameraName(String cameraName) 
+    {
+        this.cameraName = cameraName;
+    }
+
+    public String getCameraName() 
+    {
+        return cameraName;
+    }
+    public void setCameraCode(String cameraCode) 
+    {
+        this.cameraCode = cameraCode;
+    }
+
+    public String getCameraCode() 
+    {
+        return cameraCode;
+    }
+    public void setPresetPoints(Integer presetPoints) 
+    {
+        this.presetPoints = presetPoints;
+    }
+
+    public Integer getPresetPoints() 
+    {
+        return presetPoints;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("parentId", getParentId())
+            .append("areasName", getAreasName())
+            .append("cameraName", getCameraName())
+            .append("cameraCode", getCameraCode())
+            .append("presetPoints", getPresetPoints())
+            .toString();
+    }
+}

+ 106 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/KeyProject.java

@@ -0,0 +1,106 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 重点工程对象 key_project
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public class KeyProject extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    private Long id;
+
+    /** 父部门id */
+    private Long parentId;
+
+    /**  */
+    @Excel(name = "")
+    private String projectName;
+
+    /** 摄像头名称 */
+    @Excel(name = "摄像头名称")
+    private String cameraName;
+
+    /** 唯一标识 */
+    @Excel(name = "唯一标识")
+    private String cameraCode;
+
+    /** 预置号 */
+    @Excel(name = "预置号")
+    private Integer presetPoints;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setParentId(Long parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Long getParentId() 
+    {
+        return parentId;
+    }
+    public void setProjectName(String projectName) 
+    {
+        this.projectName = projectName;
+    }
+
+    public String getProjectName() 
+    {
+        return projectName;
+    }
+    public void setCameraName(String cameraName) 
+    {
+        this.cameraName = cameraName;
+    }
+
+    public String getCameraName() 
+    {
+        return cameraName;
+    }
+    public void setCameraCode(String cameraCode) 
+    {
+        this.cameraCode = cameraCode;
+    }
+
+    public String getCameraCode() 
+    {
+        return cameraCode;
+    }
+    public void setPresetPoints(Integer presetPoints) 
+    {
+        this.presetPoints = presetPoints;
+    }
+
+    public Integer getPresetPoints() 
+    {
+        return presetPoints;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("parentId", getParentId())
+            .append("projectName", getProjectName())
+            .append("cameraName", getCameraName())
+            .append("cameraCode", getCameraCode())
+            .append("presetPoints", getPresetPoints())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/KeyAreasMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.KeyAreas;
+
+/**
+ * 重点区域Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public interface KeyAreasMapper 
+{
+    /**
+     * 查询重点区域
+     * 
+     * @param id 重点区域主键
+     * @return 重点区域
+     */
+    public KeyAreas selectKeyAreasById(Long id);
+
+    /**
+     * 查询重点区域列表
+     * 
+     * @param keyAreas 重点区域
+     * @return 重点区域集合
+     */
+    public List<KeyAreas> selectKeyAreasList(KeyAreas keyAreas);
+
+    /**
+     * 新增重点区域
+     * 
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    public int insertKeyAreas(KeyAreas keyAreas);
+
+    /**
+     * 修改重点区域
+     * 
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    public int updateKeyAreas(KeyAreas keyAreas);
+
+    /**
+     * 删除重点区域
+     * 
+     * @param id 重点区域主键
+     * @return 结果
+     */
+    public int deleteKeyAreasById(Long id);
+
+    /**
+     * 批量删除重点区域
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKeyAreasByIds(String[] ids);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/KeyProjectMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.KeyProject;
+
+/**
+ * 重点工程Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public interface KeyProjectMapper 
+{
+    /**
+     * 查询重点工程
+     * 
+     * @param id 重点工程主键
+     * @return 重点工程
+     */
+    public KeyProject selectKeyProjectById(Long id);
+
+    /**
+     * 查询重点工程列表
+     * 
+     * @param keyProject 重点工程
+     * @return 重点工程集合
+     */
+    public List<KeyProject> selectKeyProjectList(KeyProject keyProject);
+
+    /**
+     * 新增重点工程
+     * 
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    public int insertKeyProject(KeyProject keyProject);
+
+    /**
+     * 修改重点工程
+     * 
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    public int updateKeyProject(KeyProject keyProject);
+
+    /**
+     * 删除重点工程
+     * 
+     * @param id 重点工程主键
+     * @return 结果
+     */
+    public int deleteKeyProjectById(Long id);
+
+    /**
+     * 批量删除重点工程
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKeyProjectByIds(String[] ids);
+}

+ 30 - 13
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java

@@ -1,19 +1,22 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.KeyAreas;
+import com.ruoyi.system.domain.KeyProject;
 import org.apache.ibatis.annotations.Param;
 import com.ruoyi.common.core.domain.entity.SysDept;
 
 /**
  * 部门管理 数据层
- * 
+ *
  * @author ruoyi
  */
 public interface SysDeptMapper
 {
     /**
      * 查询下级部门数量
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -21,7 +24,7 @@ public interface SysDeptMapper
 
     /**
      * 查询部门是否存在用户
-     * 
+     *
      * @param deptId 部门ID
      * @return 结果
      */
@@ -29,15 +32,29 @@ public interface SysDeptMapper
 
     /**
      * 查询部门管理数据
-     * 
+     *
      * @param dept 部门信息
      * @return 部门信息集合
      */
     public List<SysDept> selectDeptList(SysDept dept);
 
     /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    public List<KeyProject> keyProject();
+
+    /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    public List<KeyAreas> keyAreas();
+
+    /**
      * 删除部门管理信息
-     * 
+     *
      * @param deptId 部门ID
      * @return 结果
      */
@@ -45,7 +62,7 @@ public interface SysDeptMapper
 
     /**
      * 新增部门信息
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -53,7 +70,7 @@ public interface SysDeptMapper
 
     /**
      * 修改部门信息
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -61,7 +78,7 @@ public interface SysDeptMapper
 
     /**
      * 修改子元素关系
-     * 
+     *
      * @param depts 子元素
      * @return 结果
      */
@@ -69,7 +86,7 @@ public interface SysDeptMapper
 
     /**
      * 根据部门ID查询信息
-     * 
+     *
      * @param deptId 部门ID
      * @return 部门信息
      */
@@ -77,7 +94,7 @@ public interface SysDeptMapper
 
     /**
      * 校验部门名称是否唯一
-     * 
+     *
      * @param deptName 部门名称
      * @param parentId 父部门ID
      * @return 结果
@@ -94,14 +111,14 @@ public interface SysDeptMapper
 
     /**
      * 修改所在部门正常状态
-     * 
+     *
      * @param deptIds 部门ID组
      */
     public void updateDeptStatusNormal(Long[] deptIds);
 
     /**
      * 根据ID查询所有子部门
-     * 
+     *
      * @param deptId 部门ID
      * @return 部门列表
      */
@@ -109,7 +126,7 @@ public interface SysDeptMapper
 
     /**
      * 根据ID查询所有子部门(正常状态)
-     * 
+     *
      * @param deptId 部门ID
      * @return 子部门数
      */

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IKeyAreasService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.KeyAreas;
+
+/**
+ * 重点区域Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public interface IKeyAreasService 
+{
+    /**
+     * 查询重点区域
+     * 
+     * @param id 重点区域主键
+     * @return 重点区域
+     */
+    public KeyAreas selectKeyAreasById(Long id);
+
+    /**
+     * 查询重点区域列表
+     * 
+     * @param keyAreas 重点区域
+     * @return 重点区域集合
+     */
+    public List<KeyAreas> selectKeyAreasList(KeyAreas keyAreas);
+
+    /**
+     * 新增重点区域
+     * 
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    public int insertKeyAreas(KeyAreas keyAreas);
+
+    /**
+     * 修改重点区域
+     * 
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    public int updateKeyAreas(KeyAreas keyAreas);
+
+    /**
+     * 批量删除重点区域
+     * 
+     * @param ids 需要删除的重点区域主键集合
+     * @return 结果
+     */
+    public int deleteKeyAreasByIds(String ids);
+
+    /**
+     * 删除重点区域信息
+     * 
+     * @param id 重点区域主键
+     * @return 结果
+     */
+    public int deleteKeyAreasById(Long id);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IKeyProjectService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.KeyProject;
+
+/**
+ * 重点工程Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+public interface IKeyProjectService 
+{
+    /**
+     * 查询重点工程
+     * 
+     * @param id 重点工程主键
+     * @return 重点工程
+     */
+    public KeyProject selectKeyProjectById(Long id);
+
+    /**
+     * 查询重点工程列表
+     * 
+     * @param keyProject 重点工程
+     * @return 重点工程集合
+     */
+    public List<KeyProject> selectKeyProjectList(KeyProject keyProject);
+
+    /**
+     * 新增重点工程
+     * 
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    public int insertKeyProject(KeyProject keyProject);
+
+    /**
+     * 修改重点工程
+     * 
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    public int updateKeyProject(KeyProject keyProject);
+
+    /**
+     * 批量删除重点工程
+     * 
+     * @param ids 需要删除的重点工程主键集合
+     * @return 结果
+     */
+    public int deleteKeyProjectByIds(String ids);
+
+    /**
+     * 删除重点工程信息
+     * 
+     * @param id 重点工程主键
+     * @return 结果
+     */
+    public int deleteKeyProjectById(Long id);
+}

+ 27 - 13
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java

@@ -7,14 +7,14 @@ import com.ruoyi.common.core.domain.entity.SysRole;
 
 /**
  * 部门管理 服务层
- * 
+ *
  * @author ruoyi
  */
 public interface ISysDeptService
 {
     /**
      * 查询部门管理数据
-     * 
+     *
      * @param dept 部门信息
      * @return 部门信息集合
      */
@@ -22,15 +22,29 @@ public interface ISysDeptService
 
     /**
      * 查询部门管理树
-     * 
+     *
      * @param dept 部门信息
      * @return 所有部门信息
      */
     public List<Ztree> selectDeptTree(SysDept dept);
 
     /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    public List<Ztree> keyProject();
+
+    /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    public List<Ztree> keyAreas();
+
+    /**
      * 查询部门管理树(排除下级)
-     * 
+     *
      * @param dept 部门信息
      * @return 所有部门信息
      */
@@ -46,7 +60,7 @@ public interface ISysDeptService
 
     /**
      * 根据父部门ID查询下级部门数量
-     * 
+     *
      * @param parentId 父部门ID
      * @return 结果
      */
@@ -54,7 +68,7 @@ public interface ISysDeptService
 
     /**
      * 查询部门是否存在用户
-     * 
+     *
      * @param deptId 部门ID
      * @return 结果 true 存在 false 不存在
      */
@@ -62,7 +76,7 @@ public interface ISysDeptService
 
     /**
      * 删除部门管理信息
-     * 
+     *
      * @param deptId 部门ID
      * @return 结果
      */
@@ -70,7 +84,7 @@ public interface ISysDeptService
 
     /**
      * 新增保存部门信息
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -78,7 +92,7 @@ public interface ISysDeptService
 
     /**
      * 修改保存部门信息
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -86,7 +100,7 @@ public interface ISysDeptService
 
     /**
      * 根据部门ID查询信息
-     * 
+     *
      * @param deptId 部门ID
      * @return 部门信息
      */
@@ -94,7 +108,7 @@ public interface ISysDeptService
 
     /**
      * 根据ID查询所有子部门(正常状态)
-     * 
+     *
      * @param deptId 部门ID
      * @return 子部门数
      */
@@ -102,7 +116,7 @@ public interface ISysDeptService
 
     /**
      * 校验部门名称是否唯一
-     * 
+     *
      * @param dept 部门信息
      * @return 结果
      */
@@ -110,7 +124,7 @@ public interface ISysDeptService
 
     /**
      * 校验部门是否有数据权限
-     * 
+     *
      * @param deptId 部门id
      */
     public void checkDeptDataScope(Long deptId);

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KeyAreasServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.KeyAreasMapper;
+import com.ruoyi.system.domain.KeyAreas;
+import com.ruoyi.system.service.IKeyAreasService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 重点区域Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+@Service
+public class KeyAreasServiceImpl implements IKeyAreasService
+{
+    @Autowired
+    private KeyAreasMapper keyAreasMapper;
+
+    /**
+     * 查询重点区域
+     *
+     * @param id 重点区域主键
+     * @return 重点区域
+     */
+    @Override
+    public KeyAreas selectKeyAreasById(Long id)
+    {
+        return keyAreasMapper.selectKeyAreasById(id);
+    }
+
+    /**
+     * 查询重点区域列表
+     *
+     * @param keyAreas 重点区域
+     * @return 重点区域
+     */
+    @Override
+    public List<KeyAreas> selectKeyAreasList(KeyAreas keyAreas)
+    {
+        return keyAreasMapper.selectKeyAreasList(keyAreas);
+    }
+
+    /**
+     * 新增重点区域
+     *
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    @Override
+    public int insertKeyAreas(KeyAreas keyAreas)
+    {
+        keyAreas.setParentId(1L);
+        return keyAreasMapper.insertKeyAreas(keyAreas);
+    }
+
+    /**
+     * 修改重点区域
+     *
+     * @param keyAreas 重点区域
+     * @return 结果
+     */
+    @Override
+    public int updateKeyAreas(KeyAreas keyAreas)
+    {
+        keyAreas.setParentId(1L);
+        return keyAreasMapper.updateKeyAreas(keyAreas);
+    }
+
+    /**
+     * 批量删除重点区域
+     *
+     * @param ids 需要删除的重点区域主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKeyAreasByIds(String ids)
+    {
+        return keyAreasMapper.deleteKeyAreasByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除重点区域信息
+     *
+     * @param id 重点区域主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKeyAreasById(Long id)
+    {
+        return keyAreasMapper.deleteKeyAreasById(id);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KeyProjectServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.KeyProjectMapper;
+import com.ruoyi.system.domain.KeyProject;
+import com.ruoyi.system.service.IKeyProjectService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 重点工程Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-07-24
+ */
+@Service
+public class KeyProjectServiceImpl implements IKeyProjectService
+{
+    @Autowired
+    private KeyProjectMapper keyProjectMapper;
+
+    /**
+     * 查询重点工程
+     *
+     * @param id 重点工程主键
+     * @return 重点工程
+     */
+    @Override
+    public KeyProject selectKeyProjectById(Long id)
+    {
+        return keyProjectMapper.selectKeyProjectById(id);
+    }
+
+    /**
+     * 查询重点工程列表
+     *
+     * @param keyProject 重点工程
+     * @return 重点工程
+     */
+    @Override
+    public List<KeyProject> selectKeyProjectList(KeyProject keyProject)
+    {
+        return keyProjectMapper.selectKeyProjectList(keyProject);
+    }
+
+    /**
+     * 新增重点工程
+     *
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    @Override
+    public int insertKeyProject(KeyProject keyProject)
+    {
+        keyProject.setParentId(1L);
+        return keyProjectMapper.insertKeyProject(keyProject);
+    }
+
+    /**
+     * 修改重点工程
+     *
+     * @param keyProject 重点工程
+     * @return 结果
+     */
+    @Override
+    public int updateKeyProject(KeyProject keyProject)
+    {
+        keyProject.setParentId(1L);
+        return keyProjectMapper.updateKeyProject(keyProject);
+    }
+
+    /**
+     * 批量删除重点工程
+     *
+     * @param ids 需要删除的重点工程主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKeyProjectByIds(String ids)
+    {
+        return keyProjectMapper.deleteKeyProjectByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除重点工程信息
+     *
+     * @param id 重点工程主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKeyProjectById(Long id)
+    {
+        return keyProjectMapper.deleteKeyProjectById(id);
+    }
+}

+ 108 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -2,6 +2,10 @@ package com.ruoyi.system.service.impl;
 
 import java.util.ArrayList;
 import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.*;
+import com.ruoyi.system.domain.KeyAreas;
+import com.ruoyi.system.domain.KeyProject;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -9,9 +13,6 @@ import org.springframework.transaction.annotation.Transactional;
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.domain.Ztree;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysRole;
-import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.ShiroUtils;
@@ -60,6 +61,110 @@ public class SysDeptServiceImpl implements ISysDeptService
     }
 
     /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    @Override
+    public List<Ztree> keyProject()
+    {
+        List<KeyProject> deptList = deptMapper.keyProject();
+        List<Ztree> ztrees = initZtreeKeyProject(deptList);
+        return ztrees;
+    }
+
+    /**
+     * 对象转部门树
+     *
+     * @param deptList 部门列表
+     * @return 树结构列表
+     */
+    public List<Ztree> initZtreeKeyProject(List<KeyProject> deptList)
+    {
+        return initZtreeKeyProject(deptList, null);
+    }
+    /**
+     * 对象转部门树
+     *
+     * @param deptList 部门列表
+     * @param roleDeptList 角色已存在菜单列表
+     * @return 树结构列表
+     */
+    public List<Ztree> initZtreeKeyProject(List<KeyProject> deptList, List<String> roleDeptList)
+    {
+
+        List<Ztree> ztrees = new ArrayList<Ztree>();
+        boolean isCheck = StringUtils.isNotNull(roleDeptList);
+        for (KeyProject dept : deptList)
+        {
+            Ztree<KeyProject> ztree = new Ztree<>();
+            ztree.setId(dept.getId());
+            ztree.setpId(dept.getParentId());
+            ztree.setName(dept.getProjectName());
+            ztree.setTitle(dept.getProjectName());
+            ztree.setData(dept);
+            if (isCheck)
+            {
+                ztree.setChecked(roleDeptList.contains(dept.getId() + dept.getProjectName()));
+            }
+            ztrees.add(ztree);
+        }
+        return ztrees;
+    }
+
+    /**
+     * 查询部门管理树
+     *
+     * @return 所有部门信息
+     */
+    @Override
+    public List<Ztree> keyAreas()
+    {
+        List<KeyAreas> deptList = deptMapper.keyAreas();
+        List<Ztree> ztrees = initZtreeKeyAreas(deptList);
+        return ztrees;
+    }
+
+    /**
+     * 对象转部门树
+     *
+     * @param deptList 部门列表
+     * @return 树结构列表
+     */
+    public List<Ztree> initZtreeKeyAreas(List<KeyAreas> deptList)
+    {
+        return initZtreeKeyAreas(deptList, null);
+    }
+    /**
+     * 对象转部门树
+     *
+     * @param deptList 部门列表
+     * @param roleDeptList 角色已存在菜单列表
+     * @return 树结构列表
+     */
+    public List<Ztree> initZtreeKeyAreas(List<KeyAreas> deptList, List<String> roleDeptList)
+    {
+
+        List<Ztree> ztrees = new ArrayList<Ztree>();
+        boolean isCheck = StringUtils.isNotNull(roleDeptList);
+        for (KeyAreas dept : deptList)
+        {
+            Ztree<KeyAreas> ztree = new Ztree<>();
+            ztree.setId(dept.getId());
+            ztree.setpId(dept.getParentId());
+            ztree.setName(dept.getAreasName());
+            ztree.setTitle(dept.getAreasName());
+            ztree.setData(dept);
+            if (isCheck)
+            {
+                ztree.setChecked(roleDeptList.contains(dept.getId() + dept.getAreasName()));
+            }
+            ztrees.add(ztree);
+        }
+        return ztrees;
+    }
+
+    /**
      * 查询部门管理树(排除下级)
      *
      * @param deptId 部门ID

+ 79 - 0
ruoyi-system/src/main/resources/mapper/system/KeyAreasMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.KeyAreasMapper">
+
+    <resultMap type="KeyAreas" id="KeyAreasResult">
+        <result property="id"    column="id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="areasName"    column="areas_name"    />
+        <result property="cameraName"    column="camera_name"    />
+        <result property="cameraCode"    column="camera_code"    />
+        <result property="presetPoints"    column="preset_points"    />
+    </resultMap>
+
+    <sql id="selectKeyAreasVo">
+        select id, parent_id, areas_name, camera_name, camera_code, preset_points from key_areas
+    </sql>
+
+    <select id="selectKeyAreasList" parameterType="KeyAreas" resultMap="KeyAreasResult">
+        <include refid="selectKeyAreasVo"/>
+        <where>
+            and parent_id != 0
+            <if test="areasName != null  and areasName != ''"> and areas_name like concat('%', #{areasName}, '%')</if>
+            <if test="cameraName != null  and cameraName != ''"> and camera_name like concat('%', #{cameraName}, '%')</if>
+            <if test="cameraCode != null  and cameraCode != ''"> and camera_code like concat('%', #{cameraCode}, '%')</if>
+            <if test="presetPoints != null "> and preset_points like concat('%', #{presetPoints}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectKeyAreasById" parameterType="Long" resultMap="KeyAreasResult">
+        <include refid="selectKeyAreasVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertKeyAreas" parameterType="KeyAreas">
+        insert into key_areas
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="areasName != null">areas_name,</if>
+            <if test="cameraName != null">camera_name,</if>
+            <if test="cameraCode != null">camera_code,</if>
+            <if test="presetPoints != null">preset_points,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="areasName != null">#{areasName},</if>
+            <if test="cameraName != null">#{cameraName},</if>
+            <if test="cameraCode != null">#{cameraCode},</if>
+            <if test="presetPoints != null">#{presetPoints},</if>
+         </trim>
+    </insert>
+
+    <update id="updateKeyAreas" parameterType="KeyAreas">
+        update key_areas
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="areasName != null">areas_name = #{areasName},</if>
+            <if test="cameraName != null">camera_name = #{cameraName},</if>
+            <if test="cameraCode != null">camera_code = #{cameraCode},</if>
+            <if test="presetPoints != null">preset_points = #{presetPoints},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKeyAreasById" parameterType="Long">
+        delete from key_areas where id = #{id}
+    </delete>
+
+    <delete id="deleteKeyAreasByIds" parameterType="String">
+        delete from key_areas where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 79 - 0
ruoyi-system/src/main/resources/mapper/system/KeyProjectMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.KeyProjectMapper">
+
+    <resultMap type="KeyProject" id="KeyProjectResult">
+        <result property="id"    column="id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="cameraName"    column="camera_name"    />
+        <result property="cameraCode"    column="camera_code"    />
+        <result property="presetPoints"    column="preset_points"    />
+    </resultMap>
+
+    <sql id="selectKeyProjectVo">
+        select id, parent_id, project_name, camera_name, camera_code, preset_points from key_project
+    </sql>
+
+    <select id="selectKeyProjectList" parameterType="KeyProject" resultMap="KeyProjectResult">
+        <include refid="selectKeyProjectVo"/>
+        <where>
+            and parent_id != 0
+            <if test="projectName != null  and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+            <if test="cameraName != null  and cameraName != ''"> and camera_name like concat('%', #{cameraName}, '%')</if>
+            <if test="cameraCode != null  and cameraCode != ''"> and camera_code like concat('%', #{cameraCode}, '%')</if>
+            <if test="presetPoints != null "> and preset_points like concat('%', #{presetPoints}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectKeyProjectById" parameterType="Long" resultMap="KeyProjectResult">
+        <include refid="selectKeyProjectVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertKeyProject" parameterType="KeyProject">
+        insert into key_project
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="projectName != null">project_name,</if>
+            <if test="cameraName != null">camera_name,</if>
+            <if test="cameraCode != null">camera_code,</if>
+            <if test="presetPoints != null">preset_points,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="projectName != null">#{projectName},</if>
+            <if test="cameraName != null">#{cameraName},</if>
+            <if test="cameraCode != null">#{cameraCode},</if>
+            <if test="presetPoints != null">#{presetPoints},</if>
+         </trim>
+    </insert>
+
+    <update id="updateKeyProject" parameterType="KeyProject">
+        update key_project
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="cameraName != null">camera_name = #{cameraName},</if>
+            <if test="cameraCode != null">camera_code = #{cameraCode},</if>
+            <if test="presetPoints != null">preset_points = #{presetPoints},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKeyProjectById" parameterType="Long">
+        delete from key_project where id = #{id}
+    </delete>
+
+    <delete id="deleteKeyProjectByIds" parameterType="String">
+        delete from key_project where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 24 - 0
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -25,6 +25,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="cameraCode" column="camera_code" />
 		<result property="presetPoints" column="preset_points" />
 	</resultMap>
+	<resultMap type="KeyProject" id="KeyProjectResult">
+		<id     property="id"     column="id"     />
+		<result property="parentId"   column="parent_id"   />
+		<result property="projectName" column="project_name" />
+
+		<result property="cameraName" column="camera_name" />
+		<result property="cameraCode" column="camera_code" />
+		<result property="presetPoints" column="preset_points" />
+	</resultMap>
+	<resultMap type="KeyAreas" id="KeyAreasResult">
+		<id     property="id"     column="id"     />
+		<result property="parentId"   column="parent_id"   />
+		<result property="areasName" column="areas_name" />
+
+		<result property="cameraName" column="camera_name" />
+		<result property="cameraCode" column="camera_code" />
+		<result property="presetPoints" column="preset_points" />
+	</resultMap>
 
 	<sql id="selectDeptVo">
         select d.preset_points, d.camera_name, d.camera_code, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
@@ -58,6 +76,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		${params.dataScope}
 		order by d.parent_id, d.order_num
     </select>
+	<select id="keyProject" resultMap="KeyProjectResult">
+        select * from key_project
+    </select>
+	<select id="keyAreas" resultMap="KeyAreasResult">
+		select * from key_areas
+	</select>
 
 	<select id="checkDeptExistUser" parameterType="Long" resultType="int">
 		select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'