src/main/resources/mapper/LocDetlMapper.xml
@@ -26,6 +26,23 @@ <result column="appe_time" property="appeTime" /> </resultMap> <select id="selectItem" resultMap="BaseResultMap"> select top 1 * from asr_loc_detl where 1=1 and loc_no = #{locNo} and matnr = #{matnr} <choose> <when test="batch != null and batch != ''"> and batch = #{batch} </when> <otherwise> and (batch IS NULL OR batch = '') </otherwise> </choose> </select> <sql id="stockOutCondition"> <if test="loc_no!=null and loc_no!='' "> and a.loc_no like '%' + #{loc_no} + '%'