|
@@ -278,7 +278,8 @@
|
|
|
a.register_address,
|
|
|
a.business_location,
|
|
|
a.security_business,
|
|
|
- a.invoice_number,
|
|
|
+ (case when a.invoice_number is null then fi.no
|
|
|
+ else a.invoice_number end) as invoiceNumber,
|
|
|
a.is_complete_invoice,
|
|
|
cw_prs1.proc_ins_id as proc_ins_id1,
|
|
|
cw_prs1.process_definition_id as process_definition_id1,
|
|
@@ -337,6 +338,8 @@
|
|
|
LEFT JOIN sys_user su1 on a.signature_annotator1 = su1.id
|
|
|
LEFT JOIN sys_user su2 on a.signature_annotator2 = su2.id
|
|
|
LEFT JOIN sys_user su3 on a.real_create = su3.id
|
|
|
+ left join cw_finance_invoice_base fib on a.id = fib.program_id
|
|
|
+ left join cw_finance_invoice fi on fib.invoice_id = fi.id
|
|
|
where a.id = #{id}
|
|
|
</select>
|
|
|
|
|
@@ -644,6 +647,7 @@
|
|
|
left join cw_project_report_new_line new_line on a.id = new_line.report_id and new_line.del_flag = '0'
|
|
|
left join cw_project_report_number_apply na on a.id = na.report_id and na.del_flag = '0'
|
|
|
where a.project_id = #{projectId} and a.del_flag = '0'
|
|
|
+ order by a.create_time DESC
|
|
|
</select>
|
|
|
<select id="getContainDelByProjectId" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
|
|
|
SELECT
|
|
@@ -1182,6 +1186,33 @@
|
|
|
update cw_project_report set is_complete_invoice = '2' where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
+ <select id="getByInvoiceNumber" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
+ a.create_by_id as createById,
|
|
|
+ a.create_time,
|
|
|
+ a.update_by_id,
|
|
|
+ a.update_time,
|
|
|
+ a.del_flag,
|
|
|
+ a.remarks,
|
|
|
+ a.status,
|
|
|
+ a.document_no,
|
|
|
+ a.project_report_number,
|
|
|
+ a.project_id,
|
|
|
+ a.office_id,
|
|
|
+ a.signature_type,
|
|
|
+ a.signature_annotator1,
|
|
|
+ a.signature_annotator2,
|
|
|
+ a.signature_contract_id,
|
|
|
+ a.real_create,
|
|
|
+ a.proc_ins_id,
|
|
|
+ a.process_definition_id,
|
|
|
+ a.signature_annotator_status
|
|
|
+ from cw_project_report a
|
|
|
+ left join cw_project_report_number_apply rna on a.id = rna.report_id and rna.del_flag = '0'
|
|
|
+ where rna.review_status not in ('0','1') and a.invoice_number = #{invoiceNumber}
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
|
|
|
</mapper>
|