From adc3f07cd3d717c08e60ff7d3aa8210b5167da29 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 11 七月 2022 10:17:50 +0800 Subject: [PATCH] # --- src/main/resources/mapper/LocMastMapper.xml | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml index 67c995b..2fe2065 100644 --- a/src/main/resources/mapper/LocMastMapper.xml +++ b/src/main/resources/mapper/LocMastMapper.xml @@ -41,11 +41,29 @@ <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> -- Gitblit v1.9.1