From 775fb8ae05178ce6d9cca2986bb06f6473327420 Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 9 Dec 2024 17:58:53 +0800 Subject: [PATCH] =?UTF-8?q?add(ems):=20=E6=B7=BB=E5=8A=A0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E7=9B=91=E6=B5=8B=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=89=A9=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 TWTempertureData 类中添加 pm1、pm2、pm10 和 standby 字段 - 更新 TWTempertureDataMapper.xml 以支持新字段的映射和查询 - 优化部分 SQL 语句,明确表别名 --- .../ems/record/domain/TWTempertureData.java | 58 +++++++++++++++++++ .../ems/record/TWTempertureDataMapper.xml | 36 ++++++++++-- 2 files changed, 90 insertions(+), 4 deletions(-) diff --git a/ruoyi-ems/src/main/java/com/ruoyi/ems/record/domain/TWTempertureData.java b/ruoyi-ems/src/main/java/com/ruoyi/ems/record/domain/TWTempertureData.java index b58f0db..4784d6d 100644 --- a/ruoyi-ems/src/main/java/com/ruoyi/ems/record/domain/TWTempertureData.java +++ b/ruoyi-ems/src/main/java/com/ruoyi/ems/record/domain/TWTempertureData.java @@ -81,6 +81,22 @@ public class TWTempertureData extends BaseEntity @Excel(name = "能源类型") private Long monitorType; + /** pm1.0 */ + @Excel(name = "pm1.0") + private BigDecimal pm1; + + /** pm2.5 */ + @Excel(name = "pm2.5") + private BigDecimal pm2; + + /** pm10.0 */ + @Excel(name = "pm10.0") + private BigDecimal pm10; + + /** 粉尘 */ + @Excel(name = "粉尘") + private BigDecimal standby; + public void setObjid(Long objid) { this.objid = objid; @@ -216,6 +232,44 @@ public class TWTempertureData extends BaseEntity this.monitorType = monitorType; } + public void setPm1(BigDecimal pm1) + { + this.pm1 = pm1; + } + + public BigDecimal getPm1() + { + return pm1; + } + public void setPm2(BigDecimal pm2) + { + this.pm2 = pm2; + } + + public BigDecimal getPm2() + { + return pm2; + } + public void setPm10(BigDecimal pm10) + { + this.pm10 = pm10; + } + + public BigDecimal getPm10() + { + return pm10; + } + public void setStandby(BigDecimal standby) + { + this.standby = standby; + } + + public BigDecimal getStandby() + { + return standby; + } + + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -233,6 +287,10 @@ public class TWTempertureData extends BaseEntity .append("confirmTime", getConfirmTime()) .append("confirmFlag", getConfirmFlag()) .append("monitorType", getMonitorType()) + .append("pm1", getPm1()) + .append("pm2", getPm2()) + .append("pm10", getPm10()) + .append("standby", getStandby()) .toString(); } } diff --git a/ruoyi-ems/src/main/resources/mapper/ems/record/TWTempertureDataMapper.xml b/ruoyi-ems/src/main/resources/mapper/ems/record/TWTempertureDataMapper.xml index ac6e5fb..70cc8cd 100644 --- a/ruoyi-ems/src/main/resources/mapper/ems/record/TWTempertureDataMapper.xml +++ b/ruoyi-ems/src/main/resources/mapper/ems/record/TWTempertureDataMapper.xml @@ -20,6 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + @@ -38,8 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" twtd.confirmFlag, ebmi.monitor_name, - ebmi.monitor_type + ebmi.monitor_type, + twtd.pm1, + twtd.pm2, + twtd.pm10, + twtd.standby from T_W_TempertureData twtd left join ems_base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_code @@ -64,22 +74,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and twtd.confirmFlag = #{confirmFlag} and ebmi.monitor_type = #{monitorType} + and twtd.pm1 = #{pm1} + and twtd.pm2 = #{pm2} + and twtd.pm10 = #{pm10} + and twtd.standby = #{standby} order by twtd.recodeTime desc @@ -107,6 +121,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" confirmPersonID, confirmTime, confirmFlag, + pm1, + pm2, + pm10, + standby, #{monitorId}, @@ -121,6 +139,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{confirmPersonID}, #{confirmTime}, #{confirmFlag}, + + #{pm1}, + #{pm2}, + #{pm10}, + #{standby}, @@ -139,6 +162,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" confirmPersonID = #{confirmPersonID}, confirmTime = #{confirmTime}, confirmFlag = #{confirmFlag}, + + pm1 = #{pm1}, + pm2 = #{pm2}, + pm10 = #{pm10}, + standby = #{standby}, where objid = #{objid}