<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dxhy.core.dao.InvoiceDetailDao">

    <resultMap id="BaseResultMap"
               type="com.dxhy.core.model.BbfpzhmxcxRespVO">
        <result column="invoice_code" property="invoiceCode"/>
        <result column="invoice_no" property="invoiceNo"/>
        <result column="kprq" property="invoiceDate"/>
        <result column="invoice_type" property="invoiceType"/>
        <result column="gfsh" property="gfsh"/>
        <result column="gfmc" property="gfmc"/>
        <result column="gfdzdh" property="gfdzdh"/>
        <result column="gfkhhzh" property="gfkhhzh"/>
        <result column="xfsh" property="xfsh"/>
        <result column="xfmc" property="xfmc"/>
        <result column="xfdzdh" property="xfdzdh"/>
        <result column="xfkhhzh" property="xfkhhzh"/>
        <result column="invoice_amount" property="invoiceAmount"/>
        <result column="tax_amount" property="taxAmount"/>
        <result column="jshj" property="jshj"/>
        <result column="hlmc" property="hlmc"/>
        <result column="ggxh" property="ggxh"/>
        <result column="dw" property="dw"/>
        <result column="num" property="num"/>
        <result column="dj" property="dj"/>
        <result column="je" property="je"/>
        <result column="se" property="se"/>
        <result column="sl" property="sl"/>
        <result column="bz" property="bz"/>
    </resultMap>

    <select id="fpcxSelectInvoiceDetails" parameterType="java.util.Map"
            resultMap="BaseResultMap" databaseId="mysql">
        select b.goods_name    hlmc,
               b.model         ggxh,
               b.unit          dw,
               b.num           num,
               b.unit_price    dj,
               b.detail_amount je,
               b.tax_amount    se,
               b.tax_rate      sl
        from t_dx_record_invoice_detail b
        WHERE b.uuid = #{uuid}
    </select>
    <select id="fpcxSelectInvoiceDetails" parameterType="java.util.Map"
            resultMap="BaseResultMap" databaseId="oracle">
        select b.goods_name    hlmc,
               b.model         ggxh,
               b.unit          dw,
               b.num           num,
               b.unit_price    dj,
               b.detail_amount je,
               b.tax_amount    se,
               b.tax_rate      sl,
        from t_dx_record_invoice_detail b
        WHERE b.uuid = #{uuid}
    </select>

</mapper>
