| package com.zy.asrs.mapper; | 
|   | 
| import com.baomidou.mybatisplus.mapper.BaseMapper; | 
| import com.zy.asrs.entity.LocMast; | 
| import org.apache.ibatis.annotations.Mapper; | 
| import org.apache.ibatis.annotations.Param; | 
| import org.apache.ibatis.annotations.Select; | 
| import org.springframework.stereotype.Repository; | 
|   | 
| import java.util.List; | 
|   | 
| @Mapper | 
| @Repository | 
| public interface LocMastMapper extends BaseMapper<LocMast> { | 
|   | 
|   | 
|     /** | 
|      * 库位模糊查询库位号 | 
|      */ | 
|     List<LocMast> selectLocMastListSix(@Param("locSts") String locSts, | 
|                                        @Param("locNo") String locNo, | 
|                                        @Param("whsType") Long whsType, | 
|                                        @Param("crnNo") Integer crnNo, | 
|                                        @Param("row1") Integer row1, | 
|                                        @Param("bay1") Integer bay1, | 
|                                        @Param("lev1") Integer lev1, | 
|                                        @Param("pageNumber") Integer curr, | 
|                                        @Param("pageSize") Integer limit); | 
|   | 
|     /** | 
|      * 堆垛机对应的排号集合 | 
|      */ | 
|     Long selectLocMastListTotalSix(@Param("locSts") String locSts, | 
|                                    @Param("locNo") String locNo, | 
|                                    @Param("whsType") Long whsType, | 
|                                    @Param("crnNo") Integer crnNo, | 
|                                    @Param("row1") Integer row1, | 
|                                    @Param("bay1") Integer bay1, | 
|                                    @Param("lev1") Integer lev1); | 
|   | 
|   | 
|     List<LocMast> selectLocMastList(@Param("locNo") String locNo, | 
|                                     @Param("pageNumber") Integer curr, | 
|                                     @Param("pageSize") Integer limit); | 
|   | 
|     Long selectLocMastListTotal(@Param("locNo") String locNo); | 
|   | 
| //    @Select("select distinct row1 from "SOURCE"."asr_loc_mast" where crn_no = #{crnNo}") | 
|     @Select("select row1 from ( select distinct row1 from \"SOURCE\".\"asr_loc_mast\" where crn_no = #{crnNo} ) a " + | 
|         "order by case row1 when 1 then 1 when 2 then 0 when 3 then 0 when 4 then 1 " + | 
|         "when 5 then 1 when 6 then 0 when 7 then 0 when 8 then 1 when 9 then 1 when 10 then 0 " + | 
|         "when 11 then 0 when 12 then 1 when 13 then 1 when 14 then 0 when 15 then 0 when 16 then 1 end desc,newid()") | 
|     List<Integer> queryDistinctRow(@Param("crnNo")Integer crnNo); | 
|   | 
|     LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); | 
|   | 
|     @Select("select loc_no from \"SOURCE\".\"asr_loc_mast\" where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") | 
|     List<String> queryGroupEmptyStock(Integer crnNo); | 
|   | 
|     @Select("select top 1 bay1 from \"SOURCE\".\"asr_loc_mast\" order by bay1 desc") | 
|     Short selectTotalBay(); | 
|   | 
|     LocMast queryDemoSourceLoc(@Param("crnNo") Integer crnNo); | 
|   | 
|     LocMast queryDemoLoc(@Param("crnNo") Integer crnNo); | 
|   | 
|     @Select("select count(*) as count from \"SOURCE\".\"asr_loc_mast\" where 1=1 and loc_sts = 'O' and loc_type1 = #{locType1} and crn_no = #{crnNo}") | 
|     Integer selectEmptyLocCount(@Param("locType1") Short locType1, @Param("crnNo") Integer crnNo); | 
|   | 
|     LocMast selectByLocNo(String locNo); | 
|   | 
|     List<LocMast> selectLocByLev(@Param("lev")Integer lev); | 
|   | 
| } |