You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
5.6 KiB
137 lines
5.6 KiB
<?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.extend.dao.ExtBbyqfpDao">
|
|
|
|
<resultMap id="BaseResultMap"
|
|
type="com.dxhy.extend.model.ExtBbyqfpRespVO">
|
|
<result column="invoice_code" property="invoiceCode"/>
|
|
<result column="invoice_no" property="invoiceNo"/>
|
|
<result column="kprq" property="invoiceDate"/>
|
|
<result column="invoiceType" property="invoiceType"/>
|
|
<result column="gfsh" property="gfsh"/>
|
|
<result column="gfmc" property="gfmc"/>
|
|
<result column="xfsh" property="xfsh"/>
|
|
<result column="xfmc" property="xfmc"/>
|
|
<result column="je" property="invoiceAmount"/>
|
|
<result column="se" property="taxAmount"/>
|
|
<result column="dkAmount" property="dkAmount"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="YqfpcxhjResultMap"
|
|
type="com.dxhy.extend.model.ExtBbyqfpRespVO">
|
|
<result column="hjsl" property="id"/>
|
|
<result column="hjje" property="invoiceAmount"/>
|
|
<result column="hjse" property="taxAmount"/>
|
|
</resultMap>
|
|
|
|
<select id="selectByPramsMap" parameterType="java.util.Map"
|
|
resultMap="BaseResultMap" databaseId="mysql">
|
|
select
|
|
t.invoice_code,t.invoice_no,DATE_FORMAT(t.invoice_date,'%Y-%m-%d')
|
|
kprq,t.gf_tax_no gfsh,t.gf_name gfmc,
|
|
t.xf_tax_no xfsh,t.xf_name
|
|
xfmc,t.tax_amount se,t.invoice_amount je ,t.dk_tax_amount dkAmount , t.invoice_type invoiceType
|
|
from t_dx_record_invoice t,t_dx_tax_current c
|
|
WHERE t.invoice_amount > 0
|
|
and t.gf_tax_no = c.taxno
|
|
and DATE_FORMAT(t.invoice_date,'%Y%m%d') < c.select_start_date
|
|
and t.invoice_status = '0'
|
|
and t.rzh_yesorno = '0'
|
|
and t.invoice_type in ('01','03','14')
|
|
and t.company = #{company}
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
|
|
and t.xf_name like CONCAT(#{xfmc},'%')
|
|
</if>
|
|
<if
|
|
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
|
|
and t.invoice_no = #{invoiceNo}
|
|
</if>
|
|
|
|
order by t.invoice_date desc
|
|
</select>
|
|
<select id="selectByPramsMap" parameterType="java.util.Map"
|
|
resultMap="BaseResultMap" databaseId="oracle">
|
|
select
|
|
t.invoice_code,t.invoice_no,to_char(t.invoice_date,'yyyy-mm-dd')
|
|
kprq,t.gf_tax_no gfsh,t.gf_name gfmc,
|
|
t.xf_tax_no xfsh,t.xf_name
|
|
xfmc,t.tax_amount se,t.invoice_amount je,t.dk_tax_amount dkAmount , t.invoice_type invoiceType
|
|
from t_dx_record_invoice t,t_dx_tax_current c
|
|
WHERE t.invoice_amount > 0
|
|
and t.gf_tax_no = c.taxno
|
|
and to_char(t.invoice_date,'yyyyMMdd') < c.select_start_date
|
|
and t.invoice_status = '0'
|
|
and t.rzh_yesorno = '0'
|
|
and t.invoice_type in ('01','03','14')
|
|
and t.company = #{company}
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
|
|
and t.xf_name like CONCAT(#{xfmc},'%')
|
|
</if>
|
|
<if
|
|
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
|
|
and t.invoice_no = #{invoiceNo}
|
|
</if>
|
|
|
|
order by t.invoice_date desc
|
|
</select>
|
|
|
|
<select id="selectBbyqfpHj" parameterType="java.util.Map"
|
|
resultMap="YqfpcxhjResultMap" databaseId="mysql">
|
|
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
|
|
from t_dx_record_invoice t,t_dx_tax_current c
|
|
where t.invoice_amount > 0
|
|
and t.gf_tax_no = c.taxno
|
|
and DATE_FORMAT(t.invoice_date,'%Y%m%d') < c.select_start_date
|
|
and t.invoice_status = '0'
|
|
and t.rzh_yesorno = '0'
|
|
and t.invoice_type in ('01','03','14')
|
|
and t.company = #{company}
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
|
|
and t.xf_name like CONCAT(#{xfmc},'%')
|
|
</if>
|
|
<if
|
|
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
|
|
and t.invoice_no = #{invoiceNo}
|
|
</if>
|
|
|
|
</select>
|
|
<select id="selectBbyqfpHj" parameterType="java.util.Map"
|
|
resultMap="YqfpcxhjResultMap" databaseId="oracle">
|
|
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
|
|
from t_dx_record_invoice t,t_dx_tax_current c
|
|
where t.invoice_amount > 0
|
|
and t.gf_tax_no = c.taxno
|
|
and to_char(t.invoice_date,'yyyyMMdd') < c.select_start_date
|
|
and t.invoice_status = '0'
|
|
and t.rzh_yesorno = '0'
|
|
and t.invoice_type in ('01','03','14')
|
|
and t.company = #{company}
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
|
|
and t.xf_name like CONCAT(#{xfmc},'%')
|
|
</if>
|
|
<if
|
|
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
|
|
and t.invoice_no = #{invoiceNo}
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
|