修改site_id & device_id
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
<result property="dataUpdateTime" column="data_update_time" />
|
||||
<result property="category" column="category" />
|
||||
<result property="totalKwh" column="total_kwh" />
|
||||
<result property="sharpKwh" column="sharp_kwh" />
|
||||
<result property="peakKwh" column="peak_kwh" />
|
||||
<result property="flatKwh" column="flat_kwh" />
|
||||
<result property="valleyKwh" column="valley_kwh" />
|
||||
@ -22,7 +23,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsAmmeterDataVo">
|
||||
select id, data_update_time, category, total_kwh, peak_kwh, flat_kwh, valley_kwh, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_ammeter_data
|
||||
select id, data_update_time, category, total_kwh, sharp_kwh, peak_kwh, flat_kwh, valley_kwh, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_ammeter_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsAmmeterDataList" parameterType="EmsAmmeterData" resultMap="EmsAmmeterDataResult">
|
||||
@ -31,11 +32,12 @@
|
||||
<if test="dataUpdateTime != null "> and data_update_time = #{dataUpdateTime}</if>
|
||||
<if test="category != null and category != ''"> and category = #{category}</if>
|
||||
<if test="totalKwh != null "> and total_kwh = #{totalKwh}</if>
|
||||
<if test="sharpKwh != null "> and sharp_kwh = #{sharpKwh}</if>
|
||||
<if test="peakKwh != null "> and peak_kwh = #{peakKwh}</if>
|
||||
<if test="flatKwh != null "> and flat_kwh = #{flatKwh}</if>
|
||||
<if test="valleyKwh != null "> and valley_kwh = #{valleyKwh}</if>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -50,6 +52,7 @@
|
||||
<if test="dataUpdateTime != null">data_update_time,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="totalKwh != null">total_kwh,</if>
|
||||
<if test="sharpKwh != null">sharp_kwh,</if>
|
||||
<if test="peakKwh != null">peak_kwh,</if>
|
||||
<if test="flatKwh != null">flat_kwh,</if>
|
||||
<if test="valleyKwh != null">valley_kwh,</if>
|
||||
@ -59,12 +62,13 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="totalKwh != null">#{totalKwh},</if>
|
||||
<if test="sharpKwh != null">#{sharpKwh},</if>
|
||||
<if test="peakKwh != null">#{peakKwh},</if>
|
||||
<if test="flatKwh != null">#{flatKwh},</if>
|
||||
<if test="valleyKwh != null">#{valleyKwh},</if>
|
||||
@ -74,7 +78,7 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -84,6 +88,7 @@
|
||||
<if test="dataUpdateTime != null">data_update_time = #{dataUpdateTime},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="totalKwh != null">total_kwh = #{totalKwh},</if>
|
||||
<if test="sharpKwh != null">sharp_kwh = #{sharpKwh},</if>
|
||||
<if test="peakKwh != null">peak_kwh = #{peakKwh},</if>
|
||||
<if test="flatKwh != null">flat_kwh = #{flatKwh},</if>
|
||||
<if test="valleyKwh != null">valley_kwh = #{valleyKwh},</if>
|
||||
@ -93,7 +98,7 @@
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -108,9 +113,11 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getAmmeterDetailInfo" parameterType="Long" resultType="com.xzzn.ems.domain.vo.AmmeterDataDetailInfo">
|
||||
|
||||
<select id="getAmmeterDetailInfo" parameterType="String" resultType="com.xzzn.ems.domain.vo.AmmeterDataDetailInfo">
|
||||
select t.category as category,
|
||||
t.total_kwh as totalKwh,
|
||||
t.sharp_kwh as sharpKwh,
|
||||
t.flat_kwh as flatKwh,
|
||||
t.peak_kwh as peakKwh,
|
||||
t.valley_kwh as valleyKwh,
|
||||
|
Reference in New Issue
Block a user