| | |
| | | } |
| | | List<LocDetl> locDetls; |
| | | if (Cools.isEmpty(orderDetls.get(0).getSPgNO())) { |
| | | locDetls = locDetlService.queryStockByModel(orderDetl.getModel()); |
| | | locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, null); |
| | | } else { |
| | | locDetls = locDetlService.queryStock(orderDetl.getSPgNO()); |
| | | } |
| | |
| | | <if test="sPgNO != null and sPgNO != ''"> |
| | | and a.pg_no = #{sPgNO} |
| | | </if> |
| | | <if test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <!-- <if test="batch != null and batch != ''">--> |
| | | <!-- and a.batch = #{batch}--> |
| | | <!-- </if>--> |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <!-- <if test="orderNo != null and orderNo != ''">--> |
| | | <!-- and a.order_no = #{orderNo}--> |
| | | <!-- </if>--> |