自动化立体仓库 - WMS系统
#
whycq
2024-05-31 6ce49b375bba4e1bbbe75c4dd891dc95cd9ff28f
src/main/java/com/zy/common/service/AgvCommonService.java
@@ -268,9 +268,10 @@
        throw new CoolException("楼层号:"+floor+";该楼层没有空接驳位");
    }
    /**
     * 检索库位号
     * @return locNo 检索到的库位号
     * @return locNo 检索自动接驳位
     */
    public AgvBasDevp getDevpNo(int type, int floor, String auto) {
        // 目标库位
@@ -284,6 +285,24 @@
        //找不到库位,抛出异常
        throw new CoolException("楼层号:"+floor+";该楼层没有空接驳位");
    }
    /**
     * 检索库位号
     * @return locNo 检索可入接驳位
     */
    public AgvBasDevp getDevpNo(int type, int floor, String auto ,String inEable) {
        // 目标库位
        AgvBasDevp basDevp = null;
        // 开始查找库位 ==============================>>
        basDevp = getDevpNoInEable(type,floor,inEable);
        if (basDevp != null) {
            return basDevp;
        }
        //找不到库位,抛出异常
        return basDevp;
    }
    //随机取一个货位
@@ -305,4 +324,14 @@
                .like("dev_no","DB"));
    }
    //随机取一个货位
    private AgvBasDevp getDevpNoInEable(int type,int floor,String inEable){
        return agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>()
                .eq("loc_sts","O")
                .eq("floor",floor)
                .eq("loc_type1",type)
                .eq("in_enable",inEable)
                .like("dev_no","DB"));
    }
}