<?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="cn.gov.customs.wxjy.analyze.dao.NewDeclaredGoodsMapper">

    <resultMap type="NewDeclaredGoods" id="NewDeclaredGoodsResult">
        <result property="ID" column="ID"/>
        <result property="entryId" column="ENTRY_ID"/>
        <result property="gNo" column="G_NO"/>
        <result property="ieFlag" column="IE_FLAG"/>
        <result property="iePort" column="IE_PORT"/>
        <result property="declPort" column="DECL_PORT"/>
        <result property="customsCode" column="CUSTOMS_CODE"/>
        <result property="declDate" column="DECL_DATE"/>
        <result property="consignScc" column="CONSIGN_SCC"/>
        <result property="consignCode" column="CONSIGN_CODE"/>
        <result property="consignName" column="CONSIGN_NAME"/>
        <result property="codeTs" column="CODE_TS"/>
        <result property="iqCode" column="IQ_CODE"/>
        <result property="gName" column="G_NAME"/>
        <result property="iqGName" column="IQ_G_NAME"/>
        <result property="gNameFn" column="G_NAME_FN"/>
        <result property="gModel" column="G_MODEL"/>
        <result property="iqGModel" column="IQ_G_MODEL"/>
        <result property="gComposition" column="G_COMPOSITION"/>
        <result property="prodWarranty" column="PROD_WARRANTY"/>
        <result property="prodValidaty" column="PROD_VALIDATY"/>
        <result property="dutyMode" column="DUTY_MODE"/>
        <result property="GTIN" column="GTIN"/>
        <result property="gQty" column="G_QTY"/>
        <result property="gUnit" column="G_UNIT"/>
        <result property="qty1" column="QTY_1"/>
        <result property="unit1" column="UNIT_1"/>
        <result property="qty2" column="QTY_2"/>
        <result property="unit2" column="UNIT_2"/>
        <result property="declPrice" column="DECL_PRICE"/>
        <result property="declTotal" column="DECL_TOTAL"/>
        <result property="tradeCurr" column="TRADE_CURR"/>
        <result property="tradeTotal" column="TRADE_TOTAL"/>
        <result property="dutyValue" column="DUTY_VALUE"/>
        <result property="rmbPrice" column="RMB_PRICE"/>
        <result property="usdPrice" column="USD_PRICE"/>
        <result property="exchangeRate" column="EXCHANGE_RATE"/>
        <result property="originCountry" column="ORIGIN_COUNTRY"/>
        <result property="originRegionCode" column="ORIGIN_REGION_CODE"/>
        <result property="destCountry" column="DEST_COUNTRY"/>
        <result property="ieDistrictCode" column="IE_DISTRICT_CODE"/>
        <result property="iqIeDistrictCode" column="IQ_IE_DISTRICT_CODE"/>
        <result property="frnProducerName" column="FRN_PRODUCER_NAME"/>
        <result property="productModel" column="PRODUCT_MODEL"/>
        <result property="productBrand" column="PRODUCT_BRAND"/>
        <result property="productDate" column="PRODUCT_DATE"/>
        <result property="productBatch" column="PRODUCT_BATCH"/>
        <result property="UNGID" column="UNGID"/>
        <result property="ungFlag" column="UNG_FLAG"/>
        <result property="ungModel" column="UNG_MODEL"/>
        <result property="ungClassify" column="UNG_CLASSIFY"/>
        <result property="ungGName" column="UNG_G_NAME"/>
        <result property="productCharCode" column="PRODUCT_CHAR_CODE"/>
        <result property="goodsId" column="GOODS_ID"/>
        <result property="useTo" column="USE_TO"/>
        <result property="gCertFlag" column="G_CERT_FLAG"/>
        <result property="mnufctrRegNo" column="MNUFCTR_REG_NO"/>
        <result property="CAS" column="CAS"/>
        <result property="goodsType" column="GOODS_TYPE"/>
    </resultMap>

    <sql id="baseVo">
        select ID, ENTRY_ID, G_NO, IE_FLAG, IE_PORT, DECL_PORT, CUSTOMS_CODE, DECL_DATE, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, CODE_TS, IQ_CODE, G_NAME, IQ_G_NAME, G_NAME_FN, G_MODEL, IQ_G_MODEL, G_COMPOSITION, PROD_WARRANTY, PROD_VALIDATY, DUTY_MODE, GTIN, G_QTY, G_UNIT, QTY_1, UNIT_1, QTY_2, UNIT_2, DECL_PRICE, DECL_TOTAL, TRADE_CURR, TRADE_TOTAL, DUTY_VALUE, RMB_PRICE, USD_PRICE, EXCHANGE_RATE, ORIGIN_COUNTRY, ORIGIN_REGION_CODE, DEST_COUNTRY, IE_DISTRICT_CODE, IQ_IE_DISTRICT_CODE, FRN_PRODUCER_NAME, PRODUCT_MODEL, PRODUCT_BRAND, PRODUCT_DATE, PRODUCT_BATCH, UNGID, UNG_FLAG, UNG_MODEL, UNG_CLASSIFY, UNG_G_NAME, PRODUCT_CHAR_CODE, GOODS_ID, USE_TO, G_CERT_FLAG, MNUFCTR_REG_NO, CAS, GOODS_TYPE
        from WXJY_NEW_DECLARED_GOODS
    </sql>

    <select id="selectList" parameterType="NewDeclaredGoodsQuery" resultMap="NewDeclaredGoodsResult">
        <include refid="baseVo"/>
        <where>
            <if test="entryId != null  and entryId != ''">
                and ENTRY_ID = #{entryId}
            </if>
            <if test="gNo != null  and gNo != ''">
                and G_NO = #{gNo}
            </if>
            <if test="ieFlag != null  and ieFlag != ''">
                and IE_FLAG = #{ieFlag}
            </if>
            <if test="iePort != null  and iePort != ''">
                and IE_PORT = #{iePort}
            </if>
            <if test="declPort != null  and declPort != ''">
                and DECL_PORT = #{declPort}
            </if>
            <if test="customsCode != null  and customsCode != ''">
                and CUSTOMS_CODE = #{customsCode}
            </if>
            <if test="declDate != null  and declDate != ''">
                and DECL_DATE = #{declDate}
            </if>
            <if test="consignScc != null  and consignScc != ''">
                and CONSIGN_SCC = #{consignScc}
            </if>
            <if test="consignCode != null  and consignCode != ''">
                and CONSIGN_CODE = #{consignCode}
            </if>
            <if test="consignName != null  and consignName != ''">
                and CONSIGN_NAME like concat('%', #{consignName}, '%')
            </if>
            <if test="codeTs != null  and codeTs != ''">
                and CODE_TS = #{codeTs}
            </if>
            <if test="iqCode != null  and iqCode != ''">
                and IQ_CODE = #{iqCode}
            </if>
            <if test="gName != null  and gName != ''">
                and G_NAME like concat('%', #{gName}, '%')
            </if>
            <if test="iqGName != null  and iqGName != ''">
                and IQ_G_NAME like concat('%', #{iqGName}, '%')
            </if>
            <if test="gNameFn != null  and gNameFn != ''">
                and G_NAME_FN = #{gNameFn}
            </if>
            <if test="gModel != null  and gModel != ''">
                and G_MODEL = #{gModel}
            </if>
            <if test="iqGModel != null  and iqGModel != ''">
                and IQ_G_MODEL = #{iqGModel}
            </if>
            <if test="gComposition != null  and gComposition != ''">
                and G_COMPOSITION = #{gComposition}
            </if>
            <if test="prodWarranty != null  and prodWarranty != ''">
                and PROD_WARRANTY = #{prodWarranty}
            </if>
            <if test="prodValidaty != null  and prodValidaty != ''">
                and PROD_VALIDATY = #{prodValidaty}
            </if>
            <if test="dutyMode != null  and dutyMode != ''">
                and DUTY_MODE = #{dutyMode}
            </if>
            <if test="GTIN != null  and GTIN != ''">
                and GTIN = #{GTIN}
            </if>
            <if test="gQty != null  and gQty != ''">
                and G_QTY = #{gQty}
            </if>
            <if test="gUnit != null  and gUnit != ''">
                and G_UNIT = #{gUnit}
            </if>
            <if test="qty1 != null  and qty1 != ''">
                and QTY_1 = #{qty1}
            </if>
            <if test="unit1 != null  and unit1 != ''">
                and UNIT_1 = #{unit1}
            </if>
            <if test="qty2 != null  and qty2 != ''">
                and QTY_2 = #{qty2}
            </if>
            <if test="unit2 != null  and unit2 != ''">
                and UNIT_2 = #{unit2}
            </if>
            <if test="declPrice != null  and declPrice != ''">
                and DECL_PRICE = #{declPrice}
            </if>
            <if test="declTotal != null  and declTotal != ''">
                and DECL_TOTAL = #{declTotal}
            </if>
            <if test="tradeCurr != null  and tradeCurr != ''">
                and TRADE_CURR = #{tradeCurr}
            </if>
            <if test="tradeTotal != null  and tradeTotal != ''">
                and TRADE_TOTAL = #{tradeTotal}
            </if>
            <if test="dutyValue != null  and dutyValue != ''">
                and DUTY_VALUE = #{dutyValue}
            </if>
            <if test="rmbPrice != null  and rmbPrice != ''">
                and RMB_PRICE = #{rmbPrice}
            </if>
            <if test="usdPrice != null  and usdPrice != ''">
                and USD_PRICE = #{usdPrice}
            </if>
            <if test="exchangeRate != null  and exchangeRate != ''">
                and EXCHANGE_RATE = #{exchangeRate}
            </if>
            <if test="originCountry != null  and originCountry != ''">
                and ORIGIN_COUNTRY = #{originCountry}
            </if>
            <if test="originRegionCode != null  and originRegionCode != ''">
                and ORIGIN_REGION_CODE = #{originRegionCode}
            </if>
            <if test="destCountry != null  and destCountry != ''">
                and DEST_COUNTRY = #{destCountry}
            </if>
            <if test="ieDistrictCode != null  and ieDistrictCode != ''">
                and IE_DISTRICT_CODE = #{ieDistrictCode}
            </if>
            <if test="iqIeDistrictCode != null  and iqIeDistrictCode != ''">
                and IQ_IE_DISTRICT_CODE = #{iqIeDistrictCode}
            </if>
            <if test="frnProducerName != null  and frnProducerName != ''">
                and FRN_PRODUCER_NAME like concat('%', #{frnProducerName}, '%')
            </if>
            <if test="productModel != null  and productModel != ''">
                and PRODUCT_MODEL = #{productModel}
            </if>
            <if test="productBrand != null  and productBrand != ''">
                and PRODUCT_BRAND = #{productBrand}
            </if>
            <if test="productDate != null  and productDate != ''">
                and PRODUCT_DATE = #{productDate}
            </if>
            <if test="productBatch != null  and productBatch != ''">
                and PRODUCT_BATCH = #{productBatch}
            </if>
            <if test="UNGID != null  and UNGID != ''">
                and UNGID = #{UNGID}
            </if>
            <if test="ungFlag != null  and ungFlag != ''">
                and UNG_FLAG = #{ungFlag}
            </if>
            <if test="ungModel != null  and ungModel != ''">
                and UNG_MODEL = #{ungModel}
            </if>
            <if test="ungClassify != null  and ungClassify != ''">
                and UNG_CLASSIFY = #{ungClassify}
            </if>
            <if test="ungGName != null  and ungGName != ''">
                and UNG_G_NAME like concat('%', #{ungGName}, '%')
            </if>
            <if test="productCharCode != null  and productCharCode != ''">
                and PRODUCT_CHAR_CODE = #{productCharCode}
            </if>
            <if test="goodsId != null  and goodsId != ''">
                and GOODS_ID = #{goodsId}
            </if>
            <if test="useTo != null  and useTo != ''">
                and USE_TO = #{useTo}
            </if>
            <if test="gCertFlag != null  and gCertFlag != ''">
                and G_CERT_FLAG = #{gCertFlag}
            </if>
            <if test="mnufctrRegNo != null  and mnufctrRegNo != ''">
                and MNUFCTR_REG_NO = #{mnufctrRegNo}
            </if>
            <if test="CAS != null  and CAS != ''">
                and CAS = #{CAS}
            </if>
            <if test="goodsType != null  and goodsType != ''">
                and GOODS_TYPE like concat('%', #{goodsType}, '%')
            </if>
            <if test="beginDate != null and beginDate != ''">
                and DECL_DATE &gt;= #{beginDate}
            </if>
            <if test="endDate != null and endDate != ''">
                and DECL_DATE &lt;= #{endDate}
            </if>
        </where>
        order by decl_date desc
    </select>

    <select id="selectByID" parameterType="String"
            resultMap="NewDeclaredGoodsResult">
        <include refid="baseVo"/>
        where ID = #{ID}
    </select>

    <insert id="insert" parameterType="NewDeclaredGoods">
        insert into WXJY_NEW_DECLARED_GOODS
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="ID != null and ID != ''">ID,
            </if>
            <if test="entryId != null">ENTRY_ID,
            </if>
            <if test="gNo != null">G_NO,
            </if>
            <if test="ieFlag != null">IE_FLAG,
            </if>
            <if test="iePort != null">IE_PORT,
            </if>
            <if test="declPort != null">DECL_PORT,
            </if>
            <if test="customsCode != null">CUSTOMS_CODE,
            </if>
            <if test="declDate != null">DECL_DATE,
            </if>
            <if test="consignScc != null">CONSIGN_SCC,
            </if>
            <if test="consignCode != null">CONSIGN_CODE,
            </if>
            <if test="consignName != null">CONSIGN_NAME,
            </if>
            <if test="codeTs != null">CODE_TS,
            </if>
            <if test="iqCode != null">IQ_CODE,
            </if>
            <if test="gName != null">G_NAME,
            </if>
            <if test="iqGName != null">IQ_G_NAME,
            </if>
            <if test="gNameFn != null">G_NAME_FN,
            </if>
            <if test="gModel != null">G_MODEL,
            </if>
            <if test="iqGModel != null">IQ_G_MODEL,
            </if>
            <if test="gComposition != null">G_COMPOSITION,
            </if>
            <if test="prodWarranty != null">PROD_WARRANTY,
            </if>
            <if test="prodValidaty != null">PROD_VALIDATY,
            </if>
            <if test="dutyMode != null">DUTY_MODE,
            </if>
            <if test="GTIN != null">GTIN,
            </if>
            <if test="gQty != null">G_QTY,
            </if>
            <if test="gUnit != null">G_UNIT,
            </if>
            <if test="qty1 != null">QTY_1,
            </if>
            <if test="unit1 != null">UNIT_1,
            </if>
            <if test="qty2 != null">QTY_2,
            </if>
            <if test="unit2 != null">UNIT_2,
            </if>
            <if test="declPrice != null">DECL_PRICE,
            </if>
            <if test="declTotal != null">DECL_TOTAL,
            </if>
            <if test="tradeCurr != null">TRADE_CURR,
            </if>
            <if test="tradeTotal != null">TRADE_TOTAL,
            </if>
            <if test="dutyValue != null">DUTY_VALUE,
            </if>
            <if test="rmbPrice != null">RMB_PRICE,
            </if>
            <if test="usdPrice != null">USD_PRICE,
            </if>
            <if test="exchangeRate != null">EXCHANGE_RATE,
            </if>
            <if test="originCountry != null">ORIGIN_COUNTRY,
            </if>
            <if test="originRegionCode != null">ORIGIN_REGION_CODE,
            </if>
            <if test="destCountry != null">DEST_COUNTRY,
            </if>
            <if test="ieDistrictCode != null">IE_DISTRICT_CODE,
            </if>
            <if test="iqIeDistrictCode != null">IQ_IE_DISTRICT_CODE,
            </if>
            <if test="frnProducerName != null">FRN_PRODUCER_NAME,
            </if>
            <if test="productModel != null">PRODUCT_MODEL,
            </if>
            <if test="productBrand != null">PRODUCT_BRAND,
            </if>
            <if test="productDate != null">PRODUCT_DATE,
            </if>
            <if test="productBatch != null">PRODUCT_BATCH,
            </if>
            <if test="UNGID != null">UNGID,
            </if>
            <if test="ungFlag != null">UNG_FLAG,
            </if>
            <if test="ungModel != null">UNG_MODEL,
            </if>
            <if test="ungClassify != null">UNG_CLASSIFY,
            </if>
            <if test="ungGName != null">UNG_G_NAME,
            </if>
            <if test="productCharCode != null">PRODUCT_CHAR_CODE,
            </if>
            <if test="goodsId != null">GOODS_ID,
            </if>
            <if test="useTo != null">USE_TO,
            </if>
            <if test="gCertFlag != null">G_CERT_FLAG,
            </if>
            <if test="mnufctrRegNo != null">MNUFCTR_REG_NO,
            </if>
            <if test="CAS != null">CAS,
            </if>
            <if test="goodsType != null">GOODS_TYPE,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="ID != null and ID != ''">#{ID},
            </if>
            <if test="entryId != null">#{entryId},
            </if>
            <if test="gNo != null">#{gNo},
            </if>
            <if test="ieFlag != null">#{ieFlag},
            </if>
            <if test="iePort != null">#{iePort},
            </if>
            <if test="declPort != null">#{declPort},
            </if>
            <if test="customsCode != null">#{customsCode},
            </if>
            <if test="declDate != null">#{declDate},
            </if>
            <if test="consignScc != null">#{consignScc},
            </if>
            <if test="consignCode != null">#{consignCode},
            </if>
            <if test="consignName != null">#{consignName},
            </if>
            <if test="codeTs != null">#{codeTs},
            </if>
            <if test="iqCode != null">#{iqCode},
            </if>
            <if test="gName != null">#{gName},
            </if>
            <if test="iqGName != null">#{iqGName},
            </if>
            <if test="gNameFn != null">#{gNameFn},
            </if>
            <if test="gModel != null">#{gModel},
            </if>
            <if test="iqGModel != null">#{iqGModel},
            </if>
            <if test="gComposition != null">#{gComposition},
            </if>
            <if test="prodWarranty != null">#{prodWarranty},
            </if>
            <if test="prodValidaty != null">#{prodValidaty},
            </if>
            <if test="dutyMode != null">#{dutyMode},
            </if>
            <if test="GTIN != null">#{GTIN},
            </if>
            <if test="gQty != null">#{gQty},
            </if>
            <if test="gUnit != null">#{gUnit},
            </if>
            <if test="qty1 != null">#{qty1},
            </if>
            <if test="unit1 != null">#{unit1},
            </if>
            <if test="qty2 != null">#{qty2},
            </if>
            <if test="unit2 != null">#{unit2},
            </if>
            <if test="declPrice != null">#{declPrice},
            </if>
            <if test="declTotal != null">#{declTotal},
            </if>
            <if test="tradeCurr != null">#{tradeCurr},
            </if>
            <if test="tradeTotal != null">#{tradeTotal},
            </if>
            <if test="dutyValue != null">#{dutyValue},
            </if>
            <if test="rmbPrice != null">#{rmbPrice},
            </if>
            <if test="usdPrice != null">#{usdPrice},
            </if>
            <if test="exchangeRate != null">#{exchangeRate},
            </if>
            <if test="originCountry != null">#{originCountry},
            </if>
            <if test="originRegionCode != null">#{originRegionCode},
            </if>
            <if test="destCountry != null">#{destCountry},
            </if>
            <if test="ieDistrictCode != null">#{ieDistrictCode},
            </if>
            <if test="iqIeDistrictCode != null">#{iqIeDistrictCode},
            </if>
            <if test="frnProducerName != null">#{frnProducerName},
            </if>
            <if test="productModel != null">#{productModel},
            </if>
            <if test="productBrand != null">#{productBrand},
            </if>
            <if test="productDate != null">#{productDate},
            </if>
            <if test="productBatch != null">#{productBatch},
            </if>
            <if test="UNGID != null">#{UNGID},
            </if>
            <if test="ungFlag != null">#{ungFlag},
            </if>
            <if test="ungModel != null">#{ungModel},
            </if>
            <if test="ungClassify != null">#{ungClassify},
            </if>
            <if test="ungGName != null">#{ungGName},
            </if>
            <if test="productCharCode != null">#{productCharCode},
            </if>
            <if test="goodsId != null">#{goodsId},
            </if>
            <if test="useTo != null">#{useTo},
            </if>
            <if test="gCertFlag != null">#{gCertFlag},
            </if>
            <if test="mnufctrRegNo != null">#{mnufctrRegNo},
            </if>
            <if test="CAS != null">#{CAS},
            </if>
            <if test="goodsType != null">#{goodsType},
            </if>
        </trim>
    </insert>

    <update id="update" parameterType="NewDeclaredGoods">
        update WXJY_NEW_DECLARED_GOODS
        <trim prefix="SET" suffixOverrides=",">
            <if test="entryId != null">ENTRY_ID =
                #{entryId},
            </if>
            <if test="gNo != null">G_NO =
                #{gNo},
            </if>
            <if test="ieFlag != null">IE_FLAG =
                #{ieFlag},
            </if>
            <if test="iePort != null">IE_PORT =
                #{iePort},
            </if>
            <if test="declPort != null">DECL_PORT =
                #{declPort},
            </if>
            <if test="customsCode != null">CUSTOMS_CODE =
                #{customsCode},
            </if>
            <if test="declDate != null">DECL_DATE =
                #{declDate},
            </if>
            <if test="consignScc != null">CONSIGN_SCC =
                #{consignScc},
            </if>
            <if test="consignCode != null">CONSIGN_CODE =
                #{consignCode},
            </if>
            <if test="consignName != null">CONSIGN_NAME =
                #{consignName},
            </if>
            <if test="codeTs != null">CODE_TS =
                #{codeTs},
            </if>
            <if test="iqCode != null">IQ_CODE =
                #{iqCode},
            </if>
            <if test="gName != null">G_NAME =
                #{gName},
            </if>
            <if test="iqGName != null">IQ_G_NAME =
                #{iqGName},
            </if>
            <if test="gNameFn != null">G_NAME_FN =
                #{gNameFn},
            </if>
            <if test="gModel != null">G_MODEL =
                #{gModel},
            </if>
            <if test="iqGModel != null">IQ_G_MODEL =
                #{iqGModel},
            </if>
            <if test="gComposition != null">G_COMPOSITION =
                #{gComposition},
            </if>
            <if test="prodWarranty != null">PROD_WARRANTY =
                #{prodWarranty},
            </if>
            <if test="prodValidaty != null">PROD_VALIDATY =
                #{prodValidaty},
            </if>
            <if test="dutyMode != null">DUTY_MODE =
                #{dutyMode},
            </if>
            <if test="GTIN != null">GTIN =
                #{GTIN},
            </if>
            <if test="gQty != null">G_QTY =
                #{gQty},
            </if>
            <if test="gUnit != null">G_UNIT =
                #{gUnit},
            </if>
            <if test="qty1 != null">QTY_1 =
                #{qty1},
            </if>
            <if test="unit1 != null">UNIT_1 =
                #{unit1},
            </if>
            <if test="qty2 != null">QTY_2 =
                #{qty2},
            </if>
            <if test="unit2 != null">UNIT_2 =
                #{unit2},
            </if>
            <if test="declPrice != null">DECL_PRICE =
                #{declPrice},
            </if>
            <if test="declTotal != null">DECL_TOTAL =
                #{declTotal},
            </if>
            <if test="tradeCurr != null">TRADE_CURR =
                #{tradeCurr},
            </if>
            <if test="tradeTotal != null">TRADE_TOTAL =
                #{tradeTotal},
            </if>
            <if test="dutyValue != null">DUTY_VALUE =
                #{dutyValue},
            </if>
            <if test="rmbPrice != null">RMB_PRICE =
                #{rmbPrice},
            </if>
            <if test="usdPrice != null">USD_PRICE =
                #{usdPrice},
            </if>
            <if test="exchangeRate != null">EXCHANGE_RATE =
                #{exchangeRate},
            </if>
            <if test="originCountry != null">ORIGIN_COUNTRY =
                #{originCountry},
            </if>
            <if test="originRegionCode != null">ORIGIN_REGION_CODE =
                #{originRegionCode},
            </if>
            <if test="destCountry != null">DEST_COUNTRY =
                #{destCountry},
            </if>
            <if test="ieDistrictCode != null">IE_DISTRICT_CODE =
                #{ieDistrictCode},
            </if>
            <if test="iqIeDistrictCode != null">IQ_IE_DISTRICT_CODE =
                #{iqIeDistrictCode},
            </if>
            <if test="frnProducerName != null">FRN_PRODUCER_NAME =
                #{frnProducerName},
            </if>
            <if test="productModel != null">PRODUCT_MODEL =
                #{productModel},
            </if>
            <if test="productBrand != null">PRODUCT_BRAND =
                #{productBrand},
            </if>
            <if test="productDate != null">PRODUCT_DATE =
                #{productDate},
            </if>
            <if test="productBatch != null">PRODUCT_BATCH =
                #{productBatch},
            </if>
            <if test="UNGID != null">UNGID =
                #{UNGID},
            </if>
            <if test="ungFlag != null">UNG_FLAG =
                #{ungFlag},
            </if>
            <if test="ungModel != null">UNG_MODEL =
                #{ungModel},
            </if>
            <if test="ungClassify != null">UNG_CLASSIFY =
                #{ungClassify},
            </if>
            <if test="ungGName != null">UNG_G_NAME =
                #{ungGName},
            </if>
            <if test="productCharCode != null">PRODUCT_CHAR_CODE =
                #{productCharCode},
            </if>
            <if test="goodsId != null">GOODS_ID =
                #{goodsId},
            </if>
            <if test="useTo != null">USE_TO =
                #{useTo},
            </if>
            <if test="gCertFlag != null">G_CERT_FLAG =
                #{gCertFlag},
            </if>
            <if test="mnufctrRegNo != null">MNUFCTR_REG_NO =
                #{mnufctrRegNo},
            </if>
            <if test="CAS != null">CAS =
                #{CAS},
            </if>
            <if test="goodsType != null">GOODS_TYPE =
                #{goodsType},
            </if>
        </trim>
        where ID = #{ID}
    </update>

    <delete id="deleteByID" parameterType="String">
        delete
        from WXJY_NEW_DECLARED_GOODS where ID = #{ID}
    </delete>

    <delete id="deleteByIDs" parameterType="String">
        delete from WXJY_NEW_DECLARED_GOODS where ID in
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        </foreach>
    </delete>

    <delete id="logicDelete" parameterType="String">
        update  WXJY_NEW_DECLARED_GOODS set is_del = 1  where ID = #{ID}
    </delete>
</mapper>