<?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.superdesk.uniorder.dao.mapper.invoice.customer.invoiced.InvoiceInvoicedMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoiced">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="invoice_sequence_number" jdbcType="VARCHAR" property="invoiceSequenceNumber" />
    <result column="erp_document_number" jdbcType="VARCHAR" property="erpDocumentNumber" />
    <result column="invoice_type_id" jdbcType="BIGINT" property="invoiceTypeId" />
    <result column="invoice_type" jdbcType="VARCHAR" property="invoiceType" />
    <result column="category_code" jdbcType="VARCHAR" property="categoryCode" />
    <result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
    <result column="source_from_excel_type" jdbcType="TINYINT" property="sourceFromExcelType" />
    <result column="billing_machine_number" jdbcType="VARCHAR" property="billingMachineNumber" />
    <result column="purchaser_main_id" jdbcType="BIGINT" property="purchaserMainId" />
    <result column="purchaser_company_name" jdbcType="VARCHAR" property="purchaserCompanyName" />
    <result column="purchaser_taxpayers_i_d_code" jdbcType="VARCHAR" property="purchaserTaxpayersIDCode" />
    <result column="purchaser_address_phone" jdbcType="VARCHAR" property="purchaserAddressPhone" />
    <result column="purchaser_phone" jdbcType="VARCHAR" property="purchaserPhone" />
    <result column="purchaser_address" jdbcType="VARCHAR" property="purchaserAddress" />
    <result column="purchaser_bank_account_number" jdbcType="VARCHAR" property="purchaserBankAccountNumber" />
    <result column="purchaser_bank_account" jdbcType="VARCHAR" property="purchaserBankAccount" />
    <result column="purchaser_bank_name" jdbcType="VARCHAR" property="purchaserBankName" />
    <result column="seller_main_id" jdbcType="BIGINT" property="sellerMainId" />
    <result column="seller_company_name" jdbcType="VARCHAR" property="sellerCompanyName" />
    <result column="seller_taxpayers_i_d_code" jdbcType="VARCHAR" property="sellerTaxpayersIDCode" />
    <result column="seller_address_phone" jdbcType="VARCHAR" property="sellerAddressPhone" />
    <result column="seller_address" jdbcType="VARCHAR" property="sellerAddress" />
    <result column="seller_phone" jdbcType="VARCHAR" property="sellerPhone" />
    <result column="seller_bank_account_number" jdbcType="VARCHAR" property="sellerBankAccountNumber" />
    <result column="seller_bank_account" jdbcType="VARCHAR" property="sellerBankAccount" />
    <result column="seller_bank_name" jdbcType="VARCHAR" property="sellerBankName" />
    <result column="encrypted_version_number" jdbcType="VARCHAR" property="encryptedVersionNumber" />
    <result column="invoiced_date" jdbcType="TIMESTAMP" property="invoicedDate" />
    <result column="reporting_period" jdbcType="TINYINT" property="reportingPeriod" />
    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
    <result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
    <result column="total_tax" jdbcType="DECIMAL" property="totalTax" />
    <result column="total_amount_including_tax" jdbcType="DECIMAL" property="totalAmountIncludingTax" />
    <result column="receivable_amount" jdbcType="DECIMAL" property="receivableAmount" />
    <result column="is_red_write_off" jdbcType="TINYINT" property="isRedWriteOff" />
    <result column="red_write_off_amount" jdbcType="DECIMAL" property="redWriteOffAmount" />
    <result column="red_write_off_invoice_sequence_number" jdbcType="VARCHAR" property="redWriteOffInvoiceSequenceNumber" />
    <result column="is_blue_write_off" jdbcType="TINYINT" property="isBlueWriteOff" />
    <result column="blue_write_off_amount" jdbcType="DECIMAL" property="blueWriteOffAmount" />
    <result column="is_back_collection" jdbcType="TINYINT" property="isBackCollection" />
    <result column="back_collection_time" jdbcType="TIMESTAMP" property="backCollectionTime" />
    <result column="back_collection_amount_already" jdbcType="DECIMAL" property="backCollectionAmountAlready" />
    <result column="back_collection_amount_wait_for" jdbcType="DECIMAL" property="backCollectionAmountWaitFor" />
    <result column="back_collection_frequency" jdbcType="INTEGER" property="backCollectionFrequency" />
    <result column="main_goods_name" jdbcType="VARCHAR" property="mainGoodsName" />
    <result column="goods_tax_item" jdbcType="VARCHAR" property="goodsTaxItem" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="person_name_invoice" jdbcType="VARCHAR" property="personNameInvoice" />
    <result column="person_name_review" jdbcType="VARCHAR" property="personNameReview" />
    <result column="person_name_cashier" jdbcType="VARCHAR" property="personNameCashier" />
    <result column="sys_user_id_invoice" jdbcType="BIGINT" property="sysUserIdInvoice" />
    <result column="sys_user_id_review" jdbcType="BIGINT" property="sysUserIdReview" />
    <result column="sys_user_id_cashier" jdbcType="BIGINT" property="sysUserIdCashier" />
    <result column="flag_list" jdbcType="VARCHAR" property="flagList" />
    <result column="flag_void_sign" jdbcType="VARCHAR" property="flagVoidSign" />
    <result column="is_invalid" jdbcType="TINYINT" property="isInvalid" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
    <result column="flag_repair" jdbcType="VARCHAR" property="flagRepair" />
    <result column="person_name_applicant" jdbcType="VARCHAR" property="personNameApplicant" />
    <result column="sys_user_id_applicant" jdbcType="BIGINT" property="sysUserIdApplicant" />
    <result column="custom_item" jdbcType="VARCHAR" property="customItem" />
    <result column="document_number" jdbcType="VARCHAR" property="documentNumber" />
    <result column="custom_item2" jdbcType="VARCHAR" property="customItem2" />
    <result column="invoiced_method" jdbcType="VARCHAR" property="invoicedMethod" />
    <result column="hardware_sales_volume" jdbcType="VARCHAR" property="hardwareSalesVolume" />
    <result column="software_sales_volume" jdbcType="VARCHAR" property="softwareSalesVolume" />
    <result column="business_category_code" jdbcType="VARCHAR" property="businessCategoryCode" />
    <result column="business_category_name" jdbcType="VARCHAR" property="businessCategoryName" />
    <result column="overdue_days" jdbcType="INTEGER" property="overdueDays" />
    <result column="is_overdue" jdbcType="TINYINT" property="isOverdue" />
    <result column="property_company_id" jdbcType="BIGINT" property="propertyCompanyId" />
    <result column="property_company_name" jdbcType="VARCHAR" property="propertyCompanyName" />
    <result column="customer_manager_id" jdbcType="BIGINT" property="customerManagerId" />
    <result column="customer_manager_name" jdbcType="VARCHAR" property="customerManagerName" />
    <result column="process_number_and_rate_of_progress" jdbcType="VARCHAR" property="processNumberAndRateOfProgress" />
    <result column="rate_of_progress_update" jdbcType="VARCHAR" property="rateOfProgressUpdate" />
    <result column="is_push_hardly" jdbcType="TINYINT" property="isPushHardly" />
    <result column="customer_project_name" jdbcType="VARCHAR" property="customerProjectName" />
    <result column="memo1" jdbcType="VARCHAR" property="memo1" />
    <result column="memo2" jdbcType="VARCHAR" property="memo2" />
    <result column="memo3" jdbcType="VARCHAR" property="memo3" />
    <result column="memo4" jdbcType="VARCHAR" property="memo4" />
    <result column="memo5" jdbcType="VARCHAR" property="memo5" />
    <result column="memo6" jdbcType="VARCHAR" property="memo6" />
    <result column="memo7" jdbcType="VARCHAR" property="memo7" />
    <result column="memo8" jdbcType="VARCHAR" property="memo8" />
    <result column="memo9" jdbcType="VARCHAR" property="memo9" />
    <result column="memo10" jdbcType="VARCHAR" property="memo10" />
    <result column="out_clique_leave_0_id" jdbcType="BIGINT" property="outCliqueLeave0Id" />
    <result column="out_clique_leave_0_name" jdbcType="VARCHAR" property="outCliqueLeave0Name" />
    <result column="out_clique_leave_1_4_id" jdbcType="VARCHAR" property="outCliqueLeave14Id" />
    <result column="out_clique_leave_1_4_name" jdbcType="VARCHAR" property="outCliqueLeave14Name" />
    <result column="out_org_id" jdbcType="BIGINT" property="outOrgId" />
    <result column="out_org_name" jdbcType="VARCHAR" property="outOrgName" />
    <result column="out_virt_id" jdbcType="BIGINT" property="outVirtId" />
    <result column="out_virt_name" jdbcType="VARCHAR" property="outVirtName" />
    <result column="out_path" jdbcType="VARCHAR" property="outPath" />
    <result column="out_effect" jdbcType="VARCHAR" property="outEffect" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
    <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
    <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, invoice_sequence_number, erp_document_number, invoice_type_id, invoice_type,
    category_code, invoice_number, source_from_excel_type, billing_machine_number, purchaser_main_id,
    purchaser_company_name, purchaser_taxpayers_i_d_code, purchaser_address_phone, purchaser_phone,
    purchaser_address, purchaser_bank_account_number, purchaser_bank_account, purchaser_bank_name,
    seller_main_id, seller_company_name, seller_taxpayers_i_d_code, seller_address_phone,
    seller_address, seller_phone, seller_bank_account_number, seller_bank_account, seller_bank_name,
    encrypted_version_number, invoiced_date, reporting_period, total_amount, tax_rate,
    total_tax, total_amount_including_tax, receivable_amount, is_red_write_off, red_write_off_amount,
    red_write_off_invoice_sequence_number, is_blue_write_off, blue_write_off_amount,
    is_back_collection, back_collection_time, back_collection_amount_already, back_collection_amount_wait_for,
    back_collection_frequency, main_goods_name, goods_tax_item, remarks, person_name_invoice,
    person_name_review, person_name_cashier, sys_user_id_invoice, sys_user_id_review,
    sys_user_id_cashier, flag_list, flag_void_sign, is_invalid, deleted, flag_repair,
    person_name_applicant, sys_user_id_applicant, custom_item, document_number, custom_item2,
    invoiced_method, hardware_sales_volume, software_sales_volume, business_category_code,
    business_category_name, overdue_days, is_overdue, property_company_id, property_company_name,
    customer_manager_id, customer_manager_name, process_number_and_rate_of_progress,
    rate_of_progress_update, is_push_hardly, customer_project_name, memo1, memo2, memo3,
    memo4, memo5, memo6, memo7, memo8, memo9, memo10, out_clique_leave_0_id, out_clique_leave_0_name,
    out_clique_leave_1_4_id, out_clique_leave_1_4_name, out_org_id, out_org_name, out_virt_id,
    out_virt_name, out_path, out_effect, create_time, create_user_id, create_user_name,
    update_time, update_user_id, update_user_name
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoicedExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from invoice_invoiced
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from invoice_invoiced
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from invoice_invoiced
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoicedExample">
    delete from invoice_invoiced
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoiced">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_invoiced (invoice_sequence_number, erp_document_number,
      invoice_type_id, invoice_type, category_code,
      invoice_number, source_from_excel_type, billing_machine_number,
      purchaser_main_id, purchaser_company_name, purchaser_taxpayers_i_d_code,
      purchaser_address_phone, purchaser_phone,
      purchaser_address, purchaser_bank_account_number,
      purchaser_bank_account, purchaser_bank_name,
      seller_main_id, seller_company_name, seller_taxpayers_i_d_code,
      seller_address_phone, seller_address, seller_phone,
      seller_bank_account_number, seller_bank_account,
      seller_bank_name, encrypted_version_number,
      invoiced_date, reporting_period, total_amount,
      tax_rate, total_tax, total_amount_including_tax,
      receivable_amount, is_red_write_off, red_write_off_amount,
      red_write_off_invoice_sequence_number, is_blue_write_off,
      blue_write_off_amount, is_back_collection, back_collection_time,
      back_collection_amount_already, back_collection_amount_wait_for,
      back_collection_frequency, main_goods_name,
      goods_tax_item, remarks, person_name_invoice,
      person_name_review, person_name_cashier, sys_user_id_invoice,
      sys_user_id_review, sys_user_id_cashier, flag_list,
      flag_void_sign, is_invalid, deleted,
      flag_repair, person_name_applicant, sys_user_id_applicant,
      custom_item, document_number, custom_item2,
      invoiced_method, hardware_sales_volume, software_sales_volume,
      business_category_code, business_category_name,
      overdue_days, is_overdue, property_company_id,
      property_company_name, customer_manager_id,
      customer_manager_name, process_number_and_rate_of_progress,
      rate_of_progress_update, is_push_hardly, customer_project_name,
      memo1, memo2, memo3,
      memo4, memo5, memo6,
      memo7, memo8, memo9,
      memo10, out_clique_leave_0_id, out_clique_leave_0_name,
      out_clique_leave_1_4_id, out_clique_leave_1_4_name,
      out_org_id, out_org_name, out_virt_id,
      out_virt_name, out_path, out_effect,
      create_time, create_user_id, create_user_name,
      update_time, update_user_id, update_user_name
      )
    values (#{invoiceSequenceNumber,jdbcType=VARCHAR}, #{erpDocumentNumber,jdbcType=VARCHAR},
      #{invoiceTypeId,jdbcType=BIGINT}, #{invoiceType,jdbcType=VARCHAR}, #{categoryCode,jdbcType=VARCHAR},
      #{invoiceNumber,jdbcType=VARCHAR}, #{sourceFromExcelType,jdbcType=TINYINT}, #{billingMachineNumber,jdbcType=VARCHAR},
      #{purchaserMainId,jdbcType=BIGINT}, #{purchaserCompanyName,jdbcType=VARCHAR}, #{purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      #{purchaserAddressPhone,jdbcType=VARCHAR}, #{purchaserPhone,jdbcType=VARCHAR},
      #{purchaserAddress,jdbcType=VARCHAR}, #{purchaserBankAccountNumber,jdbcType=VARCHAR},
      #{purchaserBankAccount,jdbcType=VARCHAR}, #{purchaserBankName,jdbcType=VARCHAR},
      #{sellerMainId,jdbcType=BIGINT}, #{sellerCompanyName,jdbcType=VARCHAR}, #{sellerTaxpayersIDCode,jdbcType=VARCHAR},
      #{sellerAddressPhone,jdbcType=VARCHAR}, #{sellerAddress,jdbcType=VARCHAR}, #{sellerPhone,jdbcType=VARCHAR},
      #{sellerBankAccountNumber,jdbcType=VARCHAR}, #{sellerBankAccount,jdbcType=VARCHAR},
      #{sellerBankName,jdbcType=VARCHAR}, #{encryptedVersionNumber,jdbcType=VARCHAR},
      #{invoicedDate,jdbcType=TIMESTAMP}, #{reportingPeriod,jdbcType=TINYINT}, #{totalAmount,jdbcType=DECIMAL},
      #{taxRate,jdbcType=DECIMAL}, #{totalTax,jdbcType=DECIMAL}, #{totalAmountIncludingTax,jdbcType=DECIMAL},
      #{receivableAmount,jdbcType=DECIMAL}, #{isRedWriteOff,jdbcType=TINYINT}, #{redWriteOffAmount,jdbcType=DECIMAL},
      #{redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR}, #{isBlueWriteOff,jdbcType=TINYINT},
      #{blueWriteOffAmount,jdbcType=DECIMAL}, #{isBackCollection,jdbcType=TINYINT}, #{backCollectionTime,jdbcType=TIMESTAMP},
      #{backCollectionAmountAlready,jdbcType=DECIMAL}, #{backCollectionAmountWaitFor,jdbcType=DECIMAL},
      #{backCollectionFrequency,jdbcType=INTEGER}, #{mainGoodsName,jdbcType=VARCHAR},
      #{goodsTaxItem,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{personNameInvoice,jdbcType=VARCHAR},
      #{personNameReview,jdbcType=VARCHAR}, #{personNameCashier,jdbcType=VARCHAR}, #{sysUserIdInvoice,jdbcType=BIGINT},
      #{sysUserIdReview,jdbcType=BIGINT}, #{sysUserIdCashier,jdbcType=BIGINT}, #{flagList,jdbcType=VARCHAR},
      #{flagVoidSign,jdbcType=VARCHAR}, #{isInvalid,jdbcType=TINYINT}, #{deleted,jdbcType=TINYINT},
      #{flagRepair,jdbcType=VARCHAR}, #{personNameApplicant,jdbcType=VARCHAR}, #{sysUserIdApplicant,jdbcType=BIGINT},
      #{customItem,jdbcType=VARCHAR}, #{documentNumber,jdbcType=VARCHAR}, #{customItem2,jdbcType=VARCHAR},
      #{invoicedMethod,jdbcType=VARCHAR}, #{hardwareSalesVolume,jdbcType=VARCHAR}, #{softwareSalesVolume,jdbcType=VARCHAR},
      #{businessCategoryCode,jdbcType=VARCHAR}, #{businessCategoryName,jdbcType=VARCHAR},
      #{overdueDays,jdbcType=INTEGER}, #{isOverdue,jdbcType=TINYINT}, #{propertyCompanyId,jdbcType=BIGINT},
      #{propertyCompanyName,jdbcType=VARCHAR}, #{customerManagerId,jdbcType=BIGINT},
      #{customerManagerName,jdbcType=VARCHAR}, #{processNumberAndRateOfProgress,jdbcType=VARCHAR},
      #{rateOfProgressUpdate,jdbcType=VARCHAR}, #{isPushHardly,jdbcType=TINYINT}, #{customerProjectName,jdbcType=VARCHAR},
      #{memo1,jdbcType=VARCHAR}, #{memo2,jdbcType=VARCHAR}, #{memo3,jdbcType=VARCHAR},
      #{memo4,jdbcType=VARCHAR}, #{memo5,jdbcType=VARCHAR}, #{memo6,jdbcType=VARCHAR},
      #{memo7,jdbcType=VARCHAR}, #{memo8,jdbcType=VARCHAR}, #{memo9,jdbcType=VARCHAR},
      #{memo10,jdbcType=VARCHAR}, #{outCliqueLeave0Id,jdbcType=BIGINT}, #{outCliqueLeave0Name,jdbcType=VARCHAR},
      #{outCliqueLeave14Id,jdbcType=VARCHAR}, #{outCliqueLeave14Name,jdbcType=VARCHAR},
      #{outOrgId,jdbcType=BIGINT}, #{outOrgName,jdbcType=VARCHAR}, #{outVirtId,jdbcType=BIGINT},
      #{outVirtName,jdbcType=VARCHAR}, #{outPath,jdbcType=VARCHAR}, #{outEffect,jdbcType=VARCHAR},
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{createUserName,jdbcType=VARCHAR},
      #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{updateUserName,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoiced">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_invoiced
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="invoiceSequenceNumber != null">
        invoice_sequence_number,
      </if>
      <if test="erpDocumentNumber != null">
        erp_document_number,
      </if>
      <if test="invoiceTypeId != null">
        invoice_type_id,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="categoryCode != null">
        category_code,
      </if>
      <if test="invoiceNumber != null">
        invoice_number,
      </if>
      <if test="sourceFromExcelType != null">
        source_from_excel_type,
      </if>
      <if test="billingMachineNumber != null">
        billing_machine_number,
      </if>
      <if test="purchaserMainId != null">
        purchaser_main_id,
      </if>
      <if test="purchaserCompanyName != null">
        purchaser_company_name,
      </if>
      <if test="purchaserTaxpayersIDCode != null">
        purchaser_taxpayers_i_d_code,
      </if>
      <if test="purchaserAddressPhone != null">
        purchaser_address_phone,
      </if>
      <if test="purchaserPhone != null">
        purchaser_phone,
      </if>
      <if test="purchaserAddress != null">
        purchaser_address,
      </if>
      <if test="purchaserBankAccountNumber != null">
        purchaser_bank_account_number,
      </if>
      <if test="purchaserBankAccount != null">
        purchaser_bank_account,
      </if>
      <if test="purchaserBankName != null">
        purchaser_bank_name,
      </if>
      <if test="sellerMainId != null">
        seller_main_id,
      </if>
      <if test="sellerCompanyName != null">
        seller_company_name,
      </if>
      <if test="sellerTaxpayersIDCode != null">
        seller_taxpayers_i_d_code,
      </if>
      <if test="sellerAddressPhone != null">
        seller_address_phone,
      </if>
      <if test="sellerAddress != null">
        seller_address,
      </if>
      <if test="sellerPhone != null">
        seller_phone,
      </if>
      <if test="sellerBankAccountNumber != null">
        seller_bank_account_number,
      </if>
      <if test="sellerBankAccount != null">
        seller_bank_account,
      </if>
      <if test="sellerBankName != null">
        seller_bank_name,
      </if>
      <if test="encryptedVersionNumber != null">
        encrypted_version_number,
      </if>
      <if test="invoicedDate != null">
        invoiced_date,
      </if>
      <if test="reportingPeriod != null">
        reporting_period,
      </if>
      <if test="totalAmount != null">
        total_amount,
      </if>
      <if test="taxRate != null">
        tax_rate,
      </if>
      <if test="totalTax != null">
        total_tax,
      </if>
      <if test="totalAmountIncludingTax != null">
        total_amount_including_tax,
      </if>
      <if test="receivableAmount != null">
        receivable_amount,
      </if>
      <if test="isRedWriteOff != null">
        is_red_write_off,
      </if>
      <if test="redWriteOffAmount != null">
        red_write_off_amount,
      </if>
      <if test="redWriteOffInvoiceSequenceNumber != null">
        red_write_off_invoice_sequence_number,
      </if>
      <if test="isBlueWriteOff != null">
        is_blue_write_off,
      </if>
      <if test="blueWriteOffAmount != null">
        blue_write_off_amount,
      </if>
      <if test="isBackCollection != null">
        is_back_collection,
      </if>
      <if test="backCollectionTime != null">
        back_collection_time,
      </if>
      <if test="backCollectionAmountAlready != null">
        back_collection_amount_already,
      </if>
      <if test="backCollectionAmountWaitFor != null">
        back_collection_amount_wait_for,
      </if>
      <if test="backCollectionFrequency != null">
        back_collection_frequency,
      </if>
      <if test="mainGoodsName != null">
        main_goods_name,
      </if>
      <if test="goodsTaxItem != null">
        goods_tax_item,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="personNameInvoice != null">
        person_name_invoice,
      </if>
      <if test="personNameReview != null">
        person_name_review,
      </if>
      <if test="personNameCashier != null">
        person_name_cashier,
      </if>
      <if test="sysUserIdInvoice != null">
        sys_user_id_invoice,
      </if>
      <if test="sysUserIdReview != null">
        sys_user_id_review,
      </if>
      <if test="sysUserIdCashier != null">
        sys_user_id_cashier,
      </if>
      <if test="flagList != null">
        flag_list,
      </if>
      <if test="flagVoidSign != null">
        flag_void_sign,
      </if>
      <if test="isInvalid != null">
        is_invalid,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="flagRepair != null">
        flag_repair,
      </if>
      <if test="personNameApplicant != null">
        person_name_applicant,
      </if>
      <if test="sysUserIdApplicant != null">
        sys_user_id_applicant,
      </if>
      <if test="customItem != null">
        custom_item,
      </if>
      <if test="documentNumber != null">
        document_number,
      </if>
      <if test="customItem2 != null">
        custom_item2,
      </if>
      <if test="invoicedMethod != null">
        invoiced_method,
      </if>
      <if test="hardwareSalesVolume != null">
        hardware_sales_volume,
      </if>
      <if test="softwareSalesVolume != null">
        software_sales_volume,
      </if>
      <if test="businessCategoryCode != null">
        business_category_code,
      </if>
      <if test="businessCategoryName != null">
        business_category_name,
      </if>
      <if test="overdueDays != null">
        overdue_days,
      </if>
      <if test="isOverdue != null">
        is_overdue,
      </if>
      <if test="propertyCompanyId != null">
        property_company_id,
      </if>
      <if test="propertyCompanyName != null">
        property_company_name,
      </if>
      <if test="customerManagerId != null">
        customer_manager_id,
      </if>
      <if test="customerManagerName != null">
        customer_manager_name,
      </if>
      <if test="processNumberAndRateOfProgress != null">
        process_number_and_rate_of_progress,
      </if>
      <if test="rateOfProgressUpdate != null">
        rate_of_progress_update,
      </if>
      <if test="isPushHardly != null">
        is_push_hardly,
      </if>
      <if test="customerProjectName != null">
        customer_project_name,
      </if>
      <if test="memo1 != null">
        memo1,
      </if>
      <if test="memo2 != null">
        memo2,
      </if>
      <if test="memo3 != null">
        memo3,
      </if>
      <if test="memo4 != null">
        memo4,
      </if>
      <if test="memo5 != null">
        memo5,
      </if>
      <if test="memo6 != null">
        memo6,
      </if>
      <if test="memo7 != null">
        memo7,
      </if>
      <if test="memo8 != null">
        memo8,
      </if>
      <if test="memo9 != null">
        memo9,
      </if>
      <if test="memo10 != null">
        memo10,
      </if>
      <if test="outCliqueLeave0Id != null">
        out_clique_leave_0_id,
      </if>
      <if test="outCliqueLeave0Name != null">
        out_clique_leave_0_name,
      </if>
      <if test="outCliqueLeave14Id != null">
        out_clique_leave_1_4_id,
      </if>
      <if test="outCliqueLeave14Name != null">
        out_clique_leave_1_4_name,
      </if>
      <if test="outOrgId != null">
        out_org_id,
      </if>
      <if test="outOrgName != null">
        out_org_name,
      </if>
      <if test="outVirtId != null">
        out_virt_id,
      </if>
      <if test="outVirtName != null">
        out_virt_name,
      </if>
      <if test="outPath != null">
        out_path,
      </if>
      <if test="outEffect != null">
        out_effect,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
      <if test="updateUserName != null">
        update_user_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="invoiceSequenceNumber != null">
        #{invoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="erpDocumentNumber != null">
        #{erpDocumentNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTypeId != null">
        #{invoiceTypeId,jdbcType=BIGINT},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="categoryCode != null">
        #{categoryCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="sourceFromExcelType != null">
        #{sourceFromExcelType,jdbcType=TINYINT},
      </if>
      <if test="billingMachineNumber != null">
        #{billingMachineNumber,jdbcType=VARCHAR},
      </if>
      <if test="purchaserMainId != null">
        #{purchaserMainId,jdbcType=BIGINT},
      </if>
      <if test="purchaserCompanyName != null">
        #{purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="purchaserTaxpayersIDCode != null">
        #{purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="purchaserAddressPhone != null">
        #{purchaserAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaserPhone != null">
        #{purchaserPhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaserAddress != null">
        #{purchaserAddress,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankAccountNumber != null">
        #{purchaserBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankAccount != null">
        #{purchaserBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankName != null">
        #{purchaserBankName,jdbcType=VARCHAR},
      </if>
      <if test="sellerMainId != null">
        #{sellerMainId,jdbcType=BIGINT},
      </if>
      <if test="sellerCompanyName != null">
        #{sellerCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="sellerTaxpayersIDCode != null">
        #{sellerTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddressPhone != null">
        #{sellerAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddress != null">
        #{sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="sellerPhone != null">
        #{sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankAccountNumber != null">
        #{sellerBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankAccount != null">
        #{sellerBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankName != null">
        #{sellerBankName,jdbcType=VARCHAR},
      </if>
      <if test="encryptedVersionNumber != null">
        #{encryptedVersionNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoicedDate != null">
        #{invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="reportingPeriod != null">
        #{reportingPeriod,jdbcType=TINYINT},
      </if>
      <if test="totalAmount != null">
        #{totalAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxRate != null">
        #{taxRate,jdbcType=DECIMAL},
      </if>
      <if test="totalTax != null">
        #{totalTax,jdbcType=DECIMAL},
      </if>
      <if test="totalAmountIncludingTax != null">
        #{totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="receivableAmount != null">
        #{receivableAmount,jdbcType=DECIMAL},
      </if>
      <if test="isRedWriteOff != null">
        #{isRedWriteOff,jdbcType=TINYINT},
      </if>
      <if test="redWriteOffAmount != null">
        #{redWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="redWriteOffInvoiceSequenceNumber != null">
        #{redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="isBlueWriteOff != null">
        #{isBlueWriteOff,jdbcType=TINYINT},
      </if>
      <if test="blueWriteOffAmount != null">
        #{blueWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="isBackCollection != null">
        #{isBackCollection,jdbcType=TINYINT},
      </if>
      <if test="backCollectionTime != null">
        #{backCollectionTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backCollectionAmountAlready != null">
        #{backCollectionAmountAlready,jdbcType=DECIMAL},
      </if>
      <if test="backCollectionAmountWaitFor != null">
        #{backCollectionAmountWaitFor,jdbcType=DECIMAL},
      </if>
      <if test="backCollectionFrequency != null">
        #{backCollectionFrequency,jdbcType=INTEGER},
      </if>
      <if test="mainGoodsName != null">
        #{mainGoodsName,jdbcType=VARCHAR},
      </if>
      <if test="goodsTaxItem != null">
        #{goodsTaxItem,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="personNameInvoice != null">
        #{personNameInvoice,jdbcType=VARCHAR},
      </if>
      <if test="personNameReview != null">
        #{personNameReview,jdbcType=VARCHAR},
      </if>
      <if test="personNameCashier != null">
        #{personNameCashier,jdbcType=VARCHAR},
      </if>
      <if test="sysUserIdInvoice != null">
        #{sysUserIdInvoice,jdbcType=BIGINT},
      </if>
      <if test="sysUserIdReview != null">
        #{sysUserIdReview,jdbcType=BIGINT},
      </if>
      <if test="sysUserIdCashier != null">
        #{sysUserIdCashier,jdbcType=BIGINT},
      </if>
      <if test="flagList != null">
        #{flagList,jdbcType=VARCHAR},
      </if>
      <if test="flagVoidSign != null">
        #{flagVoidSign,jdbcType=VARCHAR},
      </if>
      <if test="isInvalid != null">
        #{isInvalid,jdbcType=TINYINT},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="flagRepair != null">
        #{flagRepair,jdbcType=VARCHAR},
      </if>
      <if test="personNameApplicant != null">
        #{personNameApplicant,jdbcType=VARCHAR},
      </if>
      <if test="sysUserIdApplicant != null">
        #{sysUserIdApplicant,jdbcType=BIGINT},
      </if>
      <if test="customItem != null">
        #{customItem,jdbcType=VARCHAR},
      </if>
      <if test="documentNumber != null">
        #{documentNumber,jdbcType=VARCHAR},
      </if>
      <if test="customItem2 != null">
        #{customItem2,jdbcType=VARCHAR},
      </if>
      <if test="invoicedMethod != null">
        #{invoicedMethod,jdbcType=VARCHAR},
      </if>
      <if test="hardwareSalesVolume != null">
        #{hardwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="softwareSalesVolume != null">
        #{softwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="businessCategoryCode != null">
        #{businessCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="businessCategoryName != null">
        #{businessCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="overdueDays != null">
        #{overdueDays,jdbcType=INTEGER},
      </if>
      <if test="isOverdue != null">
        #{isOverdue,jdbcType=TINYINT},
      </if>
      <if test="propertyCompanyId != null">
        #{propertyCompanyId,jdbcType=BIGINT},
      </if>
      <if test="propertyCompanyName != null">
        #{propertyCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="customerManagerId != null">
        #{customerManagerId,jdbcType=BIGINT},
      </if>
      <if test="customerManagerName != null">
        #{customerManagerName,jdbcType=VARCHAR},
      </if>
      <if test="processNumberAndRateOfProgress != null">
        #{processNumberAndRateOfProgress,jdbcType=VARCHAR},
      </if>
      <if test="rateOfProgressUpdate != null">
        #{rateOfProgressUpdate,jdbcType=VARCHAR},
      </if>
      <if test="isPushHardly != null">
        #{isPushHardly,jdbcType=TINYINT},
      </if>
      <if test="customerProjectName != null">
        #{customerProjectName,jdbcType=VARCHAR},
      </if>
      <if test="memo1 != null">
        #{memo1,jdbcType=VARCHAR},
      </if>
      <if test="memo2 != null">
        #{memo2,jdbcType=VARCHAR},
      </if>
      <if test="memo3 != null">
        #{memo3,jdbcType=VARCHAR},
      </if>
      <if test="memo4 != null">
        #{memo4,jdbcType=VARCHAR},
      </if>
      <if test="memo5 != null">
        #{memo5,jdbcType=VARCHAR},
      </if>
      <if test="memo6 != null">
        #{memo6,jdbcType=VARCHAR},
      </if>
      <if test="memo7 != null">
        #{memo7,jdbcType=VARCHAR},
      </if>
      <if test="memo8 != null">
        #{memo8,jdbcType=VARCHAR},
      </if>
      <if test="memo9 != null">
        #{memo9,jdbcType=VARCHAR},
      </if>
      <if test="memo10 != null">
        #{memo10,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave0Id != null">
        #{outCliqueLeave0Id,jdbcType=BIGINT},
      </if>
      <if test="outCliqueLeave0Name != null">
        #{outCliqueLeave0Name,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave14Id != null">
        #{outCliqueLeave14Id,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave14Name != null">
        #{outCliqueLeave14Name,jdbcType=VARCHAR},
      </if>
      <if test="outOrgId != null">
        #{outOrgId,jdbcType=BIGINT},
      </if>
      <if test="outOrgName != null">
        #{outOrgName,jdbcType=VARCHAR},
      </if>
      <if test="outVirtId != null">
        #{outVirtId,jdbcType=BIGINT},
      </if>
      <if test="outVirtName != null">
        #{outVirtName,jdbcType=VARCHAR},
      </if>
      <if test="outPath != null">
        #{outPath,jdbcType=VARCHAR},
      </if>
      <if test="outEffect != null">
        #{outEffect,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="updateUserName != null">
        #{updateUserName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoicedExample" resultType="java.lang.Long">
    select count(*) from invoice_invoiced
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update invoice_invoiced
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceSequenceNumber != null">
        invoice_sequence_number = #{record.invoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.erpDocumentNumber != null">
        erp_document_number = #{record.erpDocumentNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceTypeId != null">
        invoice_type_id = #{record.invoiceTypeId,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="record.categoryCode != null">
        category_code = #{record.categoryCode,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceNumber != null">
        invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.sourceFromExcelType != null">
        source_from_excel_type = #{record.sourceFromExcelType,jdbcType=TINYINT},
      </if>
      <if test="record.billingMachineNumber != null">
        billing_machine_number = #{record.billingMachineNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserMainId != null">
        purchaser_main_id = #{record.purchaserMainId,jdbcType=BIGINT},
      </if>
      <if test="record.purchaserCompanyName != null">
        purchaser_company_name = #{record.purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserTaxpayersIDCode != null">
        purchaser_taxpayers_i_d_code = #{record.purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserAddressPhone != null">
        purchaser_address_phone = #{record.purchaserAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserPhone != null">
        purchaser_phone = #{record.purchaserPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserAddress != null">
        purchaser_address = #{record.purchaserAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserBankAccountNumber != null">
        purchaser_bank_account_number = #{record.purchaserBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserBankAccount != null">
        purchaser_bank_account = #{record.purchaserBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.purchaserBankName != null">
        purchaser_bank_name = #{record.purchaserBankName,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerMainId != null">
        seller_main_id = #{record.sellerMainId,jdbcType=BIGINT},
      </if>
      <if test="record.sellerCompanyName != null">
        seller_company_name = #{record.sellerCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerTaxpayersIDCode != null">
        seller_taxpayers_i_d_code = #{record.sellerTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerAddressPhone != null">
        seller_address_phone = #{record.sellerAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerAddress != null">
        seller_address = #{record.sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerPhone != null">
        seller_phone = #{record.sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerBankAccountNumber != null">
        seller_bank_account_number = #{record.sellerBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerBankAccount != null">
        seller_bank_account = #{record.sellerBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerBankName != null">
        seller_bank_name = #{record.sellerBankName,jdbcType=VARCHAR},
      </if>
      <if test="record.encryptedVersionNumber != null">
        encrypted_version_number = #{record.encryptedVersionNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.invoicedDate != null">
        invoiced_date = #{record.invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.reportingPeriod != null">
        reporting_period = #{record.reportingPeriod,jdbcType=TINYINT},
      </if>
      <if test="record.totalAmount != null">
        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.taxRate != null">
        tax_rate = #{record.taxRate,jdbcType=DECIMAL},
      </if>
      <if test="record.totalTax != null">
        total_tax = #{record.totalTax,jdbcType=DECIMAL},
      </if>
      <if test="record.totalAmountIncludingTax != null">
        total_amount_including_tax = #{record.totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="record.receivableAmount != null">
        receivable_amount = #{record.receivableAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.isRedWriteOff != null">
        is_red_write_off = #{record.isRedWriteOff,jdbcType=TINYINT},
      </if>
      <if test="record.redWriteOffAmount != null">
        red_write_off_amount = #{record.redWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.redWriteOffInvoiceSequenceNumber != null">
        red_write_off_invoice_sequence_number = #{record.redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.isBlueWriteOff != null">
        is_blue_write_off = #{record.isBlueWriteOff,jdbcType=TINYINT},
      </if>
      <if test="record.blueWriteOffAmount != null">
        blue_write_off_amount = #{record.blueWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.isBackCollection != null">
        is_back_collection = #{record.isBackCollection,jdbcType=TINYINT},
      </if>
      <if test="record.backCollectionTime != null">
        back_collection_time = #{record.backCollectionTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.backCollectionAmountAlready != null">
        back_collection_amount_already = #{record.backCollectionAmountAlready,jdbcType=DECIMAL},
      </if>
      <if test="record.backCollectionAmountWaitFor != null">
        back_collection_amount_wait_for = #{record.backCollectionAmountWaitFor,jdbcType=DECIMAL},
      </if>
      <if test="record.backCollectionFrequency != null">
        back_collection_frequency = #{record.backCollectionFrequency,jdbcType=INTEGER},
      </if>
      <if test="record.mainGoodsName != null">
        main_goods_name = #{record.mainGoodsName,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsTaxItem != null">
        goods_tax_item = #{record.goodsTaxItem,jdbcType=VARCHAR},
      </if>
      <if test="record.remarks != null">
        remarks = #{record.remarks,jdbcType=VARCHAR},
      </if>
      <if test="record.personNameInvoice != null">
        person_name_invoice = #{record.personNameInvoice,jdbcType=VARCHAR},
      </if>
      <if test="record.personNameReview != null">
        person_name_review = #{record.personNameReview,jdbcType=VARCHAR},
      </if>
      <if test="record.personNameCashier != null">
        person_name_cashier = #{record.personNameCashier,jdbcType=VARCHAR},
      </if>
      <if test="record.sysUserIdInvoice != null">
        sys_user_id_invoice = #{record.sysUserIdInvoice,jdbcType=BIGINT},
      </if>
      <if test="record.sysUserIdReview != null">
        sys_user_id_review = #{record.sysUserIdReview,jdbcType=BIGINT},
      </if>
      <if test="record.sysUserIdCashier != null">
        sys_user_id_cashier = #{record.sysUserIdCashier,jdbcType=BIGINT},
      </if>
      <if test="record.flagList != null">
        flag_list = #{record.flagList,jdbcType=VARCHAR},
      </if>
      <if test="record.flagVoidSign != null">
        flag_void_sign = #{record.flagVoidSign,jdbcType=VARCHAR},
      </if>
      <if test="record.isInvalid != null">
        is_invalid = #{record.isInvalid,jdbcType=TINYINT},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
      <if test="record.flagRepair != null">
        flag_repair = #{record.flagRepair,jdbcType=VARCHAR},
      </if>
      <if test="record.personNameApplicant != null">
        person_name_applicant = #{record.personNameApplicant,jdbcType=VARCHAR},
      </if>
      <if test="record.sysUserIdApplicant != null">
        sys_user_id_applicant = #{record.sysUserIdApplicant,jdbcType=BIGINT},
      </if>
      <if test="record.customItem != null">
        custom_item = #{record.customItem,jdbcType=VARCHAR},
      </if>
      <if test="record.documentNumber != null">
        document_number = #{record.documentNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.customItem2 != null">
        custom_item2 = #{record.customItem2,jdbcType=VARCHAR},
      </if>
      <if test="record.invoicedMethod != null">
        invoiced_method = #{record.invoicedMethod,jdbcType=VARCHAR},
      </if>
      <if test="record.hardwareSalesVolume != null">
        hardware_sales_volume = #{record.hardwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="record.softwareSalesVolume != null">
        software_sales_volume = #{record.softwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="record.businessCategoryCode != null">
        business_category_code = #{record.businessCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="record.businessCategoryName != null">
        business_category_name = #{record.businessCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="record.overdueDays != null">
        overdue_days = #{record.overdueDays,jdbcType=INTEGER},
      </if>
      <if test="record.isOverdue != null">
        is_overdue = #{record.isOverdue,jdbcType=TINYINT},
      </if>
      <if test="record.propertyCompanyId != null">
        property_company_id = #{record.propertyCompanyId,jdbcType=BIGINT},
      </if>
      <if test="record.propertyCompanyName != null">
        property_company_name = #{record.propertyCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="record.customerManagerId != null">
        customer_manager_id = #{record.customerManagerId,jdbcType=BIGINT},
      </if>
      <if test="record.customerManagerName != null">
        customer_manager_name = #{record.customerManagerName,jdbcType=VARCHAR},
      </if>
      <if test="record.processNumberAndRateOfProgress != null">
        process_number_and_rate_of_progress = #{record.processNumberAndRateOfProgress,jdbcType=VARCHAR},
      </if>
      <if test="record.rateOfProgressUpdate != null">
        rate_of_progress_update = #{record.rateOfProgressUpdate,jdbcType=VARCHAR},
      </if>
      <if test="record.isPushHardly != null">
        is_push_hardly = #{record.isPushHardly,jdbcType=TINYINT},
      </if>
      <if test="record.customerProjectName != null">
        customer_project_name = #{record.customerProjectName,jdbcType=VARCHAR},
      </if>
      <if test="record.memo1 != null">
        memo1 = #{record.memo1,jdbcType=VARCHAR},
      </if>
      <if test="record.memo2 != null">
        memo2 = #{record.memo2,jdbcType=VARCHAR},
      </if>
      <if test="record.memo3 != null">
        memo3 = #{record.memo3,jdbcType=VARCHAR},
      </if>
      <if test="record.memo4 != null">
        memo4 = #{record.memo4,jdbcType=VARCHAR},
      </if>
      <if test="record.memo5 != null">
        memo5 = #{record.memo5,jdbcType=VARCHAR},
      </if>
      <if test="record.memo6 != null">
        memo6 = #{record.memo6,jdbcType=VARCHAR},
      </if>
      <if test="record.memo7 != null">
        memo7 = #{record.memo7,jdbcType=VARCHAR},
      </if>
      <if test="record.memo8 != null">
        memo8 = #{record.memo8,jdbcType=VARCHAR},
      </if>
      <if test="record.memo9 != null">
        memo9 = #{record.memo9,jdbcType=VARCHAR},
      </if>
      <if test="record.memo10 != null">
        memo10 = #{record.memo10,jdbcType=VARCHAR},
      </if>
      <if test="record.outCliqueLeave0Id != null">
        out_clique_leave_0_id = #{record.outCliqueLeave0Id,jdbcType=BIGINT},
      </if>
      <if test="record.outCliqueLeave0Name != null">
        out_clique_leave_0_name = #{record.outCliqueLeave0Name,jdbcType=VARCHAR},
      </if>
      <if test="record.outCliqueLeave14Id != null">
        out_clique_leave_1_4_id = #{record.outCliqueLeave14Id,jdbcType=VARCHAR},
      </if>
      <if test="record.outCliqueLeave14Name != null">
        out_clique_leave_1_4_name = #{record.outCliqueLeave14Name,jdbcType=VARCHAR},
      </if>
      <if test="record.outOrgId != null">
        out_org_id = #{record.outOrgId,jdbcType=BIGINT},
      </if>
      <if test="record.outOrgName != null">
        out_org_name = #{record.outOrgName,jdbcType=VARCHAR},
      </if>
      <if test="record.outVirtId != null">
        out_virt_id = #{record.outVirtId,jdbcType=BIGINT},
      </if>
      <if test="record.outVirtName != null">
        out_virt_name = #{record.outVirtName,jdbcType=VARCHAR},
      </if>
      <if test="record.outPath != null">
        out_path = #{record.outPath,jdbcType=VARCHAR},
      </if>
      <if test="record.outEffect != null">
        out_effect = #{record.outEffect,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=BIGINT},
      </if>
      <if test="record.createUserName != null">
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUserId != null">
        update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.updateUserName != null">
        update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update invoice_invoiced
    set id = #{record.id,jdbcType=BIGINT},
      invoice_sequence_number = #{record.invoiceSequenceNumber,jdbcType=VARCHAR},
      erp_document_number = #{record.erpDocumentNumber,jdbcType=VARCHAR},
      invoice_type_id = #{record.invoiceTypeId,jdbcType=BIGINT},
      invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
      category_code = #{record.categoryCode,jdbcType=VARCHAR},
      invoice_number = #{record.invoiceNumber,jdbcType=VARCHAR},
      source_from_excel_type = #{record.sourceFromExcelType,jdbcType=TINYINT},
      billing_machine_number = #{record.billingMachineNumber,jdbcType=VARCHAR},
      purchaser_main_id = #{record.purchaserMainId,jdbcType=BIGINT},
      purchaser_company_name = #{record.purchaserCompanyName,jdbcType=VARCHAR},
      purchaser_taxpayers_i_d_code = #{record.purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      purchaser_address_phone = #{record.purchaserAddressPhone,jdbcType=VARCHAR},
      purchaser_phone = #{record.purchaserPhone,jdbcType=VARCHAR},
      purchaser_address = #{record.purchaserAddress,jdbcType=VARCHAR},
      purchaser_bank_account_number = #{record.purchaserBankAccountNumber,jdbcType=VARCHAR},
      purchaser_bank_account = #{record.purchaserBankAccount,jdbcType=VARCHAR},
      purchaser_bank_name = #{record.purchaserBankName,jdbcType=VARCHAR},
      seller_main_id = #{record.sellerMainId,jdbcType=BIGINT},
      seller_company_name = #{record.sellerCompanyName,jdbcType=VARCHAR},
      seller_taxpayers_i_d_code = #{record.sellerTaxpayersIDCode,jdbcType=VARCHAR},
      seller_address_phone = #{record.sellerAddressPhone,jdbcType=VARCHAR},
      seller_address = #{record.sellerAddress,jdbcType=VARCHAR},
      seller_phone = #{record.sellerPhone,jdbcType=VARCHAR},
      seller_bank_account_number = #{record.sellerBankAccountNumber,jdbcType=VARCHAR},
      seller_bank_account = #{record.sellerBankAccount,jdbcType=VARCHAR},
      seller_bank_name = #{record.sellerBankName,jdbcType=VARCHAR},
      encrypted_version_number = #{record.encryptedVersionNumber,jdbcType=VARCHAR},
      invoiced_date = #{record.invoicedDate,jdbcType=TIMESTAMP},
      reporting_period = #{record.reportingPeriod,jdbcType=TINYINT},
      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
      tax_rate = #{record.taxRate,jdbcType=DECIMAL},
      total_tax = #{record.totalTax,jdbcType=DECIMAL},
      total_amount_including_tax = #{record.totalAmountIncludingTax,jdbcType=DECIMAL},
      receivable_amount = #{record.receivableAmount,jdbcType=DECIMAL},
      is_red_write_off = #{record.isRedWriteOff,jdbcType=TINYINT},
      red_write_off_amount = #{record.redWriteOffAmount,jdbcType=DECIMAL},
      red_write_off_invoice_sequence_number = #{record.redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR},
      is_blue_write_off = #{record.isBlueWriteOff,jdbcType=TINYINT},
      blue_write_off_amount = #{record.blueWriteOffAmount,jdbcType=DECIMAL},
      is_back_collection = #{record.isBackCollection,jdbcType=TINYINT},
      back_collection_time = #{record.backCollectionTime,jdbcType=TIMESTAMP},
      back_collection_amount_already = #{record.backCollectionAmountAlready,jdbcType=DECIMAL},
      back_collection_amount_wait_for = #{record.backCollectionAmountWaitFor,jdbcType=DECIMAL},
      back_collection_frequency = #{record.backCollectionFrequency,jdbcType=INTEGER},
      main_goods_name = #{record.mainGoodsName,jdbcType=VARCHAR},
      goods_tax_item = #{record.goodsTaxItem,jdbcType=VARCHAR},
      remarks = #{record.remarks,jdbcType=VARCHAR},
      person_name_invoice = #{record.personNameInvoice,jdbcType=VARCHAR},
      person_name_review = #{record.personNameReview,jdbcType=VARCHAR},
      person_name_cashier = #{record.personNameCashier,jdbcType=VARCHAR},
      sys_user_id_invoice = #{record.sysUserIdInvoice,jdbcType=BIGINT},
      sys_user_id_review = #{record.sysUserIdReview,jdbcType=BIGINT},
      sys_user_id_cashier = #{record.sysUserIdCashier,jdbcType=BIGINT},
      flag_list = #{record.flagList,jdbcType=VARCHAR},
      flag_void_sign = #{record.flagVoidSign,jdbcType=VARCHAR},
      is_invalid = #{record.isInvalid,jdbcType=TINYINT},
      deleted = #{record.deleted,jdbcType=TINYINT},
      flag_repair = #{record.flagRepair,jdbcType=VARCHAR},
      person_name_applicant = #{record.personNameApplicant,jdbcType=VARCHAR},
      sys_user_id_applicant = #{record.sysUserIdApplicant,jdbcType=BIGINT},
      custom_item = #{record.customItem,jdbcType=VARCHAR},
      document_number = #{record.documentNumber,jdbcType=VARCHAR},
      custom_item2 = #{record.customItem2,jdbcType=VARCHAR},
      invoiced_method = #{record.invoicedMethod,jdbcType=VARCHAR},
      hardware_sales_volume = #{record.hardwareSalesVolume,jdbcType=VARCHAR},
      software_sales_volume = #{record.softwareSalesVolume,jdbcType=VARCHAR},
      business_category_code = #{record.businessCategoryCode,jdbcType=VARCHAR},
      business_category_name = #{record.businessCategoryName,jdbcType=VARCHAR},
      overdue_days = #{record.overdueDays,jdbcType=INTEGER},
      is_overdue = #{record.isOverdue,jdbcType=TINYINT},
      property_company_id = #{record.propertyCompanyId,jdbcType=BIGINT},
      property_company_name = #{record.propertyCompanyName,jdbcType=VARCHAR},
      customer_manager_id = #{record.customerManagerId,jdbcType=BIGINT},
      customer_manager_name = #{record.customerManagerName,jdbcType=VARCHAR},
      process_number_and_rate_of_progress = #{record.processNumberAndRateOfProgress,jdbcType=VARCHAR},
      rate_of_progress_update = #{record.rateOfProgressUpdate,jdbcType=VARCHAR},
      is_push_hardly = #{record.isPushHardly,jdbcType=TINYINT},
      customer_project_name = #{record.customerProjectName,jdbcType=VARCHAR},
      memo1 = #{record.memo1,jdbcType=VARCHAR},
      memo2 = #{record.memo2,jdbcType=VARCHAR},
      memo3 = #{record.memo3,jdbcType=VARCHAR},
      memo4 = #{record.memo4,jdbcType=VARCHAR},
      memo5 = #{record.memo5,jdbcType=VARCHAR},
      memo6 = #{record.memo6,jdbcType=VARCHAR},
      memo7 = #{record.memo7,jdbcType=VARCHAR},
      memo8 = #{record.memo8,jdbcType=VARCHAR},
      memo9 = #{record.memo9,jdbcType=VARCHAR},
      memo10 = #{record.memo10,jdbcType=VARCHAR},
      out_clique_leave_0_id = #{record.outCliqueLeave0Id,jdbcType=BIGINT},
      out_clique_leave_0_name = #{record.outCliqueLeave0Name,jdbcType=VARCHAR},
      out_clique_leave_1_4_id = #{record.outCliqueLeave14Id,jdbcType=VARCHAR},
      out_clique_leave_1_4_name = #{record.outCliqueLeave14Name,jdbcType=VARCHAR},
      out_org_id = #{record.outOrgId,jdbcType=BIGINT},
      out_org_name = #{record.outOrgName,jdbcType=VARCHAR},
      out_virt_id = #{record.outVirtId,jdbcType=BIGINT},
      out_virt_name = #{record.outVirtName,jdbcType=VARCHAR},
      out_path = #{record.outPath,jdbcType=VARCHAR},
      out_effect = #{record.outEffect,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoiced">
    update invoice_invoiced
    <set>
      <if test="invoiceSequenceNumber != null">
        invoice_sequence_number = #{invoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="erpDocumentNumber != null">
        erp_document_number = #{erpDocumentNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceTypeId != null">
        invoice_type_id = #{invoiceTypeId,jdbcType=BIGINT},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="categoryCode != null">
        category_code = #{categoryCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceNumber != null">
        invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      </if>
      <if test="sourceFromExcelType != null">
        source_from_excel_type = #{sourceFromExcelType,jdbcType=TINYINT},
      </if>
      <if test="billingMachineNumber != null">
        billing_machine_number = #{billingMachineNumber,jdbcType=VARCHAR},
      </if>
      <if test="purchaserMainId != null">
        purchaser_main_id = #{purchaserMainId,jdbcType=BIGINT},
      </if>
      <if test="purchaserCompanyName != null">
        purchaser_company_name = #{purchaserCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="purchaserTaxpayersIDCode != null">
        purchaser_taxpayers_i_d_code = #{purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="purchaserAddressPhone != null">
        purchaser_address_phone = #{purchaserAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaserPhone != null">
        purchaser_phone = #{purchaserPhone,jdbcType=VARCHAR},
      </if>
      <if test="purchaserAddress != null">
        purchaser_address = #{purchaserAddress,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankAccountNumber != null">
        purchaser_bank_account_number = #{purchaserBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankAccount != null">
        purchaser_bank_account = #{purchaserBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="purchaserBankName != null">
        purchaser_bank_name = #{purchaserBankName,jdbcType=VARCHAR},
      </if>
      <if test="sellerMainId != null">
        seller_main_id = #{sellerMainId,jdbcType=BIGINT},
      </if>
      <if test="sellerCompanyName != null">
        seller_company_name = #{sellerCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="sellerTaxpayersIDCode != null">
        seller_taxpayers_i_d_code = #{sellerTaxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddressPhone != null">
        seller_address_phone = #{sellerAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddress != null">
        seller_address = #{sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="sellerPhone != null">
        seller_phone = #{sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankAccountNumber != null">
        seller_bank_account_number = #{sellerBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankAccount != null">
        seller_bank_account = #{sellerBankAccount,jdbcType=VARCHAR},
      </if>
      <if test="sellerBankName != null">
        seller_bank_name = #{sellerBankName,jdbcType=VARCHAR},
      </if>
      <if test="encryptedVersionNumber != null">
        encrypted_version_number = #{encryptedVersionNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoicedDate != null">
        invoiced_date = #{invoicedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="reportingPeriod != null">
        reporting_period = #{reportingPeriod,jdbcType=TINYINT},
      </if>
      <if test="totalAmount != null">
        total_amount = #{totalAmount,jdbcType=DECIMAL},
      </if>
      <if test="taxRate != null">
        tax_rate = #{taxRate,jdbcType=DECIMAL},
      </if>
      <if test="totalTax != null">
        total_tax = #{totalTax,jdbcType=DECIMAL},
      </if>
      <if test="totalAmountIncludingTax != null">
        total_amount_including_tax = #{totalAmountIncludingTax,jdbcType=DECIMAL},
      </if>
      <if test="receivableAmount != null">
        receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
      </if>
      <if test="isRedWriteOff != null">
        is_red_write_off = #{isRedWriteOff,jdbcType=TINYINT},
      </if>
      <if test="redWriteOffAmount != null">
        red_write_off_amount = #{redWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="redWriteOffInvoiceSequenceNumber != null">
        red_write_off_invoice_sequence_number = #{redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="isBlueWriteOff != null">
        is_blue_write_off = #{isBlueWriteOff,jdbcType=TINYINT},
      </if>
      <if test="blueWriteOffAmount != null">
        blue_write_off_amount = #{blueWriteOffAmount,jdbcType=DECIMAL},
      </if>
      <if test="isBackCollection != null">
        is_back_collection = #{isBackCollection,jdbcType=TINYINT},
      </if>
      <if test="backCollectionTime != null">
        back_collection_time = #{backCollectionTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backCollectionAmountAlready != null">
        back_collection_amount_already = #{backCollectionAmountAlready,jdbcType=DECIMAL},
      </if>
      <if test="backCollectionAmountWaitFor != null">
        back_collection_amount_wait_for = #{backCollectionAmountWaitFor,jdbcType=DECIMAL},
      </if>
      <if test="backCollectionFrequency != null">
        back_collection_frequency = #{backCollectionFrequency,jdbcType=INTEGER},
      </if>
      <if test="mainGoodsName != null">
        main_goods_name = #{mainGoodsName,jdbcType=VARCHAR},
      </if>
      <if test="goodsTaxItem != null">
        goods_tax_item = #{goodsTaxItem,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        remarks = #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="personNameInvoice != null">
        person_name_invoice = #{personNameInvoice,jdbcType=VARCHAR},
      </if>
      <if test="personNameReview != null">
        person_name_review = #{personNameReview,jdbcType=VARCHAR},
      </if>
      <if test="personNameCashier != null">
        person_name_cashier = #{personNameCashier,jdbcType=VARCHAR},
      </if>
      <if test="sysUserIdInvoice != null">
        sys_user_id_invoice = #{sysUserIdInvoice,jdbcType=BIGINT},
      </if>
      <if test="sysUserIdReview != null">
        sys_user_id_review = #{sysUserIdReview,jdbcType=BIGINT},
      </if>
      <if test="sysUserIdCashier != null">
        sys_user_id_cashier = #{sysUserIdCashier,jdbcType=BIGINT},
      </if>
      <if test="flagList != null">
        flag_list = #{flagList,jdbcType=VARCHAR},
      </if>
      <if test="flagVoidSign != null">
        flag_void_sign = #{flagVoidSign,jdbcType=VARCHAR},
      </if>
      <if test="isInvalid != null">
        is_invalid = #{isInvalid,jdbcType=TINYINT},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
      <if test="flagRepair != null">
        flag_repair = #{flagRepair,jdbcType=VARCHAR},
      </if>
      <if test="personNameApplicant != null">
        person_name_applicant = #{personNameApplicant,jdbcType=VARCHAR},
      </if>
      <if test="sysUserIdApplicant != null">
        sys_user_id_applicant = #{sysUserIdApplicant,jdbcType=BIGINT},
      </if>
      <if test="customItem != null">
        custom_item = #{customItem,jdbcType=VARCHAR},
      </if>
      <if test="documentNumber != null">
        document_number = #{documentNumber,jdbcType=VARCHAR},
      </if>
      <if test="customItem2 != null">
        custom_item2 = #{customItem2,jdbcType=VARCHAR},
      </if>
      <if test="invoicedMethod != null">
        invoiced_method = #{invoicedMethod,jdbcType=VARCHAR},
      </if>
      <if test="hardwareSalesVolume != null">
        hardware_sales_volume = #{hardwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="softwareSalesVolume != null">
        software_sales_volume = #{softwareSalesVolume,jdbcType=VARCHAR},
      </if>
      <if test="businessCategoryCode != null">
        business_category_code = #{businessCategoryCode,jdbcType=VARCHAR},
      </if>
      <if test="businessCategoryName != null">
        business_category_name = #{businessCategoryName,jdbcType=VARCHAR},
      </if>
      <if test="overdueDays != null">
        overdue_days = #{overdueDays,jdbcType=INTEGER},
      </if>
      <if test="isOverdue != null">
        is_overdue = #{isOverdue,jdbcType=TINYINT},
      </if>
      <if test="propertyCompanyId != null">
        property_company_id = #{propertyCompanyId,jdbcType=BIGINT},
      </if>
      <if test="propertyCompanyName != null">
        property_company_name = #{propertyCompanyName,jdbcType=VARCHAR},
      </if>
      <if test="customerManagerId != null">
        customer_manager_id = #{customerManagerId,jdbcType=BIGINT},
      </if>
      <if test="customerManagerName != null">
        customer_manager_name = #{customerManagerName,jdbcType=VARCHAR},
      </if>
      <if test="processNumberAndRateOfProgress != null">
        process_number_and_rate_of_progress = #{processNumberAndRateOfProgress,jdbcType=VARCHAR},
      </if>
      <if test="rateOfProgressUpdate != null">
        rate_of_progress_update = #{rateOfProgressUpdate,jdbcType=VARCHAR},
      </if>
      <if test="isPushHardly != null">
        is_push_hardly = #{isPushHardly,jdbcType=TINYINT},
      </if>
      <if test="customerProjectName != null">
        customer_project_name = #{customerProjectName,jdbcType=VARCHAR},
      </if>
      <if test="memo1 != null">
        memo1 = #{memo1,jdbcType=VARCHAR},
      </if>
      <if test="memo2 != null">
        memo2 = #{memo2,jdbcType=VARCHAR},
      </if>
      <if test="memo3 != null">
        memo3 = #{memo3,jdbcType=VARCHAR},
      </if>
      <if test="memo4 != null">
        memo4 = #{memo4,jdbcType=VARCHAR},
      </if>
      <if test="memo5 != null">
        memo5 = #{memo5,jdbcType=VARCHAR},
      </if>
      <if test="memo6 != null">
        memo6 = #{memo6,jdbcType=VARCHAR},
      </if>
      <if test="memo7 != null">
        memo7 = #{memo7,jdbcType=VARCHAR},
      </if>
      <if test="memo8 != null">
        memo8 = #{memo8,jdbcType=VARCHAR},
      </if>
      <if test="memo9 != null">
        memo9 = #{memo9,jdbcType=VARCHAR},
      </if>
      <if test="memo10 != null">
        memo10 = #{memo10,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave0Id != null">
        out_clique_leave_0_id = #{outCliqueLeave0Id,jdbcType=BIGINT},
      </if>
      <if test="outCliqueLeave0Name != null">
        out_clique_leave_0_name = #{outCliqueLeave0Name,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave14Id != null">
        out_clique_leave_1_4_id = #{outCliqueLeave14Id,jdbcType=VARCHAR},
      </if>
      <if test="outCliqueLeave14Name != null">
        out_clique_leave_1_4_name = #{outCliqueLeave14Name,jdbcType=VARCHAR},
      </if>
      <if test="outOrgId != null">
        out_org_id = #{outOrgId,jdbcType=BIGINT},
      </if>
      <if test="outOrgName != null">
        out_org_name = #{outOrgName,jdbcType=VARCHAR},
      </if>
      <if test="outVirtId != null">
        out_virt_id = #{outVirtId,jdbcType=BIGINT},
      </if>
      <if test="outVirtName != null">
        out_virt_name = #{outVirtName,jdbcType=VARCHAR},
      </if>
      <if test="outPath != null">
        out_path = #{outPath,jdbcType=VARCHAR},
      </if>
      <if test="outEffect != null">
        out_effect = #{outEffect,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=BIGINT},
      </if>
      <if test="updateUserName != null">
        update_user_name = #{updateUserName,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.invoice.customer.invoiced.InvoiceInvoiced">
    update invoice_invoiced
    set invoice_sequence_number = #{invoiceSequenceNumber,jdbcType=VARCHAR},
      erp_document_number = #{erpDocumentNumber,jdbcType=VARCHAR},
      invoice_type_id = #{invoiceTypeId,jdbcType=BIGINT},
      invoice_type = #{invoiceType,jdbcType=VARCHAR},
      category_code = #{categoryCode,jdbcType=VARCHAR},
      invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
      source_from_excel_type = #{sourceFromExcelType,jdbcType=TINYINT},
      billing_machine_number = #{billingMachineNumber,jdbcType=VARCHAR},
      purchaser_main_id = #{purchaserMainId,jdbcType=BIGINT},
      purchaser_company_name = #{purchaserCompanyName,jdbcType=VARCHAR},
      purchaser_taxpayers_i_d_code = #{purchaserTaxpayersIDCode,jdbcType=VARCHAR},
      purchaser_address_phone = #{purchaserAddressPhone,jdbcType=VARCHAR},
      purchaser_phone = #{purchaserPhone,jdbcType=VARCHAR},
      purchaser_address = #{purchaserAddress,jdbcType=VARCHAR},
      purchaser_bank_account_number = #{purchaserBankAccountNumber,jdbcType=VARCHAR},
      purchaser_bank_account = #{purchaserBankAccount,jdbcType=VARCHAR},
      purchaser_bank_name = #{purchaserBankName,jdbcType=VARCHAR},
      seller_main_id = #{sellerMainId,jdbcType=BIGINT},
      seller_company_name = #{sellerCompanyName,jdbcType=VARCHAR},
      seller_taxpayers_i_d_code = #{sellerTaxpayersIDCode,jdbcType=VARCHAR},
      seller_address_phone = #{sellerAddressPhone,jdbcType=VARCHAR},
      seller_address = #{sellerAddress,jdbcType=VARCHAR},
      seller_phone = #{sellerPhone,jdbcType=VARCHAR},
      seller_bank_account_number = #{sellerBankAccountNumber,jdbcType=VARCHAR},
      seller_bank_account = #{sellerBankAccount,jdbcType=VARCHAR},
      seller_bank_name = #{sellerBankName,jdbcType=VARCHAR},
      encrypted_version_number = #{encryptedVersionNumber,jdbcType=VARCHAR},
      invoiced_date = #{invoicedDate,jdbcType=TIMESTAMP},
      reporting_period = #{reportingPeriod,jdbcType=TINYINT},
      total_amount = #{totalAmount,jdbcType=DECIMAL},
      tax_rate = #{taxRate,jdbcType=DECIMAL},
      total_tax = #{totalTax,jdbcType=DECIMAL},
      total_amount_including_tax = #{totalAmountIncludingTax,jdbcType=DECIMAL},
      receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
      is_red_write_off = #{isRedWriteOff,jdbcType=TINYINT},
      red_write_off_amount = #{redWriteOffAmount,jdbcType=DECIMAL},
      red_write_off_invoice_sequence_number = #{redWriteOffInvoiceSequenceNumber,jdbcType=VARCHAR},
      is_blue_write_off = #{isBlueWriteOff,jdbcType=TINYINT},
      blue_write_off_amount = #{blueWriteOffAmount,jdbcType=DECIMAL},
      is_back_collection = #{isBackCollection,jdbcType=TINYINT},
      back_collection_time = #{backCollectionTime,jdbcType=TIMESTAMP},
      back_collection_amount_already = #{backCollectionAmountAlready,jdbcType=DECIMAL},
      back_collection_amount_wait_for = #{backCollectionAmountWaitFor,jdbcType=DECIMAL},
      back_collection_frequency = #{backCollectionFrequency,jdbcType=INTEGER},
      main_goods_name = #{mainGoodsName,jdbcType=VARCHAR},
      goods_tax_item = #{goodsTaxItem,jdbcType=VARCHAR},
      remarks = #{remarks,jdbcType=VARCHAR},
      person_name_invoice = #{personNameInvoice,jdbcType=VARCHAR},
      person_name_review = #{personNameReview,jdbcType=VARCHAR},
      person_name_cashier = #{personNameCashier,jdbcType=VARCHAR},
      sys_user_id_invoice = #{sysUserIdInvoice,jdbcType=BIGINT},
      sys_user_id_review = #{sysUserIdReview,jdbcType=BIGINT},
      sys_user_id_cashier = #{sysUserIdCashier,jdbcType=BIGINT},
      flag_list = #{flagList,jdbcType=VARCHAR},
      flag_void_sign = #{flagVoidSign,jdbcType=VARCHAR},
      is_invalid = #{isInvalid,jdbcType=TINYINT},
      deleted = #{deleted,jdbcType=TINYINT},
      flag_repair = #{flagRepair,jdbcType=VARCHAR},
      person_name_applicant = #{personNameApplicant,jdbcType=VARCHAR},
      sys_user_id_applicant = #{sysUserIdApplicant,jdbcType=BIGINT},
      custom_item = #{customItem,jdbcType=VARCHAR},
      document_number = #{documentNumber,jdbcType=VARCHAR},
      custom_item2 = #{customItem2,jdbcType=VARCHAR},
      invoiced_method = #{invoicedMethod,jdbcType=VARCHAR},
      hardware_sales_volume = #{hardwareSalesVolume,jdbcType=VARCHAR},
      software_sales_volume = #{softwareSalesVolume,jdbcType=VARCHAR},
      business_category_code = #{businessCategoryCode,jdbcType=VARCHAR},
      business_category_name = #{businessCategoryName,jdbcType=VARCHAR},
      overdue_days = #{overdueDays,jdbcType=INTEGER},
      is_overdue = #{isOverdue,jdbcType=TINYINT},
      property_company_id = #{propertyCompanyId,jdbcType=BIGINT},
      property_company_name = #{propertyCompanyName,jdbcType=VARCHAR},
      customer_manager_id = #{customerManagerId,jdbcType=BIGINT},
      customer_manager_name = #{customerManagerName,jdbcType=VARCHAR},
      process_number_and_rate_of_progress = #{processNumberAndRateOfProgress,jdbcType=VARCHAR},
      rate_of_progress_update = #{rateOfProgressUpdate,jdbcType=VARCHAR},
      is_push_hardly = #{isPushHardly,jdbcType=TINYINT},
      customer_project_name = #{customerProjectName,jdbcType=VARCHAR},
      memo1 = #{memo1,jdbcType=VARCHAR},
      memo2 = #{memo2,jdbcType=VARCHAR},
      memo3 = #{memo3,jdbcType=VARCHAR},
      memo4 = #{memo4,jdbcType=VARCHAR},
      memo5 = #{memo5,jdbcType=VARCHAR},
      memo6 = #{memo6,jdbcType=VARCHAR},
      memo7 = #{memo7,jdbcType=VARCHAR},
      memo8 = #{memo8,jdbcType=VARCHAR},
      memo9 = #{memo9,jdbcType=VARCHAR},
      memo10 = #{memo10,jdbcType=VARCHAR},
      out_clique_leave_0_id = #{outCliqueLeave0Id,jdbcType=BIGINT},
      out_clique_leave_0_name = #{outCliqueLeave0Name,jdbcType=VARCHAR},
      out_clique_leave_1_4_id = #{outCliqueLeave14Id,jdbcType=VARCHAR},
      out_clique_leave_1_4_name = #{outCliqueLeave14Name,jdbcType=VARCHAR},
      out_org_id = #{outOrgId,jdbcType=BIGINT},
      out_org_name = #{outOrgName,jdbcType=VARCHAR},
      out_virt_id = #{outVirtId,jdbcType=BIGINT},
      out_virt_name = #{outVirtName,jdbcType=VARCHAR},
      out_path = #{outPath,jdbcType=VARCHAR},
      out_effect = #{outEffect,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      update_user_name = #{updateUserName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
