From d44b855ffdda21a5abf8e00bc3381310882f9375 Mon Sep 17 00:00:00 2001
From: 唐耀东 <18861537@qq.com>
Date: 星期四, 12 五月 2022 09:45:36 +0800
Subject: [PATCH] 提交代码

---
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgNvrBo.java                           |  162 ++++
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/BsOrganizationVo.java                  |   77 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsOrganizationController.java  |  116 +++
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgNvrService.java                       |   56 +
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgNvr.java                                |  101 ++
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgNvrVo.java                           |  139 ++++
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgNvrServiceImpl.java               |   93 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgNvrController.java           |  118 +++
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsOrganizationServiceImpl.java      |  109 +++
 ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgNvrMapper.java                          |   14 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/BsOrganization.java                       |   61 +
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgReserveIpBo.java                     |    5 
 ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsSchoolMapper.java                       |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgIpcController.java           |  118 +++
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgIpc.java                                |   89 ++
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgReserveIp.java                          |    8 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgConstructionBatch.java                  |    8 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgConstructionBatchBo.java             |    5 
 ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgIpcMapper.java                          |   14 
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java |   10 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsBuildingController.java      |    8 
 ruoyi-oa/src/main/resources/mapper/oa/SgIpcMapper.xml                                |   29 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BsOrganizationBo.java                  |   98 ++
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/IBsOrganizationService.java              |   51 +
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgIpcServiceImpl.java               |  107 +++
 ruoyi-oa/src/main/resources/mapper/oa/BsOrganizationMapper.xml                       |   24 
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgIpcService.java                       |   56 +
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgIpcBo.java                           |  141 ++++
 ruoyi-oa/src/main/resources/mapper/oa/SgNvrMapper.xml                                |   31 
 ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsOrganizationMapper.java                 |   14 
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgReserveIpServiceImpl.java         |    1 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgConstructionBatchVo.java             |    5 
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgIpcVo.java                           |  129 +++
 ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgReserveIpVo.java                     |    5 
 34 files changed, 1,988 insertions(+), 16 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsBuildingController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsBuildingController.java
index d4f63bf..f53caa4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsBuildingController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsBuildingController.java
@@ -69,7 +69,7 @@
      * 鑾峰彇寤虹瓚鍗曞厓璇︾粏淇℃伅
      */
     @ApiOperation("鑾峰彇寤虹瓚鍗曞厓璇︾粏淇℃伅")
