|
@@ -1027,6 +1027,16 @@
|
|
|
AND prd.number like concat(concat('%',#{reportData.number}),'%')
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="invoiceStatus != null and invoiceStatus != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="invoiceStatus== 5">
|
|
|
+ AND wi.invoice_state = '5'
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND wi.invoice_state in (1,2,3,4)
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
/*and prd.number is not null*/
|
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|
|
@@ -1059,6 +1069,8 @@
|
|
|
<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
|
|
|
LEFT JOIN work_client_info wct on wci.client_id = wct.id
|
|
|
</if>
|
|
|
+ left join work_invoice_project_relation wipr on wipr.project_id = a.id
|
|
|
+ left join work_invoice wi on wi.id = wipr.invoice_id
|
|
|
<where>
|
|
|
<if test="projectId != null and projectId != ''">
|
|
|
AND a.project_id like concat('%',#{projectId},'%')
|
|
@@ -1119,6 +1131,16 @@
|
|
|
AND prd.number like concat(concat('%',#{reportData.number}),'%')
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="invoiceStatus != null and invoiceStatus != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="invoiceStatus== 5">
|
|
|
+ AND wi.invoice_state = '5'
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND wi.invoice_state in (1,2,3,4)
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
AND a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
/*and prd.number is not null*/
|
|
|
<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
|