<?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.dy.pipIrrGlobal.daoRm.RmTimingReportHistoryMapper">
|
<resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory">
|
<!--@mbg.generated-->
|
<!--@Table rm_timing_report_history-->
|
<id column="id" jdbcType="BIGINT" property="id" />
|
<result column="controller_id" jdbcType="BIGINT" property="controllerId" />
|
<result column="intake_id" jdbcType="BIGINT" property="intakeId" />
|
<result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
|
<result column="dt" jdbcType="TIMESTAMP" property="dt" />
|
<result column="rtu_dt" jdbcType="TIMESTAMP" property="rtuDt" />
|
<result column="data_dt" jdbcType="DATE" property="dataDt" />
|
<result column="water_total_amount_year" jdbcType="FLOAT" property="waterTotalAmountYear" />
|
<result column="water_total_amount_meter" jdbcType="FLOAT" property="waterTotalAmountMeter" />
|
<result column="ele_total_amount_year" jdbcType="FLOAT" property="eleTotalAmountYear" />
|
<result column="ele_total_amount_meter" jdbcType="FLOAT" property="eleTotalAmountMeter" />
|
<result column="water_total_amount_day" jdbcType="FLOAT" property="waterTotalAmountDay" />
|
<result column="water_user_total_amount_day" jdbcType="FLOAT" property="waterUserTotalAmountDay" />
|
<result column="loss_total_amount_day" jdbcType="FLOAT" property="lossTotalAmountDay" />
|
<result column="battery_volt" jdbcType="FLOAT" property="batteryVolt" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
<!--@mbg.generated-->
|
id, controller_id, intake_id, rtu_addr, dt, rtu_dt, data_dt, water_total_amount_year,
|
water_total_amount_meter, ele_total_amount_year, ele_total_amount_meter, water_total_amount_day,
|
water_user_total_amount_day, loss_total_amount_day, battery_volt
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
<!--@mbg.generated-->
|
select
|
<include refid="Base_Column_List" />
|
from rm_timing_report_history
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<!--@mbg.generated-->
|
delete from rm_timing_report_history
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory">
|
<!--@mbg.generated-->
|
insert into rm_timing_report_history (id, controller_id, intake_id,
|
rtu_addr, dt, rtu_dt,
|
data_dt, water_total_amount_year, water_total_amount_meter,
|
ele_total_amount_year, ele_total_amount_meter, water_total_amount_day,
|
water_user_total_amount_day, loss_total_amount_day,
|
battery_volt)
|
values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
|
#{rtuAddr,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{rtuDt,jdbcType=TIMESTAMP},
|
#{dataDt,jdbcType=DATE}, #{waterTotalAmountYear,jdbcType=FLOAT}, #{waterTotalAmountMeter,jdbcType=FLOAT},
|
#{eleTotalAmountYear,jdbcType=FLOAT}, #{eleTotalAmountMeter,jdbcType=FLOAT}, #{waterTotalAmountDay,jdbcType=FLOAT},
|
#{waterUserTotalAmountDay,jdbcType=FLOAT}, #{lossTotalAmountDay,jdbcType=FLOAT},
|
#{batteryVolt,jdbcType=FLOAT})
|
</insert>
|
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory">
|
<!--@mbg.generated-->
|
insert into rm_timing_report_history
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="controllerId != null">
|
controller_id,
|
</if>
|
<if test="intakeId != null">
|
intake_id,
|
</if>
|
<if test="rtuAddr != null">
|
rtu_addr,
|
</if>
|
<if test="dt != null">
|
dt,
|
</if>
|
<if test="rtuDt != null">
|
rtu_dt,
|
</if>
|
<if test="dataDt != null">
|
data_dt,
|
</if>
|
<if test="waterTotalAmountYear != null">
|
water_total_amount_year,
|
</if>
|
<if test="waterTotalAmountMeter != null">
|
water_total_amount_meter,
|
</if>
|
<if test="eleTotalAmountYear != null">
|
ele_total_amount_year,
|
</if>
|
<if test="eleTotalAmountMeter != null">
|
ele_total_amount_meter,
|
</if>
|
<if test="waterTotalAmountDay != null">
|
water_total_amount_day,
|
</if>
|
<if test="waterUserTotalAmountDay != null">
|
water_user_total_amount_day,
|
</if>
|
<if test="lossTotalAmountDay != null">
|
loss_total_amount_day,
|
</if>
|
<if test="batteryVolt != null">
|
battery_volt,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="controllerId != null">
|
#{controllerId,jdbcType=BIGINT},
|
</if>
|
<if test="intakeId != null">
|
#{intakeId,jdbcType=BIGINT},
|
</if>
|
<if test="rtuAddr != null">
|
#{rtuAddr,jdbcType=VARCHAR},
|
</if>
|
<if test="dt != null">
|
#{dt,jdbcType=TIMESTAMP},
|
</if>
|
<if test="rtuDt != null">
|
#{rtuDt,jdbcType=TIMESTAMP},
|
</if>
|
<if test="dataDt != null">
|
#{dataDt,jdbcType=DATE},
|
</if>
|
<if test="waterTotalAmountYear != null">
|
#{waterTotalAmountYear,jdbcType=FLOAT},
|
</if>
|
<if test="waterTotalAmountMeter != null">
|
#{waterTotalAmountMeter,jdbcType=FLOAT},
|
</if>
|
<if test="eleTotalAmountYear != null">
|
#{eleTotalAmountYear,jdbcType=FLOAT},
|
</if>
|
<if test="eleTotalAmountMeter != null">
|
#{eleTotalAmountMeter,jdbcType=FLOAT},
|
</if>
|
<if test="waterTotalAmountDay != null">
|
#{waterTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="waterUserTotalAmountDay != null">
|
#{waterUserTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="lossTotalAmountDay != null">
|
#{lossTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="batteryVolt != null">
|
#{batteryVolt,jdbcType=FLOAT},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory">
|
<!--@mbg.generated-->
|
update rm_timing_report_history
|
<set>
|
<if test="controllerId != null">
|
controller_id = #{controllerId,jdbcType=BIGINT},
|
</if>
|
<if test="intakeId != null">
|
intake_id = #{intakeId,jdbcType=BIGINT},
|
</if>
|
<if test="rtuAddr != null">
|
rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
|
</if>
|
<if test="dt != null">
|
dt = #{dt,jdbcType=TIMESTAMP},
|
</if>
|
<if test="rtuDt != null">
|
rtu_dt = #{rtuDt,jdbcType=TIMESTAMP},
|
</if>
|
<if test="dataDt != null">
|
data_dt = #{dataDt,jdbcType=DATE},
|
</if>
|
<if test="waterTotalAmountYear != null">
|
water_total_amount_year = #{waterTotalAmountYear,jdbcType=FLOAT},
|
</if>
|
<if test="waterTotalAmountMeter != null">
|
water_total_amount_meter = #{waterTotalAmountMeter,jdbcType=FLOAT},
|
</if>
|
<if test="eleTotalAmountYear != null">
|
ele_total_amount_year = #{eleTotalAmountYear,jdbcType=FLOAT},
|
</if>
|
<if test="eleTotalAmountMeter != null">
|
ele_total_amount_meter = #{eleTotalAmountMeter,jdbcType=FLOAT},
|
</if>
|
<if test="waterTotalAmountDay != null">
|
water_total_amount_day = #{waterTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="waterUserTotalAmountDay != null">
|
water_user_total_amount_day = #{waterUserTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="lossTotalAmountDay != null">
|
loss_total_amount_day = #{lossTotalAmountDay,jdbcType=FLOAT},
|
</if>
|
<if test="batteryVolt != null">
|
battery_volt = #{batteryVolt,jdbcType=FLOAT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmTimingReportHistory">
|
<!--@mbg.generated-->
|
update rm_timing_report_history
|
set controller_id = #{controllerId,jdbcType=BIGINT},
|
intake_id = #{intakeId,jdbcType=BIGINT},
|
rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
|
dt = #{dt,jdbcType=TIMESTAMP},
|
rtu_dt = #{rtuDt,jdbcType=TIMESTAMP},
|
data_dt = #{dataDt,jdbcType=DATE},
|
water_total_amount_year = #{waterTotalAmountYear,jdbcType=FLOAT},
|
water_total_amount_meter = #{waterTotalAmountMeter,jdbcType=FLOAT},
|
ele_total_amount_year = #{eleTotalAmountYear,jdbcType=FLOAT},
|
ele_total_amount_meter = #{eleTotalAmountMeter,jdbcType=FLOAT},
|
water_total_amount_day = #{waterTotalAmountDay,jdbcType=FLOAT},
|
water_user_total_amount_day = #{waterUserTotalAmountDay,jdbcType=FLOAT},
|
loss_total_amount_day = #{lossTotalAmountDay,jdbcType=FLOAT},
|
battery_volt = #{batteryVolt,jdbcType=FLOAT}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|