add(ems): 添加环境监测数据模型扩展

- 在 TWTempertureData 类中添加 pm1、pm2、pm10 和 standby 字段
- 更新 TWTempertureDataMapper.xml 以支持新字段的映射和查询
- 优化部分 SQL 语句,明确表别名
IOT
zch 1 month ago
parent a6baa9f8ae
commit 775fb8ae05

@ -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();
}
}

@ -20,6 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="confirmFlag" column="confirmFlag" />
<result property="monitorName" column="monitor_name" />
<result property="monitorType" column="monitor_type" />
<result property="pm1" column="pm1"/>
<result property="pm2" column="pm2"/>
<result property="pm10" column="pm10"/>
<result property="standby" column="standby"/>
</resultMap>
<sql id="selectTWTempertureDataVo">
@ -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
</sql>
@ -64,22 +74,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="confirmFlag != null "> and twtd.confirmFlag = #{confirmFlag}</if>
<if test="monitorType != null "> and ebmi.monitor_type = #{monitorType}</if>
<if test="pm1 != null "> and twtd.pm1 = #{pm1}</if>
<if test="pm2 != null "> and twtd.pm2 = #{pm2}</if>
<if test="pm10 != null "> and twtd.pm10 = #{pm10}</if>
<if test="standby != null "> and twtd.standby = #{standby}</if>
</where>
order by twtd.recodeTime desc
</select>
<select id="selectTWTempertureDataByObjid" parameterType="Long" resultMap="TWTempertureDataResult">
<include refid="selectTWTempertureDataVo"/>
where objid = #{objid}
where twtd.objid = #{objid}
</select>
<select id="selectIotInstantList" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
<include refid="selectTWTempertureDataVo"></include>
<where>
<if test="monitorId != null and monitorId != ''">and twtd.monitorId = #{monitorId}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
and twtd.collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
and recodeTime between #{params.beginRecordTime} and #{params.endRecordTime}</if>
and twtd.recodeTime between #{params.beginRecordTime} and #{params.endRecordTime}</if>
</where>
order by twtd.collectTime
</select>
@ -107,6 +121,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmPersonID != null">confirmPersonID,</if>
<if test="confirmTime != null">confirmTime,</if>
<if test="confirmFlag != null">confirmFlag,</if>
<if test="pm1 != null">pm1,</if>
<if test="pm2 != null">pm2,</if>
<if test="pm10 != null">pm10,</if>
<if test="standby != null">standby,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorId != null">#{monitorId},</if>
@ -121,6 +139,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmPersonID != null">#{confirmPersonID},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="confirmFlag != null">#{confirmFlag},</if>
<if test="pm1 != null">#{pm1},</if>
<if test="pm2 != null">#{pm2},</if>
<if test="pm10 != null">#{pm10},</if>
<if test="standby != null">#{standby},</if>
</trim>
</insert>
@ -139,6 +162,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmPersonID != null">confirmPersonID = #{confirmPersonID},</if>
<if test="confirmTime != null">confirmTime = #{confirmTime},</if>
<if test="confirmFlag != null">confirmFlag = #{confirmFlag},</if>
<if test="pm1 != null">pm1 = #{pm1},</if>
<if test="pm2 != null">pm2 = #{pm2},</if>
<if test="pm10 != null">pm10 = #{pm10},</if>
<if test="standby != null">standby = #{standby},</if>
</trim>
where objid = #{objid}
</update>

Loading…
Cancel
Save