自动化立体仓库 - WMS系统
Junjie
2023-06-02 0f478c31b5327ffe4bfdebd72fdf23a6df5d37e6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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> queryFreeLocMast(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1);
    List<LocMast> queryFreeLocMast0(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday);
    List<LocMast> queryFreeLocMast1(@Param("rows") List<Integer> 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<LocMast> 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<LocMast> queryFreeLocMastEnd(@Param("row") Integer row, @Param("locType1") Short locType1);
    List<LocMast> queryFreeLocMastEnd0(@Param("bay") Integer bay,@Param("lev") Integer lev,@Param("row1") Integer row, @Param("locType1") Short locType1);
 
    List<LocMast> 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<String> 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<LocMast> findOutMast(Short locType1, List<Integer> crnNos);
 
    //找单品类型,最内侧空库位
    List<LocMast> findInEmptyLocMast(Short locType1, @Param("rows") List<Integer> rows, Integer crnNo);
 
    //在库位组中搜索可入的空库位
    List<LocMast> findEmptyLocMastByLocNos(Short locType1, @Param("locNos") List<String> locNos, Integer crnNo);
 
    //搜索低频(混放区域)空库位
    List<LocMast> findEmptyLowFrequencyLocMast(Short locType1, Integer crnNo);
 
    List<LocMast> findEmptyLocMast(Short locType1, Integer crnNo);
 
    List<LocMast> selectLocByLev(Integer lev);
 
    List<LocMast> selectByLocNos(@Param("locNos") List<String> locNos);
}