| | |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.orderNo = #{orderNo} |
| | | and a.order_no = #{orderNo} |
| | | </if> |
| | | |
| | | <if test="locNos != null and locNos.size > 0"> |
| | | and b.loc_no not in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <!-- <if test="locNos != null and locNos.size > 0">--> |
| | | <!-- and b.loc_no not in--> |
| | | <!-- <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")">--> |
| | | <!-- #{item}--> |
| | | <!-- </foreach>--> |
| | | <!-- </if>--> |
| | | |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | loc_no, |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |