自动化立体仓库 - WMS系统
#
lsh
2024-02-17 b43b90ed4ff5e61df7c87553c8cab5daea66cb8e
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -536,6 +536,7 @@
        if (Cools.isEmpty(param.getOutSite())) {
            throw new CoolException("站点不存在");
        }
        List<String> locNoOtherList = new ArrayList<>();
        for (String locNo : param.getLocNos()) {
            // 获取工作号
            int workNo = commonService.getWorkNo(WorkNoType.PAKOUT.type);
@@ -594,6 +595,48 @@
        }
    }
    public String[] staNoOther(String locNo){
        String[] strings = new String[2];
        int row = Utils.getRow(locNo);
        if (row==1 || row==5 ){
            strings[0] = locNo;
            strings[1] = getDeepLoc2(locNo,row);
            return strings;
        } else if (row == 4 || row == 8){
            strings[0] = getDeepLoc2(locNo,row);
            strings[1] = locNo;
            return strings;
        }else {
            return null;
        }
    }
    /**
     * 获取 浅库位对应的深库位号
     */
    public static String getDeepLoc(String shallowLoc,int row) {
        if (row == 2 || row == 6) {
            return Utils.zerofill(String.valueOf(row-1), 2) + shallowLoc.substring(2);
        } else if (row == 3 || row == 7) {
            return Utils.zerofill(String.valueOf(row+1), 2) + shallowLoc.substring(2);
        }else {
            return shallowLoc;
        }
    }
    /**
     * 获取 深库位对应的浅库位号
     */
    public static String getDeepLoc2(String shallowLoc,int row) {
        if (row == 1 || row == 5) {
            return Utils.zerofill(String.valueOf(row+1), 2) + shallowLoc.substring(2);
        } else if (row == 4 || row == 8) {
            return Utils.zerofill(String.valueOf(row-1), 2) + shallowLoc.substring(2);
        }else {
            return null;
        }
    }
    @Override
    @Transactional
    public WrkMast emptyPlateOut(EmptyPlateOutParam param) {