|
@@ -2,9 +2,9 @@
|
|
|
<!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">
|
|
|
+<mapper namespace="com.ruoyi.project.aspen.mapper.TDashboarddayelecMapper">
|
|
|
|
|
|
- <resultMap type="TDashboardelecdata" id="TDashboardelecdataResult">
|
|
|
+ <resultMap type="TDashboarddayelec" id="TDashboarddayelecResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createrCode" column="creater_code" />
|
|
@@ -37,16 +37,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="shihua" column="shihua" />
|
|
|
<result property="shiyou" column="shiyou" />
|
|
|
<result property="shunshiliang" column="shunshiliang" />
|
|
|
+ <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="dataDate" column="data_date" />
|
|
|
+ <result property="dateDay" column="date_day" />
|
|
|
<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, s.dept_name from t_dashboardelecdata d
|
|
|
+ <sql id="selectTDashboarddayelecVo">
|
|
|
+ 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.ypg, d.daodianliang, d.eve_lec, d.fenggucha, d.byc_elec, d.boc_elec, d.data_date, d.date_day ,s.dept_name from t_dashboarddayelec d
|
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectTDashboardelecdataList" parameterType="TDashboardelecdata" resultMap="TDashboardelecdataResult">
|
|
|
- <include refid="selectTDashboardelecdataVo"/>
|
|
|
+ <select id="selectTDashboarddayelecList" parameterType="TDashboarddayelec" resultMap="TDashboarddayelecResult">
|
|
|
+ <include refid="selectTDashboarddayelecVo"/>
|
|
|
<where>
|
|
|
<if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
<if test="createdate != null "> and createdate = #{createdate}</if>
|
|
@@ -78,26 +86,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="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>
|
|
|
+ <if test="dataDate != null "> and data_date = #{dataDate}</if>
|
|
|
+ <if test="dateDay != null and dateDay != ''"> and date_day = #{dateDay}</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"/>
|
|
|
+
|
|
|
+ <select id="selectTDashboarddayelecById" parameterType="Long" resultMap="TDashboarddayelecResult">
|
|
|
+ <include refid="selectTDashboarddayelecVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertTDashboardelecdata" parameterType="TDashboardelecdata">
|
|
|
+ <insert id="insertTDashboarddayelec" parameterType="TDashboarddayelec">
|
|
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
- SELECT seq_t_dashboardelecdata.NEXTVAL as id FROM DUAL
|
|
|
+ SELECT seq_t_dashboarddayelec.NEXTVAL as id FROM DUAL
|
|
|
</selectKey>
|
|
|
- insert into t_dashboardelecdata
|
|
|
+ insert into t_dashboarddayelec
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">id,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
@@ -131,6 +143,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shihua != null">shihua,</if>
|
|
|
<if test="shiyou != null">shiyou,</if>
|
|
|
<if test="shunshiliang != null">shunshiliang,</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>
|
|
|
+ <if test="dataDate != null">data_date,</if>
|
|
|
+ <if test="dateDay != null">date_day,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
@@ -165,11 +185,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shihua != null">#{shihua},</if>
|
|
|
<if test="shiyou != null">#{shiyou},</if>
|
|
|
<if test="shunshiliang != null">#{shunshiliang},</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>
|
|
|
+ <if test="dataDate != null">#{dataDate},</if>
|
|
|
+ <if test="dateDay != null">#{dateDay},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <update id="updateTDashboardelecdata" parameterType="TDashboardelecdata">
|
|
|
- update t_dashboardelecdata
|
|
|
+ <update id="updateTDashboarddayelec" parameterType="TDashboarddayelec">
|
|
|
+ update t_dashboarddayelec
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
<if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
@@ -202,19 +230,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shihua != null">shihua = #{shihua},</if>
|
|
|
<if test="shiyou != null">shiyou = #{shiyou},</if>
|
|
|
<if test="shunshiliang != null">shunshiliang = #{shunshiliang},</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>
|
|
|
+ <if test="dataDate != null">data_date = #{dataDate},</if>
|
|
|
+ <if test="dateDay != null">date_day = #{dateDay},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
- <update id="deleteTDashboardelecdataById" parameterType="Long">
|
|
|
- update t_dashboardelecdata set del_flag = 2 where id = #{id}
|
|
|
+ <update id="deleteTDashboarddayelecById" parameterType="Long">
|
|
|
+ update t_dashboarddayelec set del_flag = 2 where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
- <update id="deleteTDashboardelecdataByIds" parameterType="String">
|
|
|
- update t_dashboardelecdata set del_flag = 2 where id in
|
|
|
+ <update id="deleteTDashboarddayelecByIds" parameterType="String">
|
|
|
+ update t_dashboarddayelec set del_flag = 2 where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
+
|
|
|
+ <select id="selectLast" parameterType="TDashboarddayelec" resultMap="TDashboarddayelecResult">
|
|
|
+ select * from ( select * from t_dashboarddayelec where del_flag = 0 order by id desc ) WHERE ROWNUM = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMonth" parameterType="TDashboarddayelec" resultMap="TDashboarddayelecResult">
|
|
|
+ select * from ( select * from t_dashboarddayelec where del_flag = 0 order by id asc ) WHERE 32 > ROWNUM
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|