ariesy 去掉艺龙相关跨库查询代码

release
yefei 2 years ago
parent 35739ed1f7
commit cb375054ee
  1. 6
      dxhy-core/src/main/resources/mapper/BbycfpbbcxMapper.xml
  2. 2
      dxhy-core/src/main/resources/mapper/FpZhMapper.xml
  3. 4
      dxhy-core/src/main/resources/mapper/job/TDxRecordInvoiceDao.xml
  4. 11
      dxhy-erp/src/main/resources/mapper/SignedDao.xml
  5. 4
      dxhy-export-domestic/src/main/resources/mapper/DomesticRecordInvoiceMapper.xml
  6. 8
      dxhy-extend/src/main/resources/mapper/ExtBbycfpbbcxMapper.xml
  7. 4
      dxhy-sign/src/main/resources/mapper/SignInvoiceMapper.xml
  8. 8
      dxhy-sign/src/main/resources/mapper/SignRecordInvoiceMapper.xml

@ -49,7 +49,7 @@
select t.invoice_status yczt,o.taxno gfsh,o.taxname gfmc,count(1) select t.invoice_status yczt,o.taxno gfsh,o.taxname gfmc,count(1)
hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from ${dxhyTertiary}.t_dx_record_invoice t left join ${dxhyAdmin}.sys_dept o on t.gf_tax_no = o.taxno from ${dxhyTertiary}.t_dx_record_invoice t
where t.invoice_status != '0' where t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14') and t.invoice_type in ('01','03','08','14')
and to_char(t.invoice_date,'yyyy-mm-dd') between #{kpksrq} and #{kpjsrq} and to_char(t.invoice_date,'yyyy-mm-dd') between #{kpksrq} and #{kpjsrq}
@ -68,7 +68,7 @@
<if test="company !=null and company !=''"> <if test="company !=null and company !=''">
and t.company = #{company} and t.company = #{company}
</if> </if>
group by t.invoice_status,o.taxno,o.taxname group by t.invoice_status,t.gf_tax_no,t.gf_name
</select> </select>
<select id="selectHjxx" parameterType="java.util.Map" <select id="selectHjxx" parameterType="java.util.Map"
@ -95,7 +95,7 @@
<select id="selectHjxx" parameterType="java.util.Map" <select id="selectHjxx" parameterType="java.util.Map"
resultMap="hjxxMap" databaseId="oracle"> resultMap="hjxxMap" databaseId="oracle">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from ${dxhyTertiary}.t_dx_record_invoice t left join ${dxhyAdmin}.sys_dept o on t.gf_tax_no = o.taxno from ${dxhyTertiary}.t_dx_record_invoice t
where t.invoice_status != '0' where t.invoice_status != '0'
and t.invoice_type in ('01','03','14') and t.invoice_type in ('01','03','14')
and t.invoice_date between to_date(#{kpksrq},'yyyy-mm-dd hh24:mi:ss') and to_date(#{kpjsrq},'yyyy-mm-dd and t.invoice_date between to_date(#{kpksrq},'yyyy-mm-dd hh24:mi:ss') and to_date(#{kpjsrq},'yyyy-mm-dd

@ -371,7 +371,6 @@
select select
<include refid="Authentication_Check_Column_List"/> <include refid="Authentication_Check_Column_List"/>
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime} WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime}
and (t.rzlx = '2' or t.rzlx = '3') and (t.rzlx = '2' or t.rzlx = '3')
and t.export_mark = '0' and t.export_mark = '0'
@ -443,7 +442,6 @@
rzh_date,rzh_yesorno,auth_status,rzlx,gx_user_name, rzh_date,rzh_yesorno,auth_status,rzlx,gx_user_name,
rzh_belong_date,b.business_name dept_id rzh_belong_date,b.business_name dept_id
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE to_char(t.invoice_date,'yyyy-mm-dd') between #{invoiceStartTime} and #{invoiceEndTime} WHERE to_char(t.invoice_date,'yyyy-mm-dd') between #{invoiceStartTime} and #{invoiceEndTime}
and (t.rzlx = '2' or t.rzlx = '3') and (t.rzlx = '2' or t.rzlx = '3')
and t.export_mark = '0' and t.export_mark = '0'

