|
@@ -1267,6 +1267,7 @@
|
|
left join sys_area sa on sa.id = a.area_id
|
|
left join sys_area sa on sa.id = a.area_id
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
|
+ and a.invoice_state !=4
|
|
<if test="number != null and number != ''">
|
|
<if test="number != null and number != ''">
|
|
AND a.number LIKE
|
|
AND a.number LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{number}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{number}||'%'</if>
|
|
@@ -1274,7 +1275,7 @@
|
|
<if test="dbName == 'mysql'">concat('%',#{number},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{number},'%')</if>
|
|
</if>
|
|
</if>
|
|
<if test="invoiceState != null and invoiceState != ''">
|
|
<if test="invoiceState != null and invoiceState != ''">
|
|
- AND a.invoice_state = #{invoiceState} or a.cancellation_state = #{invoiceState}
|
|
|
|
|
|
+ AND (a.invoice_state = #{invoiceState} or a.cancellation_state = #{invoiceState})
|
|
</if>
|
|
</if>
|
|
<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
|
|
<if test="beginContractDate != null and endContractDate != null and beginContractDate != '' and endContractDate != ''">
|
|
AND a.invoice_date BETWEEN #{beginContractDate} AND #{endContractDate}
|
|
AND a.invoice_date BETWEEN #{beginContractDate} AND #{endContractDate}
|
|
@@ -1320,8 +1321,11 @@
|
|
<!--<if test="officeId != null and officeId != ''">
|
|
<!--<if test="officeId != null and officeId != ''">
|
|
AND so.id = #{officeId}
|
|
AND so.id = #{officeId}
|
|
</if>-->
|
|
</if>-->
|
|
- <if test="money != null and money != ''">
|
|
|
|
- AND a.money = #{money}
|
|
|
|
|
|
+ <if test="moneyStr != null and moneyStr != ''">
|
|
|
|
+ AND a.money LIKE
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{moneyStr}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{moneyStr}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{moneyStr},'%')</if>
|
|
</if>
|
|
</if>
|
|
<!--<if test="submitterId != null and submitterId != ''">
|
|
<!--<if test="submitterId != null and submitterId != ''">
|
|
AND a.create_by = #{submitterId}
|
|
AND a.create_by = #{submitterId}
|
|
@@ -1356,6 +1360,15 @@
|
|
#{officeId}
|
|
#{officeId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="redNotStatusList!=null and redNotStatusList.size!=0">
|
|
|
|
+ and a.invoice_state not in
|
|
|
|
+ <foreach collection="redNotStatusList" item="status" separator="," open="(" close=")">
|
|
|
|
+ #{status}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="officeId == '' and officeName!=null and officeName!=''">
|
|
|
|
+ AND o.name like concat('%',#{officeName},'%')
|
|
|
|
+ </if>
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
AND a.invoice_number LIKE
|
|
AND a.invoice_number LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{invoiceNumber}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{invoiceNumber}||'%'</if>
|