<?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.hzya.frame.plugin.cinvoice.dao.impl.CInvoiceImportBDaoImpl">
    <resultMap id="get-CInvoiceImportBEntity-result" type="com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity">
        <result property="id" column="id" />

    </resultMap>

    <select id="entity_list_base" resultMap="get-CInvoiceImportBEntity-result" parameterType="com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportBEntity">
        SELECT id,
        formmain_id,
        'formmain_0327' as formmain_tab_name,-- 对公付款单
        field0171 as cinvoice_number,
        field0172 as cinvoice_code,
        field0188 as cinvoice_type,
        field0315 as cinvoice_date,
        field0172 as cinvoice_amount
        from formson_0317
        <trim prefix="where" prefixOverrides="and">
            <if test="id != null and id != ''">id = #{id}</if>
            <if test="formmain_id != null and formmain_id != ''">and formmain_id = #{formmain_id}</if>
            <if test="formmain_tab_name != null and formmain_tab_name != ''">and formmain_tab_name = #{formmain_tab_name}</if>

        </trim>
    </select>
</mapper>
