<?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.lexmis.dao.impl.LexmiscivBusinvoiceDaoImpl">
	<resultMap id="get-LexmiscivBusinvoiceEntity-result" type="com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivBusinvoiceEntity">
		<!--无备注 -->
		<result property="BI_ID" column="BI_ID" />
		<!--无备注 -->
		<result property="BI_FPDM" column="BI_FPDM" />
		<!--无备注 -->
		<result property="BI_FPHM" column="BI_FPHM" />
		<!--无备注 -->
		<result property="BI_NO" column="BI_NO" />
		<!--无备注 -->
		<result property="BI_SEAT" column="BI_SEAT" />
		<!--无备注 -->
		<result property="BI_FSTATION" column="BI_FSTATION" />
		<!--无备注 -->
		<result property="BI_TSTATION" column="BI_TSTATION" />
		<!--无备注 -->
		<result property="BI_DATE" column="BI_DATE" />
		<!--无备注 -->
		<result property="BI_TIME" column="BI_TIME" />
		<!--无备注 -->
		<result property="BI_TOTALAMOUNT" column="BI_TOTALAMOUNT" />
		<!--无备注 -->
		<result property="BI_USERNAME" column="BI_USERNAME" />
		<!--无备注 -->
		<result property="BI_USERID" column="BI_USERID" />
		<!--无备注 -->
		<result property="BI_TAXRATE" column="BI_TAXRATE" />
		<!--无备注 -->
		<result property="BI_TAXAMOUNT" column="BI_TAXAMOUNT" />
		<!--无备注 -->
		<result property="BI_NOTAXAMOUNT" column="BI_NOTAXAMOUNT" />
		<!--无备注 -->
		<result property="BI_AREACODE" column="BI_AREACODE" />
		<!--无备注 -->
		<result property="BI_AREANAME" column="BI_AREANAME" />
		<!--无备注 -->
		<result property="BI_KEY" column="BI_KEY" />
		<!--无备注 -->
		<result property="BI_COUNT" column="BI_COUNT" />
		<!--无备注 -->
		<result property="BI_DATETIME" column="BI_DATETIME" />
		<!--无备注 -->
		<result property="BI_EDATETIME" column="BI_EDATETIME" />
	</resultMap>

	<sql id="LexmiscivBusinvoiceEntity_Base_Column_List">
		BI_ID,
		BI_FPDM,
		BI_FPHM,
		BI_NO,
		BI_SEAT,
		BI_FSTATION,
		BI_TSTATION,
		BI_DATE,
		BI_TIME,
		BI_TOTALAMOUNT,
		BI_USERNAME,
		BI_USERID,
		BI_TAXRATE,
		BI_TAXAMOUNT,
		BI_NOTAXAMOUNT,
		BI_AREACODE,
		BI_AREANAME,
		BI_KEY,
		BI_COUNT,
		BI_DATETIME,
		BI_EDATETIME
	</sql>

	<!--通过ID获取数据 -->
	<select id="entity_get" resultMap="get-LexmiscivBusinvoiceEntity-result">
		select
		<include refid="LexmiscivBusinvoiceEntity_Base_Column_List" />
		from lexmisciv_businvoice where BI_ID = #{BI_ID}
	</select>

	<!-- 查询 采用==查询 -->
	<select id="entity_list_base" resultMap="get-LexmiscivBusinvoiceEntity-result" parameterType="com.hzya.frame.plugin.cinvoice.lexmis.entity.LexmiscivBusinvoiceEntity">
		select
		<include refid="LexmiscivBusinvoiceEntity_Base_Column_List" />
		from lexmisciv_businvoice
		<trim prefix="where" prefixOverrides="and">
			<if test="BI_ID != null ">BI_ID=#{BI_ID}</if>
			<if test="BI_FPDM != null and BI_FPDM !='' "> and BI_FPDM = #{BI_FPDM}</if>
			<if test="BI_FPHM != null and BI_FPHM !='' "> and BI_FPHM = #{BI_FPHM}</if>
			<if test="BI_NO != null and BI_NO !='' "> and BI_NO = #{BI_NO}</if>
			<if test="BI_SEAT != null and BI_SEAT !='' "> and BI_SEAT = #{BI_SEAT}</if>
			<if test="BI_FSTATION != null and BI_FSTATION !='' "> and BI_FSTATION = #{BI_FSTATION}</if>
			<if test="BI_TSTATION != null and BI_TSTATION !='' "> and BI_TSTATION = #{BI_TSTATION}</if>
			<if test="BI_DATE != null "> and BI_DATE = #{BI_DATE}</if>
			<if test="BI_TIME != null and BI_TIME !='' "> and BI_TIME = #{BI_TIME}</if>
			<if test="BI_TOTALAMOUNT != null "> and BI_TOTALAMOUNT = #{BI_TOTALAMOUNT}</if>
			<if test="BI_USERNAME != null and BI_USERNAME !='' "> and BI_USERNAME = #{BI_USERNAME}</if>
			<if test="BI_USERID != null and BI_USERID !='' "> and BI_USERID = #{BI_USERID}</if>
			<if test="BI_TAXRATE != null and BI_TAXRATE !='' "> and BI_TAXRATE = #{BI_TAXRATE}</if>
			<if test="BI_TAXAMOUNT != null "> and BI_TAXAMOUNT = #{BI_TAXAMOUNT}</if>
			<if test="BI_NOTAXAMOUNT != null "> and BI_NOTAXAMOUNT = #{BI_NOTAXAMOUNT}</if>
			<if test="BI_AREACODE != null and BI_AREACODE !='' "> and BI_AREACODE = #{BI_AREACODE}</if>
			<if test="BI_AREANAME != null and BI_AREANAME !='' "> and BI_AREANAME = #{BI_AREANAME}</if>
			<if test="BI_KEY != null and BI_KEY !='' "> and BI_KEY = #{BI_KEY}</if>
			<if test="BI_COUNT != null "> and BI_COUNT = #{BI_COUNT}</if>
			<if test="BI_DATETIME != null and BI_DATETIME !='' "> and BI_DATETIME = #{BI_DATETIME}</if>
			<if test="BI_EDATETIME != null and BI_EDATETIME !='' "> and BI_EDATETIME = #{BI_EDATETIME}</if>

		</trim>

	</select>

</mapper>
