|
@@ -0,0 +1,116 @@
|
|
|
+<?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.TDashboarddayMapper">
|
|
|
+
|
|
|
+ <resultMap type="TDashboardday" id="TDashboarddayResult">
|
|
|
+ <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="dailyYixi" column="daily_yixi" />
|
|
|
+ <result property="dailyBingxi" column="daily_bingxi" />
|
|
|
+ <result property="lossRate" column="loss_rate" />
|
|
|
+ <result property="energyConsumption" column="energy_consumption" />
|
|
|
+ <result property="productPutput" column="product_putput" />
|
|
|
+ <result property="dataDate" column="data_date" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTDashboarddayVo">
|
|
|
+ select d.id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.daily_yixi, d.daily_bingxi, d.loss_rate, d.energy_consumption, d.product_putput, d.data_date ,s.dept_name from t_dashboardday d
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTDashboarddayList" parameterType="TDashboardday" resultMap="TDashboarddayResult">
|
|
|
+ <include refid="selectTDashboarddayVo"/>
|
|
|
+ <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="dailyYixi != null and dailyYixi != ''"> and daily_yixi = #{dailyYixi}</if>
|
|
|
+ <if test="dailyBingxi != null and dailyBingxi != ''"> and daily_bingxi = #{dailyBingxi}</if>
|
|
|
+ <if test="lossRate != null and lossRate != ''"> and loss_rate = #{lossRate}</if>
|
|
|
+ <if test="energyConsumption != null and energyConsumption != ''"> and energy_consumption = #{energyConsumption}</if>
|
|
|
+ <if test="productPutput != null and productPutput != ''"> and product_putput = #{productPutput}</if>
|
|
|
+ <if test="dataDate != null "> and data_date = #{dataDate}</if>
|
|
|
+ and d.del_flag = 0
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTDashboarddayById" parameterType="Long" resultMap="TDashboarddayResult">
|
|
|
+ <include refid="selectTDashboarddayVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTDashboardday" parameterType="TDashboardday">
|
|
|
+ <selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
+ SELECT seq_t_dashboardday.NEXTVAL as id FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ insert into t_dashboardday
|
|
|
+ <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="dailyYixi != null">daily_yixi,</if>
|
|
|
+ <if test="dailyBingxi != null">daily_bingxi,</if>
|
|
|
+ <if test="lossRate != null">loss_rate,</if>
|
|
|
+ <if test="energyConsumption != null">energy_consumption,</if>
|
|
|
+ <if test="productPutput != null">product_putput,</if>
|
|
|
+ <if test="dataDate != null">data_date,</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="dailyYixi != null">#{dailyYixi},</if>
|
|
|
+ <if test="dailyBingxi != null">#{dailyBingxi},</if>
|
|
|
+ <if test="lossRate != null">#{lossRate},</if>
|
|
|
+ <if test="energyConsumption != null">#{energyConsumption},</if>
|
|
|
+ <if test="productPutput != null">#{productPutput},</if>
|
|
|
+ <if test="dataDate != null">#{dataDate},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTDashboardday" parameterType="TDashboardday">
|
|
|
+ update t_dashboardday
|
|
|
+ <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="dailyYixi != null">daily_yixi = #{dailyYixi},</if>
|
|
|
+ <if test="dailyBingxi != null">daily_bingxi = #{dailyBingxi},</if>
|
|
|
+ <if test="lossRate != null">loss_rate = #{lossRate},</if>
|
|
|
+ <if test="energyConsumption != null">energy_consumption = #{energyConsumption},</if>
|
|
|
+ <if test="productPutput != null">product_putput = #{productPutput},</if>
|
|
|
+ <if test="dataDate != null">data_date = #{dataDate},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTDashboarddayById" parameterType="Long">
|
|
|
+ update t_dashboardday set del_flag = 2 where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTDashboarddayByIds" parameterType="String">
|
|
|
+ update t_dashboardday set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|