自动化立体仓库 - WMS系统
#
Junjie
2023-09-09 66a0d529543221eb2720140eaccfb3c3eba93b9f
#
2个文件已修改
37 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/utils/Utils.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java
@@ -350,4 +350,39 @@
        throw new RuntimeException("库位解析异常");
    }
    //通过输送站点号获取提升机号
    public static Integer stnNoToLiftNo(Integer stnNo) {
        //一号提升机
        ArrayList<Integer> one = new ArrayList<Integer>(){{
            add(100);add(101);
            add(200);add(201);
            add(300);add(301);
        }};
        //二号提升机
        ArrayList<Integer> two = new ArrayList<Integer>(){{
            add(102);add(103);
            add(202);add(203);
            add(340);add(341);
        }};
        //三号提升机
        ArrayList<Integer> three = new ArrayList<Integer>(){{
            add(104);add(105);
            add(204);add(205);
            add(345);add(346);
        }};
        if (one.contains(stnNo)) {
            return 1;
        } else if (two.contains(stnNo)) {
            return 2;
        } else if (three.contains(stnNo)) {
            return 3;
        }
        return null;
    }
}
src/main/java/com/zy/common/service/CommonService.java
@@ -349,7 +349,7 @@
        Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                .eq("type_no", staDescId)
                .eq("stn_no", sourceStaNo)
                .eq("crn_no",Utils.getLev(locNo));//借用堆垛机号字段充当楼层号
                .eq("crn_no",Utils.stnNoToLiftNo(sourceStaNo));//借用堆垛机号字段充当提升机号
        StaDesc staDesc = staDescService.selectOne(wrapper);
        if (Cools.isEmpty(staDesc)) {
            log.error("入库路径不存在, staDescId={}, sourceStaNo={}", staDescId, sourceStaNo);