<?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.zbf.system.mapper.TRkWareNoticeTabMapper">

    <resultMap type="TRkWareNoticeTab" id="TRkWareNoticeTabResult">
        <result property="id" column="id"/>
        <result property="salesOrderNumber" column="sales_order_number"/>
        <result property="noticeId" column="notice_id"/>
        <result property="goodsId" column="goods_id"/>
        <result property="goodsName" column="goods_name"/>
        <result property="unit" column="unit"/>
        <result property="specification" column="specification"/>
        <result property="recoil" column="recoil"/>
        <result property="brand" column="brand"/>
        <result property="price" column="price"/>
        <result property="totalMoney" column="total_money"/>
        <result property="arraMount" column="arra_mount"/>
        <result property="recNum" column="rec_num"/>
        <result property="project" column="project"/>
        <result property="needDept" column="need_dept"/>
        <result property="useType" column="use_type"/>
        <result property="scaleUnit" column="scale_unit"/>
        <result property="totalVolume" column="total_volume"/>
        <result property="totalRoughWeight" column="total_rough_weight"/>
        <result property="totalNetWeigh" column="total_net_weigh"/>
        <result property="amount" column="amount"/>
        <result property="productionDate" column="production_date"/>
        <result property="storageId" column="storage_id"/>
        <result property="storageAreaId" column="storage_area_id"/>
        <result property="packageId" column="package_id"/>
        <result property="remark" column="remark"/>
        <result property="goodsTypeId" column="goods_type_id"/>
        <result property="barcode" column="barcode"/>
        <result property="goodsVolume" column="goods_volume"/>
        <result property="printSts" column="print_sts"/>
        <result property="printCs" column="print_cs"/>
        <result property="netWeigh" column="net_weigh"/>
        <result property="kindNum" column="kind_num"/>
        <result property="expiryDate" column="expiry_date"/>
        <result property="operateDate" column="operate_date"/>
        <result property="productStatus" column="product_status"/>
        <result property="receivingStatus" column="receiving_status"/>
        <result property="inStatus" column="in_status"/>
        <result property="ctl" column="ctl"/>
        <result property="qualityInspectionDate" column="quality_inspection_date"/>
        <result property="status" column="status"/>
        <result property="acceNum" column="acce_num"/>
        <result property="qualityInspecStatus" column="quality_inspec_status"/>
        <result property="orderType" column="order_type"/>
        <result property="applicant" column="applicant"/>
        <result property="supplier" column="supplier"/>
        <result property="qualified" column="qualified"/>
        <result property="updateTime" column="update_time"/>
        <result property="planDate" column="plan_date"/>
        <result property="planTime" column="plan_time"/>
        <result property="needCycle" column="need_cycle"/>
        <result property="needType" column="need_type"/>
        <result property="batchNo" column="batch_no"/>
        <result property="reportTime" column="report_time"/>
        <result property="createTime" column="create_time"/>
        <result property="createBy" column="create_by"/>
        <result property="updateBy" column="update_by"/>
        <result property="abc" column="abc"/>
        <result property="levelType" column="level_type"/>
        <result property="storageShortName" column="storage_short_name"/>
        <result property="storageLocation"    column="storage_location"    />
        <result property="dataSource" column="data_source"/>
        <result property="totalArraAmout" column="total_arra_amout"/>
        <result property="noTaxPrice" column="no_tax_price"/>
        <result property="noTaxMoney" column="no_tax_money"/>
        <result property="purchaseTaxRate" column="purchase_tax_rate"/>
        <result property="purchaseTax" column="purchase_tax"/>
        <result property="smartSelectionMode" column="smart_selection_mode"/>
        <result property="independentAccounting" column="independent_accounting"/>
        <result property="emphasisGoods" column="emphasis_goods"/>
        <result property="expedited" column="expedited"/>
        <result property="individualInvoicing" column="individual_invoicing"/>
        <result property="rejectNum" column="reject_num"/>
        <result property="attachments" column="attachments"/>
        <result property="supplierAttachments" column="supplier_attachments"/>
        <result property="invoiceTitle" column="invoice_title"/>
        <result property="sourceNum" column="source_num"/>
        <result property="needPerson"    column="need_person"    />
        <result property="needTel"    column="need_tel"    />
        <result property="purchaseId"    column="purchase_id"    />
        <result property="receivingNum"    column="receiving_num"    />
    </resultMap>

    <sql id="selectTRkWareNoticeTabVo">
        select id,
               sales_order_number,
               notice_id,
               goods_id,
               goods_name,
               unit,
               specification,
               recoil,
               brand,
               price,
               total_money,
               arra_mount,
               rec_num,
               project,
               need_dept,
               use_type,
               scale_unit,
               total_volume,
               total_rough_weight,
               total_net_weigh,
               amount,
               production_date,
               storage_id,
               storage_area_id,
               package_id,
               remark,
               goods_type_id,
               barcode,
               goods_volume,
               print_sts,
               print_cs,
               net_weigh,
               kind_num,
               expiry_date,
               operate_date,
               product_status,
               receiving_status,
               in_status,
               ctl,
               quality_inspection_date,
               status,
               acce_num,
               quality_inspec_status,
               order_type,
               applicant,
               supplier,
               qualified,
               update_time,
               plan_date,
               plan_time,
               need_cycle,
               need_type,
               batch_no,
               report_time,
               create_time,
               create_by,
               update_by,
               abc,
               level_type,
               storage_short_name,
               data_source,
               storage_location,
               total_arra_amout,
               no_tax_price,
               no_tax_money,
               purchase_tax_rate,
               purchase_tax,
               smart_selection_mode,
               independent_accounting,
               emphasis_goods,
               expedited,
               individual_invoicing,
               reject_num,
               attachments,
               supplier_attachments,
               invoice_title,
               source_num,
               need_person,
               need_tel,
               purchase_id,
               receiving_num
        from t_rk_ware_notice_tab
    </sql>

    <select id="selectTRkWareNoticeTabList" parameterType="TRkWareNoticeTab" resultMap="TRkWareNoticeTabResult">
        <include refid="selectTRkWareNoticeTabVo"/>
        <where>
            <if test="salesOrderNumber != null  and salesOrderNumber != ''">and sales_order_number =
                #{salesOrderNumber}
            </if>
            <if test="noticeId != null  and noticeId != ''">and notice_id = #{noticeId}</if>
            <if test="goodsId != null  and goodsId != ''">and REGEXP_REPLACE(goods_id, ' ', '') like concat('%',
                #{goodsId}, '%')
            </if>
            <if test="goodsName != null  and goodsName != ''">and goods_name like concat('%', #{goodsName}, '%')</if>
            <if test="unit != null  and unit != ''">and unit = #{unit}</if>
            <if test="specification != null  and specification != ''">and specification like concat('%',
                #{specification}, '%')
            </if>
            <if test="recoil != null  and recoil != ''">and recoil like concat('%', #{recoil}, '%')</if>
            <if test="brand != null  and brand != ''">and brand = #{brand}</if>
            <if test="price != null ">and price = #{price}</if>
            <if test="totalMoney != null ">and total_money = #{totalMoney}</if>
            <if test="arraMount != null ">and arra_mount = #{arraMount}</if>
            <if test="recNum != null ">and rec_num = #{recNum}</if>
            <if test="project != null  and project != ''">and project = #{project}</if>
            <if test="needDept != null  and needDept != ''">and need_dept = #{needDept}</if>
            <if test="useType != null  and useType != ''">and use_type = #{useType}</if>
            <if test="scaleUnit != null  and scaleUnit != ''">and scale_unit = #{scaleUnit}</if>
            <if test="totalVolume != null ">and total_volume = #{totalVolume}</if>
            <if test="totalRoughWeight != null ">and total_rough_weight = #{totalRoughWeight}</if>
            <if test="totalNetWeigh != null ">and total_net_weigh = #{totalNetWeigh}</if>
            <if test="amount != null ">and amount = #{amount}</if>
            <if test="productionDate != null ">and production_date = #{productionDate}</if>
            <if test="storageId != null  and storageId != ''">and storage_id = #{storageId}</if>
            <if test="storageAreaId != null  and storageAreaId != ''">and storage_area_id = #{storageAreaId}</if>
            <if test="packageId != null  and packageId != ''">and package_id = #{packageId}</if>
            <if test="goodsTypeId != null  and goodsTypeId != ''">and goods_type_id = #{goodsTypeId}</if>
            <if test="barcode != null  and barcode != ''">and barcode = #{barcode}</if>
            <if test="goodsVolume != null ">and goods_volume = #{goodsVolume}</if>
            <if test="printSts != null  and printSts != ''">and print_sts = #{printSts}</if>
            <if test="printCs != null ">and print_cs = #{printCs}</if>
            <if test="netWeigh != null ">and net_weigh = #{netWeigh}</if>
            <if test="kindNum != null ">and kind_num = #{kindNum}</if>
            <if test="expiryDate != null  and expiryDate != ''">and expiry_date = #{expiryDate}</if>
            <if test="operateDate != null ">and operate_date = #{operateDate}</if>
            <if test="productStatus != null  and productStatus != ''">and product_status = #{productStatus}</if>
            <if test="receivingStatus != null  and receivingStatus != ''">and receiving_status = #{receivingStatus}</if>
            <if test="inStatus != null  and inStatus != ''">and in_status = #{inStatus}</if>
            <if test="ctl != null  and ctl != ''">and ctl = #{ctl}</if>
            <if test="qualityInspectionDate != null  and qualityInspectionDate != ''">and quality_inspection_date =
                #{qualityInspectionDate}
            </if>
            <if test="status != null  and status != ''">and status = #{status}</if>
            <if test="acceNum != null ">and acce_num = #{acceNum}</if>
            <if test="qualityInspecStatus != null  and qualityInspecStatus != ''">and quality_inspec_status =
                #{qualityInspecStatus}
            </if>
            <if test="orderType != null  and orderType != ''">and order_type = #{orderType}</if>
            <if test="applicant != null  and applicant != ''">and applicant = #{applicant}</if>
            <if test="supplier != null  and supplier != ''">and supplier = #{supplier}</if>
            <if test="qualified != null  and qualified != ''">and qualified = #{qualified}</if>
            <if test="planDate != null  and planDate != ''">and plan_date = #{planDate}</if>
            <if test="planTime != null  and planTime != ''">and plan_time = #{planTime}</if>
            <if test="needCycle != null ">and need_cycle = #{needCycle}</if>
            <if test="needType != null  and needType != ''">and need_type = #{needType}</if>
            <if test="batchNo != null  and batchNo != ''">and batch_no = #{batchNo}</if>
            <if test="reportTime != null ">and report_time = #{reportTime}</if>
            <if test="abc != null  and abc != ''">and abc = #{abc}</if>
            <if test="levelType != null  and levelType != ''">and level_type = #{levelType}</if>
            <if test="purchaseId != null  and purchaseId != ''">and purchase_id = #{purchaseId}</if>
            <if test="storageShortName != null  and storageShortName != ''">and storage_short_name =
                #{storageShortName}
            </if>
        </where>
        order by create_time desc
    </select>

    <select id="selectTRkWareNoticeTabById" parameterType="String" resultMap="TRkWareNoticeTabResult">
        <include refid="selectTRkWareNoticeTabVo"/>
        where id = #{id}
    </select>

    <insert id="insertTRkWareNoticeTab" parameterType="TRkWareNoticeTab">
        insert into t_rk_ware_notice_tab
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="salesOrderNumber != null">sales_order_number,</if>
            <if test="noticeId != null">notice_id,</if>
            <if test="goodsId != null">goods_id,</if>
            <if test="goodsName != null">goods_name,</if>
            <if test="unit != null">unit,</if>
            <if test="specification != null">specification,</if>
            <if test="recoil != null">recoil,</if>
            <if test="brand != null">brand,</if>
            <if test="price != null">price,</if>
            <if test="totalMoney != null">total_money,</if>
            <if test="arraMount != null">arra_mount,</if>
            <if test="recNum != null">rec_num,</if>
            <if test="project != null">project,</if>
            <if test="needDept != null">need_dept,</if>
            <if test="useType != null">use_type,</if>
            <if test="scaleUnit != null">scale_unit,</if>
            <if test="totalVolume != null">total_volume,</if>
            <if test="totalRoughWeight != null">total_rough_weight,</if>
            <if test="totalNetWeigh != null">total_net_weigh,</if>
            <if test="amount != null">amount,</if>
            <if test="productionDate != null">production_date,</if>
            <if test="storageId != null">storage_id,</if>
            <if test="storageAreaId != null">storage_area_id,</if>
            <if test="packageId != null">package_id,</if>
            <if test="remark != null">remark,</if>
            <if test="goodsTypeId != null">goods_type_id,</if>
            <if test="barcode != null">barcode,</if>
            <if test="goodsVolume != null">goods_volume,</if>
            <if test="printSts != null">print_sts,</if>
            <if test="printCs != null">print_cs,</if>
            <if test="netWeigh != null">net_weigh,</if>
            <if test="kindNum != null">kind_num,</if>
            <if test="expiryDate != null">expiry_date,</if>
            <if test="operateDate != null">operate_date,</if>
            <if test="productStatus != null">product_status,</if>
            <if test="receivingStatus != null">receiving_status,</if>
            <if test="inStatus != null">in_status,</if>
            <if test="ctl != null">ctl,</if>
            <if test="qualityInspectionDate != null">quality_inspection_date,</if>
            <if test="status != null">status,</if>
            <if test="acceNum != null">acce_num,</if>
            <if test="qualityInspecStatus != null">quality_inspec_status,</if>
            <if test="orderType != null">order_type,</if>
            <if test="applicant != null">applicant,</if>
            <if test="supplier != null">supplier,</if>
            <if test="qualified != null">qualified,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="planDate != null">plan_date,</if>
            <if test="planTime != null">plan_time,</if>
            <if test="needCycle != null">need_cycle,</if>
            <if test="needType != null">need_type,</if>
            <if test="batchNo != null">batch_no,</if>
            <if test="reportTime != null">report_time,</if>
            <if test="createTime != null">create_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="abc != null">abc,</if>
            <if test="levelType != null">level_type,</if>
            <if test="storageShortName != null">storage_short_name,</if>
            <if test="dataSource != null">data_source,</if>
            <if test="storageLocation != null">storage_location,</if>
            <if test="totalArraAmout != null">total_arra_amout,</if>
            <if test="noTaxPrice != null">no_tax_price,</if>
            <if test="noTaxMoney != null">no_tax_money,</if>
            <if test="purchaseTaxRate != null">purchase_tax_rate,</if>
            <if test="purchaseTax != null">purchase_tax,</if>
            <if test="smartSelectionMode != null">smart_selection_mode,</if>
            <if test="independentAccounting != null">independent_accounting,</if>
            <if test="emphasisGoods != null">emphasis_goods,</if>
            <if test="expedited != null">expedited,</if>
            <if test="individualInvoicing != null">individual_invoicing,</if>
            <if test="rejectNum != null">reject_num,</if>
            <if test="attachments != null">attachments,</if>
            <if test="supplierAttachments != null">supplier_attachments,</if>
            <if test="invoiceTitle != null">invoice_title,</if>
            <if test="sourceNum != null">source_num,</if>
            <if test="needPerson != null">need_person,</if>
            <if test="needTel != null">need_tel,</if>
            <if test="purchaseId != null">purchase_id,</if>
            <if test="receivingNum != null">receiving_num,</if>
            </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="salesOrderNumber != null">#{salesOrderNumber},</if>
            <if test="noticeId != null">#{noticeId},</if>
            <if test="goodsId != null">#{goodsId},</if>
            <if test="goodsName != null">#{goodsName},</if>
            <if test="unit != null">#{unit},</if>
            <if test="specification != null">#{specification},</if>
            <if test="recoil != null">#{recoil},</if>
            <if test="brand != null">#{brand},</if>
            <if test="price != null">#{price},</if>
            <if test="totalMoney != null">#{totalMoney},</if>
            <if test="arraMount != null">#{arraMount},</if>
            <if test="recNum != null">#{recNum},</if>
            <if test="project != null">#{project},</if>
            <if test="needDept != null">#{needDept},</if>
            <if test="useType != null">#{useType},</if>
            <if test="scaleUnit != null">#{scaleUnit},</if>
            <if test="totalVolume != null">#{totalVolume},</if>
            <if test="totalRoughWeight != null">#{totalRoughWeight},</if>
            <if test="totalNetWeigh != null">#{totalNetWeigh},</if>
            <if test="amount != null">#{amount},</if>
            <if test="productionDate != null">#{productionDate},</if>
            <if test="storageId != null">#{storageId},</if>
            <if test="storageAreaId != null">#{storageAreaId},</if>
            <if test="packageId != null">#{packageId},</if>
            <if test="remark != null">#{remark},</if>
            <if test="goodsTypeId != null">#{goodsTypeId},</if>
            <if test="barcode != null">#{barcode},</if>
            <if test="goodsVolume != null">#{goodsVolume},</if>
            <if test="printSts != null">#{printSts},</if>
            <if test="printCs != null">#{printCs},</if>
            <if test="netWeigh != null">#{netWeigh},</if>
            <if test="kindNum != null">#{kindNum},</if>
            <if test="expiryDate != null">#{expiryDate},</if>
            <if test="operateDate != null">#{operateDate},</if>
            <if test="productStatus != null">#{productStatus},</if>
            <if test="receivingStatus != null">#{receivingStatus},</if>
            <if test="inStatus != null">#{inStatus},</if>
            <if test="ctl != null">#{ctl},</if>
            <if test="qualityInspectionDate != null">#{qualityInspectionDate},</if>
            <if test="status != null">#{status},</if>
            <if test="acceNum != null">#{acceNum},</if>
            <if test="qualityInspecStatus != null">#{qualityInspecStatus},</if>
            <if test="orderType != null">#{orderType},</if>
            <if test="applicant != null">#{applicant},</if>
            <if test="supplier != null">#{supplier},</if>
            <if test="qualified != null">#{qualified},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="planDate != null">#{planDate},</if>
            <if test="planTime != null">#{planTime},</if>
            <if test="needCycle != null">#{needCycle},</if>
            <if test="needType != null">#{needType},</if>
            <if test="batchNo != null">#{batchNo},</if>
            <if test="reportTime != null">#{reportTime},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="abc != null">#{abc},</if>
            <if test="levelType != null">#{levelType},</if>
            <if test="storageShortName != null">#{storageShortName},</if>
            <if test="dataSource != null">#{dataSource},</if>
            <if test="storageLocation != null">#{storageLocation},</if>
            <if test="totalArraAmout != null">#{totalArraAmout},</if>
            <if test="noTaxPrice != null">#{noTaxPrice},</if>
            <if test="noTaxMoney != null">#{noTaxMoney},</if>
            <if test="purchaseTaxRate != null">#{purchaseTaxRate},</if>
            <if test="purchaseTax != null">#{purchaseTax},</if>
            <if test="smartSelectionMode != null">#{smartSelectionMode},</if>
            <if test="independentAccounting != null">#{independentAccounting},</if>
            <if test="emphasisGoods != null">#{emphasisGoods},</if>
            <if test="expedited != null">#{expedited},</if>
            <if test="individualInvoicing != null">#{individualInvoicing},</if>
            <if test="rejectNum != null">#{rejectNum},</if>
            <if test="attachments != null">#{attachments},</if>
            <if test="supplierAttachments != null">#{supplierAttachments},</if>
            <if test="invoiceTitle != null">#{invoiceTitle},</if>
            <if test="sourceNum != null">#{sourceNum},</if>
            <if test="needPerson != null">#{needPerson},</if>
            <if test="needTel != null">#{needTel},</if>
            <if test="purchaseId != null">#{purchaseId},</if>
            <if test="receivingNum != null">#{receivingNum},</if>
            </trim>
    </insert>

    <update id="updateTRkWareNoticeTab" parameterType="TRkWareNoticeTab">
        update t_rk_ware_notice_tab
        <trim prefix="SET" suffixOverrides=",">
            <if test="salesOrderNumber != null">sales_order_number = #{salesOrderNumber},</if>
            <if test="noticeId != null">notice_id = #{noticeId},</if>
            <if test="goodsId != null">goods_id = #{goodsId},</if>
            <if test="goodsName != null">goods_name = #{goodsName},</if>
            <if test="unit != null">unit = #{unit},</if>
            <if test="specification != null">specification = #{specification},</if>
            <if test="recoil != null">recoil = #{recoil},</if>
            <if test="brand != null">brand = #{brand},</if>
            <if test="price != null">price = #{price},</if>
            <if test="totalMoney != null">total_money = #{totalMoney},</if>
            <if test="arraMount != null">arra_mount = #{arraMount},</if>
            <if test="recNum != null">rec_num = #{recNum},</if>
            <if test="project != null">project = #{project},</if>
            <if test="needDept != null">need_dept = #{needDept},</if>
            <if test="useType != null">use_type = #{useType},</if>
            <if test="scaleUnit != null">scale_unit = #{scaleUnit},</if>
            <if test="totalVolume != null">total_volume = #{totalVolume},</if>
            <if test="totalRoughWeight != null">total_rough_weight = #{totalRoughWeight},</if>
            <if test="totalNetWeigh != null">total_net_weigh = #{totalNetWeigh},</if>
            <if test="amount != null">amount = #{amount},</if>
            <if test="productionDate != null">production_date = #{productionDate},</if>
            <if test="storageId != null">storage_id = #{storageId},</if>
            <if test="storageAreaId != null">storage_area_id = #{storageAreaId},</if>
            <if test="packageId != null">package_id = #{packageId},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="goodsTypeId != null">goods_type_id = #{goodsTypeId},</if>
            <if test="barcode != null">barcode = #{barcode},</if>
            <if test="goodsVolume != null">goods_volume = #{goodsVolume},</if>
            <if test="printSts != null">print_sts = #{printSts},</if>
            <if test="printCs != null">print_cs = #{printCs},</if>
            <if test="netWeigh != null">net_weigh = #{netWeigh},</if>
            <if test="kindNum != null">kind_num = #{kindNum},</if>
            <if test="expiryDate != null">expiry_date = #{expiryDate},</if>
            <if test="operateDate != null">operate_date = #{operateDate},</if>
            <if test="productStatus != null">product_status = #{productStatus},</if>
            <if test="receivingStatus != null">receiving_status = #{receivingStatus},</if>
            <if test="inStatus != null">in_status = #{inStatus},</if>
            <if test="ctl != null">ctl = #{ctl},</if>
            <if test="qualityInspectionDate != null">quality_inspection_date = #{qualityInspectionDate},</if>
            <if test="status != null">status = #{status},</if>
            <if test="acceNum != null">acce_num = #{acceNum},</if>
            <if test="qualityInspecStatus != null">quality_inspec_status = #{qualityInspecStatus},</if>
            <if test="orderType != null">order_type = #{orderType},</if>
            <if test="applicant != null">applicant = #{applicant},</if>
            <if test="supplier != null">supplier = #{supplier},</if>
            <if test="qualified != null">qualified = #{qualified},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="planDate != null">plan_date = #{planDate},</if>
            <if test="planTime != null">plan_time = #{planTime},</if>
            <if test="needCycle != null">need_cycle = #{needCycle},</if>
            <if test="needType != null">need_type = #{needType},</if>
            <if test="batchNo != null">batch_no = #{batchNo},</if>
            <if test="reportTime != null">report_time = #{reportTime},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="abc != null">abc = #{abc},</if>
            <if test="levelType != null">level_type = #{levelType},</if>
            <if test="storageShortName != null">storage_short_name = #{storageShortName},</if>
            <if test="dataSource != null">data_source = #{dataSource},</if>
            <if test="storageLocation != null">storage_location = #{storageLocation},</if>
            <if test="totalArraAmout != null">total_arra_amout = #{totalArraAmout},</if>
            <if test="noTaxPrice != null">no_tax_price = #{noTaxPrice},</if>
            <if test="noTaxMoney != null">no_tax_money = #{noTaxMoney},</if>
            <if test="purchaseTaxRate != null">purchase_tax_rate = #{purchaseTaxRate},</if>
            <if test="purchaseTax != null">purchase_tax = #{purchaseTax},</if>
            <if test="smartSelectionMode != null">smart_selection_mode = #{smartSelectionMode},</if>
            <if test="independentAccounting != null">independent_accounting = #{independentAccounting},</if>
            <if test="emphasisGoods != null">emphasis_goods = #{emphasisGoods},</if>
            <if test="expedited != null">expedited = #{expedited},</if>
            <if test="individualInvoicing != null">individual_invoicing = #{individualInvoicing},</if>
            <if test="rejectNum != null">reject_num = #{rejectNum},</if>
            <if test="attachments != null">attachments = #{attachments},</if>
            <if test="supplierAttachments != null">supplier_attachments = #{supplierAttachments},</if>
            <if test="invoiceTitle != null">invoice_title = #{invoiceTitle},</if>
            <if test="sourceNum != null">source_num = #{sourceNum},</if>
            <if test="needPerson != null">need_person = #{needPerson},</if>
            <if test="needTel != null">need_tel = #{needTel},</if>
            <if test="purchaseId != null">purchase_id = #{purchaseId},</if>
            <if test="receivingNum != null">receiving_num = #{receivingNum},</if>
            </trim>
        where id = #{id}
    </update>

    <update id="updateNum" parameterType="TRkWareNoticeTab">
        update t_rk_ware_notice_tab
        set rec_num=#{recNum}, in_status=#{inStatus}
        where id = #{id}
    </update>

    <update id="enableTRkWareNoticeTabByIds" parameterType="String">
        update t_rk_ware_notice_tab set status=0 where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
    <update id="disabledTRkWareNoticeTabByIds" parameterType="String">
        update t_rk_ware_notice_tab set status=1 where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>

    <delete id="deleteTRkWareNoticeTabById" parameterType="String">
        delete
        from t_rk_ware_notice_tab
        where id = #{id}
    </delete>

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