| | |
| | | <select id="queryFreeLocMast" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_loc_mast |
| | | where row1=#{row} |
| | | and loc_sts='O' |
| | | where |
| | | row1 = |
| | | ( |
| | | case |
| | | when #{row}=3 then 1 |
| | | when #{row}=4 then 7 |
| | | when #{row}=11 then 8 |
| | | when #{row}=12 then 14 |
| | | when #{row}=18 then 15 |
| | | when #{row}=19 then 21 |
| | | end |
| | | ) |
| | | <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> |
| | | and loc_sts='O' |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | |
| | | </mapper> |