| | |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (a.batch IS NULL OR a.batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <!-- <choose>--> |
| | | <!-- <when test="batch != null and batch != ''">--> |
| | | <!-- and a.batch = #{batch}--> |
| | | <!-- </when>--> |
| | | <!-- <otherwise>--> |
| | | <!-- and (a.batch IS NULL OR a.batch = '')--> |
| | | <!-- </otherwise>--> |
| | | <!-- </choose>--> |
| | | <if test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.orderNo = #{orderNo} |
| | | </if> |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time) |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryStockTotal" resultType="com.zy.asrs.entity.result.StockVo"> |
| | | select |
| | | matnr, |
| | | batch, |
| | | count(anfme) as count |
| | | from asr_loc_detl |
| | | where 1=1 |
| | | group by matnr,batch |
| | | </select> |
| | | |
| | | </mapper> |