| | |
| | | <!-- </if>--> |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | |
| | | <select id="queryFreeLocMastIncludeFirst" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_loc_mast |
| | | where row1=#{row} |
| | | and bay1 = 1 |
| | | and loc_sts='O' |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | <!-- <if test="locType2 != null">--> |
| | | <!-- and loc_type2 = #{locType2}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="locType3 != null">--> |
| | | <!-- and loc_type3 = #{locType3}--> |
| | | <!-- </if>--> |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | <select id="queryFreeLocMastExceptFirst" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_loc_mast |
| | | where row1=#{row} |
| | | and bay1 > 1 |
| | | and loc_sts='O' |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | <!-- <if test="locType2 != null">--> |
| | | <!-- and loc_type2 = #{locType2}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="locType3 != null">--> |
| | | <!-- and loc_type3 = #{locType3}--> |
| | | <!-- </if>--> |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | |
| | | </mapper> |