|
@@ -0,0 +1,270 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.ruoyi.project.aspen.mapper.TDashboardelecdataMapper">
|
|
|
+
|
|
|
+ <resultMap type="TDashboardelecdata" id="TDashboardelecdataResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createrCode" column="creater_code" />
|
|
|
+ <result property="createdate" column="createdate" />
|
|
|
+ <result property="updaterCode" column="updater_code" />
|
|
|
+ <result property="updatedate" column="updatedate" />
|
|
|
+ <result property="gtg1Lv" column="gtg1_lv" />
|
|
|
+ <result property="gtg1Wr" column="gtg1_wr" />
|
|
|
+ <result property="gtg2Lv" column="gtg2_lv" />
|
|
|
+ <result property="gtg2Wr" column="gtg2_wr" />
|
|
|
+ <result property="gtg3Lv" column="gtg3_lv" />
|
|
|
+ <result property="gtg3Wr" column="gtg3_wr" />
|
|
|
+ <result property="stg1Lv" column="stg1_lv" />
|
|
|
+ <result property="stg1Wr" column="stg1_wr" />
|
|
|
+ <result property="mwhLv" column="mwh_lv" />
|
|
|
+ <result property="mwhWr" column="mwh_wr" />
|
|
|
+ <result property="hhp" column="hhp" />
|
|
|
+ <result property="hp" column="hp" />
|
|
|
+ <result property="lp" column="lp" />
|
|
|
+ <result property="mp" column="mp" />
|
|
|
+ <result property="totalConsumption" column="total_consumption" />
|
|
|
+ <result property="hhpNum" column="hhp_num" />
|
|
|
+ <result property="hhpTemp" column="hhp_temp" />
|
|
|
+ <result property="hpNum" column="hp_num" />
|
|
|
+ <result property="hpTemp" column="hp_temp" />
|
|
|
+ <result property="lpNum" column="lp_num" />
|
|
|
+ <result property="lpTemp" column="lp_temp" />
|
|
|
+ <result property="mpNum" column="mp_num" />
|
|
|
+ <result property="mpTemp" column="mp_temp" />
|
|
|
+ <result property="shihua" column="shihua" />
|
|
|
+ <result property="shiyou" column="shiyou" />
|
|
|
+ <result property="shunshiliang" column="shunshiliang" />
|
|
|
+ <result property="evconsume" column="evconsume" />
|
|
|
+ <result property="elecp" column="elecp" />
|
|
|
+ <result property="hechengqi" column="hechengqi" />
|
|
|
+ <result property="u2" column="u2" />
|
|
|
+ <result property="ypg" column="ypg" />
|
|
|
+ <result property="daodianliang" column="daodianliang" />
|
|
|
+ <result property="eveLec" column="eve_lec" />
|
|
|
+ <result property="fenggucha" column="fenggucha" />
|
|
|
+ <result property="bycElec" column="byc_elec" />
|
|
|
+ <result property="bocElec" column="boc_elec" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTDashboardelecdataVo">
|
|
|
+ select d.id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.gtg1_lv, d.gtg1_wr, d.gtg2_lv, d.gtg2_wr, d.gtg3_lv, d.gtg3_wr, d.stg1_lv, d.stg1_wr, d.mwh_lv, d.mwh_wr, d.hhp, d.hp, d.lp, d.mp, d.total_consumption, d.hhp_num, d.hhp_temp, d.hp_num, d.hp_temp, d.lp_num, d.lp_temp, d.mp_num, d.mp_temp, d.shihua, d.shiyou, d.shunshiliang, d.evconsume, d.elecp, d.hechengqi, d.u2, d.ypg, d.daodianliang, d.eve_lec, d.fenggucha, d.byc_elec, d.boc_elec ,s.dept_name from t_dashboardelecdata d
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTDashboardelecdataList" parameterType="TDashboardelecdata" resultMap="TDashboardelecdataResult">
|
|
|
+ <include refid="selectTDashboardelecdataVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
+ <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
+ <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
|
|
|
+ <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
+ <if test="gtg1Lv != null and gtg1Lv != ''"> and gtg1_lv = #{gtg1Lv}</if>
|
|
|
+ <if test="gtg1Wr != null and gtg1Wr != ''"> and gtg1_wr = #{gtg1Wr}</if>
|
|
|
+ <if test="gtg2Lv != null and gtg2Lv != ''"> and gtg2_lv = #{gtg2Lv}</if>
|
|
|
+ <if test="gtg2Wr != null and gtg2Wr != ''"> and gtg2_wr = #{gtg2Wr}</if>
|
|
|
+ <if test="gtg3Lv != null and gtg3Lv != ''"> and gtg3_lv = #{gtg3Lv}</if>
|
|
|
+ <if test="gtg3Wr != null and gtg3Wr != ''"> and gtg3_wr = #{gtg3Wr}</if>
|
|
|
+ <if test="stg1Lv != null and stg1Lv != ''"> and stg1_lv = #{stg1Lv}</if>
|
|
|
+ <if test="stg1Wr != null and stg1Wr != ''"> and stg1_wr = #{stg1Wr}</if>
|
|
|
+ <if test="mwhLv != null and mwhLv != ''"> and mwh_lv = #{mwhLv}</if>
|
|
|
+ <if test="mwhWr != null and mwhWr != ''"> and mwh_wr = #{mwhWr}</if>
|
|
|
+ <if test="hhp != null and hhp != ''"> and hhp = #{hhp}</if>
|
|
|
+ <if test="hp != null and hp != ''"> and hp = #{hp}</if>
|
|
|
+ <if test="lp != null and lp != ''"> and lp = #{lp}</if>
|
|
|
+ <if test="mp != null and mp != ''"> and mp = #{mp}</if>
|
|
|
+ <if test="totalConsumption != null and totalConsumption != ''"> and total_consumption = #{totalConsumption}</if>
|
|
|
+ <if test="hhpNum != null "> and hhp_num = #{hhpNum}</if>
|
|
|
+ <if test="hhpTemp != null and hhpTemp != ''"> and hhp_temp = #{hhpTemp}</if>
|
|
|
+ <if test="hpNum != null and hpNum != ''"> and hp_num = #{hpNum}</if>
|
|
|
+ <if test="hpTemp != null and hpTemp != ''"> and hp_temp = #{hpTemp}</if>
|
|
|
+ <if test="lpNum != null "> and lp_num = #{lpNum}</if>
|
|
|
+ <if test="lpTemp != null and lpTemp != ''"> and lp_temp = #{lpTemp}</if>
|
|
|
+ <if test="mpNum != null "> and mp_num = #{mpNum}</if>
|
|
|
+ <if test="mpTemp != null and mpTemp != ''"> and mp_temp = #{mpTemp}</if>
|
|
|
+ <if test="shihua != null and shihua != ''"> and shihua = #{shihua}</if>
|
|
|
+ <if test="shiyou != null and shiyou != ''"> and shiyou = #{shiyou}</if>
|
|
|
+ <if test="shunshiliang != null and shunshiliang != ''"> and shunshiliang = #{shunshiliang}</if>
|
|
|
+ <if test="evconsume != null and evconsume != ''"> and evconsume = #{evconsume}</if>
|
|
|
+ <if test="elecp != null and elecp != ''"> and elecp = #{elecp}</if>
|
|
|
+ <if test="hechengqi != null and hechengqi != ''"> and hechengqi = #{hechengqi}</if>
|
|
|
+ <if test="u2 != null and u2 != ''"> and u2 = #{u2}</if>
|
|
|
+ <if test="ypg != null and ypg != ''"> and ypg = #{ypg}</if>
|
|
|
+ <if test="daodianliang != null and daodianliang != ''"> and daodianliang = #{daodianliang}</if>
|
|
|
+ <if test="eveLec != null and eveLec != ''"> and eve_lec = #{eveLec}</if>
|
|
|
+ <if test="fenggucha != null and fenggucha != ''"> and fenggucha = #{fenggucha}</if>
|
|
|
+ <if test="bycElec != null and bycElec != ''"> and byc_elec = #{bycElec}</if>
|
|
|
+ <if test="bocElec != null and bocElec != ''"> and boc_elec = #{bocElec}</if>
|
|
|
+ and d.del_flag = 0
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectLast" parameterType="TDashboardelecdata" resultMap="TDashboardelecdataResult">
|
|
|
+ select * from ( select * from t_dashboardelecdata where del_flag = 0 order by id desc ) WHERE ROWNUM = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTDashboardelecdataById" parameterType="Long" resultMap="TDashboardelecdataResult">
|
|
|
+ <include refid="selectTDashboardelecdataVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTDashboardelecdata" parameterType="TDashboardelecdata">
|
|
|
+ <selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
+ SELECT seq_t_dashboardelecdata.NEXTVAL as id FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ insert into t_dashboardelecdata
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="createrCode != null">creater_code,</if>
|
|
|
+ <if test="createdate != null">createdate,</if>
|
|
|
+ <if test="updaterCode != null">updater_code,</if>
|
|
|
+ <if test="updatedate != null">updatedate,</if>
|
|
|
+ <if test="gtg1Lv != null">gtg1_lv,</if>
|
|
|
+ <if test="gtg1Wr != null">gtg1_wr,</if>
|
|
|
+ <if test="gtg2Lv != null">gtg2_lv,</if>
|
|
|
+ <if test="gtg2Wr != null">gtg2_wr,</if>
|
|
|
+ <if test="gtg3Lv != null">gtg3_lv,</if>
|
|
|
+ <if test="gtg3Wr != null">gtg3_wr,</if>
|
|
|
+ <if test="stg1Lv != null">stg1_lv,</if>
|
|
|
+ <if test="stg1Wr != null">stg1_wr,</if>
|
|
|
+ <if test="mwhLv != null">mwh_lv,</if>
|
|
|
+ <if test="mwhWr != null">mwh_wr,</if>
|
|
|
+ <if test="hhp != null">hhp,</if>
|
|
|
+ <if test="hp != null">hp,</if>
|
|
|
+ <if test="lp != null">lp,</if>
|
|
|
+ <if test="mp != null">mp,</if>
|
|
|
+ <if test="totalConsumption != null">total_consumption,</if>
|
|
|
+ <if test="hhpNum != null">hhp_num,</if>
|
|
|
+ <if test="hhpTemp != null">hhp_temp,</if>
|
|
|
+ <if test="hpNum != null">hp_num,</if>
|
|
|
+ <if test="hpTemp != null">hp_temp,</if>
|
|
|
+ <if test="lpNum != null">lp_num,</if>
|
|
|
+ <if test="lpTemp != null">lp_temp,</if>
|
|
|
+ <if test="mpNum != null">mp_num,</if>
|
|
|
+ <if test="mpTemp != null">mp_temp,</if>
|
|
|
+ <if test="shihua != null">shihua,</if>
|
|
|
+ <if test="shiyou != null">shiyou,</if>
|
|
|
+ <if test="shunshiliang != null">shunshiliang,</if>
|
|
|
+ <if test="evconsume != null">evconsume,</if>
|
|
|
+ <if test="elecp != null">elecp,</if>
|
|
|
+ <if test="hechengqi != null">hechengqi,</if>
|
|
|
+ <if test="u2 != null">u2,</if>
|
|
|
+ <if test="ypg != null">ypg,</if>
|
|
|
+ <if test="daodianliang != null">daodianliang,</if>
|
|
|
+ <if test="eveLec != null">eve_lec,</if>
|
|
|
+ <if test="fenggucha != null">fenggucha,</if>
|
|
|
+ <if test="bycElec != null">byc_elec,</if>
|
|
|
+ <if test="bocElec != null">boc_elec,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="createrCode != null">#{createrCode},</if>
|
|
|
+ <if test="createdate != null">#{createdate},</if>
|
|
|
+ <if test="updaterCode != null">#{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">#{updatedate},</if>
|
|
|
+ <if test="gtg1Lv != null">#{gtg1Lv},</if>
|
|
|
+ <if test="gtg1Wr != null">#{gtg1Wr},</if>
|
|
|
+ <if test="gtg2Lv != null">#{gtg2Lv},</if>
|
|
|
+ <if test="gtg2Wr != null">#{gtg2Wr},</if>
|
|
|
+ <if test="gtg3Lv != null">#{gtg3Lv},</if>
|
|
|
+ <if test="gtg3Wr != null">#{gtg3Wr},</if>
|
|
|
+ <if test="stg1Lv != null">#{stg1Lv},</if>
|
|
|
+ <if test="stg1Wr != null">#{stg1Wr},</if>
|
|
|
+ <if test="mwhLv != null">#{mwhLv},</if>
|
|
|
+ <if test="mwhWr != null">#{mwhWr},</if>
|
|
|
+ <if test="hhp != null">#{hhp},</if>
|
|
|
+ <if test="hp != null">#{hp},</if>
|
|
|
+ <if test="lp != null">#{lp},</if>
|
|
|
+ <if test="mp != null">#{mp},</if>
|
|
|
+ <if test="totalConsumption != null">#{totalConsumption},</if>
|
|
|
+ <if test="hhpNum != null">#{hhpNum},</if>
|
|
|
+ <if test="hhpTemp != null">#{hhpTemp},</if>
|
|
|
+ <if test="hpNum != null">#{hpNum},</if>
|
|
|
+ <if test="hpTemp != null">#{hpTemp},</if>
|
|
|
+ <if test="lpNum != null">#{lpNum},</if>
|
|
|
+ <if test="lpTemp != null">#{lpTemp},</if>
|
|
|
+ <if test="mpNum != null">#{mpNum},</if>
|
|
|
+ <if test="mpTemp != null">#{mpTemp},</if>
|
|
|
+ <if test="shihua != null">#{shihua},</if>
|
|
|
+ <if test="shiyou != null">#{shiyou},</if>
|
|
|
+ <if test="shunshiliang != null">#{shunshiliang},</if>
|
|
|
+ <if test="evconsume != null">#{evconsume},</if>
|
|
|
+ <if test="elecp != null">#{elecp},</if>
|
|
|
+ <if test="hechengqi != null">#{hechengqi},</if>
|
|
|
+ <if test="u2 != null">#{u2},</if>
|
|
|
+ <if test="ypg != null">#{ypg},</if>
|
|
|
+ <if test="daodianliang != null">#{daodianliang},</if>
|
|
|
+ <if test="eveLec != null">#{eveLec},</if>
|
|
|
+ <if test="fenggucha != null">#{fenggucha},</if>
|
|
|
+ <if test="bycElec != null">#{bycElec},</if>
|
|
|
+ <if test="bocElec != null">#{bocElec},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTDashboardelecdata" parameterType="TDashboardelecdata">
|
|
|
+ update t_dashboardelecdata
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
|
+ <if test="createdate != null">createdate = #{createdate},</if>
|
|
|
+ <if test="updaterCode != null">updater_code = #{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
+ <if test="gtg1Lv != null">gtg1_lv = #{gtg1Lv},</if>
|
|
|
+ <if test="gtg1Wr != null">gtg1_wr = #{gtg1Wr},</if>
|
|
|
+ <if test="gtg2Lv != null">gtg2_lv = #{gtg2Lv},</if>
|
|
|
+ <if test="gtg2Wr != null">gtg2_wr = #{gtg2Wr},</if>
|
|
|
+ <if test="gtg3Lv != null">gtg3_lv = #{gtg3Lv},</if>
|
|
|
+ <if test="gtg3Wr != null">gtg3_wr = #{gtg3Wr},</if>
|
|
|
+ <if test="stg1Lv != null">stg1_lv = #{stg1Lv},</if>
|
|
|
+ <if test="stg1Wr != null">stg1_wr = #{stg1Wr},</if>
|
|
|
+ <if test="mwhLv != null">mwh_lv = #{mwhLv},</if>
|
|
|
+ <if test="mwhWr != null">mwh_wr = #{mwhWr},</if>
|
|
|
+ <if test="hhp != null">hhp = #{hhp},</if>
|
|
|
+ <if test="hp != null">hp = #{hp},</if>
|
|
|
+ <if test="lp != null">lp = #{lp},</if>
|
|
|
+ <if test="mp != null">mp = #{mp},</if>
|
|
|
+ <if test="totalConsumption != null">total_consumption = #{totalConsumption},</if>
|
|
|
+ <if test="hhpNum != null">hhp_num = #{hhpNum},</if>
|
|
|
+ <if test="hhpTemp != null">hhp_temp = #{hhpTemp},</if>
|
|
|
+ <if test="hpNum != null">hp_num = #{hpNum},</if>
|
|
|
+ <if test="hpTemp != null">hp_temp = #{hpTemp},</if>
|
|
|
+ <if test="lpNum != null">lp_num = #{lpNum},</if>
|
|
|
+ <if test="lpTemp != null">lp_temp = #{lpTemp},</if>
|
|
|
+ <if test="mpNum != null">mp_num = #{mpNum},</if>
|
|
|
+ <if test="mpTemp != null">mp_temp = #{mpTemp},</if>
|
|
|
+ <if test="shihua != null">shihua = #{shihua},</if>
|
|
|
+ <if test="shiyou != null">shiyou = #{shiyou},</if>
|
|
|
+ <if test="shunshiliang != null">shunshiliang = #{shunshiliang},</if>
|
|
|
+ <if test="evconsume != null">evconsume = #{evconsume},</if>
|
|
|
+ <if test="elecp != null">elecp = #{elecp},</if>
|
|
|
+ <if test="hechengqi != null">hechengqi = #{hechengqi},</if>
|
|
|
+ <if test="u2 != null">u2 = #{u2},</if>
|
|
|
+ <if test="ypg != null">ypg = #{ypg},</if>
|
|
|
+ <if test="daodianliang != null">daodianliang = #{daodianliang},</if>
|
|
|
+ <if test="eveLec != null">eve_lec = #{eveLec},</if>
|
|
|
+ <if test="fenggucha != null">fenggucha = #{fenggucha},</if>
|
|
|
+ <if test="bycElec != null">byc_elec = #{bycElec},</if>
|
|
|
+ <if test="bocElec != null">boc_elec = #{bocElec},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTDashboardelecdataById" parameterType="Long">
|
|
|
+ update t_dashboardelecdata set del_flag = 2 where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTDashboardelecdataByIds" parameterType="String">
|
|
|
+ update t_dashboardelecdata set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|