and batch = #{batch} and (batch IS NULL OR batch = '') and a.loc_no like '%' + #{map.loc_no} + '%' and a.matnr like '%' + #{map.matnr} + '%' and a.maktx like '%' + #{map.maktx} + '%' and a.batch like '%' + #{map.batch} + '%' and a.anfme like '%' + #{map.anfme} + '%' and a.modi_time between #{map.startTime} and #{map.endTime} and a.memo like '%' + #{map.memo} + '%' and a.memo is not null and a.memo !='' delete from wms_loc_detl where 1=1 and loc_no = #{locNo} and matnr = #{matnr} and host_id = #{hostId} update wms_loc_detl set anfme = #{anfme} , modi_time = getdate() where 1=1 and loc_no = #{locNo} and matnr = #{matnr} and host_id = #{hostId}