|
|
@ -12,7 +12,7 @@ |
|
|
|
<select id="getResult" resultMap="reportResultMap" databaseId="mysql"> |
|
|
|
<select id="getResult" resultMap="reportResultMap" databaseId="mysql"> |
|
|
|
select count(1) totalCount, ifnull(sum(invoice_amount), 0) totalAmount, ifnull(sum(dk_tax_amount), 0) totalTax |
|
|
|
select count(1) totalCount, ifnull(sum(invoice_amount), 0) totalAmount, ifnull(sum(dk_tax_amount), 0) totalTax |
|
|
|
FROM t_dx_record_invoice |
|
|
|
FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14') AND invoice_status='0' AND rzh_yesorno='1' |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31','283','161','183','185') AND invoice_status='0' AND rzh_yesorno='1' |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and rzh_belong_date = #{skssq} |
|
|
|
and rzh_belong_date = #{skssq} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -72,7 +72,7 @@ |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="getTotalOutTax" resultType="Double" databaseId="mysql"> |
|
|
|
<select id="getTotalOutTax" resultType="Double" databaseId="mysql"> |
|
|
|
SELECT ifnull(sum(out_tax_amount), 0) FROM t_dx_record_invoice |
|
|
|
SELECT ifnull(sum(out_tax_amount), 0) FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14') AND invoice_status='0' AND rzh_yesorno='1' AND |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31','283','161','183','185') AND invoice_status='0' AND rzh_yesorno='1' AND |
|
|
|
out_status in ('1','2') |
|
|
|
out_status in ('1','2') |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
and out_belong_date = #{skssq} |
|
|
@ -91,7 +91,7 @@ |
|
|
|
out_reason rzhDate, |
|
|
|
out_reason rzhDate, |
|
|
|
ifnull(sum(out_tax_amount), 0) tax |
|
|
|
ifnull(sum(out_tax_amount), 0) tax |
|
|
|
FROM t_dx_record_invoice |
|
|
|
FROM t_dx_record_invoice |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14') AND invoice_status='0' AND rzh_yesorno='1' AND |
|
|
|
WHERE valid='1' and invoice_type in ('01','03','08','14','31','283','161','183','185') AND invoice_status='0' AND rzh_yesorno='1' AND |
|
|
|
out_status in ('1','2') |
|
|
|
out_status in ('1','2') |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
<if test="skssq !=null and skssq != ''"> |
|
|
|
and out_belong_date = #{skssq} |
|
|
|
and out_belong_date = #{skssq} |
|
|
|