|
@@ -395,6 +395,7 @@
|
|
|
<select id="auditFindList" resultType="com.jeeplus.test.cw.workClientInfo.domain.AuditFindDto">
|
|
|
|
|
|
select
|
|
|
+ DISTINCT
|
|
|
t.*
|
|
|
from
|
|
|
(
|
|
@@ -408,11 +409,11 @@ select
|
|
|
invoice.billing_date
|
|
|
FROM
|
|
|
cw_project_report_archive AS arc
|
|
|
- LEFT JOIN cw_finance_invoice_base AS base ON base.program_id = arc.report_id
|
|
|
- LEFT JOIN cw_finance_invoice_base AS base1 ON base1.invoice_id = base.invoice_id
|
|
|
- LEFT JOIN cw_project_report_new_line AS line ON line.report_id = base1.program_id
|
|
|
- LEFT JOIN cw_finance_invoice AS invoice ON invoice.id = base1.invoice_id
|
|
|
- LEFT JOIN cw_finance_invoice_detail AS detail ON detail.invoice_id = invoice.id
|
|
|
+ LEFT JOIN cw_finance_invoice_base AS base ON base.program_id = arc.report_id and base.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice_base AS base1 ON base1.invoice_id = base.invoice_id and base1.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_report_new_line AS line ON line.report_id = base1.program_id and line.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice AS invoice ON invoice.id = base1.invoice_id and invoice.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice_detail AS detail ON detail.invoice_id = invoice.id and detail.del_flag = '0'
|
|
|
${ew.customSqlSegment}
|
|
|
UNION ALL
|
|
|
SELECT
|
|
@@ -425,11 +426,11 @@ SELECT
|
|
|
invoice.billing_date
|
|
|
FROM
|
|
|
cw_project_report_archive AS arc
|
|
|
- LEFT JOIN cw_finance_invoice_base AS base ON base.program_id = arc.project_id
|
|
|
- LEFT JOIN cw_finance_invoice_base AS base1 ON base1.invoice_id = base.invoice_id
|
|
|
- LEFT JOIN cw_project_report_new_line AS line ON line.report_id = base1.program_id
|
|
|
- LEFT JOIN cw_finance_invoice AS invoice ON invoice.id = base1.invoice_id
|
|
|
- LEFT JOIN cw_finance_invoice_detail AS detail ON detail.invoice_id = invoice.id
|
|
|
+ LEFT JOIN cw_finance_invoice_base AS base ON base.program_id = arc.project_id and base.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice_base AS base1 ON base1.invoice_id = base.invoice_id and base1.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_report_new_line AS line ON line.report_id = base1.program_id and line.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice AS invoice ON invoice.id = base1.invoice_id and invoice.del_flag = '0'
|
|
|
+ LEFT JOIN cw_finance_invoice_detail AS detail ON detail.invoice_id = invoice.id and detail.del_flag = '0'
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
|
) as t
|
|
@@ -445,10 +446,10 @@ FROM
|
|
|
line.create_date
|
|
|
FROM
|
|
|
cw_project_report_archive AS arc
|
|
|
- LEFT JOIN cw_project_report AS record ON record.project_id = arc.project_id
|
|
|
- LEFT JOIN cw_project_records AS records ON records.id = record.project_id
|
|
|
- LEFT JOIN cw_project_report_new_line AS line ON line.report_id = record.id
|
|
|
- LEFT JOIN sys_user AS USER ON USER.id = record.create_by
|
|
|
+ LEFT JOIN cw_project_report AS record ON record.project_id = arc.project_id and record.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_records AS records ON records.id = record.project_id and records.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_report_new_line AS line ON line.report_id = record.id and line.del_flag = '0'
|
|
|
+ LEFT JOIN sys_user AS USER ON USER.id = record.create_by and USER.del_flag = '0'
|
|
|
${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|