@ -545,9 +545,7 @@
<select id="selectByScan" parameterType="java.lang.String" resultType="com.dxhy.core.job.entity.InvoiceScanEntity"> <select id="selectByScan" parameterType="java.lang.String" resultType="com.dxhy.core.job.entity.InvoiceScanEntity">
select invoice_code invoiceCode, invoice_no invoiceNo, qs_type qsType, qs_status qsStatus, qs_date qsDate select invoice_code invoiceCode, invoice_no invoiceNo, qs_type qsType, qs_status qsStatus, qs_date qsDate
from t_dx_invoice d from t_dx_invoice d
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where d.uuid = #{uuid}
where u.push_yesorno = 1
and d.uuid = #{uuid}
</select> </select>
<!-- 获取底账表中该税号下最后的开票日期 --> <!-- 获取底账表中该税号下最后的开票日期 -->

@ -29,17 +29,14 @@
d.create_date d.create_date
from t_dx_record_invoice ri from t_dx_record_invoice ri
left join t_dx_invoice d on d.uuid = ri.uuid left join t_dx_invoice d on d.uuid = ri.uuid
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where ri.qs_status = '1'
where u.push_yesorno = '1'
and ri.qs_status = '1'
and <![CDATA[ri.qs_date >= #{startDate}]]> and <![CDATA[ri.qs_date >= #{startDate}]]>
and <![CDATA[ri.qs_date < #{endDate}]]> and <![CDATA[ri.qs_date < #{endDate}]]>
and ri.gf_tax_no = #{gfTaxNo} and ri.gf_tax_no = #{gfTaxNo}
</select> </select>
<select id="selectByCount" resultType="java.lang.Integer"> <select id="selectByCount" resultType="java.lang.Integer">
select count(*) from t_dx_record_invoice ri left join t_dx_invoice d on d.uuid = ri.uuid select count(*) from t_dx_record_invoice ri left join t_dx_invoice d on d.uuid = ri.uuid
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where ri.qs_status=1 and <![CDATA[ri.qs_date>=#{startDate}]]> and
where u.push_yesorno=1 and ri.qs_status=1 and <![CDATA[ri.qs_date>=#{startDate}]]> and
<![CDATA[ri.qs_date<#{endDate}]]> <![CDATA[ri.qs_date<#{endDate}]]>
<if test="gfTaxNo != null and gfTaxNo!= ''"> <if test="gfTaxNo != null and gfTaxNo!= ''">
and ri.gf_tax_no=#{gfTaxNo} and ri.gf_tax_no=#{gfTaxNo}
@ -70,9 +67,7 @@
d.create_date d.create_date
from t_dx_record_invoice ri from t_dx_record_invoice ri
left join t_dx_invoice d on d.uuid = ri.uuid left join t_dx_invoice d on d.uuid = ri.uuid
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where ri.qs_status = '1'
where u.push_yesorno = '1'
and ri.qs_status = '1'
and ri.invoice_no = #{invoiceNo} and ri.invoice_no = #{invoiceNo}
and ri.invoice_code = #{invoiceCode} and ri.invoice_code = #{invoiceCode}
</select> </select>

@ -1628,7 +1628,6 @@
<include refid="Authentication_Column_List"/> <include refid="Authentication_Column_List"/>
,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code ,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime} WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime}
and t.gf_tax_no = #{gfsh} and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null) and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
@ -1677,7 +1676,6 @@
<include refid="Authentication_Check_Column_List"/> <include refid="Authentication_Check_Column_List"/>
,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code ,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime} WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{invoiceStartTime} and #{invoiceEndTime}
and t.gf_tax_no = #{gfsh} and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null) and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
@ -1867,7 +1865,6 @@
select select
<include refid="Authentication_Column_List_Oracle"/> <include refid="Authentication_Column_List_Oracle"/>
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE TO_CHAR(t.invoice_date,'yyyy-MM-dd') between #{invoiceStartTime} and #{invoiceEndTime} WHERE TO_CHAR(t.invoice_date,'yyyy-MM-dd') between #{invoiceStartTime} and #{invoiceEndTime}
and t.rzh_yesorno = '0' and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6') and t.auth_status in('0','5','6')
@ -1924,7 +1921,6 @@
select select
<include refid="Authentication_Check_Column_List_Oracle"/> <include refid="Authentication_Check_Column_List_Oracle"/>
from t_dx_record_invoice t from t_dx_record_invoice t
left join ${dxhyAdmin}.sys_business b on t.dept_id = b.business_code
WHERE TO_CHAR(t.invoice_date,'yyyy-MM-dd') between #{invoiceStartTime} and #{invoiceEndTime} WHERE TO_CHAR(t.invoice_date,'yyyy-MM-dd') between #{invoiceStartTime} and #{invoiceEndTime}
and (t.rzlx = '2' or t.rzlx = '3') and (t.rzlx = '2' or t.rzlx = '3')
and t.export_mark = '0' and t.export_mark = '0'

@ -48,8 +48,7 @@
select t.invoice_status yczt,o.taxno gfsh,o.taxname gfmc,count(1) select t.invoice_status yczt,o.taxno gfsh,o.taxname gfmc,count(1)
hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from ${dxhyTertiary}.t_dx_record_invoice t left join ${dxhyAdmin}.sys_dept o on t.gf_tax_no = from ${dxhyTertiary}.t_dx_record_invoice t
o.taxno
where t.invoice_status != '0' where t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14') and t.invoice_type in ('01','03','08','14')
and t.company = #{company} and t.company = #{company}
@ -67,7 +66,7 @@
</otherwise> </otherwise>
</choose> </choose>
group by t.invoice_status,o.taxno,o.taxname group by t.invoice_status,t.gf_tax_no,t.gf_name
</select> </select>
<select id="selectHjxx" parameterType="java.util.Map" <select id="selectHjxx" parameterType="java.util.Map"
@ -94,8 +93,7 @@
resultMap="hjxxMap" databaseId="oracle"> resultMap="hjxxMap" databaseId="oracle">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from ${dxhyTertiary}.t_dx_record_invoice t left join ${dxhyAdmin}.sys_dept o on t.gf_tax_no = from ${dxhyTertiary}.t_dx_record_invoice t
o.taxno
where t.invoice_status != '0' where t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14') and t.invoice_type in ('01','03','08','14')
and t.company = #{company} and t.company = #{company}

@ -439,9 +439,7 @@
<select id="queryByUuid" resultType="com.dxhy.sign.entity.TDxInvoice" databaseId="mysql"> <select id="queryByUuid" resultType="com.dxhy.sign.entity.TDxInvoice" databaseId="mysql">
SELECT * SELECT *
FROM t_dx_invoice d FROM t_dx_invoice d
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where d.qs_status = 1
where u.push_yesorno = 1
AND d.qs_status = 1
and d.uuid = #{uuid} and d.uuid = #{uuid}
</select> </select>

@ -239,9 +239,7 @@
invoiceDate,t.invoice_code,t.invoice_no,t.gf_name,t.xf_name,truncate(t.invoice_amount,2) as invoiceDate,t.invoice_code,t.invoice_no,t.gf_name,t.xf_name,truncate(t.invoice_amount,2) as
invoiceAmount,truncate(t.tax_amount,2) as taxAmount,DATE_FORMAT(t.qs_date,'%Y-%m-%d %T') as qsDate,t.uuid invoiceAmount,truncate(t.tax_amount,2) as taxAmount,DATE_FORMAT(t.qs_date,'%Y-%m-%d %T') as qsDate,t.uuid
from t_dx_record_invoice t left join t_dx_invoice d on d.uuid = t.uuid from t_dx_record_invoice t left join t_dx_invoice d on d.uuid = t.uuid
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where t.company = 'YL' and t.gf_tax_no in
where u.push_yesorno=1
and t.company = 'YL' and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -257,9 +255,7 @@
resultMap="WqshjResultMap" databaseId="mysql"> resultMap="WqshjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t left join t_dx_invoice d on d.uuid = t.uuid from t_dx_record_invoice t left join t_dx_invoice d on d.uuid = t.uuid
LEFT JOIN ${dxhyAdmin}.sys_user u on d.user_account = u.user_id where t.company = 'YL' and t.gf_tax_no in
where u.push_yesorno=1
and t.company = 'YL' and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>

Loading…
Cancel
Save