<?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.pretrack.pretracknotice.mapper.PreTrackNoticeMapper">
    <resultMap id="BaseResultMap" type="com.steerinfo.pretrack.pretracknotice.model.PreTrackNotice">
        <id column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo"/>
        <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo"/>
        <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName"/>
        <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo"/>
        <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo"/>
        <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo"/>
        <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName"/>
        <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea"/>
        <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo"/>
        <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName"/>
        <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo"/>
        <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName"/>
        <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo"/>
        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName"/>
        <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo"/>
        <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName"/>
        <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo"/>
        <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName"/>
        <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo"/>
        <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName"/>
        <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo"/>
        <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName"/>
        <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"/>
        <result column="READ_FLAG" jdbcType="VARCHAR" property="readFlag"/>
        <result column="TRANSPORT_TYPE_NAME" jdbcType="VARCHAR" property="transportTypeName"/>
        <result column="TOTAL" jdbcType="DECIMAL" property="total"/>
        <result column="TOLERANCE_RATIO" jdbcType="DECIMAL" property="toleranceRatio"/>
        <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
        <result column="INDEX_CODE" jdbcType="VARCHAR" property="indexCode"/>
    </resultMap>
    <sql id="columns">
    NOTICE_NO, MATTER_NO, MATTER_NAME, CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME,
    SOURCE_AREA, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
    MATERIAL_NO, MATERIAL_NAME, SPEC_NO, SPEC_NAME, LOAD_POINT_NO, LOAD_POINT_NAME, CARRIER_UNIT_NO,
    CARRIER_UNIT_NAME, METER_TYPE_NO, METER_TYPE_NAME, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
    CREATE_TIME, READ_FLAG, TRANSPORT_TYPE_NAME, TOTAL, TOLERANCE_RATIO, MEMO, INDEX_CODE
  </sql>
    <sql id="columns_alias">
    t.NOTICE_NO, t.MATTER_NO, t.MATTER_NAME, t.CONTRACT_NO, t.BATCH_NO, t.CUSTOMER_SUPPLIER_NO,
    t.CUSTOMER_SUPPLIER_NAME, t.SOURCE_AREA, t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME,
    t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, t.MATERIAL_NO, t.MATERIAL_NAME, t.SPEC_NO,
    t.SPEC_NAME, t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.CARRIER_UNIT_NO, t.CARRIER_UNIT_NAME,
    t.METER_TYPE_NO, t.METER_TYPE_NAME, t.VALUE_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME,
    t.CREATE_TIME, t.READ_FLAG, t.TRANSPORT_TYPE_NAME, t.TOTAL, t.TOLERANCE_RATIO, t.MEMO,
    t.INDEX_CODE
  </sql>
    <sql id="select">
        SELECT
        <include refid="columns"/>
        FROM PRE_TRACK_NOTICE
    </sql>
    <sql id="select_alias">
        SELECT
        <include refid="columns_alias"/>
        FROM PRE_TRACK_NOTICE t
    </sql>
    <sql id="where">
        <where>
            <if test="noticeNo != null and noticeNo != ''">
                and NOTICE_NO = #{noticeNo}
            </if>
            <if test="matterNo != null and matterNo != ''">
                and MATTER_NO = #{matterNo}
            </if>
            <if test="matterName != null and matterName != ''">
                and MATTER_NAME = #{matterName}
            </if>
            <if test="contractNo != null and contractNo != ''">
                and CONTRACT_NO = #{contractNo}
            </if>
            <if test="batchNo != null and batchNo != ''">
                and BATCH_NO = #{batchNo}
            </if>
            <if test="customerSupplierNo != null and customerSupplierNo != ''">
                and CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
            </if>
            <if test="customerSupplierName != null and customerSupplierName != ''">
                and CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
            </if>
            <if test="sourceArea != null and sourceArea != ''">
                and SOURCE_AREA = #{sourceArea}
            </if>
            <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
                and FORWARDING_UNIT_NO = #{forwardingUnitNo}
            </if>
            <if test="forwardingUnitName != null and forwardingUnitName != ''">
                and FORWARDING_UNIT_NAME = #{forwardingUnitName}
            </if>
            <if test="receivingUintNo != null and receivingUintNo != ''">
                and RECEIVING_UINT_NO = #{receivingUintNo}
            </if>
            <if test="receivingUintName != null and receivingUintName != ''">
                and RECEIVING_UINT_NAME = #{receivingUintName}
            </if>
            <if test="materialNo != null and materialNo != ''">
                and MATERIAL_NO = #{materialNo}
            </if>
            <if test="materialName != null and materialName != ''">
                and MATERIAL_NAME = #{materialName}
            </if>
            <if test="specNo != null and specNo != ''">
                and SPEC_NO = #{specNo}
            </if>
            <if test="specName != null and specName != ''">
                and SPEC_NAME = #{specName}
            </if>
            <if test="loadPointNo != null and loadPointNo != ''">
                and LOAD_POINT_NO = #{loadPointNo}
            </if>
            <if test="loadPointName != null and loadPointName != ''">
                and LOAD_POINT_NAME = #{loadPointName}
            </if>
            <if test="carrierUnitNo != null and carrierUnitNo != ''">
                and CARRIER_UNIT_NO = #{carrierUnitNo}
            </if>
            <if test="carrierUnitName != null and carrierUnitName != ''">
                and CARRIER_UNIT_NAME = #{carrierUnitName}
            </if>
            <if test="meterTypeNo != null and meterTypeNo != ''">
                and METER_TYPE_NO = #{meterTypeNo}
            </if>
            <if test="meterTypeName != null and meterTypeName != ''">
                and METER_TYPE_NAME = #{meterTypeName}
            </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>
            <if test="readFlag != null and readFlag != ''">
                and READ_FLAG = #{readFlag}
            </if>
            <if test="transportTypeName != null and transportTypeName != ''">
                and TRANSPORT_TYPE_NAME = #{transportTypeName}
            </if>
            <if test="total != null">
                and TOTAL = #{total}
            </if>
            <if test="toleranceRatio != null">
                and TOLERANCE_RATIO = #{toleranceRatio}
            </if>
            <if test="memo != null and memo != ''">
                and MEMO = #{memo}
            </if>
            <if test="indexCode != null and indexCode != ''">
                and INDEX_CODE = #{indexCode}
            </if>
        </where>
    </sql>
    <sql id="whereLike">
        <where>
            <if test="noticeNo != null and noticeNo != ''">
                and NOTICE_NO LIKE '%${noticeNo}%'
            </if>
            <if test="matterNo != null and matterNo != ''">
                and MATTER_NO LIKE '%${matterNo}%'
            </if>
            <if test="matterName != null and matterName != ''">
                and MATTER_NAME LIKE '%${matterName}%'
            </if>
            <if test="contractNo != null and contractNo != ''">
                and CONTRACT_NO LIKE '%${contractNo}%'
            </if>
            <if test="batchNo != null and batchNo != ''">
                and BATCH_NO LIKE '%${batchNo}%'
            </if>
            <if test="customerSupplierNo != null and customerSupplierNo != ''">
                and CUSTOMER_SUPPLIER_NO LIKE '%${customerSupplierNo}%'
            </if>
            <if test="customerSupplierName != null and customerSupplierName != ''">
                and CUSTOMER_SUPPLIER_NAME LIKE '%${customerSupplierName}%'
            </if>
            <if test="sourceArea != null and sourceArea != ''">
                and SOURCE_AREA LIKE '%${sourceArea}%'
            </if>
            <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
                and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
            </if>
            <if test="forwardingUnitName != null and forwardingUnitName != ''">
                and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
            </if>
            <if test="receivingUintNo != null and receivingUintNo != ''">
                and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
            </if>
            <if test="receivingUintName != null and receivingUintName != ''">
                and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
            </if>
            <if test="materialNo != null and materialNo != ''">
                and MATERIAL_NO LIKE '%${materialNo}%'
            </if>
            <if test="materialName != null and materialName != ''">
                and MATERIAL_NAME LIKE '%${materialName}%'
            </if>
            <if test="specNo != null and specNo != ''">
                and SPEC_NO LIKE '%${specNo}%'
            </if>
            <if test="specName != null and specName != ''">
                and SPEC_NAME LIKE '%${specName}%'
            </if>
            <if test="loadPointNo != null and loadPointNo != ''">
                and LOAD_POINT_NO LIKE '%${loadPointNo}%'
            </if>
            <if test="loadPointName != null and loadPointName != ''">
                and LOAD_POINT_NAME LIKE '%${loadPointName}%'
            </if>
            <if test="carrierUnitNo != null and carrierUnitNo != ''">
                and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
            </if>
            <if test="carrierUnitName != null and carrierUnitName != ''">
                and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
            </if>
            <if test="meterTypeNo != null and meterTypeNo != ''">
                and METER_TYPE_NO LIKE '%${meterTypeNo}%'
            </if>
            <if test="meterTypeName != null and meterTypeName != ''">
                and METER_TYPE_NAME LIKE '%${meterTypeName}%'
            </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>
            <if test="readFlag != null and readFlag != ''">
                and READ_FLAG LIKE '%${readFlag}%'
            </if>
            <if test="transportTypeName != null and transportTypeName != ''">
                and TRANSPORT_TYPE_NAME LIKE '%${transportTypeName}%'
            </if>
            <if test="total != null">
                and TOTAL = #{total}
            </if>
            <if test="toleranceRatio != null">
                and TOLERANCE_RATIO = #{toleranceRatio}
            </if>
            <if test="memo != null and memo != ''">
                and MEMO LIKE '%${memo}%'
            </if>
            <if test="indexCode != null and indexCode != ''">
                and INDEX_CODE LIKE '%${indexCode}%'
            </if>
        </where>
    </sql>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from PRE_TRACK_NOTICE
    where NOTICE_NO = #{noticeNo,jdbcType=VARCHAR}
  </delete>
    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
        delete from PRE_TRACK_NOTICE
        where 1!=1
        <if test="matterNo != null and matterNo != ''">
            or MATTER_NO = #{matterNo}
        </if>
        <if test="matterName != null and matterName != ''">
            or MATTER_NAME = #{matterName}
        </if>
        <if test="contractNo != null and contractNo != ''">
            or CONTRACT_NO = #{contractNo}
        </if>
        <if test="batchNo != null and batchNo != ''">
            or BATCH_NO = #{batchNo}
        </if>
        <if test="customerSupplierNo != null and customerSupplierNo != ''">
            or CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
        </if>
        <if test="customerSupplierName != null and customerSupplierName != ''">
            or CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
        </if>
        <if test="sourceArea != null and sourceArea != ''">
            or SOURCE_AREA = #{sourceArea}
        </if>
        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
            or FORWARDING_UNIT_NO = #{forwardingUnitNo}
        </if>
        <if test="forwardingUnitName != null and forwardingUnitName != ''">
            or FORWARDING_UNIT_NAME = #{forwardingUnitName}
        </if>
        <if test="receivingUintNo != null and receivingUintNo != ''">
            or RECEIVING_UINT_NO = #{receivingUintNo}
        </if>
        <if test="receivingUintName != null and receivingUintName != ''">
            or RECEIVING_UINT_NAME = #{receivingUintName}
        </if>
        <if test="materialNo != null and materialNo != ''">
            or MATERIAL_NO = #{materialNo}
        </if>
        <if test="materialName != null and materialName != ''">
            or MATERIAL_NAME = #{materialName}
        </if>
        <if test="specNo != null and specNo != ''">
            or SPEC_NO = #{specNo}
        </if>
        <if test="specName != null and specName != ''">
            or SPEC_NAME = #{specName}
        </if>
        <if test="loadPointNo != null and loadPointNo != ''">
            or LOAD_POINT_NO = #{loadPointNo}
        </if>
        <if test="loadPointName != null and loadPointName != ''">
            or LOAD_POINT_NAME = #{loadPointName}
        </if>
        <if test="carrierUnitNo != null and carrierUnitNo != ''">
            or CARRIER_UNIT_NO = #{carrierUnitNo}
        </if>
        <if test="carrierUnitName != null and carrierUnitName != ''">
            or CARRIER_UNIT_NAME = #{carrierUnitName}
        </if>
        <if test="meterTypeNo != null and meterTypeNo != ''">
            or METER_TYPE_NO = #{meterTypeNo}
        </if>
        <if test="meterTypeName != null and meterTypeName != ''">
            or METER_TYPE_NAME = #{meterTypeName}
        </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>
        <if test="readFlag != null and readFlag != ''">
            or READ_FLAG = #{readFlag}
        </if>
        <if test="transportTypeName != null and transportTypeName != ''">
            or TRANSPORT_TYPE_NAME = #{transportTypeName}
        </if>
        <if test="total != null">
            or TOTAL = #{total}
        </if>
        <if test="toleranceRatio != null">
            or TOLERANCE_RATIO = #{toleranceRatio}
        </if>
        <if test="memo != null and memo != ''">
            or MEMO = #{memo}
        </if>
        <if test="indexCode != null and indexCode != ''">
            or INDEX_CODE = #{indexCode}
        </if>
    </delete>
    <insert id="insert" parameterType="com.steerinfo.pretrack.pretracknotice.model.PreTrackNotice">
    insert into PRE_TRACK_NOTICE (NOTICE_NO, MATTER_NO, MATTER_NAME,
      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO,
      CUSTOMER_SUPPLIER_NAME, SOURCE_AREA, FORWARDING_UNIT_NO,
      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
      MATERIAL_NO, MATERIAL_NAME, SPEC_NO,
      SPEC_NAME, LOAD_POINT_NO, LOAD_POINT_NAME,
      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, METER_TYPE_NO,
      METER_TYPE_NAME, VALUE_FLAG, CREATE_MAN_NO,
      CREATE_MAN_NAME, CREATE_TIME, READ_FLAG,
      TRANSPORT_TYPE_NAME, TOTAL, TOLERANCE_RATIO,
      MEMO, INDEX_CODE)
    values (#{noticeNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR},
      #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR},
      #{customerSupplierName,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR},
      #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, #{receivingUintName,jdbcType=VARCHAR},
      #{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{specNo,jdbcType=VARCHAR},
      #{specName,jdbcType=VARCHAR}, #{loadPointNo,jdbcType=VARCHAR}, #{loadPointName,jdbcType=VARCHAR},
      #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR}, #{meterTypeNo,jdbcType=VARCHAR},
      #{meterTypeName,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{readFlag,jdbcType=VARCHAR},
      #{transportTypeName,jdbcType=VARCHAR}, #{total,jdbcType=DECIMAL}, #{toleranceRatio,jdbcType=DECIMAL},
      #{memo,jdbcType=VARCHAR}, #{indexCode,jdbcType=VARCHAR})
  </insert>
    <insert id="insertSelective" parameterType="com.steerinfo.pretrack.pretracknotice.model.PreTrackNotice">
        insert into PRE_TRACK_NOTICE
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="noticeNo != null">
                NOTICE_NO,
            </if>
            <if test="matterNo != null">
                MATTER_NO,
            </if>
            <if test="matterName != null">
                MATTER_NAME,
            </if>
            <if test="contractNo != null">
                CONTRACT_NO,
            </if>
            <if test="batchNo != null">
                BATCH_NO,
            </if>
            <if test="customerSupplierNo != null">
                CUSTOMER_SUPPLIER_NO,
            </if>
            <if test="customerSupplierName != null">
                CUSTOMER_SUPPLIER_NAME,
            </if>
            <if test="sourceArea != null">
                SOURCE_AREA,
            </if>
            <if test="forwardingUnitNo != null">
                FORWARDING_UNIT_NO,
            </if>
            <if test="forwardingUnitName != null">
                FORWARDING_UNIT_NAME,
            </if>
            <if test="receivingUintNo != null">
                RECEIVING_UINT_NO,
            </if>
            <if test="receivingUintName != null">
                RECEIVING_UINT_NAME,
            </if>
            <if test="materialNo != null">
                MATERIAL_NO,
            </if>
            <if test="materialName != null">
                MATERIAL_NAME,
            </if>
            <if test="specNo != null">
                SPEC_NO,
            </if>
            <if test="specName != null">
                SPEC_NAME,
            </if>
            <if test="loadPointNo != null">
                LOAD_POINT_NO,
            </if>
            <if test="loadPointName != null">
                LOAD_POINT_NAME,
            </if>
            <if test="carrierUnitNo != null">
                CARRIER_UNIT_NO,
            </if>
            <if test="carrierUnitName != null">
                CARRIER_UNIT_NAME,
            </if>
            <if test="meterTypeNo != null">
                METER_TYPE_NO,
            </if>
            <if test="meterTypeName != null">
                METER_TYPE_NAME,
            </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>
            <if test="readFlag != null">
                READ_FLAG,
            </if>
            <if test="transportTypeName != null">
                TRANSPORT_TYPE_NAME,
            </if>
            <if test="total != null">
                TOTAL,
            </if>
            <if test="toleranceRatio != null">
                TOLERANCE_RATIO,
            </if>
            <if test="memo != null">
                MEMO,
            </if>
            <if test="indexCode != null">
                INDEX_CODE,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="noticeNo != null">
                #{noticeNo,jdbcType=VARCHAR},
            </if>
            <if test="matterNo != null">
                #{matterNo,jdbcType=VARCHAR},
            </if>
            <if test="matterName != null">
                #{matterName,jdbcType=VARCHAR},
            </if>
            <if test="contractNo != null">
                #{contractNo,jdbcType=VARCHAR},
            </if>
            <if test="batchNo != null">
                #{batchNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierNo != null">
                #{customerSupplierNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierName != null">
                #{customerSupplierName,jdbcType=VARCHAR},
            </if>
            <if test="sourceArea != null">
                #{sourceArea,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitNo != null">
                #{forwardingUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitName != null">
                #{forwardingUnitName,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintNo != null">
                #{receivingUintNo,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintName != null">
                #{receivingUintName,jdbcType=VARCHAR},
            </if>
            <if test="materialNo != null">
                #{materialNo,jdbcType=VARCHAR},
            </if>
            <if test="materialName != null">
                #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="specNo != null">
                #{specNo,jdbcType=VARCHAR},
            </if>
            <if test="specName != null">
                #{specName,jdbcType=VARCHAR},
            </if>
            <if test="loadPointNo != null">
                #{loadPointNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointName != null">
                #{loadPointName,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitNo != null">
                #{carrierUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitName != null">
                #{carrierUnitName,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeNo != null">
                #{meterTypeNo,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeName != null">
                #{meterTypeName,jdbcType=VARCHAR},
            </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>
            <if test="readFlag != null">
                #{readFlag,jdbcType=VARCHAR},
            </if>
            <if test="transportTypeName != null">
                #{transportTypeName,jdbcType=VARCHAR},
            </if>
            <if test="total != null">
                #{total,jdbcType=DECIMAL},
            </if>
            <if test="toleranceRatio != null">
                #{toleranceRatio,jdbcType=DECIMAL},
            </if>
            <if test="memo != null">
                #{memo,jdbcType=VARCHAR},
            </if>
            <if test="indexCode != null">
                #{indexCode,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.steerinfo.pretrack.pretracknotice.model.PreTrackNotice">
    update PRE_TRACK_NOTICE
    set MATTER_NO = #{matterNo,jdbcType=VARCHAR},
      MATTER_NAME = #{matterName,jdbcType=VARCHAR},
      CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
      BATCH_NO = #{batchNo,jdbcType=VARCHAR},
      CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
      CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
      FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
      FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
      RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
      RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
      MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
      MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
      SPEC_NO = #{specNo,jdbcType=VARCHAR},
      SPEC_NAME = #{specName,jdbcType=VARCHAR},
      LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
      LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
      CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
      CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
      METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
      METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      READ_FLAG = #{readFlag,jdbcType=VARCHAR},
      TRANSPORT_TYPE_NAME = #{transportTypeName,jdbcType=VARCHAR},
      TOTAL = #{total,jdbcType=DECIMAL},
      TOLERANCE_RATIO = #{toleranceRatio,jdbcType=DECIMAL},
      MEMO = #{memo,jdbcType=VARCHAR},
      INDEX_CODE = #{indexCode,jdbcType=VARCHAR}
    where NOTICE_NO = #{noticeNo,jdbcType=VARCHAR}
  </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.pretrack.pretracknotice.model.PreTrackNotice">
        update PRE_TRACK_NOTICE
        <set>
            <if test="matterNo != null">
                MATTER_NO = #{matterNo,jdbcType=VARCHAR},
            </if>
            <if test="matterName != null">
                MATTER_NAME = #{matterName,jdbcType=VARCHAR},
            </if>
            <if test="contractNo != null">
                CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
            </if>
            <if test="batchNo != null">
                BATCH_NO = #{batchNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierNo != null">
                CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierName != null">
                CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
            </if>
            <if test="sourceArea != null">
                SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitNo != null">
                FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitName != null">
                FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintNo != null">
                RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintName != null">
                RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
            </if>
            <if test="materialNo != null">
                MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
            </if>
            <if test="materialName != null">
                MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="specNo != null">
                SPEC_NO = #{specNo,jdbcType=VARCHAR},
            </if>
            <if test="specName != null">
                SPEC_NAME = #{specName,jdbcType=VARCHAR},
            </if>
            <if test="loadPointNo != null">
                LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointName != null">
                LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitNo != null">
                CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitName != null">
                CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeNo != null">
                METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeName != null">
                METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
            </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>
            <if test="readFlag != null">
                READ_FLAG = #{readFlag,jdbcType=VARCHAR},
            </if>
            <if test="transportTypeName != null">
                TRANSPORT_TYPE_NAME = #{transportTypeName,jdbcType=VARCHAR},
            </if>
            <if test="total != null">
                TOTAL = #{total,jdbcType=DECIMAL},
            </if>
            <if test="toleranceRatio != null">
                TOLERANCE_RATIO = #{toleranceRatio,jdbcType=DECIMAL},
            </if>
            <if test="memo != null">
                MEMO = #{memo,jdbcType=VARCHAR},
            </if>
            <if test="indexCode != null">
                INDEX_CODE = #{indexCode,jdbcType=VARCHAR},
            </if>
        </set>
        where NOTICE_NO = #{noticeNo,jdbcType=VARCHAR}
    </update>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        <include refid="select"/>
        where NOTICE_NO = #{noticeNo,jdbcType=VARCHAR}
    </select>
    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <include refid="where"/>
        order by value_flag desc,CREATE_TIME desc
    </select>
    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <include refid="whereLike"/>
        order by  value_flag desc,CREATE_TIME desc
    </select>
    <insert id="batchInsert" parameterType="java.util.List">
        insert into PRE_TRACK_NOTICE
        (NOTICE_NO,
        MATTER_NO, MATTER_NAME, CONTRACT_NO,
        BATCH_NO, CUSTOMER_SUPPLIER_NO,
        CUSTOMER_SUPPLIER_NAME, SOURCE_AREA,
        FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME,
        RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
        MATERIAL_NO, MATERIAL_NAME, SPEC_NO,
        SPEC_NAME, LOAD_POINT_NO, LOAD_POINT_NAME,
        CARRIER_UNIT_NO, CARRIER_UNIT_NAME,
        METER_TYPE_NO, METER_TYPE_NAME, VALUE_FLAG,
        CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
        READ_FLAG, TRANSPORT_TYPE_NAME,
        TOTAL, TOLERANCE_RATIO, MEMO,
        INDEX_CODE)
        ( <foreach collection="list" item="item" separator="union all">
        select
        #{item.noticeNo,jdbcType=VARCHAR},
        #{item.matterNo,jdbcType=VARCHAR}, #{item.matterName,jdbcType=VARCHAR}, #{item.contractNo,jdbcType=VARCHAR},
        #{item.batchNo,jdbcType=VARCHAR}, #{item.customerSupplierNo,jdbcType=VARCHAR},
        #{item.customerSupplierName,jdbcType=VARCHAR}, #{item.sourceArea,jdbcType=VARCHAR},
        #{item.forwardingUnitNo,jdbcType=VARCHAR}, #{item.forwardingUnitName,jdbcType=VARCHAR},
        #{item.receivingUintNo,jdbcType=VARCHAR}, #{item.receivingUintName,jdbcType=VARCHAR},
        #{item.materialNo,jdbcType=VARCHAR}, #{item.materialName,jdbcType=VARCHAR}, #{item.specNo,jdbcType=VARCHAR},
        #{item.specName,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR}, #{item.loadPointName,jdbcType=VARCHAR},
        #{item.carrierUnitNo,jdbcType=VARCHAR}, #{item.carrierUnitName,jdbcType=VARCHAR},
        #{item.meterTypeNo,jdbcType=VARCHAR}, #{item.meterTypeName,jdbcType=VARCHAR},
        #{item.valueFlag,jdbcType=VARCHAR},
        #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
        #{item.createTime,jdbcType=TIMESTAMP},
        #{item.readFlag,jdbcType=VARCHAR}, #{item.transportTypeName,jdbcType=VARCHAR},
        #{item.total,jdbcType=DECIMAL}, #{item.toleranceRatio,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR},
        #{item.indexCode,jdbcType=VARCHAR} from dual
    </foreach> )
    </insert>
    <update id="batchUpdate" parameterType="java.util.List">
        update PRE_TRACK_NOTICE
        set
        NOTICE_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
        </foreach>
        ,CONTRACT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
        </foreach>
        ,BATCH_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
        </foreach>
        ,SOURCE_AREA=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
        </foreach>
        ,VALUE_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,READ_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.readFlag,jdbcType=VARCHAR}
        </foreach>
        ,TRANSPORT_TYPE_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.transportTypeName,jdbcType=VARCHAR}
        </foreach>
        ,TOTAL=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.total,jdbcType=DECIMAL}
        </foreach>
        ,TOLERANCE_RATIO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.toleranceRatio,jdbcType=DECIMAL}
        </foreach>
        ,MEMO=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        ,INDEX_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case NOTICE_NO" close="end">
            when #{item.noticeNo,jdbcType=VARCHAR} then #{item.indexCode,jdbcType=VARCHAR}
        </foreach>
        where NOTICE_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
    </update>
    <delete id="batchDelete" parameterType="java.util.List">
        delete from PRE_TRACK_NOTICE
        where NOTICE_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </delete>
    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
    <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(NOTICE_NO, LENGTH(NOTICE_NO) - 3))),0) + 1,4,'0') NOTICE_NO
    FROM PRE_TRACK_NOTICE where instr(NOTICE_NO,#{afl,jdbcType=VARCHAR})>0
  </select>

    <update id="batchUpdateRecover" parameterType="java.util.List">
        update PRE_TRACK_NOTICE
        set
        VALUE_FLAG = '0'
        where NOTICE_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
    </update>

    <update id="batchUpdateAbolish" parameterType="java.util.List">
        update PRE_TRACK_NOTICE
        set
        VALUE_FLAG = '1'
        where NOTICE_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
    </update>

    <!--【客商管理-预约管理-合同】 数据查询接口：原为CUSTOMER_SUPPLIER_NO；2021年4月13日为销售业务调整-->
    <select id="selectByCustomer" parameterType="java.util.List" resultMap="BaseResultMap">
        select *
        from PRE_TRACK_NOTICE
        where (
        FORWARDING_UNIT_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
        or RECEIVING_UINT_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
        )
        and VALUE_FLAG = '0'
    </select>

</mapper>