自动化立体仓库 - WMS系统
zyx
2024-03-27 1365b4833632f2d1c5fb346cd700e2e998010db6
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
package com.zy.asrs.mapper;
 
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zy.asrs.entity.AgvBasDevp;
import org.apache.ibatis.annotations.Delete;
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;
import java.util.Map;
 
@Mapper
@Repository
public interface AgvBasDevpMapper extends BaseMapper<AgvBasDevp> {
 
    @Delete("delete from agv_bas_devp")
    void deleteAll();
 
    @Select("select dev_no from agv_bas_devp where loc_sts = 'O'")
    List<String> getAvailableEmptyInSite();
 
    @Select("select station_code from agv_bas_devp where cache_shelves = 'N' and in_enable = 'Y' group by station_code")
    List<String> selectCacheShelvesStationCodeByFloor(@Param("floor") int floor);
 
    @Select("select dev_no from agv_bas_devp where loc_type1 = #{locType}")
    List<String> selectCacheShelvesStationCodeByLocType(@Param("locType") Short locType);
 
    @Select("SELECT\n" +
            "\tbas.dev_no,\n" +
            "\tCOUNT ( mast.loc_no ) AS num \n" +
            "FROM\n" +
            "\tagv_bas_devp bas\n" +
            "\tLEFT JOIN agv_wrk_mast mast ON bas.dev_no = mast.loc_no \n" +
            "WHERE\n" +
            "\tbas.station_code = #{stationCode} AND bas.loc_sts != 'X' \n" +
            "GROUP BY\n" +
            "\tbas.dev_no \n" +
            "ORDER BY\n" +
            "\tnum")
    List<Map<String,Object>> selectDevNoAndNumBystationCode(@Param("stationCode") String stationCode);
 
    @Select("select station_code from agv_bas_devp group by station_code")
    List<String> selectAllStationCode();
}