自动化立体仓库 - WMS系统
#
lsh
2024-06-20 bf22f0953d5a2e699b6a69dc4b6bfab8ec0a7c7d
#
1个文件已修改
49 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -847,10 +847,6 @@
//            }
        }
        if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) {
            locMast = null;
        }
        // 递归查询
        if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) {
            // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归
@@ -978,53 +974,14 @@
                    continue;
                }
                if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
//                    String shallowLoc = Utils.getDeepLocYTl(slaveProperties, locMast1.getLocNo());
//                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
//                            .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()));
                    //获取目标库位所在巷道最深空库位
                    LocMast locMast2 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue());
                    if (!Cools.isEmpty(locMast2) && locMast2.getBay1()==curRow) {
                        locMast = locMast2;
                        break;
                    }
                }
            }
            //未找到  允许混料
            if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){
                for (LocMast locMast1 : locMasts) {
                    if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                        continue;
                    }
                    if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
                        //获取目标库位所在巷道并排序
//                        List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow);
                        //获取目标库位所在巷道最浅非空库位
                        LocMast locMast2 = locMastService.selectLocByLocStsPakInF(curRow,nearRow,locMast1,rowLastnoType.getType().longValue());
                        if (Cools.isEmpty(locMast2)) {
                            LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue());
                            if (!Cools.isEmpty(locMast3)) {
                                locMast = locMast3;
                                break;
                            }
                        } else {
                            if ((locMast2.getLocSts().equals("F") && staDescId == 1) || (locMast2.getLocSts().equals("D") && staDescId == 10)){
                                LocMast locMast3 = locMastService.selectLocByLocStsPakInO(curRow,nearRow,locMast1,rowLastnoType.getType().longValue());
                                if (!Cools.isEmpty(locMast3)) {
                                    locMast = locMast3;
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) {
            locMast = null;
        }
        // 递归查询
@@ -1034,12 +991,6 @@
                times = times + 1;
                return getLocNoRun5(whsType, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times);
            }
//            // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位
//            if (locTypeDto.getLocType1() < 2) {
//                int i = locTypeDto.getLocType1() + 1;
//                locTypeDto.setLocType1((short)i);
//                return getLocNo(1, staDescId, sourceStaNo, matnr,batch,grade, locTypeDto, 0);
//            }
            log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);
            throw new CoolException("没有空库位");
        }