|
|
|
@ -15,6 +15,9 @@
|
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName,
|
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.customerId) customerName
|
|
|
|
|
from io_order as io
|
|
|
|
|
left join auth_warehouse aw on aw.code = io.fromInvCode
|
|
|
|
|
left join basic_corp bc on bc.erpId = io.fromCorp
|
|
|
|
|
|
|
|
|
|
<if test="uploadKey != null and uploadKey != ''">
|
|
|
|
|
INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId
|
|
|
|
|
</if>
|
|
|
|
@ -22,6 +25,10 @@
|
|
|
|
|
<if test="id != null and id != ''">
|
|
|
|
|
AND id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="keyWords != null and keyWords != ''">
|
|
|
|
|
AND (aw.name like concat('%', #{keyWords}, '%') or bc.name like concat('%', #{keyWords}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="corpName != null and corpName != ''">
|
|
|
|
|
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
|
|
|
|
|
concat('%', #{corpName}, '%')
|
|
|
|
@ -85,7 +92,7 @@
|
|
|
|
|
or io.outSickInfo like concat('%', #{unionRemark}, '%'))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="statuses != null and statuses.size() != 0">
|
|
|
|
|
AND status in
|
|
|
|
|
AND io.status in
|
|
|
|
|
<foreach collection="statuses" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
@ -103,7 +110,7 @@
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
AND status = #{status}
|
|
|
|
|
AND io.status = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderType != null">
|
|
|
|
|
AND orderType = #{orderType}
|
|
|
|
@ -115,7 +122,7 @@
|
|
|
|
|
<foreach collection="invoiceActions1" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
and status = 10)
|
|
|
|
|
and io.status = 10)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="invoiceActions1 == null and invoiceActions2 != null">
|
|
|
|
@ -124,7 +131,7 @@
|
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
and status = 7
|
|
|
|
|
and io.status = 7
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
@ -133,13 +140,13 @@
|
|
|
|
|
<foreach collection="invoiceActions1" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
and status = 10)
|
|
|
|
|
and io.status = 10)
|
|
|
|
|
or (
|
|
|
|
|
`action` in
|
|
|
|
|
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
and status = 7)
|
|
|
|
|
and io.status = 7)
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
</if>
|
|
|
|
|