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.
73 lines
3.5 KiB
73 lines
3.5 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.core.dao.JxsemxbbDao">
|
|
|
|
<resultMap id="BaseResultMap"
|
|
type="com.dxhy.core.model.JxsemxbbRespVO">
|
|
<result column="totalAmount" property="totalAmount"/>
|
|
<result column="totalTax" property="totalTax"/>
|
|
<result column="amount17" property="amount17"/>
|
|
<result column="tax17" property="tax17"/>
|
|
<result column="amount13" property="amount13"/>
|
|
<result column="tax13" property="tax13"/>
|
|
<result column="amount10" property="amount10"/>
|
|
<result column="tax10" property="tax10"/>
|
|
<result column="amount6" property="amount6"/>
|
|
<result column="tax6" property="tax6"/>
|
|
<result column="amount5" property="amount5"/>
|
|
<result column="tax5" property="tax5"/>
|
|
<result column="amount3" property="amount3"/>
|
|
<result column="tax3" property="tax3"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="nameResultMap"
|
|
type="com.dxhy.core.model.JxsemxbbRespVO">
|
|
<result column="gfmc" property="gfmc"/>
|
|
</resultMap>
|
|
|
|
<select id="selectname" parameterType="java.util.Map"
|
|
resultMap="nameResultMap">
|
|
select DISTINCT t.gf_name gfmc
|
|
from t_dx_record_invoice t
|
|
<if test="gfsh != null and gfsh != '' and gfsh != 'null' and gfsh != '99' ">
|
|
where t.gf_tax_no = #{gfsh}
|
|
</if>
|
|
<if test="company!=null and company!=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
</select>
|
|
<select id="selectzp" parameterType="java.util.Map"
|
|
resultMap="BaseResultMap">
|
|
select
|
|
sum(case WHEN b.tax_rate in("17","16","13","10","11","6","5","3") then t.invoice_amount else null end)
|
|
totalAmount,
|
|
sum(case WHEN b.tax_rate in("17","16","13","10","11","6","5","3") then t.tax_amount else null end) totalTax,
|
|
sum(case WHEN b.tax_rate in("17","16") then t.invoice_amount else null end) amount17,
|
|
sum(case WHEN b.tax_rate in("17","16") then t.tax_amount else null end) tax17,
|
|
sum(case WHEN b.tax_rate in("13") then t.invoice_amount else null end) amount13,
|
|
sum(case WHEN b.tax_rate in("13") then t.tax_amount else null end) tax13,
|
|
sum(case WHEN b.tax_rate in("10","11") then t.invoice_amount else null end) amount10,
|
|
sum(case WHEN b.tax_rate in("10","11") then t.tax_amount else null end) tax10,
|
|
sum(case WHEN b.tax_rate in("6") then t.invoice_amount else null end) amount6,
|
|
sum(case WHEN b.tax_rate in("6") then t.tax_amount else null end) tax6,
|
|
sum(case WHEN b.tax_rate in("5") then t.invoice_amount else null end) amount5,
|
|
sum(case WHEN b.tax_rate in("5") then t.tax_amount else null end) tax5,
|
|
sum(case WHEN b.tax_rate in("3") then t.invoice_amount else null end) amount3,
|
|
sum(case WHEN b.tax_rate in("3") then t.tax_amount else null end) tax3
|
|
from t_dx_record_invoice t, t_dx_record_invoice_detail b
|
|
where t.uuid = b.uuid
|
|
<if test="gfsh != null and gfsh != '' and gfsh != 'null' and gfsh != '99' ">
|
|
and t.gf_tax_no = #{gfsh}
|
|
</if>
|
|
<if
|
|
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
|
|
and t.rzh_belong_date = #{skssq}
|
|
</if>
|
|
<if test="company!=null and company!=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
|