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 { List queryFreeLocMast(@Param("rows") List rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1); List queryFreeLocMast0(@Param("rows") List rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday); List queryFreeLocMast1(@Param("rows") List rows , @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday , @Param("rowBeg") Integer rowBeg, @Param("rowEnd") Integer rowEnd, @Param("bayBeg") Integer bayBeg , @Param("bayEnd") Integer bayEnd, @Param("levBeg") Integer levBeg, @Param("levEnd") Integer levEnd); List queryFreeLocMast2(@Param("locType1") Short locType1 , @Param("rowBeg") Integer rowBeg, @Param("rowEnd") Integer rowEnd, @Param("bayBeg") Integer bayBeg , @Param("bayEnd") Integer bayEnd, @Param("levBeg") Integer levBeg, @Param("levEnd") Integer levEnd); List queryFreeLocMastEnd(@Param("row") Integer row, @Param("locType1") Short locType1); List queryFreeLocMastEnd0(@Param("bay") Integer bay,@Param("lev") Integer lev,@Param("row1") Integer row, @Param("locType1") Short locType1); List queryFreeLocMastEnd1(@Param("row") Integer row, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday); @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") List queryGroupEmptyStock(Integer crnNo); @Select("select count(*) as count from asr_loc_mast where 1=1 and loc_sts = 'O' and loc_type1 = #{locType1} and loc_type2 = #{locType2} and crn_no = #{crnNo}") Integer selectEmptyLocCount(@Param("locType1") Short locType1, @Param("locType2") Short locType2, @Param("crnNo") Integer crnNo); void updateLocSts(@Param("locNo") String locNo,@Param("locSts") String locSts); //找外侧空库位 List findOutMast(Short locType1, List crnNos); //找单品类型,最内侧空库位 LocMast findInEmptyLocMast(Short locType1, @Param("rows") List rows); //在库位组中搜索可入的空库位 List findEmptyLocMastByLocNos(Short locType1, @Param("locNos") List locNos); //搜索低频(混放区域)空库位 List findEmptyLowFrequencyLocMast(Short locType1); List selectLocByLev(Integer lev); List selectByLocNos(@Param("locNos") List locNos); }