From 0c66b0d39e554865920dfe6e3b4bd0185e2170bb Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 10 Jul 2024 14:40:51 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=AE=A1=E9=87=8F=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=98=88=E5=80=BC=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmsBaseMonitorThresholdController.java | 100 ++++++ .../base/domain/EmsBaseMonitorThreshold.java | 326 ++++++++++++++++++ .../mapper/EmsBaseMonitorThresholdMapper.java | 61 ++++ .../IEmsBaseMonitorThresholdService.java | 61 ++++ .../EmsBaseMonitorThresholdServiceImpl.java | 112 ++++++ .../base/EmsBaseMonitorThresholdMapper.xml | 175 ++++++++++ 6 files changed, 835 insertions(+) create mode 100644 os-ems/src/main/java/com/os/ems/base/controller/EmsBaseMonitorThresholdController.java create mode 100644 os-ems/src/main/java/com/os/ems/base/domain/EmsBaseMonitorThreshold.java create mode 100644 os-ems/src/main/java/com/os/ems/base/mapper/EmsBaseMonitorThresholdMapper.java create mode 100644 os-ems/src/main/java/com/os/ems/base/service/IEmsBaseMonitorThresholdService.java create mode 100644 os-ems/src/main/java/com/os/ems/base/service/impl/EmsBaseMonitorThresholdServiceImpl.java create mode 100644 os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorThresholdMapper.xml diff --git a/os-ems/src/main/java/com/os/ems/base/controller/EmsBaseMonitorThresholdController.java b/os-ems/src/main/java/com/os/ems/base/controller/EmsBaseMonitorThresholdController.java new file mode 100644 index 0000000..cbb396b --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/base/controller/EmsBaseMonitorThresholdController.java @@ -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 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 list = emsBaseMonitorThresholdService.selectEmsBaseMonitorThresholdList(emsBaseMonitorThreshold); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/os-ems/src/main/java/com/os/ems/base/domain/EmsBaseMonitorThreshold.java b/os-ems/src/main/java/com/os/ems/base/domain/EmsBaseMonitorThreshold.java new file mode 100644 index 0000000..d037e9f --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/base/domain/EmsBaseMonitorThreshold.java @@ -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(); + } +} diff --git a/os-ems/src/main/java/com/os/ems/base/mapper/EmsBaseMonitorThresholdMapper.java b/os-ems/src/main/java/com/os/ems/base/mapper/EmsBaseMonitorThresholdMapper.java new file mode 100644 index 0000000..9bd8be5 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/base/mapper/EmsBaseMonitorThresholdMapper.java @@ -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 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); +} diff --git a/os-ems/src/main/java/com/os/ems/base/service/IEmsBaseMonitorThresholdService.java b/os-ems/src/main/java/com/os/ems/base/service/IEmsBaseMonitorThresholdService.java new file mode 100644 index 0000000..635f1b5 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/base/service/IEmsBaseMonitorThresholdService.java @@ -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 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); +} diff --git a/os-ems/src/main/java/com/os/ems/base/service/impl/EmsBaseMonitorThresholdServiceImpl.java b/os-ems/src/main/java/com/os/ems/base/service/impl/EmsBaseMonitorThresholdServiceImpl.java new file mode 100644 index 0000000..f19bd2f --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/base/service/impl/EmsBaseMonitorThresholdServiceImpl.java @@ -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 selectEmsBaseMonitorThresholdList(EmsBaseMonitorThreshold emsBaseMonitorThreshold) { + List monitorThresholds = emsBaseMonitorThresholdMapper.selectEmsBaseMonitorThresholdList(emsBaseMonitorThreshold); + + if (monitorThresholds.size() == 0 && StringUtils.isNotEmpty(emsBaseMonitorThreshold.getMonitorCode())){ + EmsBaseMonitorInfo monitorInfo = new EmsBaseMonitorInfo(); + monitorInfo.setMonitorCode(emsBaseMonitorThreshold.getMonitorCode()); + List 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); + } +} diff --git a/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorThresholdMapper.xml b/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorThresholdMapper.xml new file mode 100644 index 0000000..85dcc5d --- /dev/null +++ b/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorThresholdMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into ems_base_monitor_threshold + + monitor_code, + monitor_type, + i_a_max, + i_a_min, + i_b_max, + i_b_min, + i_c_max, + i_c_min, + v_a_max, + v_a_min, + v_b_max, + v_b_min, + v_c_max, + v_c_min, + hour_consumption, + day_consumption, + line_loss_rate, + is_flag, + create_by, + create_time, + update_by, + update_time, + + + #{monitorCode}, + #{monitorType}, + #{iAMax}, + #{iAMin}, + #{iBMax}, + #{iBMin}, + #{iCMax}, + #{iCMin}, + #{vAMax}, + #{vAMin}, + #{vBMax}, + #{vBMin}, + #{vCMax}, + #{vCMin}, + #{hourConsumption}, + #{dayConsumption}, + #{lineLossRate}, + #{isFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update ems_base_monitor_threshold + + monitor_code = #{monitorCode}, + monitor_type = #{monitorType}, + i_a_max = #{iAMax}, + i_a_min = #{iAMin}, + i_b_max = #{iBMax}, + i_b_min = #{iBMin}, + i_c_max = #{iCMax}, + i_c_min = #{iCMin}, + v_a_max = #{vAMax}, + v_a_min = #{vAMin}, + v_b_max = #{vBMax}, + v_b_min = #{vBMin}, + v_c_max = #{vCMax}, + v_c_min = #{vCMin}, + hour_consumption = #{hourConsumption}, + day_consumption = #{dayConsumption}, + line_loss_rate = #{lineLossRate}, + is_flag = #{isFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where obj_id = #{objId} + + + + delete + from ems_base_monitor_threshold + where obj_id = #{objId} + + + + delete from ems_base_monitor_threshold where obj_id in + + #{objId} + + + \ No newline at end of file