change - 告警单元优化处理

main
wenjy 3 years ago
parent ed4c787759
commit 53289c0e18

@ -5,6 +5,7 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.dto.BaseAlarmModuleDto;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -54,7 +55,7 @@ public class BaseAlarmModuleController extends BaseController
public TableDataInfo list(BaseAlarmModule baseAlarmModule) public TableDataInfo list(BaseAlarmModule baseAlarmModule)
{ {
startPage(); startPage();
List<BaseAlarmModule> list = baseAlarmModuleService.selectBaseAlarmModuleList(baseAlarmModule); List<BaseAlarmModuleDto> list = baseAlarmModuleService.selectBaseAlarmModuleList(baseAlarmModule);
return getDataTable(list); return getDataTable(list);
} }
@ -67,8 +68,8 @@ public class BaseAlarmModuleController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult export(BaseAlarmModule baseAlarmModule) public AjaxResult export(BaseAlarmModule baseAlarmModule)
{ {
List<BaseAlarmModule> list = baseAlarmModuleService.selectBaseAlarmModuleList(baseAlarmModule); List<BaseAlarmModuleDto> list = baseAlarmModuleService.selectBaseAlarmModuleList(baseAlarmModule);
ExcelUtil<BaseAlarmModule> util = new ExcelUtil<BaseAlarmModule>(BaseAlarmModule.class); ExcelUtil<BaseAlarmModuleDto> util = new ExcelUtil<BaseAlarmModuleDto>(BaseAlarmModuleDto.class);
return util.exportExcel(list, "报警信息单元数据"); return util.exportExcel(list, "报警信息单元数据");
} }

@ -7,17 +7,36 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-alarmModule-add"> <form class="form-horizontal m" id="form-alarmModule-add">
<input name="monitorunitId" type="hidden" id="treeId"/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">告警单元:</label> <label class="col-sm-3 control-label">告警单元:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="alarmmoduleText" class="form-control" type="text"> <input name="alarmmoduleText" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <!--<div class="form-group">
<label class="col-sm-3 control-label">监控单元:</label> <label class="col-sm-3 control-label">监控单元:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="monitorunitId" class="form-control" type="text"> <input name="monitorunitId" class="form-control" type="text">
</div> </div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">监控单元:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" name="treeName" onclick="selectMonitorTree()" id="treeName">
<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="alarmTypeId" class="form-control m-b" th:with="type=${@alarmTypeService.getParamType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.alarmtypeName}" th:value="${dict.alarmtypeId}"></option>
</select>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">是否启用:</label> <label class="col-sm-3 control-label">是否启用:</label>
@ -55,6 +74,38 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
/* 选择监控单元树 */
function selectMonitorTree() {
var deptId = $.common.isEmpty($("#treeId").val()) ? "" : $("#treeId").val();
var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId;
var options = {
title: '选择部门',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = $.modal.getChildFrame(index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
$.modal.close(index);
}
$(()=>{
var cp_keynum = "alarmModule_MonitorUnit";
var str = localStorage.getItem(cp_keynum);
var num = JSON.parse(str);
if(num != null) {
$("#treeId").val(num.cp_num_value.substring(0, num.cp_num_value.indexOf('/')));
$("#treeName").val(num.cp_num_value.substring(num.cp_num_value.indexOf('/')+1,num.cp_num_value.length ));
}
})
</script> </script>
</body> </body>
</html> </html>

@ -2,8 +2,34 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('报警信息单元列表')" /> <th:block th:include="include :: header('报警信息单元列表')" />
<th:block th:include="include :: layout-latest-css"/>
<th:block th:include="include :: ztree-css"/>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="ui-layout-west">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 监控单元
</div>
<div class="box-tools pull-right">
<a type="button" class="btn btn-box-tool" href="#" onclick="monitorUnitInfo()" title="监控单元"><i
class="fa fa-edit"></i></a>
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i
class="fa fa-chevron-up"></i></button>
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i
class="fa fa-chevron-down"></i></button>
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i>
</button>
</div>
</div>
<div class="ui-layout-content">
<div id="tree" class="ztree"></div>
</div>
</div>
</div>
<div class="ui-layout-center">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
@ -53,14 +79,41 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('base:alarmModule:edit')}]]; var editFlag = [[${@permission.hasPermi('base:alarmModule:edit')}]];
var removeFlag = [[${@permission.hasPermi('base:alarmModule:remove')}]]; var removeFlag = [[${@permission.hasPermi('base:alarmModule:remove')}]];
var enableFlagDatas = [[${@dict.getType('enable_flag')}]]; var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
var prefix = ctx + "base/alarmModule"; var prefix = ctx + "base/alarmModule";
$(function() { $(() => {
if (typeof (Storage) == 'undefined') {
alert('对不起,您的浏览器不支持 web 存储。')
}
});
$(function () {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({initClosed: panehHidden, west__size: 185});
// 回到顶部绑定
if ($.fn.toTop !== undefined) {
var opt = {
win: $('.ui-layout-center'),
doc: $('.ui-layout-center')
};
$('#scroll-up').toTop(opt);
}
queryAlarmModuleList();
queryMonitorTree();
});
function queryAlarmModuleList() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",
@ -80,14 +133,14 @@
field: 'alarmmoduleText', field: 'alarmmoduleText',
title: '告警单元' title: '告警单元'
}, },
{
field: 'alarmTypeId',
title: '报警类型'
},
{ {
field: 'monitorunitId', field: 'monitorunitName',
title: '监控单元' title: '监控单元'
}, },
{
field: 'alarmTypeName',
title: '报警类型'
},
{ {
field: 'enableFlag', field: 'enableFlag',
title: '是否启用', title: '是否启用',
@ -123,7 +176,49 @@
}] }]
}; };
$.table.init(options); $.table.init(options);
}
function queryMonitorTree() {
let url = ctx + "base/monitorUnitInfo/treeData";
let options = {
url: url,
expandLevel: 2,
onClick: zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#monitorunitId").val(treeNode.id);
$.table.search();
var num = new Object;
num.cp_keynum = "alarmModule_MonitorUnit";
num.cp_num_value = treeNode.id + "/" + treeNode.name;
var str = JSON.stringify(num); // 将对象转换为字符串
localStorage.setItem(num.cp_keynum, str);
}
}
$('#btnExpand').click(function () {
$._tree.expandAll(true);
$(this).hide();
$('#btnCollapse').show();
});
$('#btnCollapse').click(function () {
$._tree.expandAll(false);
$(this).hide();
$('#btnExpand').show();
}); });
$('#btnRefresh').click(function () {
queryMonitorTree();
});
function monitorUnitInfo() {
var url = ctx + "base/monitorUnitInfo";
$.modal.openTab("监控单元", url);
}
</script> </script>
</body> </body>
</html> </html>

