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.
138 lines
5.3 KiB
138 lines
5.3 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.FprzybDao">
|
|
|
|
<resultMap id="FprzybResultMap" type="com.dxhy.core.model.FprzybRespVO">
|
|
<result column="skssq" property="skssq"/>
|
|
<result column="fpsl" property="fpsl"/>
|
|
<result column="hjje" property="hjje"/>
|
|
<result column="hjse" property="hjse"/>
|
|
<result column="dkse" property="dkse"/>
|
|
</resultMap>
|
|
<select id="selectByGfshAndRznf" parameterType="java.util.Map"
|
|
resultMap="FprzybResultMap" databaseId="mysql">
|
|
select
|
|
right (t.rzh_belong_date,2) rzDate,
|
|
t.rzh_belong_date skssq,
|
|
COUNT(t.id ) as fpsl,
|
|
sum(invoice_amount) as hjje,
|
|
sum(tax_amount) as hjse ,
|
|
sum(dk_tax_amount) as dkse
|
|
from t_dx_record_invoice t
|
|
where
|
|
t.invoice_type in ('01','03','08','14','31')
|
|
and t.auth_status = '4' <!--and rzh_yesorno='1'-->
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
|
|
<if test="rznf != null and rznf != '' and rznf != 'null' and rznf != '99' ">
|
|
and LEFT(rzh_belong_date,4) = #{rznf}
|
|
</if>
|
|
<if test="company!=null and company !=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
<if test="dklx!=null and dklx!=''">
|
|
and t.rzh_yesorno=#{dklx}
|
|
</if>
|
|
GROUP BY t.rzh_belong_date ORDER by t.rzh_belong_date
|
|
</select>
|
|
|
|
<select id="selectRzfphzByRznf" parameterType="java.util.Map"
|
|
resultMap="FprzybResultMap" databaseId="mysql">
|
|
select
|
|
right (t.rzh_belong_date,2) rzDate,
|
|
t.rzh_belong_date skssq,
|
|
COUNT(t.id ) as fpsl,
|
|
sum(invoice_amount) as hjje,
|
|
sum(tax_amount) as hjse ,
|
|
sum(dk_tax_amount) as dkse
|
|
from t_dx_record_invoice t
|
|
where
|
|
t.auth_status = '4' and
|
|
<!--t.rzh_yesorno = '1'and-->
|
|
t.invoice_type in ('01','03','08','14','31')
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="rznf != null and rznf != '' and rznf != 'null' and rznf != '99' ">
|
|
and LEFT(rzh_belong_date,4) = #{rznf}
|
|
</if>
|
|
<if test="company !=null and company !=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
<if test="dklx!=null and dklx!=''">
|
|
and t.rzh_yesorno =#{dklx}
|
|
</if>
|
|
GROUP BY t.rzh_belong_date ORDER by t.rzh_belong_date
|
|
</select>
|
|
|
|
<select id="selectByGfshAndRznf" parameterType="java.util.Map"
|
|
resultMap="FprzybResultMap" databaseId="oracle">
|
|
select
|
|
SUBSTR (t.rzh_belong_date,5) rzDate,
|
|
t.rzh_belong_date skssq,
|
|
COUNT(t.id ) as fpsl,
|
|
sum(invoice_amount) as hjje,
|
|
sum(tax_amount) as hjse ,
|
|
sum(dk_tax_amount) as dkse
|
|
from t_dx_record_invoice t
|
|
where
|
|
t.invoice_type in ('01','03','08','14','31')
|
|
and t.auth_status = '4' <!--and rzh_yesorno='1'-->
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
|
|
<if test="rznf != null and rznf != '' and rznf != 'null' and rznf != '99' ">
|
|
and SUBSTR (t.rzh_belong_date,0,LENGTH(t.rzh_belong_date) - 2) = #{rznf}
|
|
</if>
|
|
<if test="company!=null and company !=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
<if test="dklx!=null and dklx!=''">
|
|
and t.rzh_yesorno=#{dklx}
|
|
</if>
|
|
GROUP BY t.rzh_belong_date,SUBSTR (t.rzh_belong_date,5) ORDER by t.rzh_belong_date
|
|
</select>
|
|
|
|
<select id="selectRzfphzByRznf" parameterType="java.util.Map"
|
|
resultMap="FprzybResultMap" databaseId="oracle">
|
|
select
|
|
SUBSTR (t.rzh_belong_date,5) rzDate,
|
|
t.rzh_belong_date skssq,
|
|
COUNT(t.id ) as fpsl,
|
|
sum(invoice_amount) as hjje,
|
|
sum(tax_amount) as hjse ,
|
|
sum(dk_tax_amount) as dkse
|
|
from t_dx_record_invoice t
|
|
where
|
|
<!--t.rzh_yesorno = '1' and-->
|
|
t.auth_status = '4' and
|
|
t.invoice_type in ('01','03','08','14','31')
|
|
and t.gf_tax_no in
|
|
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
<if test="rznf != null and rznf != '' and rznf != 'null' and rznf != '99' ">
|
|
and SUBSTR (t.rzh_belong_date,0,LENGTH(t.rzh_belong_date) - 2) = #{rznf}
|
|
</if>
|
|
<if test="company !=null and company !=''">
|
|
and t.company = #{company}
|
|
</if>
|
|
<if test="dklx!=null and dklx!=''">
|
|
and t.rzh_yesorno =#{dklx}
|
|
</if>
|
|
GROUP BY t.rzh_belong_date,SUBSTR (t.rzh_belong_date,5) ORDER by t.rzh_belong_date
|
|
</select>
|
|
|
|
<select id="selectTaxList" resultType="com.dxhy.core.job.entity.TDxTaxCurrent">
|
|
select * from t_dx_tax_current where taxno in
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</select>
|
|
</mapper> |