| | |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | | if (!Cools.isEmpty(matNos)) { |
| | | for (String matNo : matNos) { |
| | | Mat mat = matService.selectByMatnr(matNo); |
| | | if (matType == null) { |
| | | matType = mat.getMatType(); |
| | | } |
| | | if (matType != mat.getMatType()) { |
| | | throw new CoolException("混放物料类型不一致"); |
| | | } |
| | | } |
| | | |
| | | if (matNos.size() > 1 && matType == 1) { |
| | | //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库 |
| | | throw new CoolException("物料类型和实际种类不一致"); |
| | | } |
| | | } |
| | | //3号可以入库前必须打开控制 |
| | | // if (!Cools.isEmpty(matNos)) { |
| | | // for (String matNo : matNos) { |
| | | // Mat mat = matService.selectByMatnr(matNo); |
| | | // if (matType == null) { |
| | | // matType = mat.getMatType(); |
| | | // } |
| | | // if (matType != mat.getMatType()) { |
| | | // throw new CoolException("混放物料类型不一致"); |
| | | // } |
| | | // } |
| | | // |
| | | // if (matNos.size() > 1 && matType == 1) { |
| | | // //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库 |
| | | // throw new CoolException("物料类型和实际种类不一致"); |
| | | // } |
| | | // } |
| | | |
| | | // 靠近摆放规则 --- 空托 |
| | | locMast = getLocNoStep1(staDescId, locTypeDto, start, end); |
| | |
| | | wrapper.eq("loc_type1", locTypeDto.getLocType1()); |
| | | wrapper.in("crn_no", "1,2"); |
| | | wrapper.eq("loc_sts", "O"); |
| | | locMast = locMastService.selectOne(wrapper); |
| | | if (locMast != null) { |
| | | List<LocMast> locMasts = locMastService.selectList(wrapper); |
| | | for (LocMast mast : locMasts) { |
| | | //检测当前库位内侧其他库位是否为D、F、X |
| | | if (Utils.checkInsideLocIsDFX(mast.getLocNo())) { |
| | | //内侧其他库位不是D、F、X。不能选取该库位 |
| | | continue; |
| | | } |
| | | if(sourceStaNo==103 && mast.getRow1()>7) |
| | | { |
| | | continue; |
| | | } |
| | | if(sourceStaNo==203 && mast.getRow1()<8) |
| | | { |
| | | continue; |
| | | } |
| | | //找到库位,返回dto |
| | | return getLocNoFinalStep(staDescId, sourceStaNo, locMast);//返回dto |
| | | return getLocNoFinalStep(staDescId, sourceStaNo, mast);//返回dto |
| | | } |
| | | //----------------2023.06.02兼容代码end--------------------- |
| | | |