|
@@ -0,0 +1,496 @@
|
|
|
|
|
+<?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.steerinfo.meterwork.meterworkhookmetertime.mapper.MeterWorkHookMeterTimeMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkhookmetertime.model.MeterWorkHookMeterTime">
|
|
|
|
|
+ <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
|
|
|
|
|
+ <result column="ENTER_TIME" jdbcType="TIMESTAMP" property="enterTime" />
|
|
|
|
|
+ <result column="STABLE_TIME" jdbcType="TIMESTAMP" property="stableTime" />
|
|
|
|
|
+ <result column="CONFIRM_TIME" jdbcType="TIMESTAMP" property="confirmTime" />
|
|
|
|
|
+ <result column="COMPLETE_TIME" jdbcType="TIMESTAMP" property="completeTime" />
|
|
|
|
|
+ <result column="LEAVE_TIME" jdbcType="TIMESTAMP" property="leaveTime" />
|
|
|
|
|
+ <result column="TOTAL_SECONDS" jdbcType="DECIMAL" property="totalSeconds" />
|
|
|
|
|
+ <result column="ENTER_STABLE_SECONDS" jdbcType="DECIMAL" property="enterStableSeconds" />
|
|
|
|
|
+ <result column="STABLE_CONFIRM_SECONDS" jdbcType="DECIMAL" property="stableConfirmSeconds" />
|
|
|
|
|
+ <result column="CONFIRM_COMPLETE_SECONDS" jdbcType="DECIMAL" property="confirmCompleteSeconds" />
|
|
|
|
|
+ <result column="COMPLETE_LEAVE_SECONDS" jdbcType="DECIMAL" property="completeLeaveSeconds" />
|
|
|
|
|
+ <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
|
|
|
|
|
+ <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
|
|
|
|
|
+ <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
|
|
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="columns">
|
|
|
|
|
+ ACTUAL_FIRST_NO, ENTER_TIME, STABLE_TIME, CONFIRM_TIME, COMPLETE_TIME, LEAVE_TIME,
|
|
|
|
|
+ TOTAL_SECONDS, ENTER_STABLE_SECONDS, STABLE_CONFIRM_SECONDS, CONFIRM_COMPLETE_SECONDS,
|
|
|
|
|
+ COMPLETE_LEAVE_SECONDS, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
|
+ t.ACTUAL_FIRST_NO, t.ENTER_TIME, t.STABLE_TIME, t.CONFIRM_TIME, t.COMPLETE_TIME,
|
|
|
|
|
+ t.LEAVE_TIME, t.TOTAL_SECONDS, t.ENTER_STABLE_SECONDS, t.STABLE_CONFIRM_SECONDS,
|
|
|
|
|
+ t.CONFIRM_COMPLETE_SECONDS, t.COMPLETE_LEAVE_SECONDS, t.VALUE_FLAG, t.CREATE_MAN_NO,
|
|
|
|
|
+ t.CREATE_MAN_NAME, t.CREATE_TIME
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select">
|
|
|
|
|
+ SELECT <include refid="columns"/> FROM METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
|
+ SELECT <include refid="columns_alias"/> FROM METER_WORK_HOOK_METER_TIME t
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="where">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
|
|
+ and ACTUAL_FIRST_NO = #{actualFirstNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ and TO_CHAR(ENTER_TIME,'yyyy-MM-dd') = #{enterTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ and TO_CHAR(STABLE_TIME,'yyyy-MM-dd') = #{stableTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ and TO_CHAR(CONFIRM_TIME,'yyyy-MM-dd') = #{confirmTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ and TO_CHAR(COMPLETE_TIME,'yyyy-MM-dd') = #{completeTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ and TO_CHAR(LEAVE_TIME,'yyyy-MM-dd') = #{leaveTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ and TOTAL_SECONDS = #{totalSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ and ENTER_STABLE_SECONDS = #{enterStableSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ and STABLE_CONFIRM_SECONDS = #{stableConfirmSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ and CONFIRM_COMPLETE_SECONDS = #{confirmCompleteSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ and COMPLETE_LEAVE_SECONDS = #{completeLeaveSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
+ and VALUE_FLAG = #{valueFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ and CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
|
|
+ and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ and TO_CHAR(ENTER_TIME,'yyyy-MM-dd') = #{enterTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ and TO_CHAR(STABLE_TIME,'yyyy-MM-dd') = #{stableTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ and TO_CHAR(CONFIRM_TIME,'yyyy-MM-dd') = #{confirmTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ and TO_CHAR(COMPLETE_TIME,'yyyy-MM-dd') = #{completeTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ and TO_CHAR(LEAVE_TIME,'yyyy-MM-dd') = #{leaveTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ and TOTAL_SECONDS = #{totalSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ and ENTER_STABLE_SECONDS = #{enterStableSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ and STABLE_CONFIRM_SECONDS = #{stableConfirmSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ and CONFIRM_COMPLETE_SECONDS = #{confirmCompleteSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ and COMPLETE_LEAVE_SECONDS = #{completeLeaveSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
+ and VALUE_FLAG LIKE '%${valueFlag}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ and CREATE_MAN_NO LIKE '%${createManNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and CREATE_MAN_NAME LIKE '%${createManName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
+ delete from METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
|
+ delete from METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ where 1!=1
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ or TO_CHAR(ENTER_TIME,'yyyy-MM-dd') = '#{enterTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ or TO_CHAR(STABLE_TIME,'yyyy-MM-dd') = '#{stableTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ or TO_CHAR(CONFIRM_TIME,'yyyy-MM-dd') = '#{confirmTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ or TO_CHAR(COMPLETE_TIME,'yyyy-MM-dd') = '#{completeTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ or TO_CHAR(LEAVE_TIME,'yyyy-MM-dd') = '#{leaveTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ or TOTAL_SECONDS = #{totalSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ or ENTER_STABLE_SECONDS = #{enterStableSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ or STABLE_CONFIRM_SECONDS = #{stableConfirmSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ or CONFIRM_COMPLETE_SECONDS = #{confirmCompleteSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ or COMPLETE_LEAVE_SECONDS = #{completeLeaveSeconds}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
+ or VALUE_FLAG = #{valueFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
|
|
+ or CREATE_MAN_NO = #{createManNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ or CREATE_MAN_NAME = #{createManName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkhookmetertime.model.MeterWorkHookMeterTime">
|
|
|
|
|
+ insert into METER_WORK_HOOK_METER_TIME (ACTUAL_FIRST_NO, ENTER_TIME, STABLE_TIME,
|
|
|
|
|
+ CONFIRM_TIME, COMPLETE_TIME, LEAVE_TIME,
|
|
|
|
|
+ TOTAL_SECONDS, ENTER_STABLE_SECONDS, STABLE_CONFIRM_SECONDS,
|
|
|
|
|
+ CONFIRM_COMPLETE_SECONDS, COMPLETE_LEAVE_SECONDS,
|
|
|
|
|
+ VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
|
|
+ CREATE_TIME)
|
|
|
|
|
+ values (#{actualFirstNo,jdbcType=VARCHAR}, #{enterTime,jdbcType=TIMESTAMP}, #{stableTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{confirmTime,jdbcType=TIMESTAMP}, #{completeTime,jdbcType=TIMESTAMP}, #{leaveTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{totalSeconds,jdbcType=DECIMAL}, #{enterStableSeconds,jdbcType=DECIMAL}, #{stableConfirmSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ #{confirmCompleteSeconds,jdbcType=DECIMAL}, #{completeLeaveSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkhookmetertime.model.MeterWorkHookMeterTime">
|
|
|
|
|
+ insert into METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="actualFirstNo != null">
|
|
|
|
|
+ ACTUAL_FIRST_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ ENTER_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ STABLE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ CONFIRM_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ COMPLETE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ LEAVE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ TOTAL_SECONDS,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ ENTER_STABLE_SECONDS,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ STABLE_CONFIRM_SECONDS,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ CONFIRM_COMPLETE_SECONDS,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ COMPLETE_LEAVE_SECONDS,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null">
|
|
|
|
|
+ VALUE_FLAG,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ CREATE_MAN_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ CREATE_MAN_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="actualFirstNo != null">
|
|
|
|
|
+ #{actualFirstNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ #{enterTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ #{stableTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ #{confirmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ #{completeTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ #{leaveTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ #{totalSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ #{enterStableSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ #{stableConfirmSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ #{confirmCompleteSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ #{completeLeaveSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null">
|
|
|
|
|
+ #{valueFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkhookmetertime.model.MeterWorkHookMeterTime">
|
|
|
|
|
+ update METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ set ENTER_TIME = #{enterTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ STABLE_TIME = #{stableTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ CONFIRM_TIME = #{confirmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ COMPLETE_TIME = #{completeTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ LEAVE_TIME = #{leaveTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ TOTAL_SECONDS = #{totalSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ ENTER_STABLE_SECONDS = #{enterStableSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ STABLE_CONFIRM_SECONDS = #{stableConfirmSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ CONFIRM_COMPLETE_SECONDS = #{confirmCompleteSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ COMPLETE_LEAVE_SECONDS = #{completeLeaveSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkhookmetertime.model.MeterWorkHookMeterTime">
|
|
|
|
|
+ update METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="enterTime != null">
|
|
|
|
|
+ ENTER_TIME = #{enterTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableTime != null">
|
|
|
|
|
+ STABLE_TIME = #{stableTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmTime != null">
|
|
|
|
|
+ CONFIRM_TIME = #{confirmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeTime != null">
|
|
|
|
|
+ COMPLETE_TIME = #{completeTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="leaveTime != null">
|
|
|
|
|
+ LEAVE_TIME = #{leaveTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalSeconds != null">
|
|
|
|
|
+ TOTAL_SECONDS = #{totalSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="enterStableSeconds != null">
|
|
|
|
|
+ ENTER_STABLE_SECONDS = #{enterStableSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="stableConfirmSeconds != null">
|
|
|
|
|
+ STABLE_CONFIRM_SECONDS = #{stableConfirmSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="confirmCompleteSeconds != null">
|
|
|
|
|
+ CONFIRM_COMPLETE_SECONDS = #{confirmCompleteSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="completeLeaveSeconds != null">
|
|
|
|
|
+ COMPLETE_LEAVE_SECONDS = #{completeLeaveSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null">
|
|
|
|
|
+ VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManNo != null">
|
|
|
|
|
+ CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null">
|
|
|
|
|
+ CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ <include refid="where"/>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ <include refid="whereLike"/>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
|
+ insert into METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ (ACTUAL_FIRST_NO,
|
|
|
|
|
+ ENTER_TIME, STABLE_TIME, CONFIRM_TIME,
|
|
|
|
|
+ COMPLETE_TIME, LEAVE_TIME,
|
|
|
|
|
+ TOTAL_SECONDS, ENTER_STABLE_SECONDS,
|
|
|
|
|
+ STABLE_CONFIRM_SECONDS, CONFIRM_COMPLETE_SECONDS,
|
|
|
|
|
+ COMPLETE_LEAVE_SECONDS, VALUE_FLAG,
|
|
|
|
|
+ CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME
|
|
|
|
|
+ )
|
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
|
+ select
|
|
|
|
|
+ #{item.actualFirstNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.enterTime,jdbcType=TIMESTAMP}, #{item.stableTime,jdbcType=TIMESTAMP}, #{item.confirmTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.completeTime,jdbcType=TIMESTAMP}, #{item.leaveTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{item.totalSeconds,jdbcType=DECIMAL}, #{item.enterStableSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.stableConfirmSeconds,jdbcType=DECIMAL}, #{item.confirmCompleteSeconds,jdbcType=DECIMAL},
|
|
|
|
|
+ #{item.completeLeaveSeconds,jdbcType=DECIMAL}, #{item.valueFlag,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ from dual
|
|
|
|
|
+ </foreach> )
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
|
+ update METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ set
|
|
|
|
|
+ ACTUAL_FIRST_NO=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ENTER_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.enterTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,STABLE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.stableTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CONFIRM_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.confirmTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,COMPLETE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.completeTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,LEAVE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.leaveTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,TOTAL_SECONDS=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.totalSeconds,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,ENTER_STABLE_SECONDS=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.enterStableSeconds,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,STABLE_CONFIRM_SECONDS=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.stableConfirmSeconds,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CONFIRM_COMPLETE_SECONDS=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.confirmCompleteSeconds,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,COMPLETE_LEAVE_SECONDS=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.completeLeaveSeconds,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,VALUE_FLAG=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_MAN_NO=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_MAN_NAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
|
|
|
|
|
+ when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ where ACTUAL_FIRST_NO in
|
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
|
+ #{item.actualFirstNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
|
+ delete from METER_WORK_HOOK_METER_TIME
|
|
|
|
|
+ where ACTUAL_FIRST_NO in
|
|
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
+ <select id="selectGroupByTime"
|
|
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkhookmetertime.model.GroupTimeVo">
|
|
|
|
|
+ select
|
|
|
|
|
+ t1.BASE_SPOT_NO baseSpotNo,
|
|
|
|
|
+ t1.BASE_SPOT_NAME baseSpotName,
|
|
|
|
|
+ round(avg(t.TOTAL_NUM),2) avgTotal,
|
|
|
|
|
+ round(avg(t.UP_NUM),2) avgUp,
|
|
|
|
|
+ round(avg(t.METER_NUM),2) avgMeter,
|
|
|
|
|
+ round(avg(t.DOWN_NUM),2) avgDown
|
|
|
|
|
+ from METER_WORK_CAR_METER_TIME t
|
|
|
|
|
+ left join meter_work_railway_act_first t1
|
|
|
|
|
+ on t.actual_first_no =t1.actual_first_no
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and t.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and t.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
|
|
+ and t1.BASE_SPOT_NAME like '%${baseSpotName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ group by t1.BASE_SPOT_NO,t1.BASE_SPOT_NAME
|
|
|
|
|
+ </select>
|
|
|
|
|
+</mapper>
|