| | |
| | | int start; |
| | | int end; |
| | | Integer matType = null;//物料类型 |
| | | Integer crnNo = 0; |
| | | //根据入库站,决定搜索指定堆垛机 |
| | | ArrayList<Integer> crnNos = new ArrayList<>(); |
| | | //根据入库站,找到库位组最内侧排 |
| | |
| | | rows.add(7); |
| | | rows.add(8); |
| | | rows.add(14); |
| | | crnNo = 1; |
| | | break; |
| | | case 203://203入库站 |
| | | whsType = 2; |
| | |
| | | rows.add(14); |
| | | rows.add(15); |
| | | rows.add(21); |
| | | crnNo = 3; |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | |
| | | if (locMast != null) { |
| | | //找到库位,返回dto |
| | | sign=true; |
| | | } |
| | | |
| | | //3号可以入库前必须打开控制 |
| | | if (!Cools.isEmpty(matNos) && crnNo==3) { |
| | | for (String matNo : matNos) { |
| | | Mat mat = matService.selectByMatnr(matNo); |
| | | if (matType == null) { |
| | | matType = mat.getMatType(); |
| | | } |
| | | if (!matType.equals(mat.getMatType())) { |
| | | throw new CoolException("混放物料类型不一致"); |
| | | } |
| | | } |
| | | |
| | | if (matNos.size() > 1 && matType == 1) { |
| | | //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库 |
| | | throw new CoolException("物料类型和实际种类不一致"); |
| | | } |
| | | } |
| | | |
| | | if (!sign && matType != null) { |
| | |
| | | } |
| | | |
| | | if (sign){ |
| | | //3号可以入库前必须打开控制 |
| | | if (!Cools.isEmpty(matNos) && locMast.getCrnNo()==3) { |
| | | for (String matNo : matNos) { |
| | | Mat mat = matService.selectByMatnr(matNo); |
| | | if (matType == null) { |
| | | matType = mat.getMatType(); |
| | | } |
| | | if (!matType.equals(mat.getMatType())) { |
| | | throw new CoolException("混放物料类型不一致"); |
| | | } |
| | | } |
| | | |
| | | if (matNos.size() > 1 && matType == 1) { |
| | | //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库 |
| | | throw new CoolException("物料类型和实际种类不一致"); |
| | | } |
| | | } |
| | | return getLocNoFinalStep(staDescId, sourceStaNo, locMast);//返回dto |
| | | } |
| | | //----------------2023.06.02兼容代码end--------------------- |