From 6e029826e4dcd9e72bfff473e9edcdd7e4319e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E9=9B=AA=E4=BC=9F?= Date: Fri, 22 Nov 2024 09:08:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E6=BA=90=E7=AE=A1=E7=90=86=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=9B=B2=E7=BA=BF=E7=9A=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/ems/base/domain/BaseMonitorInfo.java | 5 +++ .../ems/base/domain/EmsBaseMonitorInfo.java | 8 ++++ .../base/mapper/EmsBaseMonitorInfoMapper.java | 1 + .../impl/EmsBaseMonitorInfoServiceImpl.java | 6 ++- .../mapper/base/EmsBaseEnergyTypeMapper.xml | 2 +- .../mapper/base/EmsBaseMonitorInfoMapper.xml | 37 ++++++++++++++++++- .../mapper/record/TWTempertureDataMapper.xml | 2 +- 7 files changed, 56 insertions(+), 5 deletions(-) diff --git a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/BaseMonitorInfo.java b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/BaseMonitorInfo.java index a787972..2699b53 100644 --- a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/BaseMonitorInfo.java +++ b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/BaseMonitorInfo.java @@ -4,6 +4,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.hw.common.core.annotation.Excel; @@ -15,6 +16,7 @@ import com.hw.common.core.web.domain.BaseEntity; * @author sf * @date 2023-04-23 */ +@Data public class BaseMonitorInfo extends BaseEntity { private static final long serialVersionUID = 1L; @@ -31,6 +33,7 @@ public class BaseMonitorInfo extends BaseEntity @Excel(name = "计量设备编号") private String monitorId; + private String monitorCode; /** 计量设备名称 */ @Excel(name = "计量设备名称") private String monitorName; @@ -134,6 +137,8 @@ public class BaseMonitorInfo extends BaseEntity @Excel(name = "计量设备状态") private Long monitorStatus; + private String feeType; + /** 子部门 */ private List children = new ArrayList(); diff --git a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/EmsBaseMonitorInfo.java b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/EmsBaseMonitorInfo.java index e006827..1298a7f 100644 --- a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/EmsBaseMonitorInfo.java +++ b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/domain/EmsBaseMonitorInfo.java @@ -24,6 +24,7 @@ public class EmsBaseMonitorInfo extends BaseEntity /** 计量设备编号 */ @Excel(name = "计量设备编号") private String monitorCode; + private String monitorId; /** 计量设备名称 */ @Excel(name = "计量设备名称") @@ -96,6 +97,13 @@ public class EmsBaseMonitorInfo extends BaseEntity private String ancestors; private List monitorTypeList; + public String getMonitorId() { + return monitorId; + } + + public void setMonitorId(String monitorId) { + this.monitorId = monitorId; + } public List getMonitorTypeList() { return monitorTypeList; diff --git a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/mapper/EmsBaseMonitorInfoMapper.java b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/mapper/EmsBaseMonitorInfoMapper.java index 1c92e84..2809f0f 100644 --- a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/mapper/EmsBaseMonitorInfoMapper.java +++ b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/mapper/EmsBaseMonitorInfoMapper.java @@ -28,6 +28,7 @@ public interface EmsBaseMonitorInfoMapper * @return 计量设备信息集合 */ public List selectEmsBaseMonitorInfoList(EmsBaseMonitorInfo emsBaseMonitorInfo); + public List selectEmsBaseMonitorInfoList1(EmsBaseMonitorInfo emsBaseMonitorInfo); /** * 新增计量设备信息 diff --git a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java index c7f2d5a..fd80701 100644 --- a/hw-modules/hw-ems/src/main/java/com/hw/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java +++ b/hw-modules/hw-ems/src/main/java/com/hw/ems/base/service/impl/EmsBaseMonitorInfoServiceImpl.java @@ -49,6 +49,10 @@ public class EmsBaseMonitorInfoServiceImpl implements IEmsBaseMonitorInfoService { return emsBaseMonitorInfoMapper.selectEmsBaseMonitorInfoList(emsBaseMonitorInfo); } + public List selectEmsBaseMonitorInfoList1(EmsBaseMonitorInfo emsBaseMonitorInfo) + { + return emsBaseMonitorInfoMapper.selectEmsBaseMonitorInfoList1(emsBaseMonitorInfo); + } /** * 根据设备编号查询本设备能源类型 @@ -115,7 +119,7 @@ public class EmsBaseMonitorInfoServiceImpl implements IEmsBaseMonitorInfoService * */ @Override public List selectBaseMonitorInfoTreeList(EmsBaseMonitorInfo baseMonitorInfo) { - List baseMonitorInfos = selectEmsBaseMonitorInfoList(baseMonitorInfo); + List baseMonitorInfos = selectEmsBaseMonitorInfoList1(baseMonitorInfo); return buildMonitorInfoTreeSelect(baseMonitorInfos); } diff --git a/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseEnergyTypeMapper.xml b/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseEnergyTypeMapper.xml index 141eeb1..c2be8af 100644 --- a/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseEnergyTypeMapper.xml +++ b/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseEnergyTypeMapper.xml @@ -46,7 +46,7 @@ diff --git a/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseMonitorInfoMapper.xml b/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseMonitorInfoMapper.xml index 8235bd6..33ae934 100644 --- a/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseMonitorInfoMapper.xml +++ b/hw-modules/hw-ems/src/main/resources/mapper/base/EmsBaseMonitorInfoMapper.xml @@ -67,6 +67,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and monitor_hierarchy = #{monitorHierarchy} + select monitor_type - from ems_base_monitor_info - where monitor_code = #{monitorType} + from base_monitor_info + where monitor_id = #{monitorType} diff --git a/hw-modules/hw-ems/src/main/resources/mapper/record/TWTempertureDataMapper.xml b/hw-modules/hw-ems/src/main/resources/mapper/record/TWTempertureDataMapper.xml index 8343163..04a85a9 100644 --- a/hw-modules/hw-ems/src/main/resources/mapper/record/TWTempertureDataMapper.xml +++ b/hw-modules/hw-ems/src/main/resources/mapper/record/TWTempertureDataMapper.xml @@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -- twtd.confirmFlag, ebmi.monitor_name from record_iotenv_instant twtd - left join ems_base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_code + left join base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_id