@ -9,6 +9,7 @@
<form class="form-horizontal m" id="form-alarmModule-edit" th:object="${baseAlarmModule}"> <form class="form-horizontal m" id="form-alarmModule-edit" th:object="${baseAlarmModule}">
<input name="objId" th:field="*{objId}" type="hidden"> <input name="objId" th:field="*{objId}" type="hidden">
<input name="alarmmoduleId" th:field="*{alarmmoduleId}" type="hidden"> <input name="alarmmoduleId" th:field="*{alarmmoduleId}" type="hidden">
<input name="monitorunitId" type="hidden" th:field="*{monitorunitId}" id="treeId"/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">告警单元:</label> <label class="col-sm-3 control-label">告警单元:</label>
@ -16,10 +17,22 @@
<input name="alarmmoduleText" th:field="*{alarmmoduleText}" class="form-control" type="text"> <input name="alarmmoduleText" th:field="*{alarmmoduleText}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">监控单元:</label> <label class="col-sm-3 control-label">监控单元:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="monitorunitId" th:field="*{monitorunitId}" class="form-control" type="text"> <div class="input-group">
<input class="form-control" type="text" name="treeName" onclick="selectMonitorTree()" id="treeName" th:field="*{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="alarmTypeId" class="form-control m-b" th:with="type=${@alarmTypeService.getParamType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.alarmtypeName}" th:value="${dict.alarmtypeId}" th:field="*{alarmTypeId}"></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -57,6 +70,27 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
/* 选择监控单元树 */
function selectMonitorTree() {
var deptId = $.common.isEmpty($("#treeId").val()) ? "" : $("#treeId").val();
var url = ctx + "base/monitorUnitInfo/selectMonitorUnitInfoTree/" + deptId;
var options = {
title: '选择部门',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = $.modal.getChildFrame(index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
$.modal.close(index);
}
</script> </script>
</body> </body>
</html> </html>

@ -18,7 +18,7 @@ public class BaseAlarmModule extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键标识 */ /** 主键标识 */
private String objId; private Long objId;
/** 单元编号 */ /** 单元编号 */
@Excel(name = "单元编号") @Excel(name = "单元编号")
@ -57,16 +57,15 @@ public class BaseAlarmModule extends BaseEntity
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime; private Date updatedTime;
public void setObjId(String objId) public Long getObjId() {
{ return objId;
this.objId = objId;
} }
public String getObjId() public void setObjId(Long objId) {
{ this.objId = objId;
return objId;
} }
public void setAlarmmoduleId(String alarmmoduleId)
public void setAlarmmoduleId(String alarmmoduleId)
{ {
this.alarmmoduleId = alarmmoduleId; this.alarmmoduleId = alarmmoduleId;
} }

@ -0,0 +1,16 @@
package com.ruoyi.system.domain.dto;
import com.ruoyi.system.domain.BaseAlarmModule;
import lombok.Data;
/**
* @author WenJY
* @date 20220326 17:19
*/
@Data
public class BaseAlarmModuleDto extends BaseAlarmModule {
private String monitorunitName;
private String alarmTypeName;
}

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.BaseAlarmModule; import com.ruoyi.system.domain.BaseAlarmModule;
import com.ruoyi.system.domain.dto.BaseAlarmModuleDto;
/** /**
* Mapper * Mapper
@ -25,7 +26,7 @@ public interface BaseAlarmModuleMapper
* @param baseAlarmModule * @param baseAlarmModule
* @return * @return
*/ */
public List<BaseAlarmModule> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule); public List<BaseAlarmModuleDto> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule);
/** /**
* *

@ -2,6 +2,7 @@ package com.ruoyi.system.service;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.BaseAlarmModule; import com.ruoyi.system.domain.BaseAlarmModule;
import com.ruoyi.system.domain.dto.BaseAlarmModuleDto;
/** /**
* Service * Service
@ -25,7 +26,7 @@ public interface IBaseAlarmModuleService
* @param baseAlarmModule * @param baseAlarmModule
* @return * @return
*/ */
public List<BaseAlarmModule> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule); public List<BaseAlarmModuleDto> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule);
/** /**
* *

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.dto.BaseAlarmModuleDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseAlarmModuleMapper; import com.ruoyi.system.mapper.BaseAlarmModuleMapper;
@ -39,7 +41,7 @@ public class BaseAlarmModuleServiceImpl implements IBaseAlarmModuleService
* @return * @return
*/ */
@Override @Override
public List<BaseAlarmModule> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule) public List<BaseAlarmModuleDto> selectBaseAlarmModuleList(BaseAlarmModule baseAlarmModule)
{ {
return baseAlarmModuleMapper.selectBaseAlarmModuleList(baseAlarmModule); return baseAlarmModuleMapper.selectBaseAlarmModuleList(baseAlarmModule);
} }