-    @PreAuthorize("@ss.hasPermi('oa:building:query')")
+//    @PreAuthorize("@ss.hasPermi('oa:building:query')")
     @GetMapping("/{id}")
     public AjaxResult<BsBuildingVo> getInfo(@ApiParam("涓婚敭")
                                                   @NotNull(message = "涓婚敭涓嶈兘涓虹┖")
@@ -81,7 +81,7 @@
      * 鏂板寤虹瓚鍗曞厓
      */
     @ApiOperation("鏂板寤虹瓚鍗曞厓")
-    @PreAuthorize("@ss.hasPermi('oa:building:add')")
+//    @PreAuthorize("@ss.hasPermi('oa:building:add')")
     @Log(title = "寤虹瓚鍗曞厓", businessType = BusinessType.INSERT)
     @RepeatSubmit()
     @PostMapping()
@@ -93,7 +93,7 @@
      * 淇敼寤虹瓚鍗曞厓
      */
     @ApiOperation("淇敼寤虹瓚鍗曞厓")
-    @PreAuthorize("@ss.hasPermi('oa:building:edit')")
+//    @PreAuthorize("@ss.hasPermi('oa:building:edit')")
     @Log(title = "寤虹瓚鍗曞厓", businessType = BusinessType.UPDATE)
     @RepeatSubmit()
     @PutMapping()
@@ -105,7 +105,7 @@
      * 鍒犻櫎寤虹瓚鍗曞厓
      */
     @ApiOperation("鍒犻櫎寤虹瓚鍗曞厓")
-    @PreAuthorize("@ss.hasPermi('oa:building:remove')")
+//    @PreAuthorize("@ss.hasPermi('oa:building:remove')")
     @Log(title = "寤虹瓚鍗曞厓" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsOrganizationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsOrganizationController.java
new file mode 100644
index 0000000..ba73ff0
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsOrganizationController.java
@@ -0,0 +1,116 @@
+package com.ruoyi.web.controller.oa;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import lombok.RequiredArgsConstructor;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.*;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.ruoyi.common.annotation.RepeatSubmit;
+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.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.core.validate.QueryGroup;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.oa.domain.vo.BsOrganizationVo;
+import com.ruoyi.oa.domain.bo.BsOrganizationBo;
+import com.ruoyi.oa.service.IBsOrganizationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Validated
+@Api(value = "楂樻牎缁勭粐鏈烘瀯鎺у埗鍣�", tags = {"楂樻牎缁勭粐鏈烘瀯绠$悊"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/oa/organization")
+public class BsOrganizationController extends BaseController {
+
+    private final IBsOrganizationService iBsOrganizationService;
+
+    /**
+     * 鏌ヨ楂樻牎缁勭粐鏈烘瀯鍒楄〃
+     */
+    @ApiOperation("鏌ヨ楂樻牎缁勭粐鏈烘瀯鍒楄〃")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:list')")
+    @GetMapping("/list")
+    public AjaxResult<List<BsOrganizationVo>> list(@Validated(QueryGroup.class) BsOrganizationBo bo) {
+        List<BsOrganizationVo> list = iBsOrganizationService.queryList(bo);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 瀵煎嚭楂樻牎缁勭粐鏈烘瀯鍒楄〃
+     */
+    @ApiOperation("瀵煎嚭楂樻牎缁勭粐鏈烘瀯鍒楄〃")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:export')")
+    @Log(title = "楂樻牎缁勭粐鏈烘瀯", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public void export(@Validated BsOrganizationBo bo, HttpServletResponse response) {
+        List<BsOrganizationVo> list = iBsOrganizationService.queryList(bo);
+        ExcelUtil.exportExcel(list, "楂樻牎缁勭粐鏈烘瀯", BsOrganizationVo.class, response);
+    }
+
+    /**
+     * 鑾峰彇楂樻牎缁勭粐鏈烘瀯璇︾粏淇℃伅
+     */
+    @ApiOperation("鑾峰彇楂樻牎缁勭粐鏈烘瀯璇︾粏淇℃伅")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:query')")
+    @GetMapping("/{id}")
+    public AjaxResult<BsOrganizationVo> getInfo(@ApiParam("涓婚敭")
+                                                  @NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+                                                  @PathVariable("id") Long id) {
+        return AjaxResult.success(iBsOrganizationService.queryById(id));
+    }
+
+    /**
+     * 鏂板楂樻牎缁勭粐鏈烘瀯
+     */
+    @ApiOperation("鏂板楂樻牎缁勭粐鏈烘瀯")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:add')")
+    @Log(title = "楂樻牎缁勭粐鏈烘瀯", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody BsOrganizationBo bo) {
+        return toAjax(iBsOrganizationService.insertByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 淇敼楂樻牎缁勭粐鏈烘瀯
+     */
+    @ApiOperation("淇敼楂樻牎缁勭粐鏈烘瀯")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:edit')")
+    @Log(title = "楂樻牎缁勭粐鏈烘瀯", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody BsOrganizationBo bo) {
+        return toAjax(iBsOrganizationService.updateByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 鍒犻櫎楂樻牎缁勭粐鏈烘瀯
+     */
+    @ApiOperation("鍒犻櫎楂樻牎缁勭粐鏈烘瀯")
+//    @PreAuthorize("@ss.hasPermi('oa:organization:remove')")
+    @Log(title = "楂樻牎缁勭粐鏈烘瀯" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�")
+                                       @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
+                                       @PathVariable Long[] ids) {
+        return toAjax(iBsOrganizationService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgIpcController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgIpcController.java
new file mode 100644
index 0000000..dca1bf2
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgIpcController.java
@@ -0,0 +1,118 @@
+package com.ruoyi.web.controller.oa;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import com.ruoyi.common.annotation.DataDictClass;
+import lombok.RequiredArgsConstructor;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.*;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.ruoyi.common.annotation.RepeatSubmit;
+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.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.core.validate.QueryGroup;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.oa.domain.vo.SgIpcVo;
+import com.ruoyi.oa.domain.bo.SgIpcBo;
+import com.ruoyi.oa.service.ISgIpcService;
+import com.ruoyi.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * ipc璁惧Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Validated
+@Api(value = "ipc璁惧鎺у埗鍣�", tags = {"ipc璁惧绠$悊"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/oa/ipc")
+public class SgIpcController extends BaseController {
+
+    private final ISgIpcService iSgIpcService;
+
+    /**
+     * 鏌ヨipc璁惧鍒楄〃
+     */
+    @DataDictClass
+    @ApiOperation("鏌ヨipc璁惧鍒楄〃")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:list')")
+    @GetMapping("/list")
+    public TableDataInfo<SgIpcVo> list(@Validated(QueryGroup.class) SgIpcBo bo) {
+        return iSgIpcService.queryPageList(bo);
+    }
+
+    /**
+     * 瀵煎嚭ipc璁惧鍒楄〃
+     */
+    @ApiOperation("瀵煎嚭ipc璁惧鍒楄〃")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:export')")
+    @Log(title = "ipc璁惧", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public void export(@Validated SgIpcBo bo, HttpServletResponse response) {
+        List<SgIpcVo> list = iSgIpcService.queryList(bo);
+        ExcelUtil.exportExcel(list, "ipc璁惧", SgIpcVo.class, response);
+    }
+
+    /**
+     * 鑾峰彇ipc璁惧璇︾粏淇℃伅
+     */
+    @ApiOperation("鑾峰彇ipc璁惧璇︾粏淇℃伅")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:query')")
+    @GetMapping("/{id}")
+    public AjaxResult<SgIpcVo> getInfo(@ApiParam("涓婚敭")
+                                                  @NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+                                                  @PathVariable("id") Long id) {
+        return AjaxResult.success(iSgIpcService.queryById(id));
+    }
+
+    /**
+     * 鏂板ipc璁惧
+     */
+    @ApiOperation("鏂板ipc璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:add')")
+    @Log(title = "ipc璁惧", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgIpcBo bo) {
+        return toAjax(iSgIpcService.insertByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 淇敼ipc璁惧
+     */
+    @ApiOperation("淇敼ipc璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:edit')")
+    @Log(title = "ipc璁惧", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgIpcBo bo) {
+        return toAjax(iSgIpcService.updateByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 鍒犻櫎ipc璁惧
+     */
+    @ApiOperation("鍒犻櫎ipc璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:ipc:remove')")
+    @Log(title = "ipc璁惧" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�")
+                                       @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
+                                       @PathVariable Long[] ids) {
+        return toAjax(iSgIpcService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgNvrController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgNvrController.java
new file mode 100644
index 0000000..1436702
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/SgNvrController.java
@@ -0,0 +1,118 @@
+package com.ruoyi.web.controller.oa;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import com.ruoyi.common.annotation.DataDictClass;
+import lombok.RequiredArgsConstructor;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.*;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import com.ruoyi.common.annotation.RepeatSubmit;
+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.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.core.validate.QueryGroup;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.oa.domain.vo.SgNvrVo;
+import com.ruoyi.oa.domain.bo.SgNvrBo;
+import com.ruoyi.oa.service.ISgNvrService;
+import com.ruoyi.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * NVR璁惧Controller
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Validated
+@Api(value = "NVR璁惧鎺у埗鍣�", tags = {"NVR璁惧绠$悊"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/oa/nvr")
+public class SgNvrController extends BaseController {
+
+    private final ISgNvrService iSgNvrService;
+
+    /**
+     * 鏌ヨNVR璁惧鍒楄〃
+     */
+    @DataDictClass
+    @ApiOperation("鏌ヨNVR璁惧鍒楄〃")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:list')")
+    @GetMapping("/list")
+    public TableDataInfo<SgNvrVo> list(@Validated(QueryGroup.class) SgNvrBo bo) {
+        return iSgNvrService.queryPageList(bo);
+    }
+
+    /**
+     * 瀵煎嚭NVR璁惧鍒楄〃
+     */
+    @ApiOperation("瀵煎嚭NVR璁惧鍒楄〃")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:export')")
+    @Log(title = "NVR璁惧", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public void export(@Validated SgNvrBo bo, HttpServletResponse response) {
+        List<SgNvrVo> list = iSgNvrService.queryList(bo);
+        ExcelUtil.exportExcel(list, "NVR璁惧", SgNvrVo.class, response);
+    }
+
+    /**
+     * 鑾峰彇NVR璁惧璇︾粏淇℃伅
+     */
+    @ApiOperation("鑾峰彇NVR璁惧璇︾粏淇℃伅")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:query')")
+    @GetMapping("/{id}")
+    public AjaxResult<SgNvrVo> getInfo(@ApiParam("涓婚敭")
+                                                  @NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+                                                  @PathVariable("id") Long id) {
+        return AjaxResult.success(iSgNvrService.queryById(id));
+    }
+
+    /**
+     * 鏂板NVR璁惧
+     */
+    @ApiOperation("鏂板NVR璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:add')")
+    @Log(title = "NVR璁惧", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SgNvrBo bo) {
+        return toAjax(iSgNvrService.insertByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 淇敼NVR璁惧
+     */
+    @ApiOperation("淇敼NVR璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:edit')")
+    @Log(title = "NVR璁惧", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SgNvrBo bo) {
+        return toAjax(iSgNvrService.updateByBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 鍒犻櫎NVR璁惧
+     */
+    @ApiOperation("鍒犻櫎NVR璁惧")
+    @PreAuthorize("@ss.hasPermi('oa:nvr:remove')")
+    @Log(title = "NVR璁惧" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult<Void> remove(@ApiParam("涓婚敭涓�")
+                                       @NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
+                                       @PathVariable Long[] ids) {
+        return toAjax(iSgNvrService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
+    }
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/BsOrganization.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/BsOrganization.java
new file mode 100644
index 0000000..7a8029e
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/BsOrganization.java
@@ -0,0 +1,61 @@
+package com.ruoyi.oa.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+
+import com.ruoyi.common.core.domain.TreeEntity;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯瀵硅薄 bs_organization
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@Accessors(chain = true)
+@TableName("bs_organization")
+public class BsOrganization extends TreeEntity {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 
+     */
+    @TableId(value = "id")
+    private Long id;
+    /**
+     * 鏈烘瀯缂栧彿
+     */
+    private String code;
+    /**
+     * 鏈烘瀯鍚嶇О
+     */
+    private String name;
+    /**
+     * 璇︾粏鍚嶇О
+     */
+    private String detailedName;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * 绁栫骇鍒楄〃
+     */
+    private String ancestors;
+    /**
+     * 鏄剧ず椤哄簭
+     */
+    private Integer orderNum;
+    /**
+     * 
+     */
+    @TableLogic
+    private String delFlag;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgConstructionBatch.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgConstructionBatch.java
index 0fa5274..ef9e079 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgConstructionBatch.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgConstructionBatch.java
@@ -26,10 +26,14 @@
     private static final long serialVersionUID=1L;
 
     /**
-     * 
+     *
      */
     @TableId(value = "id")
     private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
     /**
      * 鏂藉伐鎵规
      */
@@ -55,7 +59,7 @@
      */
     private String remarks;
     /**
-     * 
+     *
      */
     @TableLogic
     private String delFlag;
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgIpc.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgIpc.java
new file mode 100644
index 0000000..7be1bdc
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgIpc.java
@@ -0,0 +1,89 @@
+package com.ruoyi.oa.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * ipc璁惧瀵硅薄 sg_ipc
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@Accessors(chain = true)
+@TableName("sg_ipc")
+public class SgIpc extends BaseEntity {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     *
+     */
+    @TableId(value = "id")
+    private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * mac
+     */
+    private String mac;
+    /**
+     * IP
+     */
+    private String ip;
+    /**
+     * 绔彛
+     */
+    private Integer port;
+    /**
+     * 鐧诲綍璐︽埛
+     */
+    private String loginAccount;
+    /**
+     * nvr
+     */
+    private Long nvrId;
+    /**
+     * 閫氶亾
+     */
+    private String passageway;
+    /**
+     * 瀹夎浣嶇疆
+     */
+    private Long buildingId;
+    /**
+     * 鎵�灞炲崟浣�
+     */
+    private Long organizationId;
+    /**
+     * 鏂藉伐鎵规
+     */
+    private Long constructionBatchId;
+    /**
+     * 搴忓垪鍙�
+     */
+    private String serialNumber;
+    /**
+     * 鍨嬪彿
+     */
+    private String model;
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+    private Long manufacturerId;
+    /**
+     *
+     */
+    @TableLogic
+    private String delFlag;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgNvr.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgNvr.java
new file mode 100644
index 0000000..47677e9
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgNvr.java
@@ -0,0 +1,101 @@
+package com.ruoyi.oa.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * NVR璁惧瀵硅薄 sg_nvr
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@Accessors(chain = true)
+@TableName("sg_nvr")
+public class SgNvr extends BaseEntity {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     *
+     */
+    @TableId(value = "id")
+    private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * 閮ㄧ讲鍚嶇О
+     */
+    private String deploymentName;
+    /**
+     * 閫氶亾
+     */
+    private String passageway;
+    /**
+     * LAN1
+     */
+    private String lanOne;
+    /**
+     * ip1
+     */
+    private String ipOne;
+    /**
+     * LAN2
+     */
+    private String lanTwo;
+    /**
+     * ip2
+     */
+    private String ipTwo;
+    /**
+     * 鐧诲綍璐﹀彿
+     */
+    private String loginAccount;
+    /**
+     * 纭洏
+     */
+    private String hardDisk;
+    /**
+     * 寤虹瓚鍗曞厓
+     */
+    private Long buildingId;
+    /**
+     * 鎵�灞炴満鏋�
+     */
+    private Long organizationId;
+    /**
+     * 鏂藉伐鎵规
+     */
+    private Long constructionBatchId;
+    /**
+     * 搴忓垪鍙�
+     */
+    private String serialNumber;
+    /**
+     * 鍨嬪彿
+     */
+    private String model;
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+    private Long manufacturerId;
+    /**
+     * 闄勪欢
+     */
+    private String filePath;
+    /**
+     *
+     */
+    @TableLogic
+    private String delFlag;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgReserveIp.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgReserveIp.java
index 60e2786..973b508 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgReserveIp.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SgReserveIp.java
@@ -26,10 +26,14 @@
     private static final long serialVersionUID=1L;
 
     /**
-     * 
+     *
      */
     @TableId(value = "id")
     private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
     /**
      * ip鍦板潃
      */
@@ -51,7 +55,7 @@
      */
     private String remarks;
     /**
-     * 
+     *
      */
     @TableLogic
     private String delFlag;
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BsOrganizationBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BsOrganizationBo.java
new file mode 100644
index 0000000..1d3a5aa
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/BsOrganizationBo.java
@@ -0,0 +1,98 @@
+package com.ruoyi.oa.domain.bo;
+
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.validation.constraints.*;
+
+import java.util.Date;
+
+import com.ruoyi.common.core.domain.TreeEntity;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯涓氬姟瀵硅薄 bs_organization
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("楂樻牎缁勭粐鏈烘瀯涓氬姟瀵硅薄")
+public class BsOrganizationBo extends TreeEntity {
+
+    /**
+     * 
+     */
+    @ApiModelProperty(value = "", required = true)
+    @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 鏈烘瀯缂栧彿
+     */
+    @ApiModelProperty(value = "鏈烘瀯缂栧彿", required = true)
+    @NotBlank(message = "鏈烘瀯缂栧彿涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String code;
+
+    /**
+     * 鏈烘瀯鍚嶇О
+     */
+    @ApiModelProperty(value = "鏈烘瀯鍚嶇О", required = true)
+    @NotBlank(message = "鏈烘瀯鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String name;
+
+    /**
+     * 璇︾粏鍚嶇О
+     */
+    @ApiModelProperty(value = "璇︾粏鍚嶇О")
+    private String detailedName;
+
+    /**
+     * 楂樻牎
+     */
+    @ApiModelProperty(value = "楂樻牎", required = true)
+    @NotNull(message = "楂樻牎涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Long schoolId;
+
+    /**
+     * 绁栫骇鍒楄〃
+     */
+    @ApiModelProperty(value = "绁栫骇鍒楄〃")
+    private String ancestors;
+
+    /**
+     * 鏄剧ず椤哄簭
+     */
+    @ApiModelProperty(value = "鏄剧ず椤哄簭")
+    private Integer orderNum;
+
+
+    /**
+     * 鍒嗛〉澶у皬
+     */
+    @ApiModelProperty("鍒嗛〉澶у皬")
+    private Integer pageSize;
+
+    /**
+     * 褰撳墠椤垫暟
+     */
+    @ApiModelProperty("褰撳墠椤垫暟")
+    private Integer pageNum;
+
+    /**
+     * 鎺掑簭鍒�
+     */
+    @ApiModelProperty("鎺掑簭鍒�")
+    private String orderByColumn;
+
+    /**
+     * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc
+     */
+    @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc")
+    private String isAsc;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgConstructionBatchBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgConstructionBatchBo.java
index 14aae83..3d492d6 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgConstructionBatchBo.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgConstructionBatchBo.java
@@ -31,7 +31,10 @@
     @ApiModelProperty(value = "", required = true)
     @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class })
     private Long id;
-
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
     /**
      * 鏂藉伐鎵规
      */
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgIpcBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgIpcBo.java
new file mode 100644
index 0000000..4f05ff9
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgIpcBo.java
@@ -0,0 +1,141 @@
+package com.ruoyi.oa.domain.bo;
+
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.validation.constraints.*;
+
+import java.util.Date;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * ipc璁惧涓氬姟瀵硅薄 sg_ipc
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("ipc璁惧涓氬姟瀵硅薄")
+public class SgIpcBo extends BaseEntity {
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "", required = true)
+    @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class })
+    private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * mac
+     */
+    @ApiModelProperty(value = "mac", required = true)
+    @NotBlank(message = "mac涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String mac;
+
+    /**
+     * IP
+     */
+    @ApiModelProperty(value = "IP", required = true)
+    @NotBlank(message = "IP涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String ip;
+
+    /**
+     * 绔彛
+     */
+    @ApiModelProperty(value = "绔彛", required = true)
+    @NotNull(message = "绔彛涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Integer port;
+
+    /**
+     * 鐧诲綍璐︽埛
+     */
+    @ApiModelProperty(value = "鐧诲綍璐︽埛", required = true)
+    @NotBlank(message = "鐧诲綍璐︽埛涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String loginAccount;
+
+    /**
+     * nvr
+     */
+    @ApiModelProperty(value = "nvr")
+    private Long nvrId;
+
+    /**
+     * 閫氶亾
+     */
+    @ApiModelProperty(value = "閫氶亾")
+    private String passageway;
+
+    /**
+     * 瀹夎浣嶇疆
+     */
+    @ApiModelProperty(value = "瀹夎浣嶇疆", required = true)
+    @NotNull(message = "瀹夎浣嶇疆涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Long buildingId;
+
+    /**
+     * 鎵�灞炲崟浣�
+     */
+    @ApiModelProperty(value = "鎵�灞炲崟浣�", required = true)
+    @NotNull(message = "鎵�灞炲崟浣嶄笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class })
+    private Long organizationId;
+
+    /**
+     * 鏂藉伐鎵规
+     */
+    @ApiModelProperty(value = "鏂藉伐鎵规", required = true)
+    @NotNull(message = "鏂藉伐鎵规涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Long constructionBatchId;
+
+    /**
+     * 搴忓垪鍙�
+     */
+    @ApiModelProperty(value = "搴忓垪鍙�")
+    private String serialNumber;
+
+    /**
+     * 鍨嬪彿
+     */
+    @ApiModelProperty(value = "鍨嬪彿")
+    private String model;
+
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+    @ApiModelProperty(value = "鐢熶骇鍘傚晢")
+    private Long manufacturerId;
+
+
+    /**
+     * 鍒嗛〉澶у皬
+     */
+    @ApiModelProperty("鍒嗛〉澶у皬")
+    private Integer pageSize;
+
+    /**
+     * 褰撳墠椤垫暟
+     */
+    @ApiModelProperty("褰撳墠椤垫暟")
+    private Integer pageNum;
+
+    /**
+     * 鎺掑簭鍒�
+     */
+    @ApiModelProperty("鎺掑簭鍒�")
+    private String orderByColumn;
+
+    /**
+     * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc
+     */
+    @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc")
+    private String isAsc;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgNvrBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgNvrBo.java
new file mode 100644
index 0000000..fbc272a
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgNvrBo.java
@@ -0,0 +1,162 @@
+package com.ruoyi.oa.domain.bo;
+
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.validation.constraints.*;
+
+import java.util.Date;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * NVR璁惧涓氬姟瀵硅薄 sg_nvr
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("NVR璁惧涓氬姟瀵硅薄")
+public class SgNvrBo extends BaseEntity {
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "", required = true)
+    @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class })
+    private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * 閮ㄧ讲鍚嶇О
+     */
+    @ApiModelProperty(value = "閮ㄧ讲鍚嶇О", required = true)
+    @NotBlank(message = "閮ㄧ讲鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String deploymentName;
+
+    /**
+     * 閫氶亾
+     */
+    @ApiModelProperty(value = "閫氶亾", required = true)
+    @NotBlank(message = "閫氶亾涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String passageway;
+
+    /**
+     * LAN1
+     */
+    @ApiModelProperty(value = "LAN1", required = true)
+    @NotBlank(message = "LAN1涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String lanOne;
+
+    /**
+     * ip1
+     */
+    @ApiModelProperty(value = "ip1", required = true)
+    @NotBlank(message = "ip1涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String ipOne;
+
+    /**
+     * LAN2
+     */
+    @ApiModelProperty(value = "LAN2", required = true)
+    @NotBlank(message = "LAN2涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String lanTwo;
+
+    /**
+     * ip2
+     */
+    @ApiModelProperty(value = "ip2", required = true)
+    @NotBlank(message = "ip2涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String ipTwo;
+
+    /**
+     * 鐧诲綍璐﹀彿
+     */
+    @ApiModelProperty(value = "鐧诲綍璐﹀彿", required = true)
+    @NotBlank(message = "鐧诲綍璐﹀彿涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String loginAccount;
+
+    /**
+     * 纭洏
+     */
+    @ApiModelProperty(value = "纭洏", required = true)
+    @NotBlank(message = "纭洏涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String hardDisk;
+
+    /**
+     * 寤虹瓚鍗曞厓
+     */
+    @ApiModelProperty(value = "寤虹瓚鍗曞厓", required = true)
+    @NotNull(message = "寤虹瓚鍗曞厓涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Long buildingId;
+
+    /**
+     * 鎵�灞炴満鏋�
+     */
+    @ApiModelProperty(value = "鎵�灞炴満鏋�", required = true)
+    @NotNull(message = "鎵�灞炴満鏋勪笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class })
+    private Long organizationId;
+
+    /**
+     * 鏂藉伐鎵规
+     */
+    @ApiModelProperty(value = "鏂藉伐鎵规", required = true)
+    @NotNull(message = "鏂藉伐鎵规涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private Long constructionBatchId;
+
+    /**
+     * 搴忓垪鍙�
+     */
+    @ApiModelProperty(value = "搴忓垪鍙�")
+    private String serialNumber;
+
+    /**
+     * 鍨嬪彿
+     */
+    @ApiModelProperty(value = "鍨嬪彿")
+    private String model;
+
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+    @ApiModelProperty(value = "鐢熶骇鍘傚晢")
+    private Long manufacturerId;
+
+    /**
+     * 闄勪欢
+     */
+    private String filePath;
+
+
+    /**
+     * 鍒嗛〉澶у皬
+     */
+    @ApiModelProperty("鍒嗛〉澶у皬")
+    private Integer pageSize;
+
+    /**
+     * 褰撳墠椤垫暟
+     */
+    @ApiModelProperty("褰撳墠椤垫暟")
+    private Integer pageNum;
+
+    /**
+     * 鎺掑簭鍒�
+     */
+    @ApiModelProperty("鎺掑簭鍒�")
+    private String orderByColumn;
+
+    /**
+     * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc
+     */
+    @ApiModelProperty(value = "鎺掑簭鐨勬柟鍚�", example = "asc,desc")
+    private String isAsc;
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgReserveIpBo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgReserveIpBo.java
index 14275fe..6ae920d 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgReserveIpBo.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/bo/SgReserveIpBo.java
@@ -30,7 +30,10 @@
     @ApiModelProperty(value = "", required = true)
     @NotNull(message = "涓嶈兘涓虹┖", groups = { EditGroup.class })
     private Long id;
-
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
     /**
      * ip鍦板潃
      */
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/BsOrganizationVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/BsOrganizationVo.java
new file mode 100644
index 0000000..11307b1
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/BsOrganizationVo.java
@@ -0,0 +1,77 @@
+package com.ruoyi.oa.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯瑙嗗浘瀵硅薄 bs_organization
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@ApiModel("楂樻牎缁勭粐鏈烘瀯瑙嗗浘瀵硅薄")
+@ExcelIgnoreUnannotated
+public class BsOrganizationVo {
+
+	private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+	@ExcelProperty(value = "")
+	@ApiModelProperty("")
+	private Long id;
+
+    /**
+     * 鏈烘瀯缂栧彿
+     */
+	@ExcelProperty(value = "鏈烘瀯缂栧彿")
+	@ApiModelProperty("鏈烘瀯缂栧彿")
+	private String code;
+
+    /**
+     * 鏈烘瀯鍚嶇О
+     */
+	@ExcelProperty(value = "鏈烘瀯鍚嶇О")
+	@ApiModelProperty("鏈烘瀯鍚嶇О")
+	private String name;
+
+    /**
+     * 楂樻牎
+     */
+	@ExcelProperty(value = "楂樻牎")
+	@ApiModelProperty("楂樻牎")
+	private Long schoolId;
+
+    /**
+     * 鐖剁骇id
+     */
+	@ExcelProperty(value = "鐖剁骇id")
+	@ApiModelProperty("鐖剁骇id")
+	private Long parentId;
+
+    /**
+     * 绁栫骇鍒楄〃
+     */
+	@ExcelProperty(value = "绁栫骇鍒楄〃")
+	@ApiModelProperty("绁栫骇鍒楄〃")
+	private String ancestors;
+
+    /**
+     * 鏄剧ず椤哄簭
+     */
+	@ExcelProperty(value = "鏄剧ず椤哄簭")
+	@ApiModelProperty("鏄剧ず椤哄簭")
+	private Integer orderNum;
+
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgConstructionBatchVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgConstructionBatchVo.java
index 274dec3..c9a9fb7 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgConstructionBatchVo.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgConstructionBatchVo.java
@@ -30,6 +30,11 @@
     private Long id;
 
     /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+
+    /**
      * 鏂藉伐鎵规
      */
 	@ExcelProperty(value = "鏂藉伐鎵规")
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgIpcVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgIpcVo.java
new file mode 100644
index 0000000..fcf0cc0
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgIpcVo.java
@@ -0,0 +1,129 @@
+package com.ruoyi.oa.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.annotation.Dict;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * ipc璁惧瑙嗗浘瀵硅薄 sg_ipc
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@ApiModel("ipc璁惧瑙嗗浘瀵硅薄")
+@ExcelIgnoreUnannotated
+public class SgIpcVo {
+
+	private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+	@ExcelProperty(value = "")
+	@ApiModelProperty("")
+	private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * mac
+     */
+	@ExcelProperty(value = "mac")
+	@ApiModelProperty("mac")
+	private String mac;
+
+    /**
+     * IP
+     */
+	@ExcelProperty(value = "IP")
+	@ApiModelProperty("IP")
+	private String ip;
+
+    /**
+     * 绔彛
+     */
+	@ExcelProperty(value = "绔彛")
+	@ApiModelProperty("绔彛")
+	private Integer port;
+
+    /**
+     * 鐧诲綍璐︽埛
+     */
+	@ExcelProperty(value = "鐧诲綍璐︽埛")
+	@ApiModelProperty("鐧诲綍璐︽埛")
+	private String loginAccount;
+
+    /**
+     * nvr
+     */
+	@ExcelProperty(value = "nvr")
+	@ApiModelProperty("nvr")
+    @Dict(dictTable = "sg_nvr", dicCode = "id", dicText = "deployment_name")
+	private Long nvrId;
+
+    /**
+     * 閫氶亾
+     */
+	@ExcelProperty(value = "閫氶亾")
+	@ApiModelProperty("閫氶亾")
+    @Dict(dicCode = "DICT109")
+	private String passageway;
+
+    /**
+     * 瀹夎浣嶇疆
+     */
+	@ExcelProperty(value = "瀹夎浣嶇疆")
+	@ApiModelProperty("瀹夎浣嶇疆")
+    @Dict(dictTable = "bs_building", dicCode = "id", dicText = "detailed_name")
+    private Long buildingId;
+
+    /**
+     * 鎵�灞炲崟浣�
+     */
+	@ExcelProperty(value = "鎵�灞炲崟浣�")
+	@ApiModelProperty("鎵�灞炲崟浣�")
+    @Dict(dictTable = "bs_organization", dicCode = "id", dicText = "detailed_name")
+	private Long organizationId;
+
+    /**
+     * 鏂藉伐鎵规
+     */
+	@ExcelProperty(value = "鏂藉伐鎵规")
+	@ApiModelProperty("鏂藉伐鎵规")
+    @Dict(dictTable = "sg_construction_batch", dicCode = "id", dicText = "batch")
+	private Long constructionBatchId;
+
+    /**
+     * 搴忓垪鍙�
+     */
+	@ExcelProperty(value = "搴忓垪鍙�")
+	@ApiModelProperty("搴忓垪鍙�")
+	private String serialNumber;
+
+    /**
+     * 鍨嬪彿
+     */
+	@ExcelProperty(value = "鍨嬪彿")
+	@ApiModelProperty("鍨嬪彿")
+	private String model;
+
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+	@ExcelProperty(value = "鐢熶骇鍘傚晢")
+	@ApiModelProperty("鐢熶骇鍘傚晢")
+    @Dict(dictTable = "dev_manufacturer", dicCode = "id", dicText = "name")
+	private Long manufacturerId;
+
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgNvrVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgNvrVo.java
new file mode 100644
index 0000000..e3ab457
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgNvrVo.java
@@ -0,0 +1,139 @@
+package com.ruoyi.oa.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * NVR璁惧瑙嗗浘瀵硅薄 sg_nvr
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Data
+@ApiModel("NVR璁惧瑙嗗浘瀵硅薄")
+@ExcelIgnoreUnannotated
+public class SgNvrVo {
+
+	private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+	@ExcelProperty(value = "")
+	@ApiModelProperty("")
+	private Long id;
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
+    /**
+     * 閮ㄧ讲鍚嶇О
+     */
+	@ExcelProperty(value = "閮ㄧ讲鍚嶇О")
+	@ApiModelProperty("閮ㄧ讲鍚嶇О")
+	private String deploymentName;
+
+    /**
+     * 閫氶亾
+     */
+	@ExcelProperty(value = "閫氶亾")
+	@ApiModelProperty("閫氶亾")
+	private String passageway;
+
+    /**
+     * LAN1
+     */
+	@ExcelProperty(value = "LAN1")
+	@ApiModelProperty("LAN1")
+	private String lanOne;
+
+    /**
+     * ip1
+     */
+	@ExcelProperty(value = "ip1")
+	@ApiModelProperty("ip1")
+	private String ipOne;
+
+    /**
+     * LAN2
+     */
+	@ExcelProperty(value = "LAN2")
+	@ApiModelProperty("LAN2")
+	private String lanTwo;
+
+    /**
+     * ip2
+     */
+	@ExcelProperty(value = "ip2")
+	@ApiModelProperty("ip2")
+	private String ipTwo;
+
+    /**
+     * 鐧诲綍璐﹀彿
+     */
+	@ExcelProperty(value = "鐧诲綍璐﹀彿")
+	@ApiModelProperty("鐧诲綍璐﹀彿")
+	private String loginAccount;
+
+    /**
+     * 纭洏
+     */
+	@ExcelProperty(value = "纭洏")
+	@ApiModelProperty("纭洏")
+	private String hardDisk;
+
+    /**
+     * 寤虹瓚鍗曞厓
+     */
+	@ExcelProperty(value = "寤虹瓚鍗曞厓")
+	@ApiModelProperty("寤虹瓚鍗曞厓")
+	private Long buildingId;
+
+    /**
+     * 鎵�灞炴満鏋�
+     */
+	@ExcelProperty(value = "鎵�灞炴満鏋�")
+	@ApiModelProperty("鎵�灞炴満鏋�")
+	private Long organizationId;
+
+    /**
+     * 鏂藉伐鎵规
+     */
+	@ExcelProperty(value = "鏂藉伐鎵规")
+	@ApiModelProperty("鏂藉伐鎵规")
+	private Long constructionBatchId;
+
+    /**
+     * 搴忓垪鍙�
+     */
+	@ExcelProperty(value = "搴忓垪鍙�")
+	@ApiModelProperty("搴忓垪鍙�")
+	private String serialNumber;
+
+    /**
+     * 鍨嬪彿
+     */
+	@ExcelProperty(value = "鍨嬪彿")
+	@ApiModelProperty("鍨嬪彿")
+	private String model;
+
+    /**
+     * 鐢熶骇鍘傚晢
+     */
+	@ExcelProperty(value = "鐢熶骇鍘傚晢")
+	@ApiModelProperty("鐢熶骇鍘傚晢")
+	private Long manufacturerId;
+
+    /**
+     * 闄勪欢
+     */
+    private String filePath;
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgReserveIpVo.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgReserveIpVo.java
index 38e2900..d65976e 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgReserveIpVo.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/domain/vo/SgReserveIpVo.java
@@ -33,7 +33,10 @@
 	@ExcelProperty(value = "")
 	@ApiModelProperty("")
 	private Long id;
-
+    /**
+     * 楂樻牎
+     */
+    private Long schoolId;
     /**
      * ip鍦板潃
      */
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsOrganizationMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsOrganizationMapper.java
new file mode 100644
index 0000000..0a8ae97
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsOrganizationMapper.java
@@ -0,0 +1,14 @@
+package com.ruoyi.oa.mapper;
+
+import com.ruoyi.oa.domain.BsOrganization;
+import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface BsOrganizationMapper extends BaseMapperPlus<BsOrganization> {
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsSchoolMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsSchoolMapper.java
index 8a8b4d9..35b5154 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsSchoolMapper.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/BsSchoolMapper.java
@@ -2,6 +2,7 @@
 
 import com.ruoyi.oa.domain.BsSchool;
 import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
+import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 瀛︽牎Mapper鎺ュ彛
@@ -9,6 +10,7 @@
  * @author ruoyi
  * @date 2021-12-03
  */
+@Mapper
 public interface BsSchoolMapper extends BaseMapperPlus<BsSchool> {
 
 }
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgIpcMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgIpcMapper.java
new file mode 100644
index 0000000..4908a41
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgIpcMapper.java
@@ -0,0 +1,14 @@
+package com.ruoyi.oa.mapper;
+
+import com.ruoyi.oa.domain.SgIpc;
+import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
+
+/**
+ * ipc璁惧Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface SgIpcMapper extends BaseMapperPlus<SgIpc> {
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgNvrMapper.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgNvrMapper.java
new file mode 100644
index 0000000..3b95649
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/mapper/SgNvrMapper.java
@@ -0,0 +1,14 @@
+package com.ruoyi.oa.mapper;
+
+import com.ruoyi.oa.domain.SgNvr;
+import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
+
+/**
+ * NVR璁惧Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface SgNvrMapper extends BaseMapperPlus<SgNvr> {
+
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/IBsOrganizationService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/IBsOrganizationService.java
new file mode 100644
index 0000000..9a479dd
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/IBsOrganizationService.java
@@ -0,0 +1,51 @@
+package com.ruoyi.oa.service;
+
+import com.ruoyi.oa.domain.BsOrganization;
+import com.ruoyi.oa.domain.vo.BsOrganizationVo;
+import com.ruoyi.oa.domain.bo.BsOrganizationBo;
+import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface IBsOrganizationService extends IServicePlus<BsOrganization, BsOrganizationVo> {
+	/**
+	 * 鏌ヨ鍗曚釜
+	 * @return
+	 */
+	BsOrganizationVo queryById(Long id);
+
+
+	/**
+	 * 鏌ヨ鍒楄〃
+	 */
+	List<BsOrganizationVo> queryList(BsOrganizationBo bo);
+
+	/**
+	 * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆楂樻牎缁勭粐鏈烘瀯
+	 * @param bo 楂樻牎缁勭粐鏈烘瀯鏂板涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean insertByBo(BsOrganizationBo bo);
+
+	/**
+	 * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼楂樻牎缁勭粐鏈烘瀯
+	 * @param bo 楂樻牎缁勭粐鏈烘瀯缂栬緫涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean updateByBo(BsOrganizationBo bo);
+
+	/**
+	 * 鏍¢獙骞跺垹闄ゆ暟鎹�
+	 * @param ids 涓婚敭闆嗗悎
+	 * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠�
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgIpcService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgIpcService.java
new file mode 100644
index 0000000..a54d281
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgIpcService.java
@@ -0,0 +1,56 @@
+package com.ruoyi.oa.service;
+
+import com.ruoyi.oa.domain.SgIpc;
+import com.ruoyi.oa.domain.vo.SgIpcVo;
+import com.ruoyi.oa.domain.bo.SgIpcBo;
+import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * ipc璁惧Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface ISgIpcService extends IServicePlus<SgIpc, SgIpcVo> {
+	/**
+	 * 鏌ヨ鍗曚釜
+	 * @return
+	 */
+	SgIpcVo queryById(Long id);
+
+	/**
+	 * 鏌ヨ鍒楄〃
+	 */
+    TableDataInfo<SgIpcVo> queryPageList(SgIpcBo bo);
+
+	/**
+	 * 鏌ヨ鍒楄〃
+	 */
+	List<SgIpcVo> queryList(SgIpcBo bo);
+
+	/**
+	 * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆ipc璁惧
+	 * @param bo ipc璁惧鏂板涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean insertByBo(SgIpcBo bo);
+
+	/**
+	 * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼ipc璁惧
+	 * @param bo ipc璁惧缂栬緫涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean updateByBo(SgIpcBo bo);
+
+	/**
+	 * 鏍¢獙骞跺垹闄ゆ暟鎹�
+	 * @param ids 涓婚敭闆嗗悎
+	 * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠�
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgNvrService.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgNvrService.java
new file mode 100644
index 0000000..ac4a40e
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/ISgNvrService.java
@@ -0,0 +1,56 @@
+package com.ruoyi.oa.service;
+
+import com.ruoyi.oa.domain.SgNvr;
+import com.ruoyi.oa.domain.vo.SgNvrVo;
+import com.ruoyi.oa.domain.bo.SgNvrBo;
+import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * NVR璁惧Service鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+public interface ISgNvrService extends IServicePlus<SgNvr, SgNvrVo> {
+	/**
+	 * 鏌ヨ鍗曚釜
+	 * @return
+	 */
+	SgNvrVo queryById(Long id);
+
+	/**
+	 * 鏌ヨ鍒楄〃
+	 */
+    TableDataInfo<SgNvrVo> queryPageList(SgNvrBo bo);
+
+	/**
+	 * 鏌ヨ鍒楄〃
+	 */
+	List<SgNvrVo> queryList(SgNvrBo bo);
+
+	/**
+	 * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆NVR璁惧
+	 * @param bo NVR璁惧鏂板涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean insertByBo(SgNvrBo bo);
+
+	/**
+	 * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼NVR璁惧
+	 * @param bo NVR璁惧缂栬緫涓氬姟瀵硅薄
+	 * @return
+	 */
+	Boolean updateByBo(SgNvrBo bo);
+
+	/**
+	 * 鏍¢獙骞跺垹闄ゆ暟鎹�
+	 * @param ids 涓婚敭闆嗗悎
+	 * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠�
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsOrganizationServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsOrganizationServiceImpl.java
new file mode 100644
index 0000000..d52ff20
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsOrganizationServiceImpl.java
@@ -0,0 +1,109 @@
+package com.ruoyi.oa.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.http.HttpStatus;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.oa.domain.BsBuilding;
+import com.ruoyi.oa.domain.BsSchool;
+import com.ruoyi.oa.mapper.BsSchoolMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.oa.domain.bo.BsOrganizationBo;
+import com.ruoyi.oa.domain.vo.BsOrganizationVo;
+import com.ruoyi.oa.domain.BsOrganization;
+import com.ruoyi.oa.mapper.BsOrganizationMapper;
+import com.ruoyi.oa.service.IBsOrganizationService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 楂樻牎缁勭粐鏈烘瀯Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Service
+public class BsOrganizationServiceImpl extends ServicePlusImpl<BsOrganizationMapper, BsOrganization, BsOrganizationVo> implements IBsOrganizationService {
+
+    @Autowired
+    private BsSchoolMapper schoolMapper;
+
+    @Override
+    public BsOrganizationVo queryById(Long id){
+        return getVoById(id);
+    }
+
+
+    @Override
+    public List<BsOrganizationVo> queryList(BsOrganizationBo bo) {
+        return listVo(buildQueryWrapper(bo));
+    }
+
+    private LambdaQueryWrapper<BsOrganization> buildQueryWrapper(BsOrganizationBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<BsOrganization> lqw = Wrappers.lambdaQuery();
+        lqw.like(StringUtils.isNotBlank(bo.getName()), BsOrganization::getName, bo.getName());
+        lqw.eq(BsOrganization::getSchoolId, bo.getSchoolId());
+        return lqw;
+    }
+
+    @Override
+    public Boolean insertByBo(BsOrganizationBo bo) {
+        BsOrganization add = BeanUtil.toBean(bo, BsOrganization.class);
+        if (bo.getParentId() == Long.valueOf(0)) {
+            BsSchool school = schoolMapper.selectById(bo.getSchoolId());
+            add.setAncestors("0");
+            add.setDetailedName(school.getName() + "-" + bo.getName());
+        } else {
+            BsOrganization info = baseMapper.selectById(bo.getParentId());
+            add.setAncestors(info.getAncestors() + "," + bo.getParentId());
+            add.setDetailedName(info.getDetailedName() + "-" + bo.getName());
+        }
+        boolean flag = save(add);
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    @Override
+    public Boolean updateByBo(BsOrganizationBo bo) {
+        BsOrganization update = BeanUtil.toBean(bo, BsOrganization.class);
+        if (bo.getParentId() == Long.valueOf(0)) {
+            BsSchool school = schoolMapper.selectById(bo.getSchoolId());
+            update.setAncestors("0");
+            update.setDetailedName(school.getName() + "-" + bo.getName());
+        } else {
+            BsOrganization info = baseMapper.selectById(bo.getParentId());
+            update.setAncestors(info.getAncestors() + "," + bo.getParentId());
+            update.setDetailedName(info.getDetailedName() + "-" + bo.getName());
+        }
+        validEntityBeforeSave(update);
+        return updateById(update);
+    }
+
+    /**
+     * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙
+     *
+     * @param entity 瀹炰綋绫绘暟鎹�
+     */
+    private void validEntityBeforeSave(BsOrganization entity){
+        //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        List<BsOrganization> list = baseMapper.selectList(new LambdaQueryWrapper<BsOrganization>()
+            .in(BsOrganization::getParentId, ids));
+        if (list.size() > 0) {
+            throw new ServiceException("瀛樺湪瀛愬缓绛戝崟鍏冿紝涓嶅厑璁稿垹闄�", HttpStatus.HTTP_PARTIAL);
+        }
+        return removeByIds(ids);
+    }
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
index 656fc9a..4df9028 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
@@ -50,16 +50,14 @@
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<SgConstructionBatch> lqw = Wrappers.lambdaQuery();
         lqw.like(StringUtils.isNotBlank(bo.getBatch()), SgConstructionBatch::getBatch, bo.getBatch());
-        lqw.eq(bo.getStartDate() != null, SgConstructionBatch::getStartDate, bo.getStartDate());
-        lqw.eq(bo.getEndDate() != null, SgConstructionBatch::getEndDate, bo.getEndDate());
-        lqw.eq(bo.getUserId() != null, SgConstructionBatch::getUserId, bo.getUserId());
+        lqw.eq(SgConstructionBatch::getSchoolId, bo.getSchoolId());
         return lqw;
     }
 
     @Override
     public Boolean insertByBo(SgConstructionBatchBo bo) {
         List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>()
-            .eq(SgConstructionBatch::getBatch, bo.getBatch()));
+            .eq(SgConstructionBatch::getBatch, bo.getBatch()).eq(SgConstructionBatch::getSchoolId, bo.getSchoolId()));
         if (list.size() > 0) {
             throw new ServiceException("鏂藉伐鎵规閲嶅", HttpStatus.HTTP_PARTIAL);
         }
@@ -75,7 +73,9 @@
     @Override
     public Boolean updateByBo(SgConstructionBatchBo bo) {
         List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>()
-            .eq(SgConstructionBatch::getBatch, bo.getBatch()).ne(SgConstructionBatch::getId, bo.getId()));
+            .eq(SgConstructionBatch::getBatch, bo.getBatch())
+            .ne(SgConstructionBatch::getId, bo.getId())
+            .eq(SgConstructionBatch::getSchoolId, bo.getSchoolId()));
         if (list.size() > 0) {
             throw new ServiceException("鏂藉伐鎵规閲嶅", HttpStatus.HTTP_PARTIAL);
         }
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgIpcServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgIpcServiceImpl.java
new file mode 100644
index 0000000..98b5d91
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgIpcServiceImpl.java
@@ -0,0 +1,107 @@
+package com.ruoyi.oa.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.http.HttpStatus;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.core.page.PagePlus;
+import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.stereotype.Service;
+import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.oa.domain.bo.SgIpcBo;
+import com.ruoyi.oa.domain.vo.SgIpcVo;
+import com.ruoyi.oa.domain.SgIpc;
+import com.ruoyi.oa.mapper.SgIpcMapper;
+import com.ruoyi.oa.service.ISgIpcService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * ipc璁惧Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Service
+public class SgIpcServiceImpl extends ServicePlusImpl<SgIpcMapper, SgIpc, SgIpcVo> implements ISgIpcService {
+
+    @Override
+    public SgIpcVo queryById(Long id) {
+        return getVoById(id);
+    }
+
+    @Override
+    public TableDataInfo<SgIpcVo> queryPageList(SgIpcBo bo) {
+        PagePlus<SgIpc, SgIpcVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
+        return PageUtils.buildDataInfo(result);
+    }
+
+    @Override
+    public List<SgIpcVo> queryList(SgIpcBo bo) {
+        return listVo(buildQueryWrapper(bo));
+    }
+
+    private LambdaQueryWrapper<SgIpc> buildQueryWrapper(SgIpcBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<SgIpc> lqw = Wrappers.lambdaQuery();
+        lqw.eq(SgIpc::getSchoolId, bo.getSchoolId());
+        lqw.eq(bo.getNvrId() != null, SgIpc::getNvrId, bo.getNvrId());
+        lqw.eq(bo.getBuildingId() != null, SgIpc::getBuildingId, bo.getBuildingId());
+        lqw.eq(bo.getOrganizationId() != null, SgIpc::getOrganizationId, bo.getOrganizationId());
+        lqw.eq(bo.getConstructionBatchId() != null, SgIpc::getConstructionBatchId, bo.getConstructionBatchId());
+        lqw.like(StringUtils.isNotBlank(bo.getModel()), SgIpc::getModel, bo.getModel());
+        return lqw;
+    }
+
+    @Override
+    public Boolean insertByBo(SgIpcBo bo) {
+        List<SgIpc> list = baseMapper.selectList(new LambdaQueryWrapper<SgIpc>()
+            .eq(SgIpc::getSchoolId, bo.getSchoolId()).eq(SgIpc::getMac, bo.getMac()));
+        if (list.size() > 0) {
+            throw new ServiceException("MAC閲嶅", HttpStatus.HTTP_PARTIAL);
+        }
+        SgIpc add = BeanUtil.toBean(bo, SgIpc.class);
+        validEntityBeforeSave(add);
+        boolean flag = save(add);
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    @Override
+    public Boolean updateByBo(SgIpcBo bo) {
+        List<SgIpc> list = baseMapper.selectList(new LambdaQueryWrapper<SgIpc>()
+            .eq(SgIpc::getSchoolId, bo.getSchoolId())
+            .eq(SgIpc::getMac, bo.getMac())
+            .ne(SgIpc::getId, bo.getId()));
+        if (list.size() > 0) {
+            throw new ServiceException("MAC閲嶅", HttpStatus.HTTP_PARTIAL);
+        }
+        SgIpc update = BeanUtil.toBean(bo, SgIpc.class);
+        validEntityBeforeSave(update);
+        return updateById(update);
+    }
+
+    /**
+     * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙
+     *
+     * @param entity 瀹炰綋绫绘暟鎹�
+     */
+    private void validEntityBeforeSave(SgIpc entity) {
+        //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if (isValid) {
+            //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠�
+        }
+        return removeByIds(ids);
+    }
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgNvrServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgNvrServiceImpl.java
new file mode 100644
index 0000000..a6170d8
--- /dev/null
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgNvrServiceImpl.java
@@ -0,0 +1,93 @@
+package com.ruoyi.oa.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.core.page.PagePlus;
+import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.stereotype.Service;
+import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.oa.domain.bo.SgNvrBo;
+import com.ruoyi.oa.domain.vo.SgNvrVo;
+import com.ruoyi.oa.domain.SgNvr;
+import com.ruoyi.oa.mapper.SgNvrMapper;
+import com.ruoyi.oa.service.ISgNvrService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * NVR璁惧Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2022-05-11
+ */
+@Service
+public class SgNvrServiceImpl extends ServicePlusImpl<SgNvrMapper, SgNvr, SgNvrVo> implements ISgNvrService {
+
+    @Override
+    public SgNvrVo queryById(Long id){
+        return getVoById(id);
+    }
+
+    @Override
+    public TableDataInfo<SgNvrVo> queryPageList(SgNvrBo bo) {
+        PagePlus<SgNvr, SgNvrVo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo));
+        return PageUtils.buildDataInfo(result);
+    }
+
+    @Override
+    public List<SgNvrVo> queryList(SgNvrBo bo) {
+        return listVo(buildQueryWrapper(bo));
+    }
+
+    private LambdaQueryWrapper<SgNvr> buildQueryWrapper(SgNvrBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<SgNvr> lqw = Wrappers.lambdaQuery();
+        lqw.like(StringUtils.isNotBlank(bo.getPassageway()), SgNvr::getPassageway, bo.getPassageway());
+        lqw.eq(bo.getBuildingId() != null, SgNvr::getBuildingId, bo.getBuildingId());
+        lqw.eq(bo.getOrganizationId() != null, SgNvr::getOrganizationId, bo.getOrganizationId());
+        lqw.eq(bo.getConstructionBatchId() != null, SgNvr::getConstructionBatchId, bo.getConstructionBatchId());
+        lqw.like(StringUtils.isNotBlank(bo.getModel()), SgNvr::getModel, bo.getModel());
+        lqw.eq(SgNvr::getSchoolId, bo.getSchoolId());
+        return lqw;
+    }
+
+    @Override
+    public Boolean insertByBo(SgNvrBo bo) {
+        SgNvr add = BeanUtil.toBean(bo, SgNvr.class);
+        validEntityBeforeSave(add);
+        boolean flag = save(add);
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    @Override
+    public Boolean updateByBo(SgNvrBo bo) {
+        SgNvr update = BeanUtil.toBean(bo, SgNvr.class);
+        validEntityBeforeSave(update);
+        return updateById(update);
+    }
+
+    /**
+     * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙
+     *
+     * @param entity 瀹炰綋绫绘暟鎹�
+     */
+    private void validEntityBeforeSave(SgNvr entity){
+        //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠�
+        }
+        return removeByIds(ids);
+    }
+}
diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgReserveIpServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgReserveIpServiceImpl.java
index 8004b4c..57b7ed1 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgReserveIpServiceImpl.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgReserveIpServiceImpl.java
@@ -49,6 +49,7 @@
         LambdaQueryWrapper<SgReserveIp> lqw = Wrappers.lambdaQuery();
         lqw.like(StringUtils.isNotBlank(bo.getIp()), SgReserveIp::getIp, bo.getIp());
         lqw.eq(bo.getBuildingId() != null, SgReserveIp::getBuildingId, bo.getBuildingId());
+        lqw.eq(SgReserveIp::getSchoolId, bo.getSchoolId());
         return lqw;
     }
 
diff --git a/ruoyi-oa/src/main/resources/mapper/oa/BsOrganizationMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/BsOrganizationMapper.xml
new file mode 100644
index 0000000..40ea225
--- /dev/null
+++ b/ruoyi-oa/src/main/resources/mapper/oa/BsOrganizationMapper.xml
@@ -0,0 +1,24 @@
+<?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.oa.mapper.BsOrganizationMapper">
+
+    <resultMap type="com.ruoyi.oa.domain.BsOrganization" id="BsOrganizationResult">
+        <result property="id" column="id"/>
+        <result property="code" column="code"/>
+        <result property="name" column="name"/>
+        <result property="detailedName" column="detailed_name"/>
+        <result property="schoolId" column="school_id"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="ancestors" column="ancestors"/>
+        <result property="orderNum" column="order_num"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+
+</mapper>
diff --git a/ruoyi-oa/src/main/resources/mapper/oa/SgIpcMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/SgIpcMapper.xml
new file mode 100644
index 0000000..cf32efb
--- /dev/null
+++ b/ruoyi-oa/src/main/resources/mapper/oa/SgIpcMapper.xml
@@ -0,0 +1,29 @@
+<?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.oa.mapper.SgIpcMapper">
+
+    <resultMap type="com.ruoyi.oa.domain.SgIpc" id="SgIpcResult">
+        <result property="id" column="id"/>
+        <result property="mac" column="mac"/>
+        <result property="ip" column="ip"/>
+        <result property="port" column="port"/>
+        <result property="loginAccount" column="login_account"/>
+        <result property="nvrId" column="nvr_id"/>
+        <result property="passageway" column="passageway"/>
+        <result property="buildingId" column="building_id"/>
+        <result property="organizationId" column="organization_id"/>
+        <result property="constructionBatchId" column="construction_batch_id"/>
+        <result property="serialNumber" column="serial_number"/>
+        <result property="model" column="model"/>
+        <result property="manufacturerId" column="manufacturer_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+
+</mapper>
diff --git a/ruoyi-oa/src/main/resources/mapper/oa/SgNvrMapper.xml b/ruoyi-oa/src/main/resources/mapper/oa/SgNvrMapper.xml
new file mode 100644
index 0000000..09114b8
--- /dev/null
+++ b/ruoyi-oa/src/main/resources/mapper/oa/SgNvrMapper.xml
@@ -0,0 +1,31 @@
+<?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.oa.mapper.SgNvrMapper">
+
+    <resultMap type="com.ruoyi.oa.domain.SgNvr" id="SgNvrResult">
+        <result property="id" column="id"/>
+        <result property="deploymentName" column="deployment_name"/>
+        <result property="passageway" column="passageway"/>
+        <result property="lanOne" column="lan_one"/>
+        <result property="ipOne" column="ip_one"/>
+        <result property="lanTwo" column="lan_two"/>
+        <result property="ipTwo" column="ip__two"/>
+        <result property="loginAccount" column="login_account"/>
+        <result property="hardDisk" column="hard_disk"/>
+        <result property="buildingId" column="building_id"/>
+        <result property="organizationId" column="organization_id"/>
+        <result property="constructionBatchId" column="construction_batch_id"/>
+        <result property="serialNumber" column="serial_number"/>
+        <result property="model" column="model"/>
+        <result property="manufacturerId" column="manufacturer_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+
+</mapper>

--
Gitblit v1.9.1