自动化立体仓库 - WMS系统
#
lsh
2025-01-12 e67cb04af87e32a19c2b1e0756e6e8c6d0c7d1f8
src/main/java/com/zy/common/service/CommonService.java
@@ -160,7 +160,13 @@
            throw new CoolException("数据异常,请联系管理员");
        }
        // ===============>>>> 开始执行
        curRow = rowLastno.getCurrentRow();
        if (sourceStaNo == 118 || sourceStaNo == 122){
            curRow = rowLastno.getCurrentRow1();
        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
            curRow = rowLastno.getCurrentRow2();
        } else {
            curRow = rowLastno.getCurrentRow();
        }
        if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){
            crnNumber = moveCrnNo;
@@ -172,7 +178,7 @@
        }
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i < crnNumber; i++) {
        for (int i = times; i < crnNumber*2; i++) {
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber);
            curRow = locNecessaryParameters[1];
            crnNo = locNecessaryParameters[2];
@@ -181,6 +187,7 @@
                nearRow = locNecessaryParameters[3];
                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
                if (locMasts.size()<=10){
                    nearRow = 0;
                    times++;
                    continue;
                }
@@ -223,10 +230,20 @@
                        if (locMast2.getCrnNo()==1 || locMast2.getCrnNo()==6){
                            continue;
                        }
                        if (sourceStaNo == 118 || sourceStaNo == 122){
                            if (locMast2.getCrnNo()>3){
                                continue;
                            }
                        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                            if (locMast2.getCrnNo()<4){
                                continue;
                            }
                        }
                    }
                    LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast2.getLocNo()));
                    if (!Cools.isEmpty(locDetl) && matnr.equals(locDetl.getMatnr())) {
                        locMast = locMast1;
                        crnNo = locMast.getCrnNo();
                        break;
                    }
                }
@@ -244,6 +261,15 @@
                    if (sourceStaNo<200){
                        if (shallowLoc.getCrnNo()==1 || shallowLoc.getCrnNo()==6){
                            continue;
                        }
                        if (sourceStaNo == 118 || sourceStaNo == 122){
                            if (shallowLoc.getCrnNo()>3){
                                continue;
                            }
                        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                            if (shallowLoc.getCrnNo()<4){
                                continue;
                            }
                        }
                    }
                    if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) {
@@ -329,7 +355,13 @@
        // 更新库位排号
        if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
            rowLastno.setCurrentRow(curRow);
            if (sourceStaNo == 118 || sourceStaNo == 122){
                rowLastno.setCurrentRow1(curRow);
            } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                rowLastno.setCurrentRow2(curRow);
            } else {
                rowLastno.setCurrentRow(curRow);
            }
            rowLastnoService.updateById(rowLastno);
        }
@@ -426,7 +458,13 @@
            throw new CoolException("数据异常,请联系管理员");
        }
        // ===============>>>> 开始执行
        curRow = rowLastno.getCurrentRow();
        if (sourceStaNo == 118 || sourceStaNo == 122){
            curRow = rowLastno.getCurrentRow1();
        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
            curRow = rowLastno.getCurrentRow2();
        } else {
            curRow = rowLastno.getCurrentRow();
        }
        if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){
            crnNumber = moveCrnNo;
@@ -448,6 +486,7 @@
                    nearRow = locNecessaryParameters[3];
                    List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
                    if (locMasts.size()<=10){
                        nearRow = 0;
                        times++;
                        continue;
                    }
@@ -461,6 +500,7 @@
                    nearRow = locNecessaryParameters[3];
                    List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
                    if (locMasts.size()<=10){
                        nearRow = 0;
                        times++;
                        continue;
                    }
@@ -598,7 +638,13 @@
        // 更新库位排号
        if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
            rowLastno.setCurrentRow(curRow);
            if (sourceStaNo == 118 || sourceStaNo == 122){
                rowLastno.setCurrentRow1(curRow);
            } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                rowLastno.setCurrentRow2(curRow);
            } else {
                rowLastno.setCurrentRow(curRow);
            }
            rowLastnoService.updateById(rowLastno);
        }