<?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.jisco.dynamicweight.dynamicworkupdata.mapper.DynamicWorkUpdataMapper">
    <resultMap id="BaseResultMap" type="com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata">
        <id column="UPDATA_NO" jdbcType="VARCHAR" property="updataNo"/>
        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
        <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode"/>
        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
        <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
        <result column="RECIEVER_CODE" jdbcType="VARCHAR" property="recieverCode"/>
        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
        <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode"/>
        <result column="WEIGHT" jdbcType="VARCHAR" property="weight"/>
        <result column="RECIEVER_TYPE" jdbcType="VARCHAR" property="recieverType"/>
        <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType"/>
        <result column="UPLOADED" jdbcType="VARCHAR" property="uploaded"/>
        <result column="START_TIME" jdbcType="TIMESTAMP" property="startTime"/>
        <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime"/>
        <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
        <result column="AUDITING_MAN_NO" jdbcType="VARCHAR" property="auditingManNo"/>
        <result column="ORIGINAL_VALUE" jdbcType="VARCHAR" property="originalValue"/>
        <result column="SYSLOG" jdbcType="VARCHAR" property="syslog"/>
        <result column="AUDITING_MAN_NAME" jdbcType="VARCHAR" property="auditingManName"/>
        <result column="AUDITING_TIME" jdbcType="TIMESTAMP" property="auditingTime"/>
        <result column="AUDITING_FLAG" jdbcType="VARCHAR" property="auditingFlag"/>
        <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag"/>
        <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"/>
        <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo"/>
        <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName"/>
        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="IS_UPLOAD" jdbcType="VARCHAR" property="isUpload"/>
        <result column="IS_INBATCHES" jdbcType="VARCHAR" property="isInbatches"/>
        <result column="IS_RETURNED_DUST" jdbcType="VARCHAR" property="isReturnedDust"/>
        <result column="IS_COKE" jdbcType="VARCHAR" property="isCoke"/>
    </resultMap>
    <sql id="columns">
        UPDATA_NO
        , MATERIAL_NAME, MATERIAL_CODE, STATION_NAME, STATION_CODE, RECIEVER_NAME,
    RECIEVER_CODE, SENDER_NAME, SENDER_CODE, WEIGHT, RECIEVER_TYPE, SENDER_TYPE, UPLOADED,
    START_TIME, END_TIME, MEMO, AUDITING_MAN_NO, ORIGINAL_VALUE, SYSLOG, AUDITING_MAN_NAME,
    AUDITING_TIME, AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, IS_UPLOAD, IS_INBATCHES, IS_RETURNED_DUST,
    IS_COKE
    </sql>
    <sql id="columns_alias">
        t
        .
        UPDATA_NO
        , t.MATERIAL_NAME, t.MATERIAL_CODE, t.STATION_NAME, t.STATION_CODE, t.RECIEVER_NAME,
    t.RECIEVER_CODE, t.SENDER_NAME, t.SENDER_CODE, t.WEIGHT, t.RECIEVER_TYPE, t.SENDER_TYPE, 
    t.UPLOADED, t.START_TIME, t.END_TIME, t.MEMO, t.AUDITING_MAN_NO, t.ORIGINAL_VALUE, 
    t.SYSLOG, t.AUDITING_MAN_NAME, t.AUDITING_TIME, t.AUDITING_FLAG, t.VALID_FLAG, t.CREATE_MAN_NO, 
    t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME
    </sql>
    <sql id="select">
        SELECT
        <include refid="columns"/>
        FROM DYNAMIC_WORK_UPDATA
    </sql>
    <sql id="select_alias">
        SELECT
        <include refid="columns_alias"/>,
        DYNAMIC_BASE_BATCH_STATION.IS_UPLOAD, DYNAMIC_BASE_BATCH_STATION.IS_INBATCHES,
        DYNAMIC_BASE_MATERIAL.IS_RETURNED_DUST, DYNAMIC_BASE_MATERIAL.IS_COKE
        FROM DYNAMIC_WORK_UPDATA t
        left join DYNAMIC_BASE_BATCH_STATION on t.STATION_CODE = DYNAMIC_BASE_BATCH_STATION.PIKA_CODE
        left join DYNAMIC_BASE_MATERIAL on t.MATERIAL_CODE = DYNAMIC_BASE_MATERIAL.MATERIAL_CODE
    </sql>
    <sql id="where">
        <where>
            <if test="updataNo != null and updataNo != ''">
                and UPDATA_NO = #{updataNo}
            </if>
            <if test="materialName != null and materialName != ''">
                and MATERIAL_NAME = #{materialName}
            </if>
            <if test="materialCode != null and materialCode != ''">
                and MATERIAL_CODE = #{materialCode}
            </if>
            <if test="stationName != null and stationName != ''">
                and STATION_NAME = #{stationName}
            </if>
            <if test="stationCode != null and stationCode != ''">
                and STATION_CODE = #{stationCode}
            </if>
            <if test="recieverName != null and recieverName != ''">
                and RECIEVER_NAME = #{recieverName}
            </if>
            <if test="recieverCode != null and recieverCode != ''">
                and RECIEVER_CODE = #{recieverCode}
            </if>
            <if test="senderName != null and senderName != ''">
                and SENDER_NAME = #{senderName}
            </if>
            <if test="senderCode != null and senderCode != ''">
                and SENDER_CODE = #{senderCode}
            </if>
            <if test="weight != null and weight != ''">
                and WEIGHT = #{weight}
            </if>
            <if test="recieverType != null and recieverType != ''">
                and RECIEVER_TYPE = #{recieverType}
            </if>
            <if test="senderType != null and senderType != ''">
                and SENDER_TYPE = #{senderType}
            </if>
            <if test="uploaded != null and uploaded != ''">
                and UPLOADED = #{uploaded}
            </if>
            <if test="startTime != null">
                and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
            </if>
            <if test="endTime != null">
                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') = #{endTime}
            </if>
            <if test="endTime1 != null">
                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') &gt;= #{endTime1}
            </if>
            <if test="endTime2 != null">
                and TO_CHAR(END_TIME,'yyyy-MM-dd HH24:mi:ss') &lt;= #{endTime2}
            </if>
            <if test="memo != null and memo != ''">
                and MEMO = #{memo}
            </if>
            <if test="auditingManNo != null and auditingManNo != ''">
                and AUDITING_MAN_NO = #{auditingManNo}
            </if>
            <if test="originalValue != null and originalValue != ''">
                and ORIGINAL_VALUE = #{originalValue}
            </if>
            <if test="syslog != null and syslog != ''">
                and SYSLOG = #{syslog}
            </if>
            <if test="auditingManName != null and auditingManName != ''">
                and AUDITING_MAN_NAME = #{auditingManName}
            </if>
            <if test="auditingTime != null">
                and TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
            </if>
            <if test="auditingFlag != null and auditingFlag != ''">
                and AUDITING_FLAG = #{auditingFlag}
            </if>
            <if test="validFlag != null and validFlag != ''">
                and VALID_FLAG = #{validFlag}
            </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>
            <if test="updateManNo != null and updateManNo != ''">
                and UPDATE_MAN_NO = #{updateManNo}
            </if>
            <if test="updateManName != null and updateManName != ''">
                and UPDATE_MAN_NAME = #{updateManName}
            </if>
            <if test="updateTime != null">
                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
            </if>
            <if test="isUpload != null">
                and IS_UPLOAD = #{isUpload}
            </if>
            <if test="isInbatches != null">
                and IS_INBATCHES = #{isInbatches}
            </if>
            <if test="isReturnedDust != null">
                and IS_RETURNED_DUST = #{isReturnedDust}
            </if>
            <if test="isCoke != null">
                and IS_COKE = #{isCoke}
            </if>
        </where>
    </sql>
    <sql id="whereLike">
        <where>
            <if test="updataNo != null and updataNo != ''">
                and t.UPDATA_NO LIKE '%${updataNo}%'
            </if>
            <if test="materialName != null and materialName != ''">
                and t.MATERIAL_NAME LIKE '%${materialName}%'
            </if>
            <if test="materialCode != null and materialCode != ''">
                and t.MATERIAL_CODE LIKE '%${materialCode}%'
            </if>
            <if test="stationName != null and stationName != ''">
                and t.STATION_NAME LIKE '%${stationName}%'
            </if>
            <if test="stationCode != null and stationCode != ''">
                and t.STATION_CODE LIKE '%${stationCode}%'
            </if>
            <if test="recieverName != null and recieverName != ''">
                and t.RECIEVER_NAME LIKE '%${recieverName}%'
            </if>
            <if test="recieverCode != null and recieverCode != ''">
                and t.RECIEVER_CODE LIKE '%${recieverCode}%'
            </if>
            <if test="senderName != null and senderName != ''">
                and t.SENDER_NAME LIKE '%${senderName}%'
            </if>
            <if test="senderCode != null and senderCode != ''">
                and t.SENDER_CODE LIKE '%${senderCode}%'
            </if>
            <if test="weight != null and weight != ''">
                and t.WEIGHT LIKE '%${weight}%'
            </if>
            <if test="recieverType != null and recieverType != ''">
                and t.RECIEVER_TYPE LIKE '%${recieverType}%'
            </if>
            <if test="senderType != null and senderType != ''">
                and t.SENDER_TYPE LIKE '%${senderType}%'
            </if>
            <if test="uploaded != null and uploaded != ''">
                and t.UPLOADED LIKE '%${uploaded}%'
            </if>
            <if test="startTime != null">
                and TO_CHAR(t.START_TIME,'yyyy-MM-dd') = #{startTime}
            </if>
            <if test="endTime != null">
                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') = #{endTime}
            </if>
            <if test="endTime1 != null">
                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') &gt;= #{endTime1}
            </if>
            <if test="endTime2 != null">
                and TO_CHAR(t.END_TIME,'yyyy-MM-dd HH24:mi:ss') &lt;= #{endTime2}
            </if>
            <if test="memo != null and memo != ''">
                and t.MEMO LIKE '%${memo}%'
            </if>
            <if test="auditingManNo != null and auditingManNo != ''">
                and t.AUDITING_MAN_NO LIKE '%${auditingManNo}%'
            </if>
            <if test="originalValue != null and originalValue != ''">
                and t.ORIGINAL_VALUE LIKE '%${originalValue}%'
            </if>
            <if test="syslog != null and syslog != ''">
                and t.SYSLOG LIKE '%${syslog}%'
            </if>
            <if test="auditingManName != null and auditingManName != ''">
                and t.AUDITING_MAN_NAME LIKE '%${auditingManName}%'
            </if>
            <if test="auditingTime != null">
                and TO_CHAR(t.AUDITING_TIME,'yyyy-MM-dd') = #{auditingTime}
            </if>
            <if test="auditingFlag != null and auditingFlag != ''">
                and t.AUDITING_FLAG LIKE '%${auditingFlag}%'
            </if>
            <if test="validFlag != null and validFlag != ''">
                and t.VALID_FLAG LIKE '%${validFlag}%'
            </if>
            <if test="createManNo != null and createManNo != ''">
                and t.CREATE_MAN_NO LIKE '%${createManNo}%'
            </if>
            <if test="createManName != null and createManName != ''">
                and t.CREATE_MAN_NAME LIKE '%${createManName}%'
            </if>
            <if test="createTime != null">
                and TO_CHAR(t.CREATE_TIME,'yyyy-MM-dd') = #{createTime}
            </if>
            <if test="updateManNo != null and updateManNo != ''">
                and t.UPDATE_MAN_NO LIKE '%${updateManNo}%'
            </if>
            <if test="updateManName != null and updateManName != ''">
                and t.UPDATE_MAN_NAME LIKE '%${updateManName}%'
            </if>
            <if test="updateTime != null">
                and TO_CHAR(t.UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
            </if>
            <if test="isUpload != null">
                and IS_UPLOAD = #{isUpload}
            </if>
            <if test="isInbatches != null">
                and IS_INBATCHES = #{isInbatches}
            </if>
            <if test="isReturnedDust != null">
                and IS_RETURNED_DUST = #{isReturnedDust}
            </if>
            <if test="isCoke != null">
                and IS_COKE = #{isCoke}
            </if>
        </where>
    </sql>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete
        from DYNAMIC_WORK_UPDATA
        where UPDATA_NO = #{updataNo,jdbcType=VARCHAR}
    </delete>
    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
        delete from DYNAMIC_WORK_UPDATA
        where 1!=1
        <if test="materialName != null and materialName != ''">
            or MATERIAL_NAME = #{materialName}
        </if>
        <if test="materialCode != null and materialCode != ''">
            or MATERIAL_CODE = #{materialCode}
        </if>
        <if test="stationName != null and stationName != ''">
            or STATION_NAME = #{stationName}
        </if>
        <if test="stationCode != null and stationCode != ''">
            or STATION_CODE = #{stationCode}
        </if>
        <if test="recieverName != null and recieverName != ''">
            or RECIEVER_NAME = #{recieverName}
        </if>
        <if test="recieverCode != null and recieverCode != ''">
            or RECIEVER_CODE = #{recieverCode}
        </if>
        <if test="senderName != null and senderName != ''">
            or SENDER_NAME = #{senderName}
        </if>
        <if test="senderCode != null and senderCode != ''">
            or SENDER_CODE = #{senderCode}
        </if>
        <if test="weight != null and weight != ''">
            or WEIGHT = #{weight}
        </if>
        <if test="recieverType != null and recieverType != ''">
            or RECIEVER_TYPE = #{recieverType}
        </if>
        <if test="senderType != null and senderType != ''">
            or SENDER_TYPE = #{senderType}
        </if>
        <if test="uploaded != null and uploaded != ''">
            or UPLOADED = #{uploaded}
        </if>
        <if test="startTime != null">
            or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
        </if>
        <if test="endTime != null">
            or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
        </if>
        <if test="memo != null and memo != ''">
            or MEMO = #{memo}
        </if>
        <if test="auditingManNo != null and auditingManNo != ''">
            or AUDITING_MAN_NO = #{auditingManNo}
        </if>
        <if test="originalValue != null and originalValue != ''">
            or ORIGINAL_VALUE = #{originalValue}
        </if>
        <if test="syslog != null and syslog != ''">
            or SYSLOG = #{syslog}
        </if>
        <if test="auditingManName != null and auditingManName != ''">
            or AUDITING_MAN_NAME = #{auditingManName}
        </if>
        <if test="auditingTime != null">
            or TO_CHAR(AUDITING_TIME,'yyyy-MM-dd') = '#{auditingTime}'
        </if>
        <if test="auditingFlag != null and auditingFlag != ''">
            or AUDITING_FLAG = #{auditingFlag}
        </if>
        <if test="validFlag != null and validFlag != ''">
            or VALID_FLAG = #{validFlag}
        </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>
        <if test="updateManNo != null and updateManNo != ''">
            or UPDATE_MAN_NO = #{updateManNo}
        </if>
        <if test="updateManName != null and updateManName != ''">
            or UPDATE_MAN_NAME = #{updateManName}
        </if>
        <if test="updateTime != null">
            or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
        </if>
    </delete>
    <insert id="insert" parameterType="com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata">
        insert into DYNAMIC_WORK_UPDATA (UPDATA_NO, MATERIAL_NAME, MATERIAL_CODE,
                                         STATION_NAME, STATION_CODE, RECIEVER_NAME,
                                         RECIEVER_CODE, SENDER_NAME, SENDER_CODE,
                                         WEIGHT, RECIEVER_TYPE, SENDER_TYPE,
                                         UPLOADED, START_TIME, END_TIME,
                                         MEMO, AUDITING_MAN_NO, ORIGINAL_VALUE,
                                         SYSLOG, AUDITING_MAN_NAME, AUDITING_TIME,
                                         AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO,
                                         CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
                                         UPDATE_MAN_NAME, UPDATE_TIME)
        values (#{updataNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{materialCode,jdbcType=VARCHAR},
                #{stationName,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{recieverName,jdbcType=VARCHAR},
                #{recieverCode,jdbcType=VARCHAR}, #{senderName,jdbcType=VARCHAR}, #{senderCode,jdbcType=VARCHAR},
                #{weight,jdbcType=VARCHAR}, #{recieverType,jdbcType=VARCHAR}, #{senderType,jdbcType=VARCHAR},
                #{uploaded,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
                #{memo,jdbcType=VARCHAR}, #{auditingManNo,jdbcType=VARCHAR}, #{originalValue,jdbcType=VARCHAR},
                #{syslog,jdbcType=VARCHAR}, #{auditingManName,jdbcType=VARCHAR}, #{auditingTime,jdbcType=TIMESTAMP},
                #{auditingFlag,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
                #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
                #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata">
        insert into DYNAMIC_WORK_UPDATA
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="updataNo != null">
                UPDATA_NO,
            </if>
            <if test="materialName != null">
                MATERIAL_NAME,
            </if>
            <if test="materialCode != null">
                MATERIAL_CODE,
            </if>
            <if test="stationName != null">
                STATION_NAME,
            </if>
            <if test="stationCode != null">
                STATION_CODE,
            </if>
            <if test="recieverName != null">
                RECIEVER_NAME,
            </if>
            <if test="recieverCode != null">
                RECIEVER_CODE,
            </if>
            <if test="senderName != null">
                SENDER_NAME,
            </if>
            <if test="senderCode != null">
                SENDER_CODE,
            </if>
            <if test="weight != null">
                WEIGHT,
            </if>
            <if test="recieverType != null">
                RECIEVER_TYPE,
            </if>
            <if test="senderType != null">
                SENDER_TYPE,
            </if>
            <if test="uploaded != null">
                UPLOADED,
            </if>
            <if test="startTime != null">
                START_TIME,
            </if>
            <if test="endTime != null">
                END_TIME,
            </if>
            <if test="memo != null">
                MEMO,
            </if>
            <if test="auditingManNo != null">
                AUDITING_MAN_NO,
            </if>
            <if test="originalValue != null">
                ORIGINAL_VALUE,
            </if>
            <if test="syslog != null">
                SYSLOG,
            </if>
            <if test="auditingManName != null">
                AUDITING_MAN_NAME,
            </if>
            <if test="auditingTime != null">
                AUDITING_TIME,
            </if>
            <if test="auditingFlag != null">
                AUDITING_FLAG,
            </if>
            <if test="validFlag != null">
                VALID_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>
            <if test="updateManNo != null">
                UPDATE_MAN_NO,
            </if>
            <if test="updateManName != null">
                UPDATE_MAN_NAME,
            </if>
            <if test="updateTime != null">
                UPDATE_TIME,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="updataNo != null">
                #{updataNo,jdbcType=VARCHAR},
            </if>
            <if test="materialName != null">
                #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="materialCode != null">
                #{materialCode,jdbcType=VARCHAR},
            </if>
            <if test="stationName != null">
                #{stationName,jdbcType=VARCHAR},
            </if>
            <if test="stationCode != null">
                #{stationCode,jdbcType=VARCHAR},
            </if>
            <if test="recieverName != null">
                #{recieverName,jdbcType=VARCHAR},
            </if>
            <if test="recieverCode != null">
                #{recieverCode,jdbcType=VARCHAR},
            </if>
            <if test="senderName != null">
                #{senderName,jdbcType=VARCHAR},
            </if>
            <if test="senderCode != null">
                #{senderCode,jdbcType=VARCHAR},
            </if>
            <if test="weight != null">
                #{weight,jdbcType=VARCHAR},
            </if>
            <if test="recieverType != null">
                #{recieverType,jdbcType=VARCHAR},
            </if>
            <if test="senderType != null">
                #{senderType,jdbcType=VARCHAR},
            </if>
            <if test="uploaded != null">
                #{uploaded,jdbcType=VARCHAR},
            </if>
            <if test="startTime != null">
                #{startTime,jdbcType=TIMESTAMP},
            </if>
            <if test="endTime != null">
                #{endTime,jdbcType=TIMESTAMP},
            </if>
            <if test="memo != null">
                #{memo,jdbcType=VARCHAR},
            </if>
            <if test="auditingManNo != null">
                #{auditingManNo,jdbcType=VARCHAR},
            </if>
            <if test="originalValue != null">
                #{originalValue,jdbcType=VARCHAR},
            </if>
            <if test="syslog != null">
                #{syslog,jdbcType=VARCHAR},
            </if>
            <if test="auditingManName != null">
                #{auditingManName,jdbcType=VARCHAR},
            </if>
            <if test="auditingTime != null">
                #{auditingTime,jdbcType=TIMESTAMP},
            </if>
            <if test="auditingFlag != null">
                #{auditingFlag,jdbcType=VARCHAR},
            </if>
            <if test="validFlag != null">
                #{validFlag,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>
            <if test="updateManNo != null">
                #{updateManNo,jdbcType=VARCHAR},
            </if>
            <if test="updateManName != null">
                #{updateManName,jdbcType=VARCHAR},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata">
        update DYNAMIC_WORK_UPDATA
        set MATERIAL_NAME     = #{materialName,jdbcType=VARCHAR},
            MATERIAL_CODE     = #{materialCode,jdbcType=VARCHAR},
            STATION_NAME      = #{stationName,jdbcType=VARCHAR},
            STATION_CODE      = #{stationCode,jdbcType=VARCHAR},
            RECIEVER_NAME     = #{recieverName,jdbcType=VARCHAR},
            RECIEVER_CODE     = #{recieverCode,jdbcType=VARCHAR},
            SENDER_NAME       = #{senderName,jdbcType=VARCHAR},
            SENDER_CODE       = #{senderCode,jdbcType=VARCHAR},
            WEIGHT            = #{weight,jdbcType=VARCHAR},
            RECIEVER_TYPE     = #{recieverType,jdbcType=VARCHAR},
            SENDER_TYPE       = #{senderType,jdbcType=VARCHAR},
            UPLOADED          = #{uploaded,jdbcType=VARCHAR},
            START_TIME        = #{startTime,jdbcType=TIMESTAMP},
            END_TIME          = #{endTime,jdbcType=TIMESTAMP},
            MEMO              = #{memo,jdbcType=VARCHAR},
            AUDITING_MAN_NO   = #{auditingManNo,jdbcType=VARCHAR},
            ORIGINAL_VALUE    = #{originalValue,jdbcType=VARCHAR},
            SYSLOG            = #{syslog,jdbcType=VARCHAR},
            AUDITING_MAN_NAME = #{auditingManName,jdbcType=VARCHAR},
            AUDITING_TIME     = #{auditingTime,jdbcType=TIMESTAMP},
            AUDITING_FLAG     = #{auditingFlag,jdbcType=VARCHAR},
            VALID_FLAG        = #{validFlag,jdbcType=VARCHAR},
            CREATE_MAN_NO     = #{createManNo,jdbcType=VARCHAR},
            CREATE_MAN_NAME   = #{createManName,jdbcType=VARCHAR},
            CREATE_TIME       = #{createTime,jdbcType=TIMESTAMP},
            UPDATE_MAN_NO     = #{updateManNo,jdbcType=VARCHAR},
            UPDATE_MAN_NAME   = #{updateManName,jdbcType=VARCHAR},
            UPDATE_TIME       = #{updateTime,jdbcType=TIMESTAMP}
        where UPDATA_NO = #{updataNo,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKeySelective"
            parameterType="com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata">
        update DYNAMIC_WORK_UPDATA
        <set>
            <if test="materialName != null">
                MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="materialCode != null">
                MATERIAL_CODE = #{materialCode,jdbcType=VARCHAR},
            </if>
            <if test="stationName != null">
                STATION_NAME = #{stationName,jdbcType=VARCHAR},
            </if>
            <if test="stationCode != null">
                STATION_CODE = #{stationCode,jdbcType=VARCHAR},
            </if>
            <if test="recieverName != null">
                RECIEVER_NAME = #{recieverName,jdbcType=VARCHAR},
            </if>
            <if test="recieverCode != null">
                RECIEVER_CODE = #{recieverCode,jdbcType=VARCHAR},
            </if>
            <if test="senderName != null">
                SENDER_NAME = #{senderName,jdbcType=VARCHAR},
            </if>
            <if test="senderCode != null">
                SENDER_CODE = #{senderCode,jdbcType=VARCHAR},
            </if>
            <if test="weight != null">
                WEIGHT = #{weight,jdbcType=VARCHAR},
            </if>
            <if test="recieverType != null">
                RECIEVER_TYPE = #{recieverType,jdbcType=VARCHAR},
            </if>
            <if test="senderType != null">
                SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
            </if>
            <if test="uploaded != null">
                UPLOADED = #{uploaded,jdbcType=VARCHAR},
            </if>
            <if test="startTime != null">
                START_TIME = #{startTime,jdbcType=TIMESTAMP},
            </if>
            <if test="endTime != null">
                END_TIME = #{endTime,jdbcType=TIMESTAMP},
            </if>
            <if test="memo != null">
                MEMO = #{memo,jdbcType=VARCHAR},
            </if>
            <if test="auditingManNo != null">
                AUDITING_MAN_NO = #{auditingManNo,jdbcType=VARCHAR},
            </if>
            <if test="originalValue != null">
                ORIGINAL_VALUE = #{originalValue,jdbcType=VARCHAR},
            </if>
            <if test="syslog != null">
                SYSLOG = #{syslog,jdbcType=VARCHAR},
            </if>
            <if test="auditingManName != null">
                AUDITING_MAN_NAME = #{auditingManName,jdbcType=VARCHAR},
            </if>
            <if test="auditingTime != null">
                AUDITING_TIME = #{auditingTime,jdbcType=TIMESTAMP},
            </if>
            <if test="auditingFlag != null">
                AUDITING_FLAG = #{auditingFlag,jdbcType=VARCHAR},
            </if>
            <if test="validFlag != null">
                VALID_FLAG = #{validFlag,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>
            <if test="updateManNo != null">
                UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
            </if>
            <if test="updateManName != null">
                UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
            </if>
            <if test="updateTime != null">
                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
            </if>
        </set>
        where UPDATA_NO = #{updataNo,jdbcType=VARCHAR}
    </update>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        <include refid="select_alias"/>
        where UPDATA_NO = #{updataNo,jdbcType=VARCHAR}
    </select>
    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select_alias"/>
        <include refid="where"/>
    </select>
    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select_alias"/>
        <include refid="whereLike"/>
    </select>
    <select id="recalc" statementType="CALLABLE">
        {call GENERATEUPDATA()}
    </select>
    <select id="inbatchsTotalWeight" resultType="java.math.BigDecimal">
        select sum(weight)
        from DYNAMIC_WORK_UPDATA
        where STATION_CODE = #{stationCode}
          and END_TIME between #{date1} and #{date2}
    </select>
    <select id="returnedDustWeight" statementType="CALLABLE" parameterType="map">
        {call RETURNEDDUSTWEIGHT(#{meterialCode}, #{date1}, #{date2},
                                 #{weight,mode=OUT,jdbcType=NUMERIC,javaType=java.math.BigDecimal})}
    </select>
    <resultMap id="DailyReportMap" type="com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO">
        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
        <result column="BL8" jdbcType="NUMERIC" property="bl8"/>
        <result column="BL16" jdbcType="NUMERIC" property="bl16"/>
        <result column="BL24" jdbcType="NUMERIC" property="bl24"/>
        <result column="rzl" jdbcType="NUMERIC" property="rzl"/>
        <result column="yzl" jdbcType="NUMERIC" property="yzl"/>
        <result column="nzl" jdbcType="NUMERIC" property="nzl"/>
    </resultMap>
    <select id="dailyReport" resultMap="DailyReportMap">
        SELECT a.STATION_NAME,
               a.MATERIAL_NAME,
               a.RECIEVER_NAME,
               a.SENDER_NAME,
               a.BL8,
               b.BL16,
               c.BL24,
               d.rzl,
               e.yzl,
               f.nzl
        FROM (
                 SELECT STATION_NAME,
                        MATERIAL_NAME,
                        RECIEVER_NAME,
                        SENDER_NAME,
                        sum(WEIGHT) AS BL8
                 FROM DYNAMIC_WORK_UPDATA t
                 WHERE t.END_TIME &gt;= #{bl8start}
                   AND t.END_TIME &lt;= #{bl8end}
                 GROUP BY STATION_NAME,
                          MATERIAL_NAME,
                          RECIEVER_NAME,
                          SENDER_NAME
             ) a
                 LEFT JOIN (
            SELECT STATION_NAME,
                   MATERIAL_NAME,
                   RECIEVER_NAME,
                   SENDER_NAME,
                   sum(WEIGHT) AS BL16
            FROM DYNAMIC_WORK_UPDATA t
            WHERE t.END_TIME &gt;= #{bl16start}
              AND t.END_TIME &lt;= #{bl16end}
            GROUP BY STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME
        ) b
                           on a.STATION_NAME = b.STATION_NAME
                               and a.MATERIAL_NAME = b.MATERIAL_NAME
                               and a.RECIEVER_NAME = b.RECIEVER_NAME
                               and a.SENDER_NAME = b.SENDER_NAME
                 LEFT JOIN (
            SELECT STATION_NAME,
                   MATERIAL_NAME,
                   RECIEVER_NAME,
                   SENDER_NAME,
                   sum(WEIGHT) AS BL24
            FROM DYNAMIC_WORK_UPDATA t
            WHERE t.END_TIME &gt;= #{bl24start}
              AND t.END_TIME &lt;= #{bl24end}
            GROUP BY STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME
        ) c
                           on a.STATION_NAME = c.STATION_NAME
                               and a.MATERIAL_NAME = c.MATERIAL_NAME
                               and a.RECIEVER_NAME = c.RECIEVER_NAME
                               and a.SENDER_NAME = c.SENDER_NAME
                 LEFT JOIN (
            SELECT STATION_NAME,
                   MATERIAL_NAME,
                   RECIEVER_NAME,
                   SENDER_NAME,
                   sum(WEIGHT) AS rzl
            FROM DYNAMIC_WORK_UPDATA t
            WHERE t.END_TIME &gt;= #{rzlstart}
              AND t.END_TIME &lt;= #{rzlend}
            GROUP BY STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME
        ) d
                           on a.STATION_NAME = d.STATION_NAME
                               and a.MATERIAL_NAME = d.MATERIAL_NAME
                               and a.RECIEVER_NAME = d.RECIEVER_NAME
                               and a.SENDER_NAME = d.SENDER_NAME
                 LEFT JOIN (
            SELECT STATION_NAME,
                   MATERIAL_NAME,
                   RECIEVER_NAME,
                   SENDER_NAME,
                   sum(WEIGHT) AS yzl
            FROM DYNAMIC_WORK_UPDATA t
            WHERE t.END_TIME &gt;= #{yzlstart}
              AND t.END_TIME &lt;= #{yzlend}
            GROUP BY STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME
        ) e
                           on a.STATION_NAME = e.STATION_NAME
                               and a.MATERIAL_NAME = e.MATERIAL_NAME
                               and a.RECIEVER_NAME = e.RECIEVER_NAME
                               and a.SENDER_NAME = e.SENDER_NAME
                 LEFT JOIN (
            SELECT STATION_NAME,
                   MATERIAL_NAME,
                   RECIEVER_NAME,
                   SENDER_NAME,
                   sum(WEIGHT) AS nzl
            FROM DYNAMIC_WORK_UPDATA t
            WHERE t.END_TIME &gt;= #{nzlstart}
              AND t.END_TIME &lt;= #{nzlend}
            GROUP BY STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME
        ) f
                           on f.STATION_NAME = c.STATION_NAME
                               and f.MATERIAL_NAME = c.MATERIAL_NAME
                               and f.RECIEVER_NAME = c.RECIEVER_NAME
                               and f.SENDER_NAME = c.SENDER_NAME
    </select>
    <!--    查询审核数据-->
    <resultMap id="getAuditDataMap" type="com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO">
        <result column="MATERIAL_CODE" jdbcType="VARCHAR" property="materialCode"/>
        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
        <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode"/>
        <result column="STATION_NAME" jdbcType="VARCHAR" property="stationName"/>
        <result column="RECIEVER_CODE" jdbcType="VARCHAR" property="recieverCode"/>
        <result column="RECIEVER_NAME" jdbcType="VARCHAR" property="recieverName"/>
        <result column="RECIEVER_TYPE" jdbcType="VARCHAR" property="recieverType"/>
        <result column="SENDER_CODE" jdbcType="VARCHAR" property="senderCode"/>
        <result column="SENDER_NAME" jdbcType="VARCHAR" property="senderName"/>
        <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType"/>
        <result column="B8" jdbcType="NUMERIC" property="bl8"/>
        <result column="B16" jdbcType="NUMERIC" property="bl16"/>
        <result column="B24" jdbcType="NUMERIC" property="bl24"/>
    </resultMap>
    <!--    查询待审核数据-->
    <select id="getAuditData" resultMap="getAuditDataMap">
        select a.STATION_CODE,
               a.STATION_NAME,
               a.MATERIAL_CODE,
               a.MATERIAL_NAME,
               a.RECIEVER_CODE,
               a.RECIEVER_NAME,
               a.RECIEVER_TYPE,
               a.SENDER_CODE,
               a.SENDER_NAME,
               a.SENDER_TYPE,
               b.B8,
               c.B16,
               d.B24
        from (
                 SELECT STATION_CODE,
                        STATION_NAME,
                        MATERIAL_CODE,
                        MATERIAL_NAME,
                        RECIEVER_CODE,
                        RECIEVER_NAME,
                        RECIEVER_TYPE,
                        SENDER_CODE,
                        SENDER_NAME,
                        SENDER_TYPE
                 FROM DYNAMIC_WORK_UPDATA
                 WHERE END_TIME &gt;= #{bl8start}
                   AND END_TIME &lt;= #{bl24end}
                   AND VALID_FLAG = '1'
                   AND STATION_NAME &lt;&gt; 'M1#皮带秤'
                   AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
                 GROUP BY STATION_CODE,
                          STATION_NAME,
                          MATERIAL_CODE,
                          MATERIAL_NAME,
                          RECIEVER_CODE,
                          RECIEVER_NAME,
                          RECIEVER_TYPE,
                          SENDER_CODE,
                          SENDER_NAME,
                          SENDER_TYPE
             ) a
                 LEFT JOIN
             (SELECT STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME,
                     sum(WEIGHT) B8
              FROM DYNAMIC_WORK_UPDATA
              WHERE END_TIME &gt;= #{bl8start}
                AND END_TIME &lt;= #{bl8end}
                AND VALID_FLAG = '1'
                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
              GROUP BY STATION_CODE,
                       STATION_NAME,
                       MATERIAL_CODE,
                       MATERIAL_NAME,
                       RECIEVER_CODE,
                       RECIEVER_NAME,
                       RECIEVER_TYPE,
                       SENDER_CODE,
                       SENDER_NAME,
                       SENDER_TYPE
             ) b
             on a.STATION_NAME = b.STATION_NAME
                 and a.MATERIAL_NAME = b.MATERIAL_NAME
                 and a.RECIEVER_NAME = b.RECIEVER_NAME
                 and a.SENDER_NAME = b.SENDER_NAME
                 LEFT JOIN
             (SELECT STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME,
                     sum(WEIGHT) B16
              FROM DYNAMIC_WORK_UPDATA
              WHERE END_TIME &gt;= #{bl16start}
                AND END_TIME &lt;= #{bl16end}
                AND VALID_FLAG = '1'
                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
              GROUP BY STATION_CODE,
                       STATION_NAME,
                       MATERIAL_CODE,
                       MATERIAL_NAME,
                       RECIEVER_CODE,
                       RECIEVER_NAME,
                       RECIEVER_TYPE,
                       SENDER_CODE,
                       SENDER_NAME,
                       SENDER_TYPE
             ) c
             on a.STATION_NAME = c.STATION_NAME
                 and a.MATERIAL_NAME = c.MATERIAL_NAME
                 and a.RECIEVER_NAME = c.RECIEVER_NAME
                 and a.SENDER_NAME = c.SENDER_NAME
                 LEFT JOIN
             (SELECT STATION_NAME,
                     MATERIAL_NAME,
                     RECIEVER_NAME,
                     SENDER_NAME,
                     sum(WEIGHT) B24
              FROM DYNAMIC_WORK_UPDATA
              WHERE END_TIME &gt;= #{bl24start}
                AND END_TIME &lt;= #{bl24end}
                AND VALID_FLAG = '1'
                AND STATION_NAME &lt;&gt; 'M1#皮带秤'
                AND STATION_NAME &lt;&gt; 'M1B#皮带秤'
              GROUP BY STATION_CODE,
                       STATION_NAME,
                       MATERIAL_CODE,
                       MATERIAL_NAME,
                       RECIEVER_CODE,
                       RECIEVER_NAME,
                       RECIEVER_TYPE,
                       SENDER_CODE,
                       SENDER_NAME,
                       SENDER_TYPE
             ) d
             on a.STATION_NAME = d.STATION_NAME
                 and a.MATERIAL_NAME = d.MATERIAL_NAME
                 and a.RECIEVER_NAME = d.RECIEVER_NAME
                 and a.SENDER_NAME = d.SENDER_NAME
    </select>
    <insert id="batchInsert" parameterType="java.util.List">
        insert into DYNAMIC_WORK_UPDATA
        (UPDATA_NO,
        MATERIAL_NAME, MATERIAL_CODE, STATION_NAME,
        STATION_CODE, RECIEVER_NAME, RECIEVER_CODE,
        SENDER_NAME, SENDER_CODE, WEIGHT,
        RECIEVER_TYPE, SENDER_TYPE, UPLOADED,
        START_TIME, END_TIME, MEMO,
        AUDITING_MAN_NO, ORIGINAL_VALUE,
        SYSLOG, AUDITING_MAN_NAME, AUDITING_TIME,
        AUDITING_FLAG, VALID_FLAG, CREATE_MAN_NO,
        CREATE_MAN_NAME, CREATE_TIME,
        UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME
        )
        ( <foreach collection="list" item="item" separator="union all">
        select
        #{item.updataNo,jdbcType=VARCHAR},
        #{item.materialName,jdbcType=VARCHAR}, #{item.materialCode,jdbcType=VARCHAR},
        #{item.stationName,jdbcType=VARCHAR},
        #{item.stationCode,jdbcType=VARCHAR}, #{item.recieverName,jdbcType=VARCHAR},
        #{item.recieverCode,jdbcType=VARCHAR},
        #{item.senderName,jdbcType=VARCHAR}, #{item.senderCode,jdbcType=VARCHAR}, #{item.weight,jdbcType=VARCHAR},
        #{item.recieverType,jdbcType=VARCHAR}, #{item.senderType,jdbcType=VARCHAR}, #{item.uploaded,jdbcType=VARCHAR},
        #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR},
        #{item.auditingManNo,jdbcType=VARCHAR}, #{item.originalValue,jdbcType=VARCHAR},
        #{item.syslog,jdbcType=VARCHAR}, #{item.auditingManName,jdbcType=VARCHAR},
        #{item.auditingTime,jdbcType=TIMESTAMP},
        #{item.auditingFlag,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR},
        #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
        #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
        #{item.updateTime,jdbcType=TIMESTAMP}
        from dual
    </foreach> )
    </insert>
    <update id="batchUpdate" parameterType="java.util.List">
        update DYNAMIC_WORK_UPDATA
        set
        UPDATA_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.updataNo,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.materialCode,jdbcType=VARCHAR}
        </foreach>
        ,STATION_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.stationName,jdbcType=VARCHAR}
        </foreach>
        ,STATION_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.stationCode,jdbcType=VARCHAR}
        </foreach>
        ,RECIEVER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.recieverName,jdbcType=VARCHAR}
        </foreach>
        ,RECIEVER_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.recieverCode,jdbcType=VARCHAR}
        </foreach>
        ,SENDER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.senderName,jdbcType=VARCHAR}
        </foreach>
        ,SENDER_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.senderCode,jdbcType=VARCHAR}
        </foreach>
        ,WEIGHT=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=VARCHAR}
        </foreach>
        ,RECIEVER_TYPE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.recieverType,jdbcType=VARCHAR}
        </foreach>
        ,SENDER_TYPE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
        </foreach>
        ,UPLOADED=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.uploaded,jdbcType=VARCHAR}
        </foreach>
        ,START_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
        </foreach>
        ,END_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
        </foreach>
        ,MEMO=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        ,AUDITING_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.auditingManNo,jdbcType=VARCHAR}
        </foreach>
        ,ORIGINAL_VALUE=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.originalValue,jdbcType=VARCHAR}
        </foreach>
        ,SYSLOG=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.syslog,jdbcType=VARCHAR}
        </foreach>
        ,AUDITING_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.auditingManName,jdbcType=VARCHAR}
        </foreach>
        ,AUDITING_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.auditingTime,jdbcType=TIMESTAMP}
        </foreach>
        ,AUDITING_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.auditingFlag,jdbcType=VARCHAR}
        </foreach>
        ,VALID_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case UPDATA_NO" close="end">
            when #{item.updataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        where UPDATA_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.updataNo,jdbcType=VARCHAR}
        </foreach>
    </update>
    <update id="setUploaded">
        UPDATE DYNAMIC_WORK_UPDATA t
        SET t.AUDITING_FLAG = '1'
        WHERE t.STATION_NAME = #{stationName}
          AND t.STATION_CODE = #{stationCode}
          AND t.MATERIAL_CODE = #{materialCode}
          AND t.MATERIAL_NAME = #{materialName}
          AND t.RECIEVER_NAME = #{recieverName}
          AND t.RECIEVER_CODE = #{recieverCode}
          AND t.SENDER_NAME = #{senderName}
          AND t.SENDER_CODE = #{senderCode}
          AND t.RECIEVER_TYPE = #{recieverType}
          AND t.SENDER_TYPE = #{senderType}
          AND t.END_TIME &gt;= #{startTime}
          AND t.END_TIME &lt;= #{endTime}
    </update>
    <delete id="batchDelete" parameterType="java.util.List">
        delete from DYNAMIC_WORK_UPDATA
        where UPDATA_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </delete>
    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->

</mapper>