Commit 79c919f9 authored by 赵啸非's avatar 赵啸非

告警内容修改

parent 517e7875
...@@ -154,7 +154,6 @@ PRIMARY KEY (`id`) ...@@ -154,7 +154,6 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备模块使用频率'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备模块使用频率';
-- ---------------------------- -- ----------------------------
-- 设备告警配置表 -- 设备告警配置表
-- ---------------------------- -- ----------------------------
...@@ -165,7 +164,7 @@ CREATE TABLE mortals_xhx_alarm_config( ...@@ -165,7 +164,7 @@ CREATE TABLE mortals_xhx_alarm_config(
`alarmType` tinyint(2) NOT NULL COMMENT '告警类型(0.离线)', `alarmType` tinyint(2) NOT NULL COMMENT '告警类型(0.离线)',
`alarmLevel` tinyint(2) NOT NULL COMMENT '告警级别,(0.危险,1.次要,2.一般)', `alarmLevel` tinyint(2) NOT NULL COMMENT '告警级别,(0.危险,1.次要,2.一般)',
`alarmPusW1ay` tinyint(2) NOT NULL COMMENT '推送方式,(0.不推送,1.短信)', `alarmPusW1ay` tinyint(2) NOT NULL COMMENT '推送方式,(0.不推送,1.短信)',
`isUse` tinyint(2) NOT NULL COMMENT '是否启用(0.不启动,1.启动)', `enabled` tinyint(2) NOT NULL COMMENT '是否启用(0.不启用,1.启用)',
`remark` varchar(2048) COMMENT '备注', `remark` varchar(2048) COMMENT '备注',
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
...@@ -175,6 +174,8 @@ PRIMARY KEY (`id`) ...@@ -175,6 +174,8 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
-- 短信发送记录表 -- 短信发送记录表
-- ---------------------------- -- ----------------------------
......
...@@ -29,13 +29,28 @@ ...@@ -29,13 +29,28 @@
}, },
/** 重写编辑方法 */ /** 重写编辑方法 */
toEdit(row) { toEdit(row) {
this.$refs.dialogform.edit(row); this.$refs.drawerform.edit(row);
}, },
/** 重写查看方法 */ /** 重写查看方法 */
// toView(row) { // toView(row) {
// this.$refs.dialogform.view(row); // this.$refs.dialogform.view(row);
// }, // },
// 操作菜单状态
changeStatus(row, column) {
return (
<device-switch
confirm
url="/alarm/config/save"
row={row}
onChange={this.statusChange}
value={this.tableData.data}
onInput={(data) => {
this.tableData.data = data;
}}
/>
);
},
}, },
data() { data() {
...@@ -46,15 +61,25 @@ ...@@ -46,15 +61,25 @@
columns: [ columns: [
{type: "selection", width: 60}, {type: "selection", width: 60},
{label: "产品", prop: "productId", formatter: this.formatterString}, {label: "序号",type: "index", width: 60},
{label: "告警内容", prop: "alarmType",formatter: this.formatter},
{label: "设备类型", prop: "productId", formatter: this.formatterString},
{label: "告警类型", prop: "alarmType",formatter: this.formatter}, {label: "告警级别", prop: "alarmLevel",formatter: this.formatter},
{label: "推送方式", prop: "alarmPusW1ay",formatter: this.formatter},
{label: "备注", prop: "remark"},
{label: "告警级别,", prop: "alarmLevel",formatter: this.formatter}, {label: "创建时间", prop: "createTime",formatter:this.formatterDate},
{label: "更新时间", prop: "updateTime",formatter:this.formatterDate},
{
prop: "enabled",
label: "启用/停用",
width: 100,
formatter: this.changeStatus,
},
{label: "推送方式,", prop: "alarmPusW1ay",formatter: this.formatter},
{label: "是否启用", prop: "isUse",formatter: this.formatter},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
......
...@@ -33,9 +33,9 @@ public class AlarmConfigEntity extends AlarmConfigVo { ...@@ -33,9 +33,9 @@ public class AlarmConfigEntity extends AlarmConfigVo {
*/ */
private Integer alarmPusW1ay; private Integer alarmPusW1ay;
/** /**
* 是否启用(0.不启动,1.启动) * 是否启用(0.不启用,1.启用)
*/ */
private Integer isUse; private Integer enabled;
/** /**
* 备注 * 备注
*/ */
...@@ -101,18 +101,18 @@ public class AlarmConfigEntity extends AlarmConfigVo { ...@@ -101,18 +101,18 @@ public class AlarmConfigEntity extends AlarmConfigVo {
this.alarmPusW1ay = alarmPusW1ay; this.alarmPusW1ay = alarmPusW1ay;
} }
/** /**
* 获取 是否启用(0.不启动,1.启动) * 获取 是否启用(0.不启用,1.启用)
* @return Integer * @return Integer
*/ */
public Integer getIsUse(){ public Integer getEnabled(){
return isUse; return enabled;
} }
/** /**
* 设置 是否启用(0.不启动,1.启动) * 设置 是否启用(0.不启用,1.启用)
* @param isUse * @param enabled
*/ */
public void setIsUse(Integer isUse){ public void setEnabled(Integer enabled){
this.isUse = isUse; this.enabled = enabled;
} }
/** /**
* 获取 备注 * 获取 备注
...@@ -154,7 +154,7 @@ public class AlarmConfigEntity extends AlarmConfigVo { ...@@ -154,7 +154,7 @@ public class AlarmConfigEntity extends AlarmConfigVo {
sb.append(",alarmType:").append(getAlarmType()); sb.append(",alarmType:").append(getAlarmType());
sb.append(",alarmLevel:").append(getAlarmLevel()); sb.append(",alarmLevel:").append(getAlarmLevel());
sb.append(",alarmPusW1ay:").append(getAlarmPusW1ay()); sb.append(",alarmPusW1ay:").append(getAlarmPusW1ay());
sb.append(",isUse:").append(getIsUse()); sb.append(",enabled:").append(getEnabled());
sb.append(",remark:").append(getRemark()); sb.append(",remark:").append(getRemark());
return sb.toString(); return sb.toString();
} }
...@@ -165,11 +165,11 @@ public class AlarmConfigEntity extends AlarmConfigVo { ...@@ -165,11 +165,11 @@ public class AlarmConfigEntity extends AlarmConfigVo {
this.alarmType = 0; this.alarmType = 0;
this.alarmLevel = null; this.alarmLevel = 2;
this.alarmPusW1ay = 0; this.alarmPusW1ay = 0;
this.isUse = null; this.enabled = 1;
this.remark = ""; this.remark = "";
} }
......
...@@ -69,17 +69,17 @@ public class AlarmConfigQuery extends AlarmConfigEntity { ...@@ -69,17 +69,17 @@ public class AlarmConfigQuery extends AlarmConfigEntity {
/** 推送方式,(0.不推送,1.短信)列表 */ /** 推送方式,(0.不推送,1.短信)列表 */
private List <Integer> alarmPusW1ayList; private List <Integer> alarmPusW1ayList;
/** 开始 是否启用(0.不启动,1.启动) */ /** 开始 是否启用(0.不启用,1.启用) */
private Integer isUseStart; private Integer enabledStart;
/** 结束 是否启用(0.不启动,1.启动) */ /** 结束 是否启用(0.不启用,1.启用) */
private Integer isUseEnd; private Integer enabledEnd;
/** 增加 是否启用(0.不启动,1.启动) */ /** 增加 是否启用(0.不启用,1.启用) */
private Integer isUseIncrement; private Integer enabledIncrement;
/** 是否启用(0.不启动,1.启动)列表 */ /** 是否启用(0.不启用,1.启用)列表 */
private List <Integer> isUseList; private List <Integer> enabledList;
/** 备注 */ /** 备注 */
private List<String> remarkList; private List<String> remarkList;
...@@ -437,67 +437,67 @@ public class AlarmConfigQuery extends AlarmConfigEntity { ...@@ -437,67 +437,67 @@ public class AlarmConfigQuery extends AlarmConfigEntity {
} }
/** /**
* 获取 开始 是否启用(0.不启动,1.启动) * 获取 开始 是否启用(0.不启用,1.启用)
* @return isUseStart * @return enabledStart
*/ */
public Integer getIsUseStart(){ public Integer getEnabledStart(){
return this.isUseStart; return this.enabledStart;
} }
/** /**
* 设置 开始 是否启用(0.不启动,1.启动) * 设置 开始 是否启用(0.不启用,1.启用)
* @param isUseStart * @param enabledStart
*/ */
public void setIsUseStart(Integer isUseStart){ public void setEnabledStart(Integer enabledStart){
this.isUseStart = isUseStart; this.enabledStart = enabledStart;
} }
/** /**
* 获取 结束 是否启用(0.不启动,1.启动) * 获取 结束 是否启用(0.不启用,1.启用)
* @return $isUseEnd * @return $enabledEnd
*/ */
public Integer getIsUseEnd(){ public Integer getEnabledEnd(){
return this.isUseEnd; return this.enabledEnd;
} }
/** /**
* 设置 结束 是否启用(0.不启动,1.启动) * 设置 结束 是否启用(0.不启用,1.启用)
* @param isUseEnd * @param enabledEnd
*/ */
public void setIsUseEnd(Integer isUseEnd){ public void setEnabledEnd(Integer enabledEnd){
this.isUseEnd = isUseEnd; this.enabledEnd = enabledEnd;
} }
/** /**
* 获取 增加 是否启用(0.不启动,1.启动) * 获取 增加 是否启用(0.不启用,1.启用)
* @return isUseIncrement * @return enabledIncrement
*/ */
public Integer getIsUseIncrement(){ public Integer getEnabledIncrement(){
return this.isUseIncrement; return this.enabledIncrement;
} }
/** /**
* 设置 增加 是否启用(0.不启动,1.启动) * 设置 增加 是否启用(0.不启用,1.启用)
* @param isUseIncrement * @param enabledIncrement
*/ */
public void setIsUseIncrement(Integer isUseIncrement){ public void setEnabledIncrement(Integer enabledIncrement){
this.isUseIncrement = isUseIncrement; this.enabledIncrement = enabledIncrement;
} }
/** /**
* 获取 是否启用(0.不启动,1.启动) * 获取 是否启用(0.不启用,1.启用)
* @return isUseList * @return enabledList
*/ */
public List<Integer> getIsUseList(){ public List<Integer> getEnabledList(){
return this.isUseList; return this.enabledList;
} }
/** /**
* 设置 是否启用(0.不启动,1.启动) * 设置 是否启用(0.不启用,1.启用)
* @param isUseList * @param enabledList
*/ */
public void setIsUseList(List<Integer> isUseList){ public void setEnabledList(List<Integer> enabledList){
this.isUseList = isUseList; this.enabledList = enabledList;
} }
/** /**
...@@ -869,47 +869,47 @@ public class AlarmConfigQuery extends AlarmConfigEntity { ...@@ -869,47 +869,47 @@ public class AlarmConfigQuery extends AlarmConfigEntity {
} }
/** /**
* 设置 是否启用(0.不启动,1.启动) * 设置 是否启用(0.不启用,1.启用)
* @param isUse * @param enabled
*/ */
public AlarmConfigQuery isUse(Integer isUse){ public AlarmConfigQuery enabled(Integer enabled){
setIsUse(isUse); setEnabled(enabled);
return this; return this;
} }
/** /**
* 设置 开始 是否启用(0.不启动,1.启动) * 设置 开始 是否启用(0.不启用,1.启用)
* @param isUseStart * @param enabledStart
*/ */
public AlarmConfigQuery isUseStart(Integer isUseStart){ public AlarmConfigQuery enabledStart(Integer enabledStart){
this.isUseStart = isUseStart; this.enabledStart = enabledStart;
return this; return this;
} }
/** /**
* 设置 结束 是否启用(0.不启动,1.启动) * 设置 结束 是否启用(0.不启用,1.启用)
* @param isUseEnd * @param enabledEnd
*/ */
public AlarmConfigQuery isUseEnd(Integer isUseEnd){ public AlarmConfigQuery enabledEnd(Integer enabledEnd){
this.isUseEnd = isUseEnd; this.enabledEnd = enabledEnd;
return this; return this;
} }
/** /**
* 设置 增加 是否启用(0.不启动,1.启动) * 设置 增加 是否启用(0.不启用,1.启用)
* @param isUseIncrement * @param enabledIncrement
*/ */
public AlarmConfigQuery isUseIncrement(Integer isUseIncrement){ public AlarmConfigQuery enabledIncrement(Integer enabledIncrement){
this.isUseIncrement = isUseIncrement; this.enabledIncrement = enabledIncrement;
return this; return this;
} }
/** /**
* 设置 是否启用(0.不启动,1.启动) * 设置 是否启用(0.不启用,1.启用)
* @param isUseList * @param enabledList
*/ */
public AlarmConfigQuery isUseList(List<Integer> isUseList){ public AlarmConfigQuery enabledList(List<Integer> enabledList){
this.isUseList = isUseList; this.enabledList = enabledList;
return this; return this;
} }
......
package com.mortals.xhx.module.alarm.service.impl; package com.mortals.xhx.module.alarm.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.alarm.model.AlarmConfigQuery;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.alarm.dao.AlarmConfigDao; import com.mortals.xhx.module.alarm.dao.AlarmConfigDao;
import com.mortals.xhx.module.alarm.model.AlarmConfigEntity; import com.mortals.xhx.module.alarm.model.AlarmConfigEntity;
import com.mortals.xhx.module.alarm.service.AlarmConfigService; import com.mortals.xhx.module.alarm.service.AlarmConfigService;
import org.springframework.util.ObjectUtils;
/** /**
* AlarmConfigService * AlarmConfigService
* 设备告警配置 service实现 * 设备告警配置 service实现
...@@ -13,5 +18,25 @@ import com.mortals.xhx.module.alarm.service.AlarmConfigService; ...@@ -13,5 +18,25 @@ import com.mortals.xhx.module.alarm.service.AlarmConfigService;
*/ */
@Service("alarmConfigService") @Service("alarmConfigService")
public class AlarmConfigServiceImpl extends AbstractCRUDServiceImpl<AlarmConfigDao, AlarmConfigEntity, Long> implements AlarmConfigService { public class AlarmConfigServiceImpl extends AbstractCRUDServiceImpl<AlarmConfigDao, AlarmConfigEntity, Long> implements AlarmConfigService {
@Override
protected void saveBefore(AlarmConfigEntity entity, Context context) throws AppException {
//校验产品是否已经存在配置
AlarmConfigEntity alarmConfigEntity = this.selectOne(new AlarmConfigQuery().productId(entity.getProductId()));
if(!ObjectUtils.isEmpty(alarmConfigEntity)){
throw new AppException("当前产品已存在告警配置!");
}
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(AlarmConfigEntity entity, Context context) throws AppException {
//校验
AlarmConfigEntity alarmConfigEntity = this.selectOne(new AlarmConfigQuery().productId(entity.getProductId()));
if(!ObjectUtils.isEmpty(alarmConfigEntity)&&entity.getId()!=alarmConfigEntity.getId()){
entity.setId(alarmConfigEntity.getId());
}
super.updateBefore(entity, context);
}
} }
\ No newline at end of file
...@@ -39,8 +39,7 @@ public class AlarmConfigController extends BaseCRUDJsonBodyMappingController<Ala ...@@ -39,8 +39,7 @@ public class AlarmConfigController extends BaseCRUDJsonBodyMappingController<Ala
this.addDict(model, "alarmType", paramService.getParamBySecondOrganize("AlarmConfig","alarmType")); this.addDict(model, "alarmType", paramService.getParamBySecondOrganize("AlarmConfig","alarmType"));
this.addDict(model, "alarmLevel", paramService.getParamBySecondOrganize("AlarmConfig","alarmLevel")); this.addDict(model, "alarmLevel", paramService.getParamBySecondOrganize("AlarmConfig","alarmLevel"));
this.addDict(model, "alarmPusW1ay", paramService.getParamBySecondOrganize("AlarmConfig","alarmPusW1ay")); this.addDict(model, "alarmPusW1ay", paramService.getParamBySecondOrganize("AlarmConfig","alarmPusW1ay"));
this.addDict(model, "isUse", paramService.getParamBySecondOrganize("AlarmConfig","isUse")); this.addDict(model, "enabled", paramService.getParamBySecondOrganize("AlarmConfig","isUse"));
this.addDict(model, "productId", productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName()))); this.addDict(model, "productId", productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())));
super.init(model, context); super.init(model, context);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<result property="alarmType" column="alarmType" /> <result property="alarmType" column="alarmType" />
<result property="alarmLevel" column="alarmLevel" /> <result property="alarmLevel" column="alarmLevel" />
<result property="alarmPusW1ay" column="alarmPusW1ay" /> <result property="alarmPusW1ay" column="alarmPusW1ay" />
<result property="isUse" column="isUse" /> <result property="enabled" column="enabled" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('alarmPusW1ay') or colPickMode == 1 and data.containsKey('alarmPusW1ay')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('alarmPusW1ay') or colPickMode == 1 and data.containsKey('alarmPusW1ay')))">
a.alarmPusW1ay, a.alarmPusW1ay,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isUse') or colPickMode == 1 and data.containsKey('isUse')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('enabled') or colPickMode == 1 and data.containsKey('enabled')))">
a.isUse, a.enabled,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark, a.remark,
...@@ -57,18 +57,18 @@ ...@@ -57,18 +57,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AlarmConfigEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="AlarmConfigEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_alarm_config insert into mortals_xhx_alarm_config
(productId,alarmType,alarmLevel,alarmPusW1ay,isUse,remark,createTime,updateUserId,updateTime) (productId,alarmType,alarmLevel,alarmPusW1ay,enabled,remark,createTime,updateUserId,updateTime)
VALUES VALUES
(#{productId},#{alarmType},#{alarmLevel},#{alarmPusW1ay},#{isUse},#{remark},#{createTime},#{updateUserId},#{updateTime}) (#{productId},#{alarmType},#{alarmLevel},#{alarmPusW1ay},#{enabled},#{remark},#{createTime},#{updateUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_alarm_config insert into mortals_xhx_alarm_config
(productId,alarmType,alarmLevel,alarmPusW1ay,isUse,remark,createTime,updateUserId,updateTime) (productId,alarmType,alarmLevel,alarmPusW1ay,enabled,remark,createTime,updateUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productId},#{item.alarmType},#{item.alarmLevel},#{item.alarmPusW1ay},#{item.isUse},#{item.remark},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.productId},#{item.alarmType},#{item.alarmLevel},#{item.alarmPusW1ay},#{item.enabled},#{item.remark},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -102,11 +102,11 @@ ...@@ -102,11 +102,11 @@
<if test="(colPickMode==0 and data.containsKey('alarmPusW1ayIncrement')) or (colPickMode==1 and !data.containsKey('alarmPusW1ayIncrement'))"> <if test="(colPickMode==0 and data.containsKey('alarmPusW1ayIncrement')) or (colPickMode==1 and !data.containsKey('alarmPusW1ayIncrement'))">
a.alarmPusW1ay=ifnull(a.alarmPusW1ay,0) + #{data.alarmPusW1ayIncrement}, a.alarmPusW1ay=ifnull(a.alarmPusW1ay,0) + #{data.alarmPusW1ayIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('isUse')) or (colPickMode==1 and !data.containsKey('isUse'))"> <if test="(colPickMode==0 and data.containsKey('enabled')) or (colPickMode==1 and !data.containsKey('enabled'))">
a.isUse=#{data.isUse}, a.enabled=#{data.enabled},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('isUseIncrement')) or (colPickMode==1 and !data.containsKey('isUseIncrement'))"> <if test="(colPickMode==0 and data.containsKey('enabledIncrement')) or (colPickMode==1 and !data.containsKey('enabledIncrement'))">
a.isUse=ifnull(a.isUse,0) + #{data.isUseIncrement}, a.enabled=ifnull(a.enabled,0) + #{data.enabledIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))"> <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark}, a.remark=#{data.remark},
...@@ -183,14 +183,14 @@ ...@@ -183,14 +183,14 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="isUse=(case" suffix="ELSE isUse end),"> <trim prefix="enabled=(case" suffix="ELSE enabled end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('isUse')) or (colPickMode==1 and !item.containsKey('isUse'))"> <when test="(colPickMode==0 and item.containsKey('enabled')) or (colPickMode==1 and !item.containsKey('enabled'))">
when a.id=#{item.id} then #{item.isUse} when a.id=#{item.id} then #{item.enabled}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('isUseIncrement')) or (colPickMode==1 and !item.containsKey('isUseIncrement'))"> <when test="(colPickMode==0 and item.containsKey('enabledIncrement')) or (colPickMode==1 and !item.containsKey('enabledIncrement'))">
when a.id=#{item.id} then ifnull(a.isUse,0) + #{item.isUseIncrement} when a.id=#{item.id} then ifnull(a.enabled,0) + #{item.enabledIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -434,25 +434,25 @@ ...@@ -434,25 +434,25 @@
${_conditionType_} a.alarmPusW1ay <![CDATA[ <= ]]> #{${_conditionParam_}.alarmPusW1ayEnd} ${_conditionType_} a.alarmPusW1ay <![CDATA[ <= ]]> #{${_conditionParam_}.alarmPusW1ayEnd}
</if> </if>
<if test="conditionParamRef.containsKey('isUse')"> <if test="conditionParamRef.containsKey('enabled')">
<if test="conditionParamRef.isUse != null "> <if test="conditionParamRef.enabled != null ">
${_conditionType_} a.isUse = #{${_conditionParam_}.isUse} ${_conditionType_} a.enabled = #{${_conditionParam_}.enabled}
</if> </if>
<if test="conditionParamRef.isUse == null"> <if test="conditionParamRef.enabled == null">
${_conditionType_} a.isUse is null ${_conditionType_} a.enabled is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('isUseList')"> <if test="conditionParamRef.containsKey('enabledList')">
${_conditionType_} a.isUse in ${_conditionType_} a.enabled in
<foreach collection="conditionParamRef.isUseList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.enabledList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('isUseStart') and conditionParamRef.isUseStart != null"> <if test="conditionParamRef.containsKey('enabledStart') and conditionParamRef.enabledStart != null">
${_conditionType_} a.isUse <![CDATA[ >= ]]> #{${_conditionParam_}.isUseStart} ${_conditionType_} a.enabled <![CDATA[ >= ]]> #{${_conditionParam_}.enabledStart}
</if> </if>
<if test="conditionParamRef.containsKey('isUseEnd') and conditionParamRef.isUseEnd != null"> <if test="conditionParamRef.containsKey('enabledEnd') and conditionParamRef.enabledEnd != null">
${_conditionType_} a.isUse <![CDATA[ <= ]]> #{${_conditionParam_}.isUseEnd} ${_conditionType_} a.enabled <![CDATA[ <= ]]> #{${_conditionParam_}.enabledEnd}
</if> </if>
...@@ -559,9 +559,9 @@ ...@@ -559,9 +559,9 @@
<if test='orderCol.alarmPusW1ay != null and "DESC".equalsIgnoreCase(orderCol.alarmPusW1ay)'>DESC</if> <if test='orderCol.alarmPusW1ay != null and "DESC".equalsIgnoreCase(orderCol.alarmPusW1ay)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('isUse')"> <if test="orderCol.containsKey('enabled')">
a.isUse a.enabled
<if test='orderCol.isUse != null and "DESC".equalsIgnoreCase(orderCol.isUse)'>DESC</if> <if test='orderCol.enabled != null and "DESC".equalsIgnoreCase(orderCol.enabled)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('remark')"> <if test="orderCol.containsKey('remark')">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment