|
|
|
@ -64,7 +64,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
@ -110,7 +110,7 @@ |
|
|
|
|
and t.payment_status = #{paymentStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -171,6 +171,18 @@ |
|
|
|
|
<if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''"> |
|
|
|
|
order by t.invoice_date desc |
|
|
|
|
</if> |
|
|
|
|
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'"> |
|
|
|
|
and t.sn_voucher_number = #{snVoucherNumber} |
|
|
|
|
</if> |
|
|
|
|
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'"> |
|
|
|
|
and t.postingTime = #{postingTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'"> |
|
|
|
|
and t.image_id = #{imageId} |
|
|
|
|
</if> |
|
|
|
|
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'"> |
|
|
|
|
and t.account_period = #{accountPeriod} |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
<select id="selectDksh" parameterType="java.util.Map" |
|
|
|
|
resultType="com.dxhy.base.entity.BaseTDxDkCount" |
|
|
|
@ -199,7 +211,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
@ -245,7 +257,7 @@ |
|
|
|
|
and t.payment_status = #{paymentStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -323,6 +335,18 @@ |
|
|
|
|
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'"> |
|
|
|
|
and t.ele_invoice_no = #{eleInvoiceNo} |
|
|
|
|
</if> |
|
|
|
|
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'"> |
|
|
|
|
and t.sn_voucher_number = #{snVoucherNumber} |
|
|
|
|
</if> |
|
|
|
|
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'"> |
|
|
|
|
and t.postingTime = #{postingTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'"> |
|
|
|
|
and t.image_id = #{imageId} |
|
|
|
|
</if> |
|
|
|
|
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'"> |
|
|
|
|
and t.account_period = #{accountPeriod} |
|
|
|
|
</if> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="selectHj" parameterType="java.util.Map" |
|
|
|
@ -331,7 +355,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
@ -368,7 +392,7 @@ |
|
|
|
|
and t.voucher_number like concat('%',concat(#{voucherNumber},'%')) |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -439,7 +463,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE to_char(t.invoice_date,'yyyy-mm-dd') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
@ -455,10 +479,10 @@ |
|
|
|
|
|
|
|
|
|
<if |
|
|
|
|
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> |
|
|
|
|
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
|
and t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or |
|
|
|
|
to_char(t.invoice_date,'yyyymmdd') <= c.select_start_date or |
|
|
|
|
to_char(t.invoice_date,'yyyymmdd') >= |
|
|
|
|
c.select_end_date or d.tj_status in ('1','2')) |
|
|
|
|
c.select_end_date or d.tj_status in ('1','2') |
|
|
|
|
|
|
|
|
|
</if> |
|
|
|
|
and t.gf_tax_no in |
|
|
|
@ -476,7 +500,7 @@ |
|
|
|
|
and t.voucher_number like concat('%',concat(#{voucherNumber},'%')) |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -731,7 +755,7 @@ |
|
|
|
|
where date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.export_mark = '0' |
|
|
|
|
and t.invoice_amount>0 |
|
|
|
|
and t.tax_amount>=0 |
|
|
|
@ -765,7 +789,7 @@ |
|
|
|
|
and date_format(t.qs_date,'%Y-%m-%d') between #{qsksrq} and #{qsjsrq} |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -810,7 +834,7 @@ |
|
|
|
|
where to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.invoice_amount>0 |
|
|
|
|
and t.tax_amount>=0 |
|
|
|
|
and t.auth_status in ('0','5','6') |
|
|
|
@ -843,7 +867,7 @@ |
|
|
|
|
and to_char(t.qs_date,'yyyy-MM-dd') between #{qsksrq} and #{qsjsrq} |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType == '14' "> |
|
|
|
|
and (t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') ) |
|
|
|
|
and t.invoice_type = '14' or (t.invoice_type = '32' and t.lq_tdyslxDm='08') |
|
|
|
|
</if> |
|
|
|
|
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '14' "> |
|
|
|
|
and t.invoice_type = #{invoiceType} |
|
|
|
@ -901,7 +925,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
@ -988,7 +1012,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
@ -1070,7 +1094,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
@ -1145,7 +1169,7 @@ |
|
|
|
|
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno |
|
|
|
|
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq |
|
|
|
|
WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} |
|
|
|
|
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) |
|
|
|
|
and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08') |
|
|
|
|
and t.rzh_yesorno = '0' |
|
|
|
|
and t.invoice_status in ('0','7') |
|
|
|
|
and t.auth_status in('0','5','6') |
|
|
|
|