自动化立体仓库 - WMS系统
#
lsh
2024-05-18 fb031cfeb03cb20c95c78fcccf9ba93c5dd5d798
#
2个文件已修改
70 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/utils/Utils.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java
@@ -125,6 +125,32 @@
        int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
        return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
    }
    /**
     * 获取 深库位对应的浅库位号   双伸+单双伸  煜星定制
     */
    public static String getShallowLoc5(SlaveProperties slaveProperties, String deepLoc,Integer whsType) {
        if (whsType==9){
            int row = getRow(deepLoc);
            int shallowRow;
            if (row == 21) {
                shallowRow = row + 1;
            } else if (row == 24) {
                shallowRow = row - 1;
            } else if (row == 25) {
                shallowRow = row;
            } else if (row == 27) {
                shallowRow = row - 1;
            } else {
                throw new RuntimeException(row + "不是深库位,系统繁忙");
            }
            return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
        }else {
            int row = getRow(deepLoc);
            int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
            int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
            return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
        }
    }
    /**
     * 获取 深库位排对应的浅库位排
@@ -149,6 +175,40 @@
            throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
        }
        return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
    }
    /**
     * 获取 浅库位对应的深库位号  双伸+单双伸  煜星定制
     */
    public static String getDeepLoc5(SlaveProperties slaveProperties, String shallowLoc,Integer whsType) {
        if (whsType==9){
            int row = getRow(shallowLoc);
            int targetRow;
            if (row == 22) {
                targetRow = row - 1;
            } else if (row == 23) {
                targetRow = row + 1;
            } else if (row == 25) {
                targetRow = row;
            } else if (row == 26) {
                targetRow = row + 1;
            } else {
                throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
            }
            return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
        } else {
            int row = getRow(shallowLoc);
            int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
            int targetRow;
            if (remainder == 2) {
                targetRow = row - 1;
            } else if (remainder == 3) {
                targetRow = row + 1;
            } else {
                throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
            }
            return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
        }
    }
    /**
@@ -240,7 +300,7 @@
        return 0;
    }
    public static boolean BooleanWhsTypeStaIoType(Integer whsType) {  //查询相似物料开关
    public static boolean BooleanWhsTypeStaIoType(Integer whsType) {  //查询相似物料开关   //是否深浅库位开关
        if (whsType == 1 || whsType==3 || whsType==4  || whsType == 9) {
            return true;
        }
src/main/java/com/zy/common/service/CommonService.java
@@ -238,7 +238,7 @@
                if (Utils.isShallowLoc(slaveProperties, locNo)) {
                    continue;
                }
                String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo);
                String shallowLocNo = Utils.getShallowLoc5(slaveProperties, locNo,whsType);
                // 检测目标库位是否为空库位
                LocMast shallowLoc = locMastService.selectById(shallowLocNo);
                if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
@@ -277,7 +277,7 @@
                    if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
                        continue;
                    }
                    String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo());
                    String shallowLocNo = Utils.getShallowLoc5(slaveProperties, loc.getLocNo(),whsType);
                    // 检测目标库位是否为空库位
                    LocMast shallowLoc = locMastService.selectById(shallowLocNo);
                    if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) {
@@ -338,7 +338,7 @@
                    continue;
                }
                if (Utils.BooleanWhsTypeStaIoType(whsType)){
                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                    String shallowLoc = Utils.getDeepLoc5(slaveProperties, locMast1.getLocNo(),whsType);
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                            .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                    if (!Cools.isEmpty(locMast2)) {
@@ -359,7 +359,7 @@
                        continue;
                    }
                    if (Utils.BooleanWhsTypeStaIoType(whsType)){
                        String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                        String shallowLoc = Utils.getDeepLoc5(slaveProperties, locMast1.getLocNo(),whsType);
                        LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                        if (!Cools.isEmpty(locMast2)) {