|
@@ -917,6 +917,10 @@
|
|
|
FROM work_invoice a
|
|
|
<include refid="workInvoiceJoins"/>
|
|
|
left join work_invoice_detail wid on a.id = wid.invoice_id
|
|
|
+ left join work_invoice_project_relation wipr on a.id = wipr.invoice_id
|
|
|
+ left join rural_project_records rprs on wipr.project_id = rprs.id
|
|
|
+ left join rural_project_records rpr on rpr.id = wipr.project_id
|
|
|
+ left join project_report_data prds on rpr.id = prds.project_id
|
|
|
LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
|
|
|
<!-- <if test="client != null and client.name != null and client.name != ''">-->
|
|
|
<!-- LEFT JOIN work_client_info w ON w.id = a.client_id-->
|
|
@@ -1048,6 +1052,23 @@
|
|
|
<if test="dbName == 'mssql'">'%'+#{widNumber}+'%'</if>
|
|
|
<if test="dbName == 'mysql'">concat('%',#{widNumber},'%')</if>
|
|
|
</if>
|
|
|
+ <if test="projectName != null and projectName != ''">
|
|
|
+ and (wipr.details like
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
|
|
|
+ or rpr.project_name like
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="reportNumber != null and reportNumber != ''">
|
|
|
+ and prds.number like
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{reportNumber}||'%'</if>
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{reportNumber}+'%'</if>
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{reportNumber},'%')</if>
|
|
|
+ </if>
|
|
|
${sqlMap.dsf}
|
|
|
</where>
|
|
|
<choose>
|