认证查询、发票综合查询优化date_format问题

release
yishiqihuasheng 2 years ago
parent b0eae65fa3
commit abbbdeb055
  1. 4
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  2. 3
      dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml
  3. 2
      dxhy-extend/src/main/resources/mapper/ExtBbycfpcxMapper.xml

@ -73,7 +73,7 @@
bdk_date,t.rzh_back_msg,t.in_account_status,t.payment_status,date_format(t.payment_date,'%Y-%m-%d')payment_date,
voucher_number,t.ele_invoice_no, sn_voucher_number, account_period, posting_time ,image_id
from t_dx_record_invoice t
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.bdk_status in ('1','2')
and t.export_mark = '0'
@ -353,7 +353,7 @@
resultMap="RzcxhjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.auth_status != '0'
and t.bdk_status in ('1','2')

@ -69,7 +69,8 @@
t.settlement_no,t.inaccount_status,t.bzdh,
t.settlement_status,t.voucher_number,t.total_amount,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period
from t_dx_record_invoice t
WHERE t.company = #{company} and t.invoice_date between #{kpksrq} and #{kpjsrq}
WHERE t.company = #{company}
and t.invoice_date between #{kpksrq} and #{kpjsrq}
<if test="sign != '88'">
and t.gf_tax_no in

@ -182,7 +182,7 @@
where t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14','31')
and t.company = #{company}
and DATE_FORMAT(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
and t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}

Loading…
Cancel
Save