@ -1,42 +1,74 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseAlarmModuleMapper"> <mapper namespace="com.ruoyi.system.mapper.BaseAlarmModuleMapper">
<resultMap type="BaseAlarmModule" id="BaseAlarmModuleResult"> <resultMap type="BaseAlarmModule" id="BaseAlarmModuleResult">
<result property="objId" column="ObjId" /> <result property="objId" column="ObjId"/>
<result property="alarmmoduleId" column="AlarmModule_Id" /> <result property="alarmmoduleId" column="AlarmModule_Id"/>
<result property="alarmmoduleText" column="AlarmModule_Text" /> <result property="alarmmoduleText" column="AlarmModule_Text"/>
<result property="monitorunitId" column="MonitorUnit_Id" /> <result property="monitorunitId" column="MonitorUnit_Id"/>
<result property="alarmTypeId" column="AlarmType_Id" /> <result property="alarmTypeId" column="AlarmType_Id"/>
<result property="enableFlag" column="Enable_Flag" /> <result property="enableFlag" column="Enable_Flag"/>
<result property="createdBy" column="CREATED_BY" /> <result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME" /> <result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY" /> <result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME" /> <result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<resultMap type="BaseAlarmModuleDto" id="BaseAlarmModuleDtoResult">
<result property="objId" column="ObjId"/>
<result property="alarmmoduleId" column="AlarmModule_Id"/>
<result property="alarmmoduleText" column="AlarmModule_Text"/>
<result property="monitorunitId" column="MonitorUnit_Id"/>
<result property="alarmTypeId" column="AlarmType_Id"/>
<result property="alarmTypeName" column="AlarmType_Name"/>
<result property="monitorunitName" column="MonitorUnit_Name"/>
<result property="alarmTypeId" column="AlarmType_Id"/>
<result property="enableFlag" column="Enable_Flag"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap> </resultMap>
<sql id="selectBaseAlarmModuleVo"> <sql id="selectBaseAlarmModuleVo">
select ObjId, AlarmModule_Id, AlarmModule_Text, MonitorUnit_Id,AlarmType_Id, Enable_Flag, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME from base_alarm_module -- select ObjId, AlarmModule_Id, AlarmModule_Text, MonitorUnit_Id,AlarmType_Id, Enable_Flag, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME from base_alarm_module
select t1.ObjId,
t1.AlarmModule_Id,
t1.AlarmModule_Text,
t1.MonitorUnit_Id,
t2.MonitorUnit_Name,
t1.AlarmType_Id,
t3.AlarmType_Name,
t1.Enable_Flag,
t1.CREATED_BY,
t1.CREATED_TIME,
t1.UPDATED_BY,
t1.UPDATED_TIME
from base_alarm_module t1
left join base_monitorunit_info t2 on t1.MonitorUnit_Id = t2.MonitorUnit_Id
left join base_alarm_type t3 on t1.AlarmType_Id = t3.alarmType_Id
</sql> </sql>
<select id="selectBaseAlarmModuleList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleResult"> <select id="selectBaseAlarmModuleList" parameterType="BaseAlarmModule" resultMap="BaseAlarmModuleDtoResult">
<include refid="selectBaseAlarmModuleVo"/> <include refid="selectBaseAlarmModuleVo"/>
<where> <where>
<if test="alarmmoduleId != null and alarmmoduleId != ''"> and AlarmModule_Id = #{alarmmoduleId}</if> <if test="alarmmoduleId != null and alarmmoduleId != ''">and t1.AlarmModule_Id = #{alarmmoduleId}</if>
<if test="alarmmoduleText != null and alarmmoduleText != ''"> and AlarmModule_Text = #{alarmmoduleText}</if> <if test="alarmmoduleText != null and alarmmoduleText != ''">and t1.AlarmModule_Text = #{alarmmoduleText}</if>
<if test="monitorunitId != null and monitorunitId != ''"> and MonitorUnit_Id = #{monitorunitId}</if> <if test="monitorunitId != null and monitorunitId != ''">and t1.MonitorUnit_Id = #{monitorunitId}</if>
<if test="alarmTypeId != null and alarmTypeId != ''"> and AlarmType_Id = #{alarmTypeId}</if> <if test="alarmTypeId != null and alarmTypeId != ''">and t1.AlarmType_Id = #{alarmTypeId}</if>
<if test="enableFlag != null "> and Enable_Flag = #{enableFlag}</if> <if test="enableFlag != null ">and t1.Enable_Flag = #{enableFlag}</if>
</where> </where>
</select> </select>
<select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleResult"> <select id="selectBaseAlarmModuleByObjId" parameterType="String" resultMap="BaseAlarmModuleDtoResult">
<include refid="selectBaseAlarmModuleVo"/> <include refid="selectBaseAlarmModuleVo"/>
where ObjId = #{objId} where t1.ObjId = #{objId}
</select> </select>
<insert id="insertBaseAlarmModule" parameterType="BaseAlarmModule"> <insert id="insertBaseAlarmModule" parameterType="BaseAlarmModule">
insert into base_alarm_module insert into base_alarm_module
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -50,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">CREATED_TIME,</if> <if test="createdTime != null">CREATED_TIME,</if>
<if test="updatedBy != null">UPDATED_BY,</if> <if test="updatedBy != null">UPDATED_BY,</if>
<if test="updatedTime != null">UPDATED_TIME,</if> <if test="updatedTime != null">UPDATED_TIME,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if> <if test="objId != null">#{objId},</if>
<if test="alarmmoduleId != null">#{alarmmoduleId},</if> <if test="alarmmoduleId != null">#{alarmmoduleId},</if>
@ -62,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateBaseAlarmModule" parameterType="BaseAlarmModule"> <update id="updateBaseAlarmModule" parameterType="BaseAlarmModule">
@ -82,11 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteBaseAlarmModuleByObjId" parameterType="String"> <delete id="deleteBaseAlarmModuleByObjId" parameterType="String">
delete from base_alarm_module where ObjId = #{objId} delete
from base_alarm_module
where ObjId = #{objId}
</delete> </delete>
<delete id="deleteBaseAlarmModuleByObjIds" parameterType="String"> <delete id="deleteBaseAlarmModuleByObjIds" parameterType="String">
delete from base_alarm_module where ObjId in delete from base_alarm_module where ObjId in
<foreach item="objId" collection="array" open="(" separator="," close=")"> <foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId} #{objId}
</foreach> </foreach>

Loading…
Cancel
Save