| | |
| | | LocMast locMast = null; |
| | | |
| | | // 靠近摆放规则 --- 同天同规格物料 |
| | | if (!Cools.isEmpty(matNos)) { |
| | | if (!Cools.isEmpty(matNos) && (whsType==2 || whsType==4)) { |
| | | List<String> locNos = locDetlService.getSameDetlToday(matNos.get(0), sRow, eRow); |
| | | for (String locNo : locNos) { |
| | | if (Utils.isShallowLoc(slaveProperties, locNo)) { |
| | |
| | | } |
| | | |
| | | // 靠近摆放规则 --- 空托 |
| | | if (staDescId == 10) { |
| | | if (staDescId == 10 && (whsType==2 || whsType==4)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | if (locMasts.size() > 0) { |
| | | for (LocMast loc : locMasts) { |
| | |
| | | |
| | | // 1.当检索库排为浅库位排时,优先寻找当前库排的深库位排 |
| | | if (locMast == null) { |
| | | if (Utils.isShallowLoc(slaveProperties, curRow)) { |
| | | if ((whsType==2 || whsType==4) && Utils.isShallowLoc(slaveProperties, curRow)) { |
| | | Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); |
| | | locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1()); |
| | | // todo:luxiaotao 如果用浅排找到的深库位,那么则需要判断这个深库位对应的浅库位是否有货(F、X、D) |
| | |
| | | locMast = null; |
| | | } |
| | | // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X |
| | | if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | if ((whsType==2 || whsType==4) && null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { |
| | | locMast = null; |
| | | } |
| | | } |
| | | // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O |
| | | if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | if ((whsType==2 || whsType==4) && null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { |
| | | LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); |
| | | if (!shallowLoc.getLocSts().equals("O")) { |
| | | locMast = null; |
| | |
| | | } |
| | | } |
| | | } |
| | | //20230203添加 lfd料箱库根据输送线筛选入库 |
| | | if (!Cools.isEmpty(locMast) && locMast.getCrnNo()<5){ |
| | | int wrkMastsC0 = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", locMast.getCrnNo()).eq("io_type",1)); |
| | | if (wrkMastsC0>3 && times < rowCount){ |
| | | int locO1 = locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("crn_no", 1)); |
| | | BasCrnp basCrnp1 = basCrnpService.selectById(1); |
| | | if (!Cools.isEmpty(locO1) && basCrnp1.getInEnable().equals("Y") && basCrnp1.getCrnSts().equals(3)){ |
| | | int wrkMastsC1 = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", 1).eq("io_type",1)); |
| | | if (wrkMastsC0>wrkMastsC1){ |
| | | locMast=null; |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(locMast)){ |
| | | locO1=locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("crn_no", 2)); |
| | | BasCrnp basCrnp2 = basCrnpService.selectById(2); |
| | | if (!Cools.isEmpty(locO1) && basCrnp2.getInEnable().equals("Y") && basCrnp2.getCrnSts().equals(3)){ |
| | | int wrkMastsC2 = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", 2).eq("io_type",1)); |
| | | if (wrkMastsC0>wrkMastsC2){ |
| | | locMast=null; |
| | | } |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(locMast)){ |
| | | locO1=locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("crn_no", 2)); |
| | | BasCrnp basCrnp3 = basCrnpService.selectById(3); |
| | | if (!Cools.isEmpty(locO1) && basCrnp3.getInEnable().equals("Y") && basCrnp3.getCrnSts().equals(3)){ |
| | | int wrkMastsC3 = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", 3).eq("io_type",1)); |
| | | if (wrkMastsC0>wrkMastsC3){ |
| | | locMast=null; |
| | | } |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(locMast)){ |
| | | locO1=locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("crn_no", 2)); |
| | | BasCrnp basCrnp4 = basCrnpService.selectById(4); |
| | | if (!Cools.isEmpty(locO1) && basCrnp4.getInEnable().equals("Y") && basCrnp4.getCrnSts().equals(3)){ |
| | | int wrkMastsC4 = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", 4).eq("io_type",1)); |
| | | if (wrkMastsC0>wrkMastsC4){ |
| | | locMast=null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | if (Cools.isEmpty(locMast)) { |