add - 变电站信息、监控单元类型信息、监控单元信息
parent
5f8fc91b5e
commit
b8b35d5c4b
@ -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<BaseMonitorunitInfo> list(BaseMonitorunitInfo baseMonitorunitInfo)
|
||||
{
|
||||
List<BaseMonitorunitInfo> list = baseMonitorunitInfoService.selectBaseMonitorunitInfoList(baseMonitorunitInfo);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控单元信息列表
|
||||
*/
|
||||
@RequiresPermissions("base:monitorUnitInfo:export")
|
||||
@Log(title = "监控单元信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseMonitorunitInfo baseMonitorunitInfo)
|
||||
{
|
||||
List<BaseMonitorunitInfo> list = baseMonitorunitInfoService.selectBaseMonitorunitInfoList(baseMonitorunitInfo);
|
||||
ExcelUtil<BaseMonitorunitInfo> util = new ExcelUtil<BaseMonitorunitInfo>(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<Ztree> treeData()
|
||||
{
|
||||
List<Ztree> ztrees = baseMonitorunitInfoService.selectBaseMonitorunitInfoTree();
|
||||
return ztrees;
|
||||
}
|
||||
}
|
@ -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<BaseMonitorunitType> 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<BaseMonitorunitType> list =
|
||||
baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType);
|
||||
ExcelUtil<BaseMonitorunitType> util =
|
||||
new ExcelUtil<BaseMonitorunitType>(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));
|
||||
}
|
||||
}
|
@ -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<BaseSubstationInfo> 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<BaseSubstationInfo> list =
|
||||
baseSubstationInfoService.selectBaseSubstationInfoList(baseSubstationInfo);
|
||||
ExcelUtil<BaseSubstationInfo> util =
|
||||
new ExcelUtil<BaseSubstationInfo>(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));
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
<!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-monitorUnitInfo-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="monitorunitId" 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="monitorunitName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">父级监控单元:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${baseMonitorunitInfo?.monitorunitId}"/>
|
||||
<input class="form-control" type="text" onclick="selectMonitorUnitInfoTree()" id="treeName" readonly="true" th:value="${baseMonitorunitInfo?.monitorunitName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="monitorunitType" class="form-control m-b" th:with="type=${@monitorunitTypeService.getMonitorunitType()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.monitorunittypeName}" th:value="${dict.monitorunittypeId}"></option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">所属变电站:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="substationId" class="form-control m-b" th:with="substationInfo=${@substationInfoService.getSubstationInfo()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="substation : ${substationInfo}" th:text="${substation.substationName}" th:value="${substation.substationId}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/monitorUnitInfo"
|
||||
$("#form-monitorUnitInfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-monitorUnitInfo-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*监控单元信息-新增-选择父监控单元信息树*/
|
||||
function selectMonitorUnitInfoTree() {
|
||||
var options = {
|
||||
title: '监控单元信息选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectMonitorUnitInfoTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,92 @@
|
||||
<!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-monitorUnitInfo-edit" th:object="${baseMonitorunitInfo}">
|
||||
<input name="ObjId" th:field="*{objId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="monitorunitId" th:field="*{monitorunitId}" 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="monitorunitName" th:field="*{monitorunitName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">父级监控单元:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<input class="form-control" type="text" onclick="selectMonitorUnitInfoTree()" id="treeName" readonly="true" th:field="*{parentName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="monitorunitType" class="form-control m-b" th:with="type=${@monitorunitTypeService.getMonitorunitType()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.monitorunittypeName}" th:value="${dict.monitorunittypeId}" th:field="*{monitorunitType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">所属变电站:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="substationId" class="form-control m-b" th:with="substationInfo=${@substationInfoService.getSubstationInfo()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="substation : ${substationInfo}" th:text="${substation.substationName}" th:value="${substation.substationId}" th:field="*{substationId}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{enableFlag}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/monitorUnitInfo";
|
||||
$("#form-monitorUnitInfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-monitorUnitInfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*监控单元信息-编辑-选择父监控单元信息树*/
|
||||
function selectMonitorUnitInfoTree() {
|
||||
var options = {
|
||||
title: '监控单元信息选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectMonitorUnitInfoTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,145 @@
|
||||
<!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 style="width: 95px">监控单元编号:</label>
|
||||
<input type="text" name="monitorunitId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label style="width: 95px">监控单元名称:</label>
|
||||
<input type="text" name="monitorunitName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label style="width: 95px">监控单元类型:</label>
|
||||
<select name="monitorunitType" th:with="type=${@monitorunitTypeService.getMonitorunitType()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.monitorunittypeName}" th:value="${dict.monitorunittypeId}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label style="width: 90px">所属变电站:</label>
|
||||
<select name="substationId" th:with="substationInfo=${@substationInfoService.getSubstationInfo()}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="substation : ${substationInfo}" th:text="${substation.substationName}" th:value="${substation.substationId}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>是否启用:</label>
|
||||
<select name="enableFlag" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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="base:monitorUnitInfo:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="base:monitorUnitInfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('base:monitorUnitInfo:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('base:monitorUnitInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('base:monitorUnitInfo:remove')}]];
|
||||
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
||||
var prefix = ctx + "base/monitorUnitInfo";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "monitorunitId",
|
||||
parentCode: "parentId",
|
||||
expandColumn: "2",
|
||||
uniqueId: "objId",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "监控单元信息",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field:'objId',
|
||||
title: '标识'
|
||||
},
|
||||
{
|
||||
field: 'monitorunitId',
|
||||
title: '监控单元编号',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'monitorunitName',
|
||||
title: '监控单元名称',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'parentId',
|
||||
title: '父级监控单元',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'monitorunitType',
|
||||
title: '监控单元类型',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'substationId',
|
||||
title: '所属变电站',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'enableFlag',
|
||||
title: '是否启用',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(enableFlagDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
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.objId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.objId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('监控单元信息树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${baseMonitorunitInfo?.monitorunitId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${baseMonitorunitInfo?.monitorunitName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<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 id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "base/monitorUnitInfo/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,45 @@
|
||||
<!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-monitorUnitType-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元类型编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="monitorunittypeId" 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="monitorunittypeName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/monitorUnitType"
|
||||
$("#form-monitorUnitType-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-monitorUnitType-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,46 @@
|
||||
<!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-monitorUnitType-edit" th:object="${baseMonitorunitType}">
|
||||
<input name="objId" th:field="*{objId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">监控单元类型编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="monitorunittypeId" th:field="*{monitorunittypeId}" 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="monitorunittypeName" th:field="*{monitorunittypeName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{enableFlag}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/monitorUnitType";
|
||||
$("#form-monitorUnitType-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-monitorUnitType-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,125 @@
|
||||
<!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="monitorunittypeId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>类型名称:</label>
|
||||
<input type="text" name="monitorunittypeName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>是否启用:</label>
|
||||
<select name="enableFlag" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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="base:monitorUnitType:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="base:monitorUnitType:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="base:monitorUnitType:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="base:monitorUnitType: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('base:monitorUnitType:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('base:monitorUnitType:remove')}]];
|
||||
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
||||
var prefix = ctx + "base/monitorUnitType";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "监控单元类型",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'objId',
|
||||
title: '主键标识',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'monitorunittypeId',
|
||||
title: '类型编号'
|
||||
},
|
||||
{
|
||||
field: 'monitorunittypeName',
|
||||
title: '类型名称'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '创建人员'
|
||||
},
|
||||
{
|
||||
field : 'createTime',
|
||||
title:'创建时间'
|
||||
},
|
||||
{
|
||||
field: 'enableFlag',
|
||||
title: '是否启用',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(enableFlagDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '修改人员'
|
||||
},
|
||||
{
|
||||
field : 'updateTime',
|
||||
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.objId + '\')"><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.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,45 @@
|
||||
<!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-stationInfo-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">变电站编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="substationId" 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="substationName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/stationInfo"
|
||||
$("#form-stationInfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-stationInfo-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,46 @@
|
||||
<!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-stationInfo-edit" th:object="${baseSubstationInfo}">
|
||||
<input name="ObjId" th:field="*{ObjId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">变电站编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="substationId" th:field="*{substationId}" 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="substationName" th:field="*{substationName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否启用:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="enableFlag" class="form-control m-b" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{enableFlag}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/stationInfo";
|
||||
$("#form-stationInfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-stationInfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,124 @@
|
||||
<!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 style="width:90px">变电站编号:</label>
|
||||
<input type="text" name="substationId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label style="width:90px">变电站名称:</label>
|
||||
<input type="text" name="substationName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>是否启用:</label>
|
||||
<select name="enableFlag" th:with="type=${@dict.getType('enable_flag')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</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="base:stationInfo:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="base:stationInfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="base:stationInfo:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="base:stationInfo: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('base:stationInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('base:stationInfo:remove')}]];
|
||||
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
||||
var prefix = ctx + "base/stationInfo";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "变电站信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'objId',
|
||||
title: '主键标识',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'substationId',
|
||||
title: '变电站编号'
|
||||
},
|
||||
{
|
||||
field: 'substationName',
|
||||
title: '变电站名称'
|
||||
},{
|
||||
field: 'createBy',
|
||||
title: '创建人员'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'enableFlag',
|
||||
title: '是否启用',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(enableFlagDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '修改人员'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
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.objId + '\')"><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.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,112 @@
|
||||
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.TreeEntity;
|
||||
|
||||
/**
|
||||
* 监控单元信息对象 base_monitorunit_info
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public class BaseMonitorunitInfo extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long objId;
|
||||
|
||||
/** 监控单元编号 */
|
||||
@Excel(name = "监控单元编号")
|
||||
private String monitorunitId;
|
||||
|
||||
/** 监控单元名称 */
|
||||
@Excel(name = "监控单元名称")
|
||||
private String monitorunitName;
|
||||
|
||||
/** 监控单元类型 */
|
||||
@Excel(name = "监控单元类型")
|
||||
private String monitorunitType;
|
||||
|
||||
/** 所属变电站 */
|
||||
@Excel(name = "所属变电站")
|
||||
private String substationId;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private Long enableFlag;
|
||||
|
||||
public void setObjId(Long objId)
|
||||
{
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objId;
|
||||
}
|
||||
public void setMonitorunitId(String monitorunitId)
|
||||
{
|
||||
this.monitorunitId = monitorunitId;
|
||||
}
|
||||
|
||||
public String getMonitorunitId()
|
||||
{
|
||||
return monitorunitId;
|
||||
}
|
||||
public void setMonitorunitName(String monitorunitName)
|
||||
{
|
||||
this.monitorunitName = monitorunitName;
|
||||
}
|
||||
|
||||
public String getMonitorunitName()
|
||||
{
|
||||
return monitorunitName;
|
||||
}
|
||||
public void setMonitorunitType(String monitorunitType)
|
||||
{
|
||||
this.monitorunitType = monitorunitType;
|
||||
}
|
||||
|
||||
public String getMonitorunitType()
|
||||
{
|
||||
return monitorunitType;
|
||||
}
|
||||
public void setSubstationId(String substationId)
|
||||
{
|
||||
this.substationId = substationId;
|
||||
}
|
||||
|
||||
public String getSubstationId()
|
||||
{
|
||||
return substationId;
|
||||
}
|
||||
public void setEnableFlag(Long enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
public Long getEnableFlag()
|
||||
{
|
||||
return enableFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId", getObjId())
|
||||
.append("monitorunitId", getMonitorunitId())
|
||||
.append("monitorunitName", getMonitorunitName())
|
||||
.append("parentId", getParentId())
|
||||
.append("monitorunitType", getMonitorunitType())
|
||||
.append("substationId", getSubstationId())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 监控单元类型对象 base_monitorunit_type
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public class BaseMonitorunitType extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long objId;
|
||||
|
||||
/** 监控单元类型编号 */
|
||||
@Excel(name = "监控单元类型编号")
|
||||
private String monitorunittypeId;
|
||||
|
||||
/** 监控单元类型名称 */
|
||||
@Excel(name = "监控单元类型名称")
|
||||
private String monitorunittypeName;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private Long enableFlag;
|
||||
|
||||
public void setObjId(Long objId)
|
||||
{
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objId;
|
||||
}
|
||||
public void setMonitorunittypeId(String monitorunittypeId)
|
||||
{
|
||||
this.monitorunittypeId = monitorunittypeId;
|
||||
}
|
||||
|
||||
public String getMonitorunittypeId()
|
||||
{
|
||||
return monitorunittypeId;
|
||||
}
|
||||
public void setMonitorunittypeName(String monitorunittypeName)
|
||||
{
|
||||
this.monitorunittypeName = monitorunittypeName;
|
||||
}
|
||||
|
||||
public String getMonitorunittypeName()
|
||||
{
|
||||
return monitorunittypeName;
|
||||
}
|
||||
public void setEnableFlag(Long enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
public Long getEnableFlag()
|
||||
{
|
||||
return enableFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId", getObjId())
|
||||
.append("monitorunittypeId", getMonitorunittypeId())
|
||||
.append("monitorunittypeName", getMonitorunittypeName())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 变电站信息对象 base_substation_info
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public class BaseSubstationInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long objid;
|
||||
|
||||
/** 变电站编号 */
|
||||
@Excel(name = "变电站编号")
|
||||
private String substationId;
|
||||
|
||||
/** 变电站名称 */
|
||||
@Excel(name = "变电站名称")
|
||||
private String substationName;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private Long enableFlag;
|
||||
|
||||
public void setObjId(Long objid)
|
||||
{
|
||||
this.objid = objid;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objid;
|
||||
}
|
||||
public void setSubstationId(String substationId)
|
||||
{
|
||||
this.substationId = substationId;
|
||||
}
|
||||
|
||||
public String getSubstationId()
|
||||
{
|
||||
return substationId;
|
||||
}
|
||||
public void setSubstationName(String substationName)
|
||||
{
|
||||
this.substationName = substationName;
|
||||
}
|
||||
|
||||
public String getSubstationName()
|
||||
{
|
||||
return substationName;
|
||||
}
|
||||
public void setEnableFlag(Long enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
public Long getEnableFlag()
|
||||
{
|
||||
return enableFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objid", getObjId())
|
||||
.append("substationId", getSubstationId())
|
||||
.append("substationName", getSubstationName())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
||||
|
||||
/**
|
||||
* 监控单元信息Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface BaseMonitorunitInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控单元信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 监控单元信息
|
||||
*/
|
||||
public BaseMonitorunitInfo selectBaseMonitorunitInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 查询监控单元信息列表
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 监控单元信息集合
|
||||
*/
|
||||
public List<BaseMonitorunitInfo> selectBaseMonitorunitInfoList(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 新增监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 修改监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 删除监控单元信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元信息
|
||||
*
|
||||
* @param ObjIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitInfoByObjIds(String[] ObjIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitType;
|
||||
|
||||
/**
|
||||
* 监控单元类型Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface BaseMonitorunitTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
public BaseMonitorunitType selectBaseMonitorunitTypeByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 监控单元类型集合
|
||||
*/
|
||||
public List<BaseMonitorunitType> selectBaseMonitorunitTypeList(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 删除监控单元类型
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitTypeByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitTypeByObjIds(String[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseSubstationInfo;
|
||||
|
||||
/**
|
||||
* 变电站信息Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface BaseSubstationInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询变电站信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 变电站信息
|
||||
*/
|
||||
public BaseSubstationInfo selectBaseSubstationInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 查询变电站信息列表
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 变电站信息集合
|
||||
*/
|
||||
public List<BaseSubstationInfo> selectBaseSubstationInfoList(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 新增变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 修改变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 删除变电站信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseSubstationInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 批量删除变电站信息
|
||||
*
|
||||
* @param ObjIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseSubstationInfoByObjIds(String[] ObjIds);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
|
||||
/**
|
||||
* 监控单元信息Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface IBaseMonitorunitInfoService
|
||||
{
|
||||
/**
|
||||
* 查询监控单元信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 监控单元信息
|
||||
*/
|
||||
public BaseMonitorunitInfo selectBaseMonitorunitInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 查询监控单元信息列表
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 监控单元信息集合
|
||||
*/
|
||||
public List<BaseMonitorunitInfo> selectBaseMonitorunitInfoList(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 新增监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 修改监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元信息
|
||||
*
|
||||
* @param ObjIds 需要删除的监控单元信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitInfoByObjIds(String ObjIds);
|
||||
|
||||
/**
|
||||
* 删除监控单元信息信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 查询监控单元信息树列表
|
||||
*
|
||||
* @return 所有监控单元信息信息
|
||||
*/
|
||||
public List<Ztree> selectBaseMonitorunitInfoTree();
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitType;
|
||||
|
||||
/**
|
||||
* 监控单元类型Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface IBaseMonitorunitTypeService
|
||||
{
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
public BaseMonitorunitType selectBaseMonitorunitTypeByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 监控单元类型集合
|
||||
*/
|
||||
public List<BaseMonitorunitType> selectBaseMonitorunitTypeList(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param objIds 需要删除的监控单元类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitTypeByObjIds(String objIds);
|
||||
|
||||
/**
|
||||
* 删除监控单元类型信息
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseMonitorunitTypeByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseSubstationInfo;
|
||||
|
||||
/**
|
||||
* 变电站信息Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
public interface IBaseSubstationInfoService
|
||||
{
|
||||
/**
|
||||
* 查询变电站信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 变电站信息
|
||||
*/
|
||||
public BaseSubstationInfo selectBaseSubstationInfoByObjId(Long ObjId);
|
||||
|
||||
/**
|
||||
* 查询变电站信息列表
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 变电站信息集合
|
||||
*/
|
||||
public List<BaseSubstationInfo> selectBaseSubstationInfoList(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 新增变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 修改变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo);
|
||||
|
||||
/**
|
||||
* 批量删除变电站信息
|
||||
*
|
||||
* @param ObjIds 需要删除的变电站信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseSubstationInfoByObjIds(String ObjIds);
|
||||
|
||||
/**
|
||||
* 删除变电站信息信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseSubstationInfoByObjId(Long ObjId);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BaseMonitorunitInfoMapper;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
||||
import com.ruoyi.system.service.IBaseMonitorunitInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 监控单元信息Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
@Service
|
||||
public class BaseMonitorunitInfoServiceImpl implements IBaseMonitorunitInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseMonitorunitInfoMapper baseMonitorunitInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询监控单元信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 监控单元信息
|
||||
*/
|
||||
@Override
|
||||
public BaseMonitorunitInfo selectBaseMonitorunitInfoByObjId(Long ObjId)
|
||||
{
|
||||
return baseMonitorunitInfoMapper.selectBaseMonitorunitInfoByObjId(ObjId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控单元信息列表
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 监控单元信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseMonitorunitInfo> selectBaseMonitorunitInfoList(BaseMonitorunitInfo baseMonitorunitInfo)
|
||||
{
|
||||
return baseMonitorunitInfoMapper.selectBaseMonitorunitInfoList(baseMonitorunitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo)
|
||||
{
|
||||
baseMonitorunitInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseMonitorunitInfoMapper.insertBaseMonitorunitInfo(baseMonitorunitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元信息
|
||||
*
|
||||
* @param baseMonitorunitInfo 监控单元信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseMonitorunitInfo(BaseMonitorunitInfo baseMonitorunitInfo)
|
||||
{
|
||||
baseMonitorunitInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseMonitorunitInfoMapper.updateBaseMonitorunitInfo(baseMonitorunitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控单元信息
|
||||
*
|
||||
* @param ObjIds 需要删除的监控单元信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseMonitorunitInfoByObjIds(String ObjIds)
|
||||
{
|
||||
return baseMonitorunitInfoMapper.deleteBaseMonitorunitInfoByObjIds(Convert.toStrArray(ObjIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元信息信息
|
||||
*
|
||||
* @param ObjId 监控单元信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseMonitorunitInfoByObjId(Long ObjId)
|
||||
{
|
||||
return baseMonitorunitInfoMapper.deleteBaseMonitorunitInfoByObjId(ObjId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控单元信息树列表
|
||||
*
|
||||
* @return 所有监控单元信息信息
|
||||
*/
|
||||
@Override
|
||||
public List<Ztree> selectBaseMonitorunitInfoTree()
|
||||
{
|
||||
List<BaseMonitorunitInfo> baseMonitorunitInfoList = baseMonitorunitInfoMapper.selectBaseMonitorunitInfoList(new BaseMonitorunitInfo());
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
for (BaseMonitorunitInfo baseMonitorunitInfo : baseMonitorunitInfoList)
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(baseMonitorunitInfo.getMonitorunitId());
|
||||
ztree.setpId(baseMonitorunitInfo.getParentId());
|
||||
ztree.setName(baseMonitorunitInfo.getMonitorunitName());
|
||||
ztree.setTitle(baseMonitorunitInfo.getMonitorunitName());
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BaseMonitorunitTypeMapper;
|
||||
import com.ruoyi.system.domain.BaseMonitorunitType;
|
||||
import com.ruoyi.system.service.IBaseMonitorunitTypeService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 监控单元类型Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
@Service("monitorunitTypeService")
|
||||
public class BaseMonitorunitTypeServiceImpl implements IBaseMonitorunitTypeService
|
||||
{
|
||||
@Autowired
|
||||
private BaseMonitorunitTypeMapper baseMonitorunitTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
@Override
|
||||
public BaseMonitorunitType selectBaseMonitorunitTypeByObjId(Long objId)
|
||||
{
|
||||
return baseMonitorunitTypeMapper.selectBaseMonitorunitTypeByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控单元下拉框
|
||||
* @author WenJY
|
||||
* @date 2022/1/27 16:35
|
||||
* @return java.util.List<com.ruoyi.system.domain.BaseMonitorunitType>
|
||||
*/
|
||||
public List<BaseMonitorunitType> getMonitorunitType(){
|
||||
return baseMonitorunitTypeMapper.selectBaseMonitorunitTypeList(new BaseMonitorunitType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
@Override
|
||||
public List<BaseMonitorunitType> selectBaseMonitorunitTypeList(BaseMonitorunitType baseMonitorunitType)
|
||||
{
|
||||
return baseMonitorunitTypeMapper.selectBaseMonitorunitTypeList(baseMonitorunitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType)
|
||||
{
|
||||
baseMonitorunitType.setCreateTime(DateUtils.getNowDate());
|
||||
return baseMonitorunitTypeMapper.insertBaseMonitorunitType(baseMonitorunitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param baseMonitorunitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseMonitorunitType(BaseMonitorunitType baseMonitorunitType)
|
||||
{
|
||||
baseMonitorunitType.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseMonitorunitTypeMapper.updateBaseMonitorunitType(baseMonitorunitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param objIds 需要删除的监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseMonitorunitTypeByObjIds(String objIds)
|
||||
{
|
||||
return baseMonitorunitTypeMapper.deleteBaseMonitorunitTypeByObjIds(Convert.toStrArray(objIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元类型信息
|
||||
*
|
||||
* @param objId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseMonitorunitTypeByObjId(Long objId)
|
||||
{
|
||||
return baseMonitorunitTypeMapper.deleteBaseMonitorunitTypeByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BaseSubstationInfoMapper;
|
||||
import com.ruoyi.system.domain.BaseSubstationInfo;
|
||||
import com.ruoyi.system.service.IBaseSubstationInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 变电站信息Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2022-01-27
|
||||
*/
|
||||
@Service("substationInfoService")
|
||||
public class BaseSubstationInfoServiceImpl implements IBaseSubstationInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseSubstationInfoMapper baseSubstationInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询变电站信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 变电站信息
|
||||
*/
|
||||
@Override
|
||||
public BaseSubstationInfo selectBaseSubstationInfoByObjId(Long ObjId)
|
||||
{
|
||||
return baseSubstationInfoMapper.selectBaseSubstationInfoByObjId(ObjId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取变电站信息下拉框
|
||||
* @author WenJY
|
||||
* @date 2022/1/27 16:38
|
||||
* @return java.util.List<com.ruoyi.system.domain.BaseSubstationInfo>
|
||||
*/
|
||||
public List<BaseSubstationInfo> getSubstationInfo()
|
||||
{
|
||||
return baseSubstationInfoMapper.selectBaseSubstationInfoList(new BaseSubstationInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询变电站信息列表
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 变电站信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseSubstationInfo> selectBaseSubstationInfoList(BaseSubstationInfo baseSubstationInfo)
|
||||
{
|
||||
return baseSubstationInfoMapper.selectBaseSubstationInfoList(baseSubstationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo)
|
||||
{
|
||||
baseSubstationInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseSubstationInfoMapper.insertBaseSubstationInfo(baseSubstationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改变电站信息
|
||||
*
|
||||
* @param baseSubstationInfo 变电站信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseSubstationInfo(BaseSubstationInfo baseSubstationInfo)
|
||||
{
|
||||
baseSubstationInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseSubstationInfoMapper.updateBaseSubstationInfo(baseSubstationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除变电站信息
|
||||
*
|
||||
* @param ObjIds 需要删除的变电站信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseSubstationInfoByObjIds(String ObjIds)
|
||||
{
|
||||
return baseSubstationInfoMapper.deleteBaseSubstationInfoByObjIds(Convert.toStrArray(ObjIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除变电站信息信息
|
||||
*
|
||||
* @param ObjId 变电站信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseSubstationInfoByObjId(Long ObjId)
|
||||
{
|
||||
return baseSubstationInfoMapper.deleteBaseSubstationInfoByObjId(ObjId);
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
<?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.BaseMonitorunitInfoMapper">
|
||||
|
||||
<resultMap type="BaseMonitorunitInfo" id="BaseMonitorunitInfoResult">
|
||||
<result property="objId" column="ObjId" />
|
||||
<result property="monitorunitId" column="MonitorUnit_Id" />
|
||||
<result property="monitorunitName" column="MonitorUnit_Name" />
|
||||
<result property="parentId" column="Parent_Id" />
|
||||
<result property="monitorunitType" column="MonitorUnit_Type" />
|
||||
<result property="substationId" column="Substation_Id" />
|
||||
<result property="enableFlag" column="Enable_Flag" />
|
||||
<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="parentName" column="parent_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseMonitorunitInfoVo">
|
||||
select ObjId, MonitorUnit_Id, MonitorUnit_Name, Parent_Id, MonitorUnit_Type, Substation_Id, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_monitorunit_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseMonitorunitInfoList" parameterType="BaseMonitorunitInfo" resultMap="BaseMonitorunitInfoResult">
|
||||
<include refid="selectBaseMonitorunitInfoVo"/>
|
||||
<where>
|
||||
<if test="monitorunitId != null and monitorunitId != ''"> and MonitorUnit_Id like concat('%', #{monitorunitId}, '%')</if>
|
||||
<if test="monitorunitName != null and monitorunitName != ''"> and MonitorUnit_Name like concat('%', #{monitorunitName}, '%')</if>
|
||||
<if test="parentId != null and parentId != ''"> and Parent_Id = #{parentId}</if>
|
||||
<if test="monitorunitType != null "> and MonitorUnit_Type = #{monitorunitType}</if>
|
||||
<if test="substationId != null and substationId != ''"> and Substation_Id = #{substationId}</if>
|
||||
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
|
||||
</where>
|
||||
order by Parent_Id
|
||||
</select>
|
||||
|
||||
<select id="selectBaseMonitorunitInfoByObjId" parameterType="Long" resultMap="BaseMonitorunitInfoResult">
|
||||
select t.ObjId, t.MonitorUnit_Id, t.MonitorUnit_Name, t.Parent_Id, t.MonitorUnit_Type, t.Substation_Id, t.Enable_Flag, t.Create_By, t.Create_Time, t.Update_By, t.Update_Time, p.MonitorUnit_Name as parent_name
|
||||
from base_monitorunit_info t
|
||||
left join base_monitorunit_info p on p.MonitorUnit_Id = t.Parent_Id
|
||||
where t.ObjId = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseMonitorunitInfo" parameterType="BaseMonitorunitInfo" useGeneratedKeys="true" keyProperty="objId">
|
||||
insert into base_monitorunit_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorunitId != null">MonitorUnit_Id,</if>
|
||||
<if test="monitorunitName != null">MonitorUnit_Name,</if>
|
||||
<if test="parentId != null">Parent_Id,</if>
|
||||
<if test="monitorunitType != null">MonitorUnit_Type,</if>
|
||||
<if test="substationId != null">Substation_Id,</if>
|
||||
<if test="enableFlag != null">Enable_Flag,</if>
|
||||
<if test="createBy != null">Create_By,</if>
|
||||
<if test="createTime != null">Create_Time,</if>
|
||||
<if test="updateBy != null">Update_By,</if>
|
||||
<if test="updateTime != null">Update_Time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorunitId != null">#{monitorunitId},</if>
|
||||
<if test="monitorunitName != null">#{monitorunitName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="monitorunitType != null">#{monitorunitType},</if>
|
||||
<if test="substationId != null">#{substationId},</if>
|
||||
<if test="enableFlag != null">#{enableFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseMonitorunitInfo" parameterType="BaseMonitorunitInfo">
|
||||
update base_monitorunit_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="monitorunitId != null">MonitorUnit_Id = #{monitorunitId},</if>
|
||||
<if test="monitorunitName != null">MonitorUnit_Name = #{monitorunitName},</if>
|
||||
<if test="parentId != null">Parent_Id = #{parentId},</if>
|
||||
<if test="monitorunitType != null">MonitorUnit_Type = #{monitorunitType},</if>
|
||||
<if test="substationId != null">Substation_Id = #{substationId},</if>
|
||||
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
||||
<if test="createBy != null">Create_By = #{createBy},</if>
|
||||
<if test="createTime != null">Create_Time = #{createTime},</if>
|
||||
<if test="updateBy != null">Update_By = #{updateBy},</if>
|
||||
<if test="updateTime != null">Update_Time = #{updateTime},</if>
|
||||
</trim>
|
||||
where ObjId = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseMonitorunitInfoByObjId" parameterType="Long">
|
||||
delete from base_monitorunit_info where ObjId = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseMonitorunitInfoByObjIds" parameterType="String">
|
||||
delete from base_monitorunit_info where ObjId in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,83 @@
|
||||
<?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.BaseMonitorunitTypeMapper">
|
||||
|
||||
<resultMap type="BaseMonitorunitType" id="BaseMonitorunitTypeResult">
|
||||
<result property="objId" column="ObjId" />
|
||||
<result property="monitorunittypeId" column="MonitorUnitType_Id" />
|
||||
<result property="monitorunittypeName" column="MonitorUnitType_Name" />
|
||||
<result property="enableFlag" column="Enable_Flag" />
|
||||
<result property="createBy" column="Create_By" />
|
||||
<result property="createTime" column="Create_Time" />
|
||||
<result property="updateBy" column="Update_By" />
|
||||
<result property="updateTime" column="Update_Time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseMonitorunitTypeVo">
|
||||
select ObjId, MonitorUnitType_Id, MonitorUnitType_Name, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_monitorunit_type
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseMonitorunitTypeList" parameterType="BaseMonitorunitType" resultMap="BaseMonitorunitTypeResult">
|
||||
<include refid="selectBaseMonitorunitTypeVo"/>
|
||||
<where>
|
||||
<if test="monitorunittypeId != null and monitorunittypeId != ''"> and MonitorUnitType_Id like concat('%', #{monitorunittypeId}, '%')</if>
|
||||
<if test="monitorunittypeName != null and monitorunittypeName != ''"> and MonitorUnitType_Name like concat('%', #{monitorunittypeName}, '%')</if>
|
||||
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseMonitorunitTypeByObjId" parameterType="Long" resultMap="BaseMonitorunitTypeResult">
|
||||
<include refid="selectBaseMonitorunitTypeVo"/>
|
||||
where ObjId = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseMonitorunitType" parameterType="BaseMonitorunitType" useGeneratedKeys="true" keyProperty="objId">
|
||||
insert into base_monitorunit_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorunittypeId != null">MonitorUnitType_Id,</if>
|
||||
<if test="monitorunittypeName != null">MonitorUnitType_Name,</if>
|
||||
<if test="enableFlag != null">Enable_Flag,</if>
|
||||
<if test="createBy != null">Create_By,</if>
|
||||
<if test="createTime != null">Create_Time,</if>
|
||||
<if test="updateBy != null">Update_By,</if>
|
||||
<if test="updateTime != null">Update_Time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorunittypeId != null">#{monitorunittypeId},</if>
|
||||
<if test="monitorunittypeName != null">#{monitorunittypeName},</if>
|
||||
<if test="enableFlag != null">#{enableFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseMonitorunitType" parameterType="BaseMonitorunitType">
|
||||
update base_monitorunit_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="monitorunittypeId != null">MonitorUnitType_Id = #{monitorunittypeId},</if>
|
||||
<if test="monitorunittypeName != null">MonitorUnitType_Name = #{monitorunittypeName},</if>
|
||||
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
||||
<if test="createBy != null">Create_By = #{createBy},</if>
|
||||
<if test="createTime != null">Create_Time = #{createTime},</if>
|
||||
<if test="updateBy != null">Update_By = #{updateBy},</if>
|
||||
<if test="updateTime != null">Update_Time = #{updateTime},</if>
|
||||
</trim>
|
||||
where ObjId = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseMonitorunitTypeByObjId" parameterType="Long">
|
||||
delete from base_monitorunit_type where ObjId = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseMonitorunitTypeByObjIds" parameterType="String">
|
||||
delete from base_monitorunit_type where ObjId in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,83 @@
|
||||
<?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.BaseSubstationInfoMapper">
|
||||
|
||||
<resultMap type="BaseSubstationInfo" id="BaseSubstationInfoResult">
|
||||
<result property="objid" column="ObjId" />
|
||||
<result property="substationId" column="Substation_Id" />
|
||||
<result property="substationName" column="Substation_Name" />
|
||||
<result property="enableFlag" column="Enable_Flag" />
|
||||
<result property="createBy" column="Create_By" />
|
||||
<result property="createTime" column="Create_Time" />
|
||||
<result property="updateBy" column="Update_By" />
|
||||
<result property="updateTime" column="Update_Time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseSubstationInfoVo">
|
||||
select ObjId, Substation_Id, Substation_Name, Enable_Flag, Create_By, Create_Time, Update_By, Update_Time from base_substation_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseSubstationInfoList" parameterType="BaseSubstationInfo" resultMap="BaseSubstationInfoResult">
|
||||
<include refid="selectBaseSubstationInfoVo"/>
|
||||
<where>
|
||||
<if test="substationId != null and substationId != ''"> and Substation_Id like concat('%', #{substationId}, '%')</if>
|
||||
<if test="substationName != null and substationName != ''"> and Substation_Name like concat('%', #{substationName}, '%')</if>
|
||||
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseSubstationInfoByObjId" parameterType="Long" resultMap="BaseSubstationInfoResult">
|
||||
<include refid="selectBaseSubstationInfoVo"/>
|
||||
where ObjId = #{objid}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseSubstationInfo" parameterType="BaseSubstationInfo" useGeneratedKeys="true" keyProperty="ObjId">
|
||||
insert into base_substation_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="substationId != null">Substation_Id,</if>
|
||||
<if test="substationName != null">Substation_Name,</if>
|
||||
<if test="enableFlag != null">Enable_Flag,</if>
|
||||
<if test="createBy != null">Create_By,</if>
|
||||
<if test="createTime != null">Create_Time,</if>
|
||||
<if test="updateBy != null">Update_By,</if>
|
||||
<if test="updateTime != null">Update_Time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="substationId != null">#{substationId},</if>
|
||||
<if test="substationName != null">#{substationName},</if>
|
||||
<if test="enableFlag != null">#{enableFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseSubstationInfo" parameterType="BaseSubstationInfo">
|
||||
update base_substation_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="substationId != null">Substation_Id = #{substationId},</if>
|
||||
<if test="substationName != null">Substation_Name = #{substationName},</if>
|
||||
<if test="enableFlag != null">Enable_Flag = #{enableFlag},</if>
|
||||
<if test="createBy != null">Create_By = #{createBy},</if>
|
||||
<if test="createTime != null">Create_Time = #{createTime},</if>
|
||||
<if test="updateBy != null">Update_By = #{updateBy},</if>
|
||||
<if test="updateTime != null">Update_Time = #{updateTime},</if>
|
||||
</trim>
|
||||
where ObjId = #{objid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseSubstationInfoByObjId" parameterType="Long">
|
||||
delete from base_substation_info where ObjId = #{ObjId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseSubstationInfoByObjIds" parameterType="String">
|
||||
delete from base_substation_info where ObjId in
|
||||
<foreach item="ObjId" collection="array" open="(" separator="," close=")">
|
||||
#{ObjId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue