<?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.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntityMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntity">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="unified_id" jdbcType="BIGINT" property="unifiedId" />
    <result column="dim_create_by" jdbcType="TINYINT" property="dimCreateBy" />
    <result column="accounting_order_sn" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="accounting_status" jdbcType="TINYINT" property="accountingStatus" />
    <result column="invoice_status" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_title" jdbcType="VARCHAR" property="invoiceTitle" />
    <result column="invoice_type" jdbcType="TINYINT" property="invoiceType" />
    <result column="tax_code" jdbcType="VARCHAR" property="taxCode" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="sale_id" jdbcType="VARCHAR" property="saleId" />
    <result column="sale_name" jdbcType="VARCHAR" property="saleName" />
    <result column="contacts_email" jdbcType="VARCHAR" property="contactsEmail" />
    <result column="contacts_full_address" jdbcType="VARCHAR" property="contactsFullAddress" />
    <result column="contacts_name" jdbcType="VARCHAR" property="contactsName" />
    <result column="contacts_phone" jdbcType="VARCHAR" property="contactsPhone" />
    <result column="seller_address" jdbcType="VARCHAR" property="sellerAddress" />
    <result column="seller_email" jdbcType="VARCHAR" property="sellerEmail" />
    <result column="seller_phone" jdbcType="VARCHAR" property="sellerPhone" />
    <result column="seller_user_id" jdbcType="VARCHAR" property="sellerUserId" />
    <result column="seller_user_name" jdbcType="VARCHAR" property="sellerUserName" />
    <result column="is_send_email" jdbcType="TINYINT" property="isSendEmail" />
    <result column="send_email_time" jdbcType="TIMESTAMP" property="sendEmailTime" />
    <result column="date_type" jdbcType="TINYINT" property="dateType" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="back_account_status" jdbcType="TINYINT" property="backAccountStatus" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="VARCHAR" 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="VARCHAR" property="updateUserId" />
    <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="invoice_apply_status" jdbcType="TINYINT" property="invoiceApplyStatus" />
    <result column="invoice_apply_user_id" jdbcType="VARCHAR" property="invoiceApplyUserId" />
    <result column="invoice_apply_time" jdbcType="TIMESTAMP" property="invoiceApplyTime" />
    <result column="invoice_apply_mode_record" jdbcType="TINYINT" property="invoiceApplyModeRecord" />
    <result column="accounting_order_amount" jdbcType="DECIMAL" property="accountingOrderAmount" />
    <result column="accounting_order_amount_with_freight" jdbcType="DECIMAL" property="accountingOrderAmountWithFreight" />
    <result column="rebate_amount" jdbcType="DECIMAL" property="rebateAmount" />
    <result column="statistics_total_amount" jdbcType="DECIMAL" property="statisticsTotalAmount" />
    <result column="jc_un_accounting_amount" jdbcType="DECIMAL" property="jcUnAccountingAmount" />
    <result column="un_accounting_amount" jdbcType="DECIMAL" property="unAccountingAmount" />
    <result column="sync_time" jdbcType="TIMESTAMP" property="syncTime" />
    <result column="storage_status" jdbcType="TINYINT" property="storageStatus" />
    <result column="storage_reason" jdbcType="VARCHAR" property="storageReason" />
    <result column="storage_time" jdbcType="TIMESTAMP" property="storageTime" />
    <result column="invoice_count" jdbcType="INTEGER" property="invoiceCount" />
    <result column="receive_invoice_status" jdbcType="TINYINT" property="receiveInvoiceStatus" />
    <result column="order_goods_count" jdbcType="INTEGER" property="orderGoodsCount" />
  </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, unified_id, dim_create_by, accounting_order_sn, accounting_status, invoice_status, 
    invoice_title, invoice_type, tax_code, address, sale_id, sale_name, contacts_email, 
    contacts_full_address, contacts_name, contacts_phone, seller_address, seller_email, 
    seller_phone, seller_user_id, seller_user_name, is_send_email, send_email_time, date_type, 
    start_time, end_time, back_account_status, create_time, create_user_id, create_user_name, 
    update_time, update_user_id, update_user_name, remark, invoice_apply_status, invoice_apply_user_id, 
    invoice_apply_time, invoice_apply_mode_record, accounting_order_amount, accounting_order_amount_with_freight, 
    rebate_amount, statistics_total_amount, jc_un_accounting_amount, un_accounting_amount, 
    sync_time, storage_status, storage_reason, storage_time, invoice_count, receive_invoice_status, 
    order_goods_count
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntityExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from qchjc_accounting_unified_supplier
    <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 qchjc_accounting_unified_supplier
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from qchjc_accounting_unified_supplier
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntityExample">
    delete from qchjc_accounting_unified_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntity">
    insert into qchjc_accounting_unified_supplier (id, unified_id, dim_create_by, 
      accounting_order_sn, accounting_status, invoice_status, 
      invoice_title, invoice_type, tax_code, 
      address, sale_id, sale_name, 
      contacts_email, contacts_full_address, contacts_name, 
      contacts_phone, seller_address, seller_email, 
      seller_phone, seller_user_id, seller_user_name, 
      is_send_email, send_email_time, date_type, 
      start_time, end_time, back_account_status, 
      create_time, create_user_id, create_user_name, 
      update_time, update_user_id, update_user_name, 
      remark, invoice_apply_status, invoice_apply_user_id, 
      invoice_apply_time, invoice_apply_mode_record, 
      accounting_order_amount, accounting_order_amount_with_freight, 
      rebate_amount, statistics_total_amount, jc_un_accounting_amount, 
      un_accounting_amount, sync_time, storage_status, 
      storage_reason, storage_time, invoice_count, 
      receive_invoice_status, order_goods_count)
    values (#{id,jdbcType=BIGINT}, #{unifiedId,jdbcType=BIGINT}, #{dimCreateBy,jdbcType=TINYINT}, 
      #{accountingOrderSn,jdbcType=VARCHAR}, #{accountingStatus,jdbcType=TINYINT}, #{invoiceStatus,jdbcType=TINYINT}, 
      #{invoiceTitle,jdbcType=VARCHAR}, #{invoiceType,jdbcType=TINYINT}, #{taxCode,jdbcType=VARCHAR}, 
      #{address,jdbcType=VARCHAR}, #{saleId,jdbcType=VARCHAR}, #{saleName,jdbcType=VARCHAR}, 
      #{contactsEmail,jdbcType=VARCHAR}, #{contactsFullAddress,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, 
      #{contactsPhone,jdbcType=VARCHAR}, #{sellerAddress,jdbcType=VARCHAR}, #{sellerEmail,jdbcType=VARCHAR}, 
      #{sellerPhone,jdbcType=VARCHAR}, #{sellerUserId,jdbcType=VARCHAR}, #{sellerUserName,jdbcType=VARCHAR}, 
      #{isSendEmail,jdbcType=TINYINT}, #{sendEmailTime,jdbcType=TIMESTAMP}, #{dateType,jdbcType=TINYINT}, 
      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{backAccountStatus,jdbcType=TINYINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=VARCHAR}, #{createUserName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=VARCHAR}, #{updateUserName,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{invoiceApplyStatus,jdbcType=TINYINT}, #{invoiceApplyUserId,jdbcType=VARCHAR}, 
      #{invoiceApplyTime,jdbcType=TIMESTAMP}, #{invoiceApplyModeRecord,jdbcType=TINYINT}, 
      #{accountingOrderAmount,jdbcType=DECIMAL}, #{accountingOrderAmountWithFreight,jdbcType=DECIMAL}, 
      #{rebateAmount,jdbcType=DECIMAL}, #{statisticsTotalAmount,jdbcType=DECIMAL}, #{jcUnAccountingAmount,jdbcType=DECIMAL}, 
      #{unAccountingAmount,jdbcType=DECIMAL}, #{syncTime,jdbcType=TIMESTAMP}, #{storageStatus,jdbcType=TINYINT}, 
      #{storageReason,jdbcType=VARCHAR}, #{storageTime,jdbcType=TIMESTAMP}, #{invoiceCount,jdbcType=INTEGER}, 
      #{receiveInvoiceStatus,jdbcType=TINYINT}, #{orderGoodsCount,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntity">
    insert into qchjc_accounting_unified_supplier
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="unifiedId != null">
        unified_id,
      </if>
      <if test="dimCreateBy != null">
        dim_create_by,
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn,
      </if>
      <if test="accountingStatus != null">
        accounting_status,
      </if>
      <if test="invoiceStatus != null">
        invoice_status,
      </if>
      <if test="invoiceTitle != null">
        invoice_title,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="taxCode != null">
        tax_code,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="saleId != null">
        sale_id,
      </if>
      <if test="saleName != null">
        sale_name,
      </if>
      <if test="contactsEmail != null">
        contacts_email,
      </if>
      <if test="contactsFullAddress != null">
        contacts_full_address,
      </if>
      <if test="contactsName != null">
        contacts_name,
      </if>
      <if test="contactsPhone != null">
        contacts_phone,
      </if>
      <if test="sellerAddress != null">
        seller_address,
      </if>
      <if test="sellerEmail != null">
        seller_email,
      </if>
      <if test="sellerPhone != null">
        seller_phone,
      </if>
      <if test="sellerUserId != null">
        seller_user_id,
      </if>
      <if test="sellerUserName != null">
        seller_user_name,
      </if>
      <if test="isSendEmail != null">
        is_send_email,
      </if>
      <if test="sendEmailTime != null">
        send_email_time,
      </if>
      <if test="dateType != null">
        date_type,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="backAccountStatus != null">
        back_account_status,
      </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>
      <if test="remark != null">
        remark,
      </if>
      <if test="invoiceApplyStatus != null">
        invoice_apply_status,
      </if>
      <if test="invoiceApplyUserId != null">
        invoice_apply_user_id,
      </if>
      <if test="invoiceApplyTime != null">
        invoice_apply_time,
      </if>
      <if test="invoiceApplyModeRecord != null">
        invoice_apply_mode_record,
      </if>
      <if test="accountingOrderAmount != null">
        accounting_order_amount,
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight,
      </if>
      <if test="rebateAmount != null">
        rebate_amount,
      </if>
      <if test="statisticsTotalAmount != null">
        statistics_total_amount,
      </if>
      <if test="jcUnAccountingAmount != null">
        jc_un_accounting_amount,
      </if>
      <if test="unAccountingAmount != null">
        un_accounting_amount,
      </if>
      <if test="syncTime != null">
        sync_time,
      </if>
      <if test="storageStatus != null">
        storage_status,
      </if>
      <if test="storageReason != null">
        storage_reason,
      </if>
      <if test="storageTime != null">
        storage_time,
      </if>
      <if test="invoiceCount != null">
        invoice_count,
      </if>
      <if test="receiveInvoiceStatus != null">
        receive_invoice_status,
      </if>
      <if test="orderGoodsCount != null">
        order_goods_count,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="unifiedId != null">
        #{unifiedId,jdbcType=BIGINT},
      </if>
      <if test="dimCreateBy != null">
        #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="taxCode != null">
        #{taxCode,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="saleId != null">
        #{saleId,jdbcType=VARCHAR},
      </if>
      <if test="saleName != null">
        #{saleName,jdbcType=VARCHAR},
      </if>
      <if test="contactsEmail != null">
        #{contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsFullAddress != null">
        #{contactsFullAddress,jdbcType=VARCHAR},
      </if>
      <if test="contactsName != null">
        #{contactsName,jdbcType=VARCHAR},
      </if>
      <if test="contactsPhone != null">
        #{contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddress != null">
        #{sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="sellerPhone != null">
        #{sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerUserId != null">
        #{sellerUserId,jdbcType=VARCHAR},
      </if>
      <if test="sellerUserName != null">
        #{sellerUserName,jdbcType=VARCHAR},
      </if>
      <if test="isSendEmail != null">
        #{isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="sendEmailTime != null">
        #{sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dateType != null">
        #{dateType,jdbcType=TINYINT},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backAccountStatus != null">
        #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=VARCHAR},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=VARCHAR},
      </if>
      <if test="updateUserName != null">
        #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyStatus != null">
        #{invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplyUserId != null">
        #{invoiceApplyUserId,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyTime != null">
        #{invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceApplyModeRecord != null">
        #{invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderAmount != null">
        #{accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="rebateAmount != null">
        #{rebateAmount,jdbcType=DECIMAL},
      </if>
      <if test="statisticsTotalAmount != null">
        #{statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="jcUnAccountingAmount != null">
        #{jcUnAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="unAccountingAmount != null">
        #{unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="syncTime != null">
        #{syncTime,jdbcType=TIMESTAMP},
      </if>
      <if test="storageStatus != null">
        #{storageStatus,jdbcType=TINYINT},
      </if>
      <if test="storageReason != null">
        #{storageReason,jdbcType=VARCHAR},
      </if>
      <if test="storageTime != null">
        #{storageTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceCount != null">
        #{invoiceCount,jdbcType=INTEGER},
      </if>
      <if test="receiveInvoiceStatus != null">
        #{receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="orderGoodsCount != null">
        #{orderGoodsCount,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntityExample" resultType="java.lang.Long">
    select count(*) from qchjc_accounting_unified_supplier
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update qchjc_accounting_unified_supplier
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.unifiedId != null">
        unified_id = #{record.unifiedId,jdbcType=BIGINT},
      </if>
      <if test="record.dimCreateBy != null">
        dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="record.accountingOrderSn != null">
        accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.accountingStatus != null">
        accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceStatus != null">
        invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceTitle != null">
        invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      </if>
      <if test="record.taxCode != null">
        tax_code = #{record.taxCode,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null">
        address = #{record.address,jdbcType=VARCHAR},
      </if>
      <if test="record.saleId != null">
        sale_id = #{record.saleId,jdbcType=VARCHAR},
      </if>
      <if test="record.saleName != null">
        sale_name = #{record.saleName,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsEmail != null">
        contacts_email = #{record.contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsFullAddress != null">
        contacts_full_address = #{record.contactsFullAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsName != null">
        contacts_name = #{record.contactsName,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsPhone != null">
        contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerAddress != null">
        seller_address = #{record.sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerEmail != null">
        seller_email = #{record.sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerPhone != null">
        seller_phone = #{record.sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerUserId != null">
        seller_user_id = #{record.sellerUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.sellerUserName != null">
        seller_user_name = #{record.sellerUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.isSendEmail != null">
        is_send_email = #{record.isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="record.sendEmailTime != null">
        send_email_time = #{record.sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.dateType != null">
        date_type = #{record.dateType,jdbcType=TINYINT},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.backAccountStatus != null">
        back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=VARCHAR},
      </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=VARCHAR},
      </if>
      <if test="record.updateUserName != null">
        update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceApplyStatus != null">
        invoice_apply_status = #{record.invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="record.invoiceApplyUserId != null">
        invoice_apply_user_id = #{record.invoiceApplyUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceApplyTime != null">
        invoice_apply_time = #{record.invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.invoiceApplyModeRecord != null">
        invoice_apply_mode_record = #{record.invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="record.accountingOrderAmount != null">
        accounting_order_amount = #{record.accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight = #{record.accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="record.rebateAmount != null">
        rebate_amount = #{record.rebateAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.statisticsTotalAmount != null">
        statistics_total_amount = #{record.statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.jcUnAccountingAmount != null">
        jc_un_accounting_amount = #{record.jcUnAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.unAccountingAmount != null">
        un_accounting_amount = #{record.unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.syncTime != null">
        sync_time = #{record.syncTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.storageStatus != null">
        storage_status = #{record.storageStatus,jdbcType=TINYINT},
      </if>
      <if test="record.storageReason != null">
        storage_reason = #{record.storageReason,jdbcType=VARCHAR},
      </if>
      <if test="record.storageTime != null">
        storage_time = #{record.storageTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.invoiceCount != null">
        invoice_count = #{record.invoiceCount,jdbcType=INTEGER},
      </if>
      <if test="record.receiveInvoiceStatus != null">
        receive_invoice_status = #{record.receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="record.orderGoodsCount != null">
        order_goods_count = #{record.orderGoodsCount,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update qchjc_accounting_unified_supplier
    set id = #{record.id,jdbcType=BIGINT},
      unified_id = #{record.unifiedId,jdbcType=BIGINT},
      dim_create_by = #{record.dimCreateBy,jdbcType=TINYINT},
      accounting_order_sn = #{record.accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{record.accountingStatus,jdbcType=TINYINT},
      invoice_status = #{record.invoiceStatus,jdbcType=TINYINT},
      invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
      invoice_type = #{record.invoiceType,jdbcType=TINYINT},
      tax_code = #{record.taxCode,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR},
      sale_id = #{record.saleId,jdbcType=VARCHAR},
      sale_name = #{record.saleName,jdbcType=VARCHAR},
      contacts_email = #{record.contactsEmail,jdbcType=VARCHAR},
      contacts_full_address = #{record.contactsFullAddress,jdbcType=VARCHAR},
      contacts_name = #{record.contactsName,jdbcType=VARCHAR},
      contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR},
      seller_address = #{record.sellerAddress,jdbcType=VARCHAR},
      seller_email = #{record.sellerEmail,jdbcType=VARCHAR},
      seller_phone = #{record.sellerPhone,jdbcType=VARCHAR},
      seller_user_id = #{record.sellerUserId,jdbcType=VARCHAR},
      seller_user_name = #{record.sellerUserName,jdbcType=VARCHAR},
      is_send_email = #{record.isSendEmail,jdbcType=TINYINT},
      send_email_time = #{record.sendEmailTime,jdbcType=TIMESTAMP},
      date_type = #{record.dateType,jdbcType=TINYINT},
      start_time = #{record.startTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      back_account_status = #{record.backAccountStatus,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=VARCHAR},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      invoice_apply_status = #{record.invoiceApplyStatus,jdbcType=TINYINT},
      invoice_apply_user_id = #{record.invoiceApplyUserId,jdbcType=VARCHAR},
      invoice_apply_time = #{record.invoiceApplyTime,jdbcType=TIMESTAMP},
      invoice_apply_mode_record = #{record.invoiceApplyModeRecord,jdbcType=TINYINT},
      accounting_order_amount = #{record.accountingOrderAmount,jdbcType=DECIMAL},
      accounting_order_amount_with_freight = #{record.accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      rebate_amount = #{record.rebateAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{record.statisticsTotalAmount,jdbcType=DECIMAL},
      jc_un_accounting_amount = #{record.jcUnAccountingAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{record.unAccountingAmount,jdbcType=DECIMAL},
      sync_time = #{record.syncTime,jdbcType=TIMESTAMP},
      storage_status = #{record.storageStatus,jdbcType=TINYINT},
      storage_reason = #{record.storageReason,jdbcType=VARCHAR},
      storage_time = #{record.storageTime,jdbcType=TIMESTAMP},
      invoice_count = #{record.invoiceCount,jdbcType=INTEGER},
      receive_invoice_status = #{record.receiveInvoiceStatus,jdbcType=TINYINT},
      order_goods_count = #{record.orderGoodsCount,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntity">
    update qchjc_accounting_unified_supplier
    <set>
      <if test="unifiedId != null">
        unified_id = #{unifiedId,jdbcType=BIGINT},
      </if>
      <if test="dimCreateBy != null">
        dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderSn != null">
        accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="accountingStatus != null">
        accounting_status = #{accountingStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceStatus != null">
        invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceTitle != null">
        invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=TINYINT},
      </if>
      <if test="taxCode != null">
        tax_code = #{taxCode,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="saleId != null">
        sale_id = #{saleId,jdbcType=VARCHAR},
      </if>
      <if test="saleName != null">
        sale_name = #{saleName,jdbcType=VARCHAR},
      </if>
      <if test="contactsEmail != null">
        contacts_email = #{contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsFullAddress != null">
        contacts_full_address = #{contactsFullAddress,jdbcType=VARCHAR},
      </if>
      <if test="contactsName != null">
        contacts_name = #{contactsName,jdbcType=VARCHAR},
      </if>
      <if test="contactsPhone != null">
        contacts_phone = #{contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerAddress != null">
        seller_address = #{sellerAddress,jdbcType=VARCHAR},
      </if>
      <if test="sellerEmail != null">
        seller_email = #{sellerEmail,jdbcType=VARCHAR},
      </if>
      <if test="sellerPhone != null">
        seller_phone = #{sellerPhone,jdbcType=VARCHAR},
      </if>
      <if test="sellerUserId != null">
        seller_user_id = #{sellerUserId,jdbcType=VARCHAR},
      </if>
      <if test="sellerUserName != null">
        seller_user_name = #{sellerUserName,jdbcType=VARCHAR},
      </if>
      <if test="isSendEmail != null">
        is_send_email = #{isSendEmail,jdbcType=TINYINT},
      </if>
      <if test="sendEmailTime != null">
        send_email_time = #{sendEmailTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dateType != null">
        date_type = #{dateType,jdbcType=TINYINT},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="backAccountStatus != null">
        back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=VARCHAR},
      </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=VARCHAR},
      </if>
      <if test="updateUserName != null">
        update_user_name = #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyStatus != null">
        invoice_apply_status = #{invoiceApplyStatus,jdbcType=TINYINT},
      </if>
      <if test="invoiceApplyUserId != null">
        invoice_apply_user_id = #{invoiceApplyUserId,jdbcType=VARCHAR},
      </if>
      <if test="invoiceApplyTime != null">
        invoice_apply_time = #{invoiceApplyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceApplyModeRecord != null">
        invoice_apply_mode_record = #{invoiceApplyModeRecord,jdbcType=TINYINT},
      </if>
      <if test="accountingOrderAmount != null">
        accounting_order_amount = #{accountingOrderAmount,jdbcType=DECIMAL},
      </if>
      <if test="accountingOrderAmountWithFreight != null">
        accounting_order_amount_with_freight = #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      </if>
      <if test="rebateAmount != null">
        rebate_amount = #{rebateAmount,jdbcType=DECIMAL},
      </if>
      <if test="statisticsTotalAmount != null">
        statistics_total_amount = #{statisticsTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="jcUnAccountingAmount != null">
        jc_un_accounting_amount = #{jcUnAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="unAccountingAmount != null">
        un_accounting_amount = #{unAccountingAmount,jdbcType=DECIMAL},
      </if>
      <if test="syncTime != null">
        sync_time = #{syncTime,jdbcType=TIMESTAMP},
      </if>
      <if test="storageStatus != null">
        storage_status = #{storageStatus,jdbcType=TINYINT},
      </if>
      <if test="storageReason != null">
        storage_reason = #{storageReason,jdbcType=VARCHAR},
      </if>
      <if test="storageTime != null">
        storage_time = #{storageTime,jdbcType=TIMESTAMP},
      </if>
      <if test="invoiceCount != null">
        invoice_count = #{invoiceCount,jdbcType=INTEGER},
      </if>
      <if test="receiveInvoiceStatus != null">
        receive_invoice_status = #{receiveInvoiceStatus,jdbcType=TINYINT},
      </if>
      <if test="orderGoodsCount != null">
        order_goods_count = #{orderGoodsCount,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierEntity">
    update qchjc_accounting_unified_supplier
    set unified_id = #{unifiedId,jdbcType=BIGINT},
      dim_create_by = #{dimCreateBy,jdbcType=TINYINT},
      accounting_order_sn = #{accountingOrderSn,jdbcType=VARCHAR},
      accounting_status = #{accountingStatus,jdbcType=TINYINT},
      invoice_status = #{invoiceStatus,jdbcType=TINYINT},
      invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
      invoice_type = #{invoiceType,jdbcType=TINYINT},
      tax_code = #{taxCode,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      sale_id = #{saleId,jdbcType=VARCHAR},
      sale_name = #{saleName,jdbcType=VARCHAR},
      contacts_email = #{contactsEmail,jdbcType=VARCHAR},
      contacts_full_address = #{contactsFullAddress,jdbcType=VARCHAR},
      contacts_name = #{contactsName,jdbcType=VARCHAR},
      contacts_phone = #{contactsPhone,jdbcType=VARCHAR},
      seller_address = #{sellerAddress,jdbcType=VARCHAR},
      seller_email = #{sellerEmail,jdbcType=VARCHAR},
      seller_phone = #{sellerPhone,jdbcType=VARCHAR},
      seller_user_id = #{sellerUserId,jdbcType=VARCHAR},
      seller_user_name = #{sellerUserName,jdbcType=VARCHAR},
      is_send_email = #{isSendEmail,jdbcType=TINYINT},
      send_email_time = #{sendEmailTime,jdbcType=TIMESTAMP},
      date_type = #{dateType,jdbcType=TINYINT},
      start_time = #{startTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      back_account_status = #{backAccountStatus,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=VARCHAR},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=VARCHAR},
      update_user_name = #{updateUserName,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      invoice_apply_status = #{invoiceApplyStatus,jdbcType=TINYINT},
      invoice_apply_user_id = #{invoiceApplyUserId,jdbcType=VARCHAR},
      invoice_apply_time = #{invoiceApplyTime,jdbcType=TIMESTAMP},
      invoice_apply_mode_record = #{invoiceApplyModeRecord,jdbcType=TINYINT},
      accounting_order_amount = #{accountingOrderAmount,jdbcType=DECIMAL},
      accounting_order_amount_with_freight = #{accountingOrderAmountWithFreight,jdbcType=DECIMAL},
      rebate_amount = #{rebateAmount,jdbcType=DECIMAL},
      statistics_total_amount = #{statisticsTotalAmount,jdbcType=DECIMAL},
      jc_un_accounting_amount = #{jcUnAccountingAmount,jdbcType=DECIMAL},
      un_accounting_amount = #{unAccountingAmount,jdbcType=DECIMAL},
      sync_time = #{syncTime,jdbcType=TIMESTAMP},
      storage_status = #{storageStatus,jdbcType=TINYINT},
      storage_reason = #{storageReason,jdbcType=VARCHAR},
      storage_time = #{storageTime,jdbcType=TIMESTAMP},
      invoice_count = #{invoiceCount,jdbcType=INTEGER},
      receive_invoice_status = #{receiveInvoiceStatus,jdbcType=TINYINT},
      order_goods_count = #{orderGoodsCount,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>

  <resultMap id="supplierResMap" type="cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierVo">
    <id column="id" javaType="java.lang.Long" jdbcType="BIGINT" property="id" />
    <result column="unified_id" javaType="java.lang.Long" jdbcType="BIGINT" property="unifiedId" />
    <result column="dim_create_by" javaType="java.lang.Integer" jdbcType="TINYINT" property="dimCreateBy" />
    <result column="accounting_order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="accounting_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="accountingStatus" />
    <result column="invoice_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="invoiceStatus" />
    <result column="invoice_title" javaType="java.lang.String" jdbcType="VARCHAR" property="invoiceTitle" />
    <result column="invoice_type" javaType="java.lang.Integer" jdbcType="TINYINT" property="invoiceType" />
    <result column="tax_code" javaType="java.lang.String" jdbcType="VARCHAR" property="taxCode" />
    <result column="address" javaType="java.lang.String" jdbcType="VARCHAR" property="address" />
    <result column="sale_id" javaType="java.lang.String" jdbcType="VARCHAR" property="saleId" />
    <result column="sale_name" javaType="java.lang.String" jdbcType="VARCHAR" property="saleName" />
    <result column="contacts_email" javaType="java.lang.String" jdbcType="VARCHAR" property="contactsEmail" />
    <result column="contacts_full_address" javaType="java.lang.String" jdbcType="VARCHAR" property="contactsFullAddress" />
    <result column="contacts_name" javaType="java.lang.String" jdbcType="VARCHAR" property="contactsName" />
    <result column="contacts_phone" javaType="java.lang.String" jdbcType="VARCHAR" property="contactsPhone" />
    <result column="seller_address" javaType="java.lang.String" jdbcType="VARCHAR" property="sellerAddress" />
    <result column="seller_email" javaType="java.lang.String" jdbcType="VARCHAR" property="sellerEmail" />
    <result column="seller_phone" javaType="java.lang.String" jdbcType="VARCHAR" property="sellerPhone" />
    <result column="seller_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="sellerUserId" />
    <result column="seller_user_name" javaType="java.lang.String" jdbcType="VARCHAR" property="sellerUserName" />
    <result column="is_send_email" javaType="java.lang.Integer" jdbcType="TINYINT" property="isSendEmail" />
    <result column="send_email_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="sendEmailTime" />
    <result column="date_type" javaType="java.lang.Integer" jdbcType="TINYINT" property="dateType" />
    <result column="start_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="endTime" />
    <result column="back_account_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="backAccountStatus" />
    <result column="create_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="createUserId" />
    <result column="create_user_name" javaType="java.lang.String" jdbcType="VARCHAR" property="createUserName" />
    <result column="update_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="updateUserId" />
    <result column="update_user_name" javaType="java.lang.String" jdbcType="VARCHAR" property="updateUserName" />
    <result column="remark" javaType="java.lang.String" jdbcType="VARCHAR" property="remark" />
    <result column="invoice_apply_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="invoiceApplyStatus" />
    <result column="invoice_apply_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="invoiceApplyUserId" />
    <result column="invoice_apply_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="invoiceApplyTime" />
    <result column="invoice_apply_mode_record" javaType="java.lang.Integer" jdbcType="TINYINT" property="invoiceApplyModeRecord" />
    <result column="accounting_order_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="accountingOrderAmount" />
    <result column="accounting_order_amount_with_freight" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="accountingOrderAmountWithFreight" />
    <result column="rebate_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="rebateAmount" />
    <result column="statistics_total_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="statisticsTotalAmount" />
    <result column="un_accounting_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="unAccountingAmount" />
    <result column="jc_un_accounting_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="jcUnAccountingAmount" />
    <result column="sync_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="syncTime" />
    <result column="storage_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="storageStatus" />
    <result column="storage_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="storageTime" />
    <result column="invoice_count" javaType="java.lang.Integer" jdbcType="INTEGER" property="invoiceCount" />
    <collection columnPrefix="o_" property="orderSelected" resultMap="orderMap" />
  </resultMap>

  <resultMap id="orderMap" type="cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcOrderVo">
    <id column="id" javaType="java.lang.Long" jdbcType="BIGINT" property="id" />
    <result column="unified_id" javaType="java.lang.Long" jdbcType="BIGINT" property="unifiedId" />
    <result column="accounting_order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="accountingOrderSn" />
    <result column="order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="orderSn" />
    <result column="order_sn_out_trade" javaType="java.lang.String" jdbcType="VARCHAR" property="orderSnOutTrade" />
    <result column="out_snapshot_order_id" javaType="java.lang.String" jdbcType="VARCHAR" property="outSnapshotOrderId" />
    <!--    &amp;amp;lt;result column="service_name" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="service_no" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="project_id" property="" javaType="java.lang.Long" jdbcType="BIGINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="project_name" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <result column="purchase_virt_id" javaType="java.lang.String" jdbcType="VARCHAR" property="purchaseVirtId" />
    <result column="purchase_virt_name" javaType="java.lang.String" jdbcType="VARCHAR" property="purchaseVirtName" />
    <result column="purchase_department_name" javaType="java.lang.String" jdbcType="VARCHAR" property="purchaseDepartmentName" />
    <result column="purchase_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="purchaseUserId" />
    <result column="purchase_user_name" javaType="java.lang.String" jdbcType="VARCHAR" property="purchaseUserName" />
    <result column="purchase_phone" javaType="java.lang.String" jdbcType="VARCHAR" property="purchasePhone" />
    <result column="sale_id" javaType="java.lang.String" jdbcType="VARCHAR" property="supplierId" />
    <result column="sale_name" javaType="java.lang.String" jdbcType="VARCHAR" property="supplierName" />
    <result column="amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="orderAmount" />
    <result column="cost_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="orderCostAmount" />
    <result column="transport_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="transportAmount" />
    <result column="transport_merchant_assume_amount" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="transportMerchantAssumeAmount" />
    <!--    &amp;amp;lt;result column="goods_amount" property="" javaType="java.math.BigDecimal" jdbcType="DECIMAL" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="goods_cost_amount" property="" javaType="java.math.BigDecimal" jdbcType="DECIMAL" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="refund_goods_amount" property="" javaType="java.math.BigDecimal" jdbcType="DECIMAL" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="refund_goods_cost_amount" property="" javaType="java.math.BigDecimal" jdbcType="DECIMAL" /&amp;amp;gt;-->
    <result column="complet_state" javaType="java.lang.Integer" jdbcType="TINYINT" property="completState" />
    <!--    &amp;amp;lt;result column="order_locking_customer" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="order_locking_supplier" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <result column="pay_type" javaType="java.lang.Integer" jdbcType="TINYINT" property="payType" />
    <result column="pay_type_name" javaType="java.lang.String" jdbcType="VARCHAR" property="payTypeName" />
    <result column="pay_state" javaType="java.lang.Integer" jdbcType="TINYINT" property="payState" />
    <result column="pay_state_name" javaType="java.lang.String" jdbcType="VARCHAR" property="payStateName" />
    <result column="order_state" javaType="java.lang.Integer" jdbcType="TINYINT" property="orderState" />
    <result column="order_state_name" javaType="java.lang.String" jdbcType="VARCHAR" property="orderStateName" />
    <!--    &amp;amp;lt;result column="settlement_type" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="appraise_state" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="source_channel" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <result column="other_params" javaType="java.lang.String" jdbcType="VARCHAR" property="otherParams" />
    <!--    &amp;amp;lt;result column="user_type" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="user_name" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <result column="create_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="createUserId" />
    <result column="update_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="updateUserId" />
    <result column="order_type" javaType="java.lang.Integer" jdbcType="TINYINT" property="orderType" />
    <result column="refund_order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="refundOrderSn" />
    <result column="rec_user_name" javaType="java.lang.String" jdbcType="VARCHAR" property="recUserName" />
    <result column="rec_user_id" javaType="java.lang.String" jdbcType="VARCHAR" property="recUserId" />
    <result column="rec_user_phone" javaType="java.lang.String" jdbcType="VARCHAR" property="recUserPhone" />
    <result column="rec_address" javaType="java.lang.String" jdbcType="VARCHAR" property="recAddress" />
    <result column="express_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="expressSn" />
    <result column="express" javaType="java.lang.String" jdbcType="VARCHAR" property="express" />
    <result column="express_company" javaType="java.lang.String" jdbcType="VARCHAR" property="expressCompany" />
    <result column="remarks" javaType="java.lang.String" jdbcType="VARCHAR" property="remarks" />
    <!--    &amp;amp;lt;result column="accounting_state_supplier" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="accounting_state_customer" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="invoice_status" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="invoice_apply_sn" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="invoice_number" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="oper_account" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="oper_name" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <result column="pay_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="payTime" />
    <result column="send_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="sendTime" />
    <result column="finish_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="finishTime" />
    <result column="accounting_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="accountingTime" />
    <!--    &amp;amp;lt;result column="back_account_status" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <result column="sync_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="syncTime" />
    <result column="storage_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="storageStatus" />
    <result column="storage_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="storageTime" />
    <collection columnPrefix="g_" property="orderGoodsSelected" resultMap="goodsMap" />
  </resultMap>

  <resultMap id="goodsMap" type="cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcOrderGoodsVo">
    <id column="id" javaType="java.lang.Long" jdbcType="BIGINT" property="id" />
    <result column="unified_id" javaType="java.lang.Long" jdbcType="BIGINT" property="unifiedOrderGoodsId" />
    <result column="order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="orderSn" />
    <result column="goods_name" javaType="java.lang.String" jdbcType="VARCHAR" property="goodsName" />
    <result column="goods_alias" javaType="java.lang.String" jdbcType="VARCHAR" property="goodsAlias" />
    <result column="goods_id" javaType="java.lang.String" jdbcType="VARCHAR" property="goodsId" />
    <result column="out_snapshot_order_goods_id" javaType="java.lang.String" jdbcType="VARCHAR" property="outSnapshotOrderGoodsId" />
    <result column="goods_type" javaType="java.lang.Integer" jdbcType="TINYINT" property="goodsType" />
    <result column="quantity" javaType="java.lang.Integer" jdbcType="INTEGER" property="quantity" />
    <result column="unit" javaType="java.lang.String" jdbcType="VARCHAR" property="unit" />
    <result column="selling_price" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="sellingPrice" />
    <result column="cost_price" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="costPrice" />
    <!--    &amp;amp;lt;result column="fiscal_code" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="tax_code" property="" javaType="java.lang.String" jdbcType="VARCHAR" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="tax_rate" property="" javaType="java.math.BigDecimal" jdbcType="DECIMAL" /&amp;amp;gt;-->
    <result column="merch_tax_id" javaType="java.lang.String" jdbcType="VARCHAR" property="merchTaxId" />
    <result column="merch_tax_code" javaType="java.lang.String" jdbcType="VARCHAR" property="merchTaxCode" />
    <result column="merch_tax_rate" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="merchTaxRate" />
    <result column="operation_tax_id" javaType="java.lang.String" jdbcType="VARCHAR" property="operationTaxId" />
    <result column="operation_tax_code" javaType="java.lang.String" jdbcType="VARCHAR" property="operationTaxCode" />
    <result column="operation_tax_rate" javaType="java.math.BigDecimal" jdbcType="DECIMAL" property="operationTaxRate" />
    <result column="cate_id_lv1" javaType="java.lang.String" jdbcType="VARCHAR" property="cateIdLv1" />
    <result column="cate_name_lv1" javaType="java.lang.String" jdbcType="VARCHAR" property="cateNameLv1" />
    <result column="cate_id_lv2" javaType="java.lang.String" jdbcType="VARCHAR" property="cateIdLv2" />
    <result column="cate_name_lv2" javaType="java.lang.String" jdbcType="VARCHAR" property="cateNameLv2" />
    <result column="cate_id_lv3" javaType="java.lang.String" jdbcType="BIGINT" property="cateIdLv3" />
    <result column="cate_name_lv3" javaType="java.lang.String" jdbcType="VARCHAR" property="cateNameLv3" />
    <result column="self_option" javaType="java.lang.String" jdbcType="VARCHAR" property="selfOption" />
    <result column="direction" javaType="java.lang.Integer" jdbcType="TINYINT" property="direction" />
    <!--    &amp;amp;lt;result column="goods_locking_customer" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="goods_locking_supplier" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="accounting_state_customer" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="accounting_state_supplier" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="back_account_status" property="" javaType="java.lang.Integer" jdbcType="TINYINT" /&amp;amp;gt;-->
    <result column="refund_order_sn" javaType="java.lang.String" jdbcType="VARCHAR" property="refundOrderSn" />
    <!--    &amp;amp;lt;result column="create_time" property="" javaType="java.util.Date" jdbcType="TIMESTAMP" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="create_user_id" property="" javaType="java.lang.Long" jdbcType="BIGINT" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="update_time" property="" javaType="java.util.Date" jdbcType="TIMESTAMP" /&amp;amp;gt;-->
    <!--    &amp;amp;lt;result column="update_user_id" property="" javaType="java.lang.Long" jdbcType="BIGINT" /&amp;amp;gt;-->
    <result column="goods_params" javaType="java.lang.String" jdbcType="VARCHAR" property="goodsParams" />
    <result column="sync_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="syncTime" />
    <result column="storage_status" javaType="java.lang.Integer" jdbcType="TINYINT" property="storageStatus" />
    <result column="storage_time" javaType="java.util.Date" jdbcType="TIMESTAMP" property="storageTime" />
  </resultMap>
  <select id="getTodoList" resultMap="supplierResMap">
    SELECT
      t1.*,
      t2.id AS o_id,
      t2.unified_id AS o_unified_id,
      t2.supplier_accounting_order_sn AS o_accounting_order_sn,
      t2.order_sn AS o_order_sn,
      t2.order_sn_out_trade AS o_order_sn_out_trade,
      t2.out_snapshot_order_id AS o_out_snapshot_order_id,
      t2.service_name AS o_service_name,
      t2.service_no AS o_service_no,
      t2.project_id AS o_project_id,
      t2.project_name AS o_project_name,
      t2.purchase_virt_id AS o_purchase_virt_id,
      t2.purchase_virt_name AS o_purchase_virt_name,
      t2.purchase_department_name AS o_purchase_department_name,
      t2.purchase_user_id AS o_purchase_user_id,
      t2.purchase_user_name AS o_purchase_user_name,
      t2.purchase_phone AS o_purchase_phone,
      t2.sale_id AS o_sale_id,
      t2.sale_name AS o_sale_name,
      t2.amount AS o_amount,
      t2.cost_amount AS o_cost_amount,
      t2.transport_amount AS o_transport_amount,
      t2.transport_merchant_assume_amount AS o_transport_merchant_assume_amount,
      t2.goods_amount AS o_goods_amount,
      t2.goods_cost_amount AS o_goods_cost_amount,
      t2.refund_goods_amount AS o_refund_goods_amount,
      t2.refund_goods_cost_amount AS o_refund_goods_cost_amount,
      t2.complet_state AS o_complet_state,
      t2.order_locking_customer AS o_order_locking_customer,
      t2.order_locking_supplier AS o_order_locking_supplier,
      t2.pay_type AS o_pay_type,
      t2.pay_type_name AS o_pay_type_name,
      t2.pay_state AS o_pay_state,
      t2.pay_state_name AS o_pay_state_name,
      t2.order_state AS o_order_state,
      t2.order_state_name AS o_order_state_name,
      t2.settlement_type AS o_settlement_type,
      t2.appraise_state AS o_appraise_state,
      t2.source_channel AS o_source_channel,
      t2.other_params AS o_other_params,
      t2.user_type AS o_user_type,
      t2.user_name AS o_user_name,
      t2.create_time AS o_create_time,
      t2.create_user_id AS o_create_user_id,
      t2.update_time AS o_update_time,
      t2.update_user_id AS o_update_user_id,
      t2.order_type AS o_order_type,
      t2.refund_order_sn AS o_refund_order_sn,
      t2.rec_user_name AS o_rec_user_name,
      t2.rec_user_id AS o_rec_user_id,
      t2.rec_user_phone AS o_rec_user_phone,
      t2.rec_address AS o_rec_address,
      t2.express_sn AS o_express_sn,
      t2.express AS o_express,
      t2.express_company AS o_express_company,
      t2.remarks AS o_remarks,
      t2.accounting_state_supplier AS o_accounting_state_supplier,
      t2.accounting_state_customer AS o_accounting_state_customer,
      t2.invoice_status AS o_invoice_status,
      t2.invoice_apply_sn AS o_invoice_apply_sn,
      t2.invoice_number AS o_invoice_number,
      t2.oper_account AS o_oper_account,
      t2.oper_name AS o_oper_name,
      t2.pay_time AS o_pay_time,
      t2.send_time AS o_send_time,
      t2.finish_time AS o_finish_time,
      t2.accounting_time AS o_accounting_time,
      t2.back_account_status AS o_back_account_status,
      t2.sync_time AS o_sync_time,
      t2.storage_status AS o_storage_status,
      t2.storage_time AS o_storage_time,
      t3.id as o_g_id,
      t3.unified_id as o_g_unified_id,
      t3.order_sn as o_g_order_sn,
      t3.goods_name as o_g_goods_name,
      t3.goods_alias as o_g_goods_alias,
      t3.goods_id as o_g_goods_id,
      t3.out_snapshot_order_goods_id as o_g_out_snapshot_order_goods_id,
      t3.goods_type as o_g_goods_type,
      t3.quantity as o_g_quantity,
      t3.unit as o_g_unit,
      t3.selling_price as o_g_selling_price,
      t3.cost_price as o_g_cost_price,
      t3.fiscal_code as o_g_fiscal_code,
      t3.tax_code as o_g_tax_code,
      t3.tax_rate as o_g_tax_rate,
      t3.merch_tax_id as o_g_merch_tax_id,
      t3.merch_tax_code as o_g_merch_tax_code,
      t3.merch_tax_rate as o_g_merch_tax_rate,
      t3.operation_tax_id as o_g_operation_tax_id,
      t3.operation_tax_code as o_g_operation_tax_code,
      t3.operation_tax_rate as o_g_operation_tax_rate,
      t3.cate_id_lv1 as o_g_cate_id_lv1,
      t3.cate_name_lv1 as o_g_cate_name_lv1,
      t3.cate_id_lv2 as o_g_cate_id_lv2,
      t3.cate_name_lv2 as o_g_cate_name_lv2,
      t3.cate_id_lv3 as o_g_cate_id_lv3,
      t3.cate_name_lv3 as o_g_cate_name_lv3,
      t3.self_option as o_g_self_option,
      t3.direction as o_g_direction,
      t3.goods_locking_customer as o_g_goods_locking_customer,
      t3.goods_locking_supplier as o_g_goods_locking_supplier,
      t3.accounting_state_customer as o_g_accounting_state_customer,
      t3.accounting_state_supplier as o_g_accounting_state_supplier,
      t3.back_account_status as o_g_back_account_status,
      t3.refund_order_sn as o_g_refund_order_sn,
      t3.create_time as o_g_create_time,
      t3.create_user_id as o_g_create_user_id,
      t3.update_time as o_g_update_time,
      t3.update_user_id as o_g_update_user_id,
      t3.goods_params as o_g_goods_params,
      t3.sync_time as o_g_sync_time,
      t3.storage_status as o_g_storage_status,
      t3.storage_time as o_g_storage_time
    FROM
      qchjc_accounting_unified_supplier t1
        LEFT JOIN qchjc_order t2 ON t1.accounting_order_sn = t2.supplier_accounting_order_sn
        LEFT JOIN qchjc_order_goods t3 ON t2.order_sn = t3.order_sn
    WHERE
      t1.storage_status = 0 and t1.id = #{id} and t3.supplier_accounting_order_sn is not null
  </select>
  <select id="selectByAccountingOrderSn" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from qchjc_accounting_unified_supplier
    where accounting_order_sn = #{accountingOrderSn}
  </select>
  <select id="queryQchjcCustomerStatementList" resultType="cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierVo">
    SELECT
      id,
      unified_id AS unifiedId,
      storage_time AS storageTime,
      storage_status AS storageStatus,
      accounting_order_sn AS accountingOrderSn,
      sale_id AS saleId,
      sale_name AS saleName,
      create_user_name AS applyUserName,
      accounting_order_amount AS accountingAmount,
      statistics_total_amount AS statisticsTotalAmount,
      rebate_amount AS rebateAmount,
      concat( DATE_FORMAT(start_time,'%Y-%m-%d'), '~', DATE_FORMAT(end_time,'%Y-%m-%d') ) AS billCycle,
      accounting_status AS accountingStatus,
      invoice_status AS invoiceStatus,
      receive_invoice_status AS receiveInvoiceStatus,
      back_account_status AS backAccountStatus,
      remark,
      case storage_status when 0 then '' when 1 then '入库成功' else IF ( LENGTH( storage_reason ) &lt; 100, storage_reason, '入库失败：请联系技术人员排查问题' )end as storageReason,
      create_user_name AS createUserName,
      create_time AS createTime,
      update_user_name AS updateUserName,
      update_time AS updateTime
    FROM
      qchjc_accounting_unified_supplier
    WHERE
      1 = 1
    <if test="accountingOrderSn != null and accountingOrderSn != ''">
      and accounting_order_sn = #{accountingOrderSn}
    </if>
    <if test="supplierName != null and supplierName != ''">
      and sale_name = #{supplierName}
    </if>
    <if test="applyUserName != null and applyUserName != ''">
      and create_user_name like concat('%',#{applyUserName},'%')
    </if>
    <if test="createUserName != null and createUserName != ''">
      and create_user_name like concat('%',#{createUserName},'%')
    </if>
    <if test="updateUserName != null and updateUserName != ''">
      and update_user_name like concat('%',#{updateUserName},'%')
    </if>
    <if test="storageStatus != null">
      and storage_status = #{storageStatus}
    </if>
    <if test="accountingStatus != null">
      and accounting_status = #{accountingStatus}
    </if>
    <if test="invoiceStatus != null">
      and invoice_status = #{invoiceStatus}
    </if>
    <if test="receiveInvoiceStatus != null">
      and receive_invoice_status = #{receiveInvoiceStatus}
    </if>
    <if test="backAccountStatus != null">
      and back_account_status = #{backAccountStatus}
    </if>
    <if test="storageStartTime != null and storageStartTime != ''">
      and storage_time &gt; concat(#{storageStartTime}, ' 00:00:00')
    </if>
    <if test="storageEndTime != null and storageEndTime != ''">
      and storage_time &lt; concat(#{storageEndTime}, ' 23:59:59')
    </if>
    <if test="createStartTime != null and createStartTime != ''">
      and create_time &gt; concat(#{createStartTime}, ' 00:00:00')
    </if>
    <if test="createEndTime != null and createEndTime != ''">
      and create_time &lt; concat(#{createEndTime}, ' 23:59:59')
    </if>
    ORDER BY
      create_time DESC
  </select>
  <select id="queryQchjcSupplierStatementVoById" resultType="cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcAccountingUnifiedSupplierVo">
    SELECT
      t1.accounting_order_sn AS accountingOrderSn,
      t1.storage_status AS storageStatus,
      t1.storage_time AS storageTime,
      t1.sale_name AS saleName,
      t1.accounting_order_amount AS accountingOrderAmount,
      t1.statistics_total_amount AS statisticsTotalAmount,
      t1.order_goods_count AS orderCount,
      t1.accounting_status AS accountingStatus,
      concat( DATE_FORMAT( t1.start_time, '%Y-%m-%d' ), '~', DATE_FORMAT( t1.end_time, '%Y-%m-%d' ) ) AS billCycle,
      t1.invoice_status AS invoiceStatus,
      t1.receive_invoice_status AS receiveInvoiceStatus,
      t1.back_account_status AS backAccountStatus,
      t1.remark,
      t1.create_user_name AS createUserName,
      t1.create_time AS createTime,
      t1.update_user_name AS updateUserName,
      t1.update_time AS updateTime
    FROM
      qchjc_accounting_unified_supplier t1
    WHERE
      t1.id = #{id}
  </select>
  <select id="getTodoIdList" resultType="java.lang.Long">
    SELECT
      id
    FROM
      qchjc_accounting_unified_supplier
    WHERE
      storage_status = 0
  </select>
</mapper>