自动化立体仓库 - WMS系统
#
LSH
2023-01-30 17dfda3a88e556fa9416f4597153495110aa2aa8
src/main/java/com/zy/common/service/CommonService.java
@@ -356,12 +356,29 @@
        // 2.无库位时,无视区域锁定,重新查找库位
        if (Cools.isEmpty(locMast)){
            List<LocMast> locMasts = locMastService.queryFreeLocMastEnd(curRow);
            int sign=curRow;
            while (true){
                if (locMasts.size()==0){
                    sign = getCurRow(sign);
                    if (sign != 0){
                        locMasts = locMastService.queryFreeLocMastEnd(sign);
                    }else {
                        break;
                    }
                }else {
                    break;
                }
            }
            for (LocMast locMast1 : locMasts){
                List<LocMast> locMasts1 = locMastService.queryFreeLocMastEnd0(locMast1.getBay1(), locMast1.getLev1(),locMast1.getRow1());
                Integer innermostRow = Utils.getInnermostRow(locMasts1.get(0).getLocNo());
                for (LocMast locMast2:locMasts1){
                    if (locMast2.getRow1().equals(innermostRow)) {
                        locMast = locMast2;
                    if (locMast2.getLocSts().equals("O")){
                        if (locMast2.getRow1().equals(innermostRow)) {
                            locMast = locMast2;
                            break;
                        }
                    }else if (!locMast2.getLocSts().equals("F")){
                        break;
                    }
                }
@@ -413,4 +430,28 @@
        }
    }
    public int getCurRow(int curRow){
        switch (curRow){
            case 1:
            case 2:
            case 8:
            case 9:
            case 10:
            case 15:
            case 16:
            case 17:
                return curRow+1;
            case 5:
            case 6:
            case 7:
            case 13:
            case 14:
            case 20:
            case 21:
                return curRow-1;
            default:
                return 0;
        }
    }
}