diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitInfoController.java new file mode 100644 index 0000000..61d2d95 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitInfoController.java @@ -0,0 +1,161 @@ +package com.ruoyi.web.controller.base; + +import java.util.Date; +import java.util.List; + +import com.ruoyi.common.utils.ShiroUtils; +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.BaseMonitorunitInfo; +import com.ruoyi.system.service.IBaseMonitorunitInfoService; +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.utils.StringUtils; +import com.ruoyi.common.core.domain.Ztree; + +/** + * 监控单元信息Controller + * + * @author wenjy + * @date 2022-01-27 + */ +@Controller +@RequestMapping("/base/monitorUnitInfo") +public class BaseMonitorunitInfoController extends BaseController +{ + private String prefix = "base/monitorUnitInfo"; + + @Autowired + private IBaseMonitorunitInfoService baseMonitorunitInfoService; + + @RequiresPermissions("base:monitorUnitInfo:view") + @GetMapping() + public String monitorUnitInfo() + { + return prefix + "/monitorUnitInfo"; + } + + /** + * 查询监控单元信息树列表 + */ + @RequiresPermissions("base:monitorUnitInfo:list") + @PostMapping("/list") + @ResponseBody + public List list(BaseMonitorunitInfo baseMonitorunitInfo) + { + List list = baseMonitorunitInfoService.selectBaseMonitorunitInfoList(baseMonitorunitInfo); + return list; + } + + /** + * 导出监控单元信息列表 + */ + @RequiresPermissions("base:monitorUnitInfo:export") + @Log(title = "监控单元信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseMonitorunitInfo baseMonitorunitInfo) + { + List list = baseMonitorunitInfoService.selectBaseMonitorunitInfoList(baseMonitorunitInfo); + ExcelUtil util = new ExcelUtil(BaseMonitorunitInfo.class); + return util.exportExcel(list, "监控单元信息数据"); + } + + /** + * 新增监控单元信息 + */ + @GetMapping(value = { "/add/{ObjId}", "/add/" }) + public String add(@PathVariable(value = "ObjId", required = false) Long ObjId, ModelMap mmap) + { + if (StringUtils.isNotNull(ObjId)) + { + mmap.put("baseMonitorunitInfo", baseMonitorunitInfoService.selectBaseMonitorunitInfoByObjId(ObjId)); + } + return prefix + "/add"; + } + + /** + * 新增保存监控单元信息 + */ + @RequiresPermissions("base:monitorUnitInfo:add") + @Log(title = "监控单元信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseMonitorunitInfo baseMonitorunitInfo) + { + baseMonitorunitInfo.setCreateBy(ShiroUtils.getLoginName()); + baseMonitorunitInfo.setCreateTime(new Date()); + return toAjax(baseMonitorunitInfoService.insertBaseMonitorunitInfo(baseMonitorunitInfo)); + } + + /** + * 修改监控单元信息 + */ + @GetMapping("/edit/{ObjId}") + public String edit(@PathVariable("ObjId") Long ObjId, ModelMap mmap) + { + BaseMonitorunitInfo baseMonitorunitInfo = baseMonitorunitInfoService.selectBaseMonitorunitInfoByObjId(ObjId); + mmap.put("baseMonitorunitInfo", baseMonitorunitInfo); + return prefix + "/edit"; + } + + /** + * 修改保存监控单元信息 + */ + @RequiresPermissions("base:monitorUnitInfo:edit") + @Log(title = "监控单元信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseMonitorunitInfo baseMonitorunitInfo) + { + baseMonitorunitInfo.setUpdateBy(ShiroUtils.getLoginName()); + baseMonitorunitInfo.setUpdateTime(new Date()); + return toAjax(baseMonitorunitInfoService.updateBaseMonitorunitInfo(baseMonitorunitInfo)); + } + + /** + * 删除 + */ + @RequiresPermissions("base:monitorUnitInfo:remove") + @Log(title = "监控单元信息", businessType = BusinessType.DELETE) + @GetMapping("/remove/{ObjId}") + @ResponseBody + public AjaxResult remove(@PathVariable("ObjId") Long ObjId) + { + return toAjax(baseMonitorunitInfoService.deleteBaseMonitorunitInfoByObjId(ObjId)); + } + + /** + * 选择监控单元信息树 + */ + @GetMapping(value = { "/selectMonitorUnitInfoTree/{ObjId}", "/selectMonitorUnitInfoTree/" }) + public String selectMonitorUnitInfoTree(@PathVariable(value = "ObjId", required = false) Long ObjId, ModelMap mmap) + { + if (StringUtils.isNotNull(ObjId)) + { + mmap.put("baseMonitorunitInfo", baseMonitorunitInfoService.selectBaseMonitorunitInfoByObjId(ObjId)); + } + return prefix + "/tree"; + } + + /** + * 加载监控单元信息树列表 + */ + @GetMapping("/treeData") + @ResponseBody + public List treeData() + { + List ztrees = baseMonitorunitInfoService.selectBaseMonitorunitInfoTree(); + return ztrees; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitTypeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitTypeController.java new file mode 100644 index 0000000..488f9f9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseMonitorunitTypeController.java @@ -0,0 +1,113 @@ +package com.ruoyi.web.controller.base; + +import java.util.Date; +import java.util.List; + +import com.ruoyi.common.utils.ShiroUtils; +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.BaseMonitorunitType; +import com.ruoyi.system.service.IBaseMonitorunitTypeService; +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 wenjy + * @date 2022-01-27 + */ +@Controller +@RequestMapping("/base/monitorUnitType") +public class BaseMonitorunitTypeController extends BaseController { + private String prefix = "base/monitorUnitType"; + + @Autowired private IBaseMonitorunitTypeService baseMonitorunitTypeService; + + @RequiresPermissions("base:monitorUnitType:view") + @GetMapping() + public String monitorUnitType() { + return prefix + "/monitorUnitType"; + } + + /** 查询监控单元类型列表 */ + @RequiresPermissions("base:monitorUnitType:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseMonitorunitType baseMonitorunitType) { + startPage(); + List list = + baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType); + return getDataTable(list); + } + + /** 导出监控单元类型列表 */ + @RequiresPermissions("base:monitorUnitType:export") + @Log(title = "监控单元类型", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseMonitorunitType baseMonitorunitType) { + List list = + baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType); + ExcelUtil util = + new ExcelUtil(BaseMonitorunitType.class); + return util.exportExcel(list, "监控单元类型数据"); + } + + /** 新增监控单元类型 */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** 新增保存监控单元类型 */ + @RequiresPermissions("base:monitorUnitType:add") + @Log(title = "监控单元类型", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseMonitorunitType baseMonitorunitType) { + baseMonitorunitType.setCreateBy(ShiroUtils.getLoginName()); + baseMonitorunitType.setCreateTime(new Date()); + return toAjax(baseMonitorunitTypeService.insertBaseMonitorunitType(baseMonitorunitType)); + } + + /** 修改监控单元类型 */ + @GetMapping("/edit/{objId}") + public String edit(@PathVariable("objId") Long objId, ModelMap mmap) { + BaseMonitorunitType baseMonitorunitType = + baseMonitorunitTypeService.selectBaseMonitorunitTypeByObjId(objId); + mmap.put("baseMonitorunitType", baseMonitorunitType); + return prefix + "/edit"; + } + + /** 修改保存监控单元类型 */ + @RequiresPermissions("base:monitorUnitType:edit") + @Log(title = "监控单元类型", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseMonitorunitType baseMonitorunitType) { + baseMonitorunitType.setUpdateBy(ShiroUtils.getLoginName()); + baseMonitorunitType.setUpdateTime(new Date()); + return toAjax(baseMonitorunitTypeService.updateBaseMonitorunitType(baseMonitorunitType)); + } + + /** 删除监控单元类型 */ + @RequiresPermissions("base:monitorUnitType:remove") + @Log(title = "监控单元类型", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(baseMonitorunitTypeService.deleteBaseMonitorunitTypeByObjIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSubstationInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSubstationInfoController.java new file mode 100644 index 0000000..9043c14 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSubstationInfoController.java @@ -0,0 +1,113 @@ +package com.ruoyi.web.controller.base; + +import java.util.Date; +import java.util.List; + +import com.ruoyi.common.utils.ShiroUtils; +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.BaseSubstationInfo; +import com.ruoyi.system.service.IBaseSubstationInfoService; +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 wenjy + * @date 2022-01-27 + */ +@Controller +@RequestMapping("/base/stationInfo") +public class BaseSubstationInfoController extends BaseController { + private String prefix = "base/stationInfo"; + + @Autowired private IBaseSubstationInfoService baseSubstationInfoService; + + @RequiresPermissions("base:stationInfo:view") + @GetMapping() + public String stationInfo() { + return prefix + "/stationInfo"; + } + + /** 查询变电站信息列表 */ + @RequiresPermissions("base:stationInfo:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(BaseSubstationInfo baseSubstationInfo) { + startPage(); + List list = + baseSubstationInfoService.selectBaseSubstationInfoList(baseSubstationInfo); + return getDataTable(list); + } + + /** 导出变电站信息列表 */ + @RequiresPermissions("base:stationInfo:export") + @Log(title = "变电站信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(BaseSubstationInfo baseSubstationInfo) { + List list = + baseSubstationInfoService.selectBaseSubstationInfoList(baseSubstationInfo); + ExcelUtil util = + new ExcelUtil(BaseSubstationInfo.class); + return util.exportExcel(list, "变电站信息数据"); + } + + /** 新增变电站信息 */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** 新增保存变电站信息 */ + @RequiresPermissions("base:stationInfo:add") + @Log(title = "变电站信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(BaseSubstationInfo baseSubstationInfo) { + baseSubstationInfo.setCreateBy(ShiroUtils.getLoginName()); + baseSubstationInfo.setCreateTime(new Date()); + return toAjax(baseSubstationInfoService.insertBaseSubstationInfo(baseSubstationInfo)); + } + + /** 修改变电站信息 */ + @GetMapping("/edit/{ObjId}") + public String edit(@PathVariable("ObjId") Long ObjId, ModelMap mmap) { + BaseSubstationInfo baseSubstationInfo = + baseSubstationInfoService.selectBaseSubstationInfoByObjId(ObjId); + mmap.put("baseSubstationInfo", baseSubstationInfo); + return prefix + "/edit"; + } + + /** 修改保存变电站信息 */ + @RequiresPermissions("base:stationInfo:edit") + @Log(title = "变电站信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(BaseSubstationInfo baseSubstationInfo) { + baseSubstationInfo.setUpdateBy(ShiroUtils.getLoginName()); + baseSubstationInfo.setUpdateTime(new Date()); + return toAjax(baseSubstationInfoService.updateBaseSubstationInfo(baseSubstationInfo)); + } + + /** 删除变电站信息 */ + @RequiresPermissions("base:stationInfo:remove") + @Log(title = "变电站信息", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(baseSubstationInfoService.deleteBaseSubstationInfoByObjIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/resources/templates/base/a b/ruoyi-admin/src/main/resources/templates/base/a new file mode 100644 index 0000000..e69de29 diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/add.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/add.html new file mode 100644 index 0000000..fbf0742 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/add.html @@ -0,0 +1,92 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + + +
+
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/edit.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/edit.html new file mode 100644 index 0000000..5ab2438 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/edit.html @@ -0,0 +1,92 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/monitorUnitInfo.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/monitorUnitInfo.html new file mode 100644 index 0000000..eb866d7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/monitorUnitInfo.html @@ -0,0 +1,145 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/tree.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/tree.html new file mode 100644 index 0000000..0b20e4c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitInfo/tree.html @@ -0,0 +1,49 @@ + + + + + + + + + + +
+ + +
+ +
+ 展开 / + 折叠 +
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/add.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/add.html new file mode 100644 index 0000000..f0f5e7f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/add.html @@ -0,0 +1,45 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/edit.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/edit.html new file mode 100644 index 0000000..55ddc11 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/edit.html @@ -0,0 +1,46 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/monitorUnitType.html b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/monitorUnitType.html new file mode 100644 index 0000000..297936c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/monitorUnitType/monitorUnitType.html @@ -0,0 +1,125 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/stationInfo/add.html b/ruoyi-admin/src/main/resources/templates/base/stationInfo/add.html new file mode 100644 index 0000000..611201f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/stationInfo/add.html @@ -0,0 +1,45 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/stationInfo/edit.html b/ruoyi-admin/src/main/resources/templates/base/stationInfo/edit.html new file mode 100644 index 0000000..1b1d974 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/stationInfo/edit.html @@ -0,0 +1,46 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/base/stationInfo/stationInfo.html b/ruoyi-admin/src/main/resources/templates/base/stationInfo/stationInfo.html new file mode 100644 index 0000000..a32c58b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/base/stationInfo/stationInfo.html @@ -0,0 +1,124 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html index 4d9404a..d534f23 100644 --- a/ruoyi-admin/src/main/resources/templates/index-topnav.html +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -26,7 +26,7 @@