<?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.EntryHeadMapper">

    <resultMap type="EntryHead" id="EntryHeadResult">
        <result property="entryId" column="ENTRY_ID"/>
        <result property="mainStatus" column="MAIN_STATUS"/>
        <result property="passMode" column="PASS_MODE"/>
        <result property="trafMode" column="TRAF_MODE"/>
        <result property="iEFlag" column="I_E_FLAG"/>
        <result property="iEPort" column="I_E_PORT"/>
        <result property="declPort" column="DECL_PORT"/>
        <result property="iEDate" column="I_E_DATE"/>
        <result property="declDate" column="DECL_DATE"/>
        <result property="declAdvanceFlag" column="DECL_ADVANCE_FLAG"/>
        <result property="acceptDate" column="ACCEPT_DATE"/>
        <result property="exInPortDate" column="EX_IN_PORT_DATE"/>
        <result property="consignScc" column="CONSIGN_SCC"/>
        <result property="consignCode" column="CONSIGN_CODE"/>
        <result property="consignName" column="CONSIGN_NAME"/>
        <result property="frnConsignCode" column="FRN_CONSIGN_CODE"/>
        <result property="frnConsignName" column="FRN_CONSIGN_NAME"/>
        <result property="tradeMode" column="TRADE_MODE"/>
        <result property="tradeCountry" column="TRADE_COUNTRY"/>
        <result property="grossWt" column="GROSS_WT"/>
        <result property="netWt" column="NET_WT"/>
        <result property="rmbPrice" column="RMB_PRICE"/>
        <result property="usdPrice" column="USD_PRICE"/>
        <result property="CONTAINER" column="CONTAINER"/>
        <result property="declMode" column="DECL_MODE"/>
        <result property="declStatus" column="DECL_STATUS"/>
        <result property="orderReceiveDate" column="ORDER_RECEIVE_DATE"/>
        <result property="orderReceiveCost" column="ORDER_RECEIVE_COST"/>
        <result property="certRlsDate" column="CERT_RLS_DATE"/>
        <result property="preReleaseDate" column="PRE_RELEASE_DATE"/>
        <result property="agentCode" column="AGENT_CODE"/>
        <result property="agentName" column="AGENT_NAME"/>
        <result property="noteS" column="NOTE_S"/>
        <result property="ownerCode" column="OWNER_CODE"/>
        <result property="ownerName" column="OWNER_NAME"/>
        <result property="examDate" column="EXAM_DATE"/>
        <result property="checkDate" column="CHECK_DATE"/>
        <result property="compEleDate" column="COMP_ELE_DATE"/>
        <result property="releaseDate" column="RELEASE_DATE"/>
        <result property="cuCost" column="CU_COST"/>
        <result property="totalCost" column="TOTAL_COST"/>
        <result property="beforeDeclCost" column="BEFORE_DECL_COST"/>
        <result property="profVerifyFlag" column="PROF_VERIFY_FLAG"/>
        <result property="newTwoStepFlag" column="NEW_TWO_STEP_FLAG"/>
        <result property="eleDeclDate" column="ELE_DECL_DATE"/>
        <result property="assessStartDate" column="ASSESS_START_DATE"/>
        <result property="assessEndDate" column="ASSESS_END_DATE"/>
        <result property="refundDate" column="REFUND_DATE"/>
        <result property="refundFlag" column="REFUND_FLAG"/>
        <result property="manCreateTime" column="MAN_CREATE_TIME"/>
        <result property="manChkTimeStart" column="MAN_CHK_TIME_START"/>
        <result property="manChkTimeEnd" column="MAN_CHK_TIME_END"/>
        <result property="checkCustomsCode" column="CHECK_CUSTOMS_CODE"/>
        <result property="checkFlag" column="CHECK_FLAG"/>
        <result property="manProcResult" column="MAN_PROC_RESULT"/>
        <result property="manProcIdea" column="MAN_PROC_IDEA"/>
    </resultMap>

    <sql id="baseVo">
        select ENTRY_ID, MAIN_STATUS, PASS_MODE, TRAF_MODE, I_E_FLAG, I_E_PORT, DECL_PORT, I_E_DATE, DECL_DATE, DECL_ADVANCE_FLAG, ACCEPT_DATE, EX_IN_PORT_DATE, CONSIGN_SCC, CONSIGN_CODE, CONSIGN_NAME, FRN_CONSIGN_CODE, FRN_CONSIGN_NAME, TRADE_MODE, TRADE_COUNTRY, GROSS_WT, NET_WT, RMB_PRICE, USD_PRICE, CONTAINER, DECL_MODE, DECL_STATUS, ORDER_RECEIVE_DATE, ORDER_RECEIVE_COST, CERT_RLS_DATE, PRE_RELEASE_DATE, AGENT_CODE, AGENT_NAME, NOTE_S, OWNER_CODE, OWNER_NAME, EXAM_DATE, CHECK_DATE, COMP_ELE_DATE, RELEASE_DATE, CU_COST, TOTAL_COST, BEFORE_DECL_COST, PROF_VERIFY_FLAG, NEW_TWO_STEP_FLAG, ELE_DECL_DATE, ASSESS_START_DATE, ASSESS_END_DATE, REFUND_DATE, REFUND_FLAG, MAN_CREATE_TIME, MAN_CHK_TIME_START, MAN_CHK_TIME_END, CHECK_CUSTOMS_CODE, CHECK_FLAG, MAN_PROC_RESULT, MAN_PROC_IDEA
        from WXJY_ENTRY_HEAD
    </sql>

    <select id="selectList" parameterType="EntryHeadQuery" resultMap="EntryHeadResult">
        <include refid="baseVo"/>
        <where>
        <if test="mainStatus != null  and mainStatus != ''">
            and MAIN_STATUS = #{mainStatus}
        </if>
        <if test="passMode != null  and passMode != ''">
            and PASS_MODE = #{passMode}
        </if>
        <if test="trafMode != null  and trafMode != ''">
            and TRAF_MODE = #{trafMode}
        </if>
        <if test="iEFlag != null  and iEFlag != ''">
            and I_E_FLAG = #{iEFlag}
        </if>
        <if test="iEPort != null  and iEPort != ''">
            and I_E_PORT = #{iEPort}
        </if>
        <if test="declPort != null  and declPort != ''">
            and DECL_PORT = #{declPort}
        </if>
        <if test="iEDate != null  and iEDate != ''">
            and I_E_DATE = #{iEDate}
        </if>
        <if test="declDate != null  and declDate != ''">
            and DECL_DATE = #{declDate}
        </if>
        <if test="declAdvanceFlag != null  and declAdvanceFlag != ''">
            and DECL_ADVANCE_FLAG = #{declAdvanceFlag}
        </if>
        <if test="acceptDate != null  and acceptDate != ''">
            and ACCEPT_DATE = #{acceptDate}
        </if>
        <if test="exInPortDate != null  and exInPortDate != ''">
            and EX_IN_PORT_DATE = #{exInPortDate}
        </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="frnConsignCode != null  and frnConsignCode != ''">
            and FRN_CONSIGN_CODE = #{frnConsignCode}
        </if>
        <if test="frnConsignName != null  and frnConsignName != ''">
            and FRN_CONSIGN_NAME like concat('%', #{frnConsignName}, '%')
        </if>
        <if test="tradeMode != null  and tradeMode != ''">
            and TRADE_MODE = #{tradeMode}
        </if>
        <if test="tradeCountry != null  and tradeCountry != ''">
            and TRADE_COUNTRY = #{tradeCountry}
        </if>
        <if test="grossWt != null  and grossWt != ''">
            and GROSS_WT = #{grossWt}
        </if>
        <if test="netWt != null  and netWt != ''">
            and NET_WT = #{netWt}
        </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="CONTAINER != null  and CONTAINER != ''">
            and CONTAINER = #{CONTAINER}
        </if>
        <if test="declMode != null  and declMode != ''">
            and DECL_MODE = #{declMode}
        </if>
        <if test="declStatus != null  and declStatus != ''">
            and DECL_STATUS = #{declStatus}
        </if>
        <if test="orderReceiveDate != null  and orderReceiveDate != ''">
            and ORDER_RECEIVE_DATE = #{orderReceiveDate}
        </if>
        <if test="orderReceiveCost != null  and orderReceiveCost != ''">
            and ORDER_RECEIVE_COST = #{orderReceiveCost}
        </if>
        <if test="certRlsDate != null  and certRlsDate != ''">
            and CERT_RLS_DATE = #{certRlsDate}
        </if>
        <if test="preReleaseDate != null  and preReleaseDate != ''">
            and PRE_RELEASE_DATE = #{preReleaseDate}
        </if>
        <if test="agentCode != null  and agentCode != ''">
            and AGENT_CODE = #{agentCode}
        </if>
        <if test="agentName != null  and agentName != ''">
            and AGENT_NAME like concat('%', #{agentName}, '%')
        </if>
        <if test="noteS != null  and noteS != ''">
            and NOTE_S = #{noteS}
        </if>
        <if test="ownerCode != null  and ownerCode != ''">
            and OWNER_CODE = #{ownerCode}
        </if>
        <if test="ownerName != null  and ownerName != ''">
            and OWNER_NAME like concat('%', #{ownerName}, '%')
        </if>
        <if test="examDate != null  and examDate != ''">
            and EXAM_DATE = #{examDate}
        </if>
        <if test="checkDate != null  and checkDate != ''">
            and CHECK_DATE = #{checkDate}
        </if>
        <if test="compEleDate != null  and compEleDate != ''">
            and COMP_ELE_DATE = #{compEleDate}
        </if>
        <if test="releaseDate != null  and releaseDate != ''">
            and RELEASE_DATE = #{releaseDate}
        </if>
        <if test="cuCost != null  and cuCost != ''">
            and CU_COST = #{cuCost}
        </if>
        <if test="totalCost != null  and totalCost != ''">
            and TOTAL_COST = #{totalCost}
        </if>
        <if test="beforeDeclCost != null  and beforeDeclCost != ''">
            and BEFORE_DECL_COST = #{beforeDeclCost}
        </if>
        <if test="profVerifyFlag != null  and profVerifyFlag != ''">
            and PROF_VERIFY_FLAG = #{profVerifyFlag}
        </if>
        <if test="newTwoStepFlag != null  and newTwoStepFlag != ''">
            and NEW_TWO_STEP_FLAG = #{newTwoStepFlag}
        </if>
        <if test="eleDeclDate != null  and eleDeclDate != ''">
            and ELE_DECL_DATE = #{eleDeclDate}
        </if>
        <if test="assessStartDate != null  and assessStartDate != ''">
            and ASSESS_START_DATE = #{assessStartDate}
        </if>
        <if test="assessEndDate != null  and assessEndDate != ''">
            and ASSESS_END_DATE = #{assessEndDate}
        </if>
        <if test="refundDate != null  and refundDate != ''">
            and REFUND_DATE = #{refundDate}
        </if>
        <if test="refundFlag != null  and refundFlag != ''">
            and REFUND_FLAG = #{refundFlag}
        </if>
        <if test="manCreateTime != null  and manCreateTime != ''">
            and MAN_CREATE_TIME = #{manCreateTime}
        </if>
        <if test="manChkTimeStart != null  and manChkTimeStart != ''">
            and MAN_CHK_TIME_START = #{manChkTimeStart}
        </if>
        <if test="manChkTimeEnd != null  and manChkTimeEnd != ''">
            and MAN_CHK_TIME_END = #{manChkTimeEnd}
        </if>
        <if test="checkCustomsCode != null  and checkCustomsCode != ''">
            and CHECK_CUSTOMS_CODE = #{checkCustomsCode}
        </if>
        <if test="checkFlag != null  and checkFlag != ''">
            and CHECK_FLAG = #{checkFlag}
        </if>
        <if test="manProcResult != null  and manProcResult != ''">
            and MAN_PROC_RESULT = #{manProcResult}
        </if>
        <if test="manProcIdea != null  and manProcIdea != ''">
            and MAN_PROC_IDEA = #{manProcIdea}
        </if>
        </where>
    </select>

    <select id="selectByEntryId" parameterType="String"
        resultMap="EntryHeadResult">
        <include refid="baseVo"/>
        where ENTRY_ID = #{entryId}
    </select>

    <insert id="insert" parameterType="EntryHead">
        insert into WXJY_ENTRY_HEAD
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="entryId != null and entryId != ''">ENTRY_ID,
            </if>
            <if test="mainStatus != null">MAIN_STATUS,
            </if>
            <if test="passMode != null">PASS_MODE,
            </if>
            <if test="trafMode != null">TRAF_MODE,
            </if>
            <if test="iEFlag != null">I_E_FLAG,
            </if>
            <if test="iEPort != null">I_E_PORT,
            </if>
            <if test="declPort != null">DECL_PORT,
            </if>
            <if test="iEDate != null">I_E_DATE,
            </if>
            <if test="declDate != null">DECL_DATE,
            </if>
            <if test="declAdvanceFlag != null">DECL_ADVANCE_FLAG,
            </if>
            <if test="acceptDate != null">ACCEPT_DATE,
            </if>
            <if test="exInPortDate != null">EX_IN_PORT_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="frnConsignCode != null">FRN_CONSIGN_CODE,
            </if>
            <if test="frnConsignName != null">FRN_CONSIGN_NAME,
            </if>
            <if test="tradeMode != null">TRADE_MODE,
            </if>
            <if test="tradeCountry != null">TRADE_COUNTRY,
            </if>
            <if test="grossWt != null">GROSS_WT,
            </if>
            <if test="netWt != null">NET_WT,
            </if>
            <if test="rmbPrice != null">RMB_PRICE,
            </if>
            <if test="usdPrice != null">USD_PRICE,
            </if>
            <if test="CONTAINER != null">CONTAINER,
            </if>
            <if test="declMode != null">DECL_MODE,
            </if>
            <if test="declStatus != null">DECL_STATUS,
            </if>
            <if test="orderReceiveDate != null">ORDER_RECEIVE_DATE,
            </if>
            <if test="orderReceiveCost != null">ORDER_RECEIVE_COST,
            </if>
            <if test="certRlsDate != null">CERT_RLS_DATE,
            </if>
            <if test="preReleaseDate != null">PRE_RELEASE_DATE,
            </if>
            <if test="agentCode != null">AGENT_CODE,
            </if>
            <if test="agentName != null">AGENT_NAME,
            </if>
            <if test="noteS != null">NOTE_S,
            </if>
            <if test="ownerCode != null">OWNER_CODE,
            </if>
            <if test="ownerName != null">OWNER_NAME,
            </if>
            <if test="examDate != null">EXAM_DATE,
            </if>
            <if test="checkDate != null">CHECK_DATE,
            </if>
            <if test="compEleDate != null">COMP_ELE_DATE,
            </if>
            <if test="releaseDate != null">RELEASE_DATE,
            </if>
            <if test="cuCost != null">CU_COST,
            </if>
            <if test="totalCost != null">TOTAL_COST,
            </if>
            <if test="beforeDeclCost != null">BEFORE_DECL_COST,
            </if>
            <if test="profVerifyFlag != null">PROF_VERIFY_FLAG,
            </if>
            <if test="newTwoStepFlag != null">NEW_TWO_STEP_FLAG,
            </if>
            <if test="eleDeclDate != null">ELE_DECL_DATE,
            </if>
            <if test="assessStartDate != null">ASSESS_START_DATE,
            </if>
            <if test="assessEndDate != null">ASSESS_END_DATE,
            </if>
            <if test="refundDate != null">REFUND_DATE,
            </if>
            <if test="refundFlag != null">REFUND_FLAG,
            </if>
            <if test="manCreateTime != null">MAN_CREATE_TIME,
            </if>
            <if test="manChkTimeStart != null">MAN_CHK_TIME_START,
            </if>
            <if test="manChkTimeEnd != null">MAN_CHK_TIME_END,
            </if>
            <if test="checkCustomsCode != null">CHECK_CUSTOMS_CODE,
            </if>
            <if test="checkFlag != null">CHECK_FLAG,
            </if>
            <if test="manProcResult != null">MAN_PROC_RESULT,
            </if>
            <if test="manProcIdea != null">MAN_PROC_IDEA,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="entryId != null and entryId != ''">#{entryId},
            </if>
            <if test="mainStatus != null">#{mainStatus},
            </if>
            <if test="passMode != null">#{passMode},
            </if>
            <if test="trafMode != null">#{trafMode},
            </if>
            <if test="iEFlag != null">#{iEFlag},
            </if>
            <if test="iEPort != null">#{iEPort},
            </if>
            <if test="declPort != null">#{declPort},
            </if>
            <if test="iEDate != null">#{iEDate},
            </if>
            <if test="declDate != null">#{declDate},
            </if>
            <if test="declAdvanceFlag != null">#{declAdvanceFlag},
            </if>
            <if test="acceptDate != null">#{acceptDate},
            </if>
            <if test="exInPortDate != null">#{exInPortDate},
            </if>
            <if test="consignScc != null">#{consignScc},
            </if>
            <if test="consignCode != null">#{consignCode},
            </if>
            <if test="consignName != null">#{consignName},
            </if>
            <if test="frnConsignCode != null">#{frnConsignCode},
            </if>
            <if test="frnConsignName != null">#{frnConsignName},
            </if>
            <if test="tradeMode != null">#{tradeMode},
            </if>
            <if test="tradeCountry != null">#{tradeCountry},
            </if>
            <if test="grossWt != null">#{grossWt},
            </if>
            <if test="netWt != null">#{netWt},
            </if>
            <if test="rmbPrice != null">#{rmbPrice},
            </if>
            <if test="usdPrice != null">#{usdPrice},
            </if>
            <if test="CONTAINER != null">#{CONTAINER},
            </if>
            <if test="declMode != null">#{declMode},
            </if>
            <if test="declStatus != null">#{declStatus},
            </if>
            <if test="orderReceiveDate != null">#{orderReceiveDate},
            </if>
            <if test="orderReceiveCost != null">#{orderReceiveCost},
            </if>
            <if test="certRlsDate != null">#{certRlsDate},
            </if>
            <if test="preReleaseDate != null">#{preReleaseDate},
            </if>
            <if test="agentCode != null">#{agentCode},
            </if>
            <if test="agentName != null">#{agentName},
            </if>
            <if test="noteS != null">#{noteS},
            </if>
            <if test="ownerCode != null">#{ownerCode},
            </if>
            <if test="ownerName != null">#{ownerName},
            </if>
            <if test="examDate != null">#{examDate},
            </if>
            <if test="checkDate != null">#{checkDate},
            </if>
            <if test="compEleDate != null">#{compEleDate},
            </if>
            <if test="releaseDate != null">#{releaseDate},
            </if>
            <if test="cuCost != null">#{cuCost},
            </if>
            <if test="totalCost != null">#{totalCost},
            </if>
            <if test="beforeDeclCost != null">#{beforeDeclCost},
            </if>
            <if test="profVerifyFlag != null">#{profVerifyFlag},
            </if>
            <if test="newTwoStepFlag != null">#{newTwoStepFlag},
            </if>
            <if test="eleDeclDate != null">#{eleDeclDate},
            </if>
            <if test="assessStartDate != null">#{assessStartDate},
            </if>
            <if test="assessEndDate != null">#{assessEndDate},
            </if>
            <if test="refundDate != null">#{refundDate},
            </if>
            <if test="refundFlag != null">#{refundFlag},
            </if>
            <if test="manCreateTime != null">#{manCreateTime},
            </if>
            <if test="manChkTimeStart != null">#{manChkTimeStart},
            </if>
            <if test="manChkTimeEnd != null">#{manChkTimeEnd},
            </if>
            <if test="checkCustomsCode != null">#{checkCustomsCode},
            </if>
            <if test="checkFlag != null">#{checkFlag},
            </if>
            <if test="manProcResult != null">#{manProcResult},
            </if>
            <if test="manProcIdea != null">#{manProcIdea},
            </if>
        </trim>
    </insert>

    <update id="update" parameterType="EntryHead">
        update WXJY_ENTRY_HEAD
        <trim prefix="SET" suffixOverrides=",">
            <if test="mainStatus != null">MAIN_STATUS =
                #{mainStatus},
            </if>
            <if test="passMode != null">PASS_MODE =
                #{passMode},
            </if>
            <if test="trafMode != null">TRAF_MODE =
                #{trafMode},
            </if>
            <if test="iEFlag != null">I_E_FLAG =
                #{iEFlag},
            </if>
            <if test="iEPort != null">I_E_PORT =
                #{iEPort},
            </if>
            <if test="declPort != null">DECL_PORT =
                #{declPort},
            </if>
            <if test="iEDate != null">I_E_DATE =
                #{iEDate},
            </if>
            <if test="declDate != null">DECL_DATE =
                #{declDate},
            </if>
            <if test="declAdvanceFlag != null">DECL_ADVANCE_FLAG =
                #{declAdvanceFlag},
            </if>
            <if test="acceptDate != null">ACCEPT_DATE =
                #{acceptDate},
            </if>
            <if test="exInPortDate != null">EX_IN_PORT_DATE =
                #{exInPortDate},
            </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="frnConsignCode != null">FRN_CONSIGN_CODE =
                #{frnConsignCode},
            </if>
            <if test="frnConsignName != null">FRN_CONSIGN_NAME =
                #{frnConsignName},
            </if>
            <if test="tradeMode != null">TRADE_MODE =
                #{tradeMode},
            </if>
            <if test="tradeCountry != null">TRADE_COUNTRY =
                #{tradeCountry},
            </if>
            <if test="grossWt != null">GROSS_WT =
                #{grossWt},
            </if>
            <if test="netWt != null">NET_WT =
                #{netWt},
            </if>
            <if test="rmbPrice != null">RMB_PRICE =
                #{rmbPrice},
            </if>
            <if test="usdPrice != null">USD_PRICE =
                #{usdPrice},
            </if>
            <if test="CONTAINER != null">CONTAINER =
                #{CONTAINER},
            </if>
            <if test="declMode != null">DECL_MODE =
                #{declMode},
            </if>
            <if test="declStatus != null">DECL_STATUS =
                #{declStatus},
            </if>
            <if test="orderReceiveDate != null">ORDER_RECEIVE_DATE =
                #{orderReceiveDate},
            </if>
            <if test="orderReceiveCost != null">ORDER_RECEIVE_COST =
                #{orderReceiveCost},
            </if>
            <if test="certRlsDate != null">CERT_RLS_DATE =
                #{certRlsDate},
            </if>
            <if test="preReleaseDate != null">PRE_RELEASE_DATE =
                #{preReleaseDate},
            </if>
            <if test="agentCode != null">AGENT_CODE =
                #{agentCode},
            </if>
            <if test="agentName != null">AGENT_NAME =
                #{agentName},
            </if>
            <if test="noteS != null">NOTE_S =
                #{noteS},
            </if>
            <if test="ownerCode != null">OWNER_CODE =
                #{ownerCode},
            </if>
            <if test="ownerName != null">OWNER_NAME =
                #{ownerName},
            </if>
            <if test="examDate != null">EXAM_DATE =
                #{examDate},
            </if>
            <if test="checkDate != null">CHECK_DATE =
                #{checkDate},
            </if>
            <if test="compEleDate != null">COMP_ELE_DATE =
                #{compEleDate},
            </if>
            <if test="releaseDate != null">RELEASE_DATE =
                #{releaseDate},
            </if>
            <if test="cuCost != null">CU_COST =
                #{cuCost},
            </if>
            <if test="totalCost != null">TOTAL_COST =
                #{totalCost},
            </if>
            <if test="beforeDeclCost != null">BEFORE_DECL_COST =
                #{beforeDeclCost},
            </if>
            <if test="profVerifyFlag != null">PROF_VERIFY_FLAG =
                #{profVerifyFlag},
            </if>
            <if test="newTwoStepFlag != null">NEW_TWO_STEP_FLAG =
                #{newTwoStepFlag},
            </if>
            <if test="eleDeclDate != null">ELE_DECL_DATE =
                #{eleDeclDate},
            </if>
            <if test="assessStartDate != null">ASSESS_START_DATE =
                #{assessStartDate},
            </if>
            <if test="assessEndDate != null">ASSESS_END_DATE =
                #{assessEndDate},
            </if>
            <if test="refundDate != null">REFUND_DATE =
                #{refundDate},
            </if>
            <if test="refundFlag != null">REFUND_FLAG =
                #{refundFlag},
            </if>
            <if test="manCreateTime != null">MAN_CREATE_TIME =
                #{manCreateTime},
            </if>
            <if test="manChkTimeStart != null">MAN_CHK_TIME_START =
                #{manChkTimeStart},
            </if>
            <if test="manChkTimeEnd != null">MAN_CHK_TIME_END =
                #{manChkTimeEnd},
            </if>
            <if test="checkCustomsCode != null">CHECK_CUSTOMS_CODE =
                #{checkCustomsCode},
            </if>
            <if test="checkFlag != null">CHECK_FLAG =
                #{checkFlag},
            </if>
            <if test="manProcResult != null">MAN_PROC_RESULT =
                #{manProcResult},
            </if>
            <if test="manProcIdea != null">MAN_PROC_IDEA =
                #{manProcIdea},
            </if>
        </trim>
        where ENTRY_ID = #{entryId}
    </update>

    <delete id="deleteByEntryId" parameterType="String">
        delete
        from WXJY_ENTRY_HEAD where ENTRY_ID = #{entryId}
    </delete>

    <delete id="deleteByEntryIds" parameterType="String">
        delete from WXJY_ENTRY_HEAD where ENTRY_ID in
        <foreach item="entryId" collection="array" open="(" separator="," close=")">
            #{entryId}
        </foreach>
    </delete>

    <delete id="logicDelete" parameterType="String">
        update  WXJY_ENTRY_HEAD set is_del = 1  where ENTRY_ID = #{entryId}
    </delete>
</mapper>