change - 计量设备阈值维护

main
yinq 4 months ago
parent b704541bf3
commit 0c66b0d39e

@ -0,0 +1,100 @@
package com.os.ems.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.os.common.annotation.Log;
import com.os.common.core.controller.BaseController;
import com.os.common.core.domain.AjaxResult;
import com.os.common.enums.BusinessType;
import com.os.ems.base.domain.EmsBaseMonitorThreshold;
import com.os.ems.base.service.IEmsBaseMonitorThresholdService;
import com.os.common.utils.poi.ExcelUtil;
import com.os.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-07-09
*/
@RestController
@RequestMapping("/ems/base/baseMonitorThreshold")
public class EmsBaseMonitorThresholdController extends BaseController {
@Autowired
private IEmsBaseMonitorThresholdService emsBaseMonitorThresholdService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:list')")
@GetMapping("/list")
public TableDataInfo list(EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
startPage();
List<EmsBaseMonitorThreshold> list = emsBaseMonitorThresholdService.selectEmsBaseMonitorThresholdList(emsBaseMonitorThreshold);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:export')")
@Log(title = "计量设备阈值维护", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
List<EmsBaseMonitorThreshold> list = emsBaseMonitorThresholdService.selectEmsBaseMonitorThresholdList(emsBaseMonitorThreshold);
ExcelUtil<EmsBaseMonitorThreshold> util = new ExcelUtil<EmsBaseMonitorThreshold>(EmsBaseMonitorThreshold.class);
util.exportExcel(response, list, "计量设备阈值维护数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:query')")
@GetMapping(value = "/{objId}")
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
return success(emsBaseMonitorThresholdService.selectEmsBaseMonitorThresholdByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:add')")
@Log(title = "计量设备阈值维护", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
emsBaseMonitorThreshold.setCreateBy(getUsername());
return toAjax(emsBaseMonitorThresholdService.insertEmsBaseMonitorThreshold(emsBaseMonitorThreshold));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:edit')")
@Log(title = "计量设备阈值维护", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
emsBaseMonitorThreshold.setUpdateBy(getUsername());
return toAjax(emsBaseMonitorThresholdService.updateEmsBaseMonitorThreshold(emsBaseMonitorThreshold));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('ems/base:baseMonitorThreshold:remove')")
@Log(title = "计量设备阈值维护", businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}")
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(emsBaseMonitorThresholdService.deleteEmsBaseMonitorThresholdByObjIds(objIds));
}
}

@ -0,0 +1,326 @@
package com.os.ems.base.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
import com.os.common.core.domain.BaseEntity;
/**
* ems_base_monitor_threshold
*
* @author Yinq
* @date 2024-07-09
*/
public class EmsBaseMonitorThreshold extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "计量设备编号")
private String monitorCode;
/**
*
*/
@Excel(name = "计量设备名称")
private String monitorName;
/**
*
*/
@Excel(name = "计量设备类型")
private Long monitorType;
/**
* A
*/
@Excel(name = "A相电流最大值")
private BigDecimal iAMax;
/**
* A
*/
@Excel(name = "A相电流最小值")
private BigDecimal iAMin;
/**
* B
*/
@Excel(name = "B相电流最大值")
private BigDecimal iBMax;
/**
* B
*/
@Excel(name = "B相电流最小值")
private BigDecimal iBMin;
/**
* C
*/
@Excel(name = "C相电流最大值")
private BigDecimal iCMax;
/**
* C
*/
@Excel(name = "C相电流最小值")
private BigDecimal iCMin;
/**
* A
*/
@Excel(name = "A相电压最大值")
private BigDecimal vAMax;
/**
* A
*/
@Excel(name = "A相电压最小值")
private BigDecimal vAMin;
/**
* B
*/
@Excel(name = "B相电压最大值")
private BigDecimal vBMax;
/**
* B
*/
@Excel(name = "B相电压最小值")
private BigDecimal vBMin;
/**
* C
*/
@Excel(name = "C相电压最大值")
private BigDecimal vCMax;
/**
* C
*/
@Excel(name = "C相电压最小值")
private BigDecimal vCMin;
/**
*
*/
@Excel(name = "小时耗量")
private BigDecimal hourConsumption;
/**
*
*/
@Excel(name = "天耗量")
private BigDecimal dayConsumption;
/**
* 线(%)
*/
@Excel(name = "线损率(%)")
private BigDecimal lineLossRate;
/**
*
*/
@Excel(name = "启用标识")
private String isFlag;
public String getMonitorName() {
return monitorName;
}
public void setMonitorName(String monitorName) {
this.monitorName = monitorName;
}
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setMonitorCode(String monitorCode) {
this.monitorCode = monitorCode;
}
public String getMonitorCode() {
return monitorCode;
}
public void setMonitorType(Long monitorType) {
this.monitorType = monitorType;
}
public Long getMonitorType() {
return monitorType;
}
public void setiAMax(BigDecimal iAMax) {
this.iAMax = iAMax;
}
public BigDecimal getiAMax() {
return iAMax;
}
public void setiAMin(BigDecimal iAMin) {
this.iAMin = iAMin;
}
public BigDecimal getiAMin() {
return iAMin;
}
public void setiBMax(BigDecimal iBMax) {
this.iBMax = iBMax;
}
public BigDecimal getiBMax() {
return iBMax;
}
public void setiBMin(BigDecimal iBMin) {
this.iBMin = iBMin;
}
public BigDecimal getiBMin() {
return iBMin;
}
public void setiCMax(BigDecimal iCMax) {
this.iCMax = iCMax;
}
public BigDecimal getiCMax() {
return iCMax;
}
public void setiCMin(BigDecimal iCMin) {
this.iCMin = iCMin;
}
public BigDecimal getiCMin() {
return iCMin;
}
public void setvAMax(BigDecimal vAMax) {
this.vAMax = vAMax;
}
public BigDecimal getvAMax() {
return vAMax;
}
public void setvAMin(BigDecimal vAMin) {
this.vAMin = vAMin;
}
public BigDecimal getvAMin() {
return vAMin;
}
public void setvBMax(BigDecimal vBMax) {
this.vBMax = vBMax;
}
public BigDecimal getvBMax() {
return vBMax;
}
public void setvBMin(BigDecimal vBMin) {
this.vBMin = vBMin;
}
public BigDecimal getvBMin() {
return vBMin;
}
public void setvCMax(BigDecimal vCMax) {
this.vCMax = vCMax;
}
public BigDecimal getvCMax() {
return vCMax;
}
public void setvCMin(BigDecimal vCMin) {
this.vCMin = vCMin;
}
public BigDecimal getvCMin() {
return vCMin;
}
public void setHourConsumption(BigDecimal hourConsumption) {
this.hourConsumption = hourConsumption;
}
public BigDecimal getHourConsumption() {
return hourConsumption;
}
public void setDayConsumption(BigDecimal dayConsumption) {
this.dayConsumption = dayConsumption;
}
public BigDecimal getDayConsumption() {
return dayConsumption;
}
public void setLineLossRate(BigDecimal lineLossRate) {
this.lineLossRate = lineLossRate;
}
public BigDecimal getLineLossRate() {
return lineLossRate;
}
public void setIsFlag(String isFlag) {
this.isFlag = isFlag;
}
public String getIsFlag() {
return isFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("monitorCode", getMonitorCode())
.append("monitorType", getMonitorType())
.append("iAMax", getiAMax())
.append("iAMin", getiAMin())
.append("iBMax", getiBMax())
.append("iBMin", getiBMin())
.append("iCMax", getiCMax())
.append("iCMin", getiCMin())
.append("vAMax", getvAMax())
.append("vAMin", getvAMin())
.append("vBMax", getvBMax())
.append("vBMin", getvBMin())
.append("vCMax", getvCMax())
.append("vCMin", getvCMin())
.append("hourConsumption", getHourConsumption())
.append("dayConsumption", getDayConsumption())
.append("lineLossRate", getLineLossRate())
.append("isFlag", getIsFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,61 @@
package com.os.ems.base.mapper;
import java.util.List;
import com.os.ems.base.domain.EmsBaseMonitorThreshold;
/**
* Mapper
*
* @author Yinq
* @date 2024-07-09
*/
public interface EmsBaseMonitorThresholdMapper {
/**
*
*
* @param objId
* @return
*/
public EmsBaseMonitorThreshold selectEmsBaseMonitorThresholdByObjId(Long objId);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public List<EmsBaseMonitorThreshold> selectEmsBaseMonitorThresholdList(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public int insertEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public int updateEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param objId
* @return
*/
public int deleteEmsBaseMonitorThresholdByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteEmsBaseMonitorThresholdByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.os.ems.base.service;
import java.util.List;
import com.os.ems.base.domain.EmsBaseMonitorThreshold;
/**
* Service
*
* @author Yinq
* @date 2024-07-09
*/
public interface IEmsBaseMonitorThresholdService {
/**
*
*
* @param objId
* @return
*/
public EmsBaseMonitorThreshold selectEmsBaseMonitorThresholdByObjId(Long objId);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public List<EmsBaseMonitorThreshold> selectEmsBaseMonitorThresholdList(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public int insertEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
public int updateEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold);
/**
*
*
* @param objIds
* @return
*/
public int deleteEmsBaseMonitorThresholdByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteEmsBaseMonitorThresholdByObjId(Long objId);
}

@ -0,0 +1,112 @@
package com.os.ems.base.service.impl;
import java.util.List;
import com.os.common.utils.DateUtils;
import com.os.common.utils.SecurityUtils;
import com.os.common.utils.StringUtils;
import com.os.ems.base.domain.EmsBaseMonitorInfo;
import com.os.ems.base.mapper.EmsBaseMonitorInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.os.ems.base.mapper.EmsBaseMonitorThresholdMapper;
import com.os.ems.base.domain.EmsBaseMonitorThreshold;
import com.os.ems.base.service.IEmsBaseMonitorThresholdService;
/**
* Service
*
* @author Yinq
* @date 2024-07-09
*/
@Service
public class EmsBaseMonitorThresholdServiceImpl implements IEmsBaseMonitorThresholdService {
@Autowired
private EmsBaseMonitorThresholdMapper emsBaseMonitorThresholdMapper;
@Autowired
private EmsBaseMonitorInfoMapper emsBaseMonitorInfoMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public EmsBaseMonitorThreshold selectEmsBaseMonitorThresholdByObjId(Long objId) {
return emsBaseMonitorThresholdMapper.selectEmsBaseMonitorThresholdByObjId(objId);
}
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
@Override
public List<EmsBaseMonitorThreshold> selectEmsBaseMonitorThresholdList(EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
List<EmsBaseMonitorThreshold> monitorThresholds = emsBaseMonitorThresholdMapper.selectEmsBaseMonitorThresholdList(emsBaseMonitorThreshold);
if (monitorThresholds.size() == 0 && StringUtils.isNotEmpty(emsBaseMonitorThreshold.getMonitorCode())){
EmsBaseMonitorInfo monitorInfo = new EmsBaseMonitorInfo();
monitorInfo.setMonitorCode(emsBaseMonitorThreshold.getMonitorCode());
List<EmsBaseMonitorInfo> monitorInfoList = emsBaseMonitorInfoMapper.selectEmsBaseMonitorInfoList(monitorInfo);
if (monitorInfoList.size() > 0) {
EmsBaseMonitorInfo emsBaseMonitorInfo = monitorInfoList.get(0);
emsBaseMonitorThreshold.setCreateBy(SecurityUtils.getUsername());
emsBaseMonitorThreshold.setMonitorType(emsBaseMonitorInfo.getMonitorType());
emsBaseMonitorThreshold.setMonitorName(emsBaseMonitorInfo.getMonitorName());
this.insertEmsBaseMonitorThreshold(emsBaseMonitorThreshold);
monitorThresholds.add(emsBaseMonitorThreshold);
}
}
return monitorThresholds;
}
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
@Override
public int insertEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
emsBaseMonitorThreshold.setCreateTime(DateUtils.getNowDate());
return emsBaseMonitorThresholdMapper.insertEmsBaseMonitorThreshold(emsBaseMonitorThreshold);
}
/**
*
*
* @param emsBaseMonitorThreshold
* @return
*/
@Override
public int updateEmsBaseMonitorThreshold(EmsBaseMonitorThreshold emsBaseMonitorThreshold) {
emsBaseMonitorThreshold.setUpdateTime(DateUtils.getNowDate());
return emsBaseMonitorThresholdMapper.updateEmsBaseMonitorThreshold(emsBaseMonitorThreshold);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteEmsBaseMonitorThresholdByObjIds(Long[] objIds) {
return emsBaseMonitorThresholdMapper.deleteEmsBaseMonitorThresholdByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteEmsBaseMonitorThresholdByObjId(Long objId) {
return emsBaseMonitorThresholdMapper.deleteEmsBaseMonitorThresholdByObjId(objId);
}
}

@ -0,0 +1,175 @@
<?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.os.ems.base.mapper.EmsBaseMonitorThresholdMapper">
<resultMap type="EmsBaseMonitorThreshold" id="EmsBaseMonitorThresholdResult">
<result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code"/>
<result property="monitorType" column="monitor_type"/>
<result property="iAMax" column="i_a_max"/>
<result property="iAMin" column="i_a_min"/>
<result property="iBMax" column="i_b_max"/>
<result property="iBMin" column="i_b_min"/>
<result property="iCMax" column="i_c_max"/>
<result property="iCMin" column="i_c_min"/>
<result property="vAMax" column="v_a_max"/>
<result property="vAMin" column="v_a_min"/>
<result property="vBMax" column="v_b_max"/>
<result property="vBMin" column="v_b_min"/>
<result property="vCMax" column="v_c_max"/>
<result property="vCMin" column="v_c_min"/>
<result property="hourConsumption" column="hour_consumption"/>
<result property="dayConsumption" column="day_consumption"/>
<result property="lineLossRate" column="line_loss_rate"/>
<result property="isFlag" column="is_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="monitorName" column="monitor_name"/>
</resultMap>
<sql id="selectEmsBaseMonitorThresholdVo">
select ebmt.obj_id,
ebmt.monitor_code,
ebmi.monitor_name,
ebmt.monitor_type,
ebmt.i_a_max,
ebmt.i_a_min,
ebmt.i_b_max,
ebmt.i_b_min,
ebmt.i_c_max,
ebmt.i_c_min,
ebmt.v_a_max,
ebmt.v_a_min,
ebmt.v_b_max,
ebmt.v_b_min,
ebmt.v_c_max,
ebmt.v_c_min,
ebmt.hour_consumption,
ebmt.day_consumption,
ebmt.line_loss_rate,
ebmt.is_flag,
ebmt.create_by,
ebmt.create_time,
ebmt.update_by,
ebmt.update_time
from ems_base_monitor_threshold ebmt
left join ems_base_monitor_info ebmi on ebmi.monitor_code = ebmt.monitor_code
</sql>
<select id="selectEmsBaseMonitorThresholdList" parameterType="EmsBaseMonitorThreshold"
resultMap="EmsBaseMonitorThresholdResult">
<include refid="selectEmsBaseMonitorThresholdVo"/>
<where>
<if test="monitorCode != null and monitorCode != ''">and ebmt.monitor_code = #{monitorCode}</if>
<if test="monitorType != null ">and ebmt.monitor_type = #{monitorType}</if>
<if test="hourConsumption != null ">and ebmt.hour_consumption = #{hourConsumption}</if>
<if test="dayConsumption != null ">and ebmt.day_consumption = #{dayConsumption}</if>
<if test="lineLossRate != null ">and ebmt.line_loss_rate = #{lineLossRate}</if>
<if test="isFlag != null and isFlag != ''">and ebmt.is_flag = #{isFlag}</if>
</where>
</select>
<select id="selectEmsBaseMonitorThresholdByObjId" parameterType="Long" resultMap="EmsBaseMonitorThresholdResult">
<include refid="selectEmsBaseMonitorThresholdVo"/>
where ebmt.obj_id = #{objId}
</select>
<insert id="insertEmsBaseMonitorThreshold" parameterType="EmsBaseMonitorThreshold" useGeneratedKeys="true"
keyProperty="objId">
insert into ems_base_monitor_threshold
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="monitorCode != null and monitorCode != ''">monitor_code,</if>
<if test="monitorType != null">monitor_type,</if>
<if test="iAMax != null">i_a_max,</if>
<if test="iAMin != null">i_a_min,</if>
<if test="iBMax != null">i_b_max,</if>
<if test="iBMin != null">i_b_min,</if>
<if test="iCMax != null">i_c_max,</if>
<if test="iCMin != null">i_c_min,</if>
<if test="vAMax != null">v_a_max,</if>
<if test="vAMin != null">v_a_min,</if>
<if test="vBMax != null">v_b_max,</if>
<if test="vBMin != null">v_b_min,</if>
<if test="vCMax != null">v_c_max,</if>
<if test="vCMin != null">v_c_min,</if>
<if test="hourConsumption != null">hour_consumption,</if>
<if test="dayConsumption != null">day_consumption,</if>
<if test="lineLossRate != null">line_loss_rate,</if>
<if test="isFlag != null">is_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="monitorCode != null and monitorCode != ''">#{monitorCode},</if>
<if test="monitorType != null">#{monitorType},</if>
<if test="iAMax != null">#{iAMax},</if>
<if test="iAMin != null">#{iAMin},</if>
<if test="iBMax != null">#{iBMax},</if>
<if test="iBMin != null">#{iBMin},</if>
<if test="iCMax != null">#{iCMax},</if>
<if test="iCMin != null">#{iCMin},</if>
<if test="vAMax != null">#{vAMax},</if>
<if test="vAMin != null">#{vAMin},</if>
<if test="vBMax != null">#{vBMax},</if>
<if test="vBMin != null">#{vBMin},</if>
<if test="vCMax != null">#{vCMax},</if>
<if test="vCMin != null">#{vCMin},</if>
<if test="hourConsumption != null">#{hourConsumption},</if>
<if test="dayConsumption != null">#{dayConsumption},</if>
<if test="lineLossRate != null">#{lineLossRate},</if>
<if test="isFlag != null">#{isFlag},</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="updateEmsBaseMonitorThreshold" parameterType="EmsBaseMonitorThreshold">
update ems_base_monitor_threshold
<trim prefix="SET" suffixOverrides=",">
<if test="monitorCode != null and monitorCode != ''">monitor_code = #{monitorCode},</if>
<if test="monitorType != null">monitor_type = #{monitorType},</if>
<if test="iAMax != null">i_a_max = #{iAMax},</if>
<if test="iAMin != null">i_a_min = #{iAMin},</if>
<if test="iBMax != null">i_b_max = #{iBMax},</if>
<if test="iBMin != null">i_b_min = #{iBMin},</if>
<if test="iCMax != null">i_c_max = #{iCMax},</if>
<if test="iCMin != null">i_c_min = #{iCMin},</if>
<if test="vAMax != null">v_a_max = #{vAMax},</if>
<if test="vAMin != null">v_a_min = #{vAMin},</if>
<if test="vBMax != null">v_b_max = #{vBMax},</if>
<if test="vBMin != null">v_b_min = #{vBMin},</if>
<if test="vCMax != null">v_c_max = #{vCMax},</if>
<if test="vCMin != null">v_c_min = #{vCMin},</if>
<if test="hourConsumption != null">hour_consumption = #{hourConsumption},</if>
<if test="dayConsumption != null">day_consumption = #{dayConsumption},</if>
<if test="lineLossRate != null">line_loss_rate = #{lineLossRate},</if>
<if test="isFlag != null">is_flag = #{isFlag},</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 obj_id = #{objId}
</update>
<delete id="deleteEmsBaseMonitorThresholdByObjId" parameterType="Long">
delete
from ems_base_monitor_threshold
where obj_id = #{objId}
</delete>
<delete id="deleteEmsBaseMonitorThresholdByObjIds" parameterType="String">
delete from ems_base_monitor_threshold where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save