| | |
| | | */ |
| | | public LocMast getLocNo2(WaitPakin waitPakin, Integer[] arr, Integer d, Integer locType, Integer locType1) { |
| | | LocMast locMast = null; |
| | | try { |
| | | //一.查询入库货物是否是特殊摆放货物 |
| | | if (locType == 2) { |
| | | //查找层标记的 |
| | |
| | | } |
| | | //该层没有找到库位时进入递归换层找库位 |
| | | if (Cools.isEmpty(locMast)) { |
| | | ++d; |
| | | if (d > 6) { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | if (d == 6 && locType == 2) { |
| | | return getLocNo2(waitPakin, arr, 0, 1, locType1); |
| | | } |
| | | return getLocNo2(waitPakin, arr, d++, locType, locType1); |
| | | return getLocNo2(waitPakin, arr, d, locType, locType1); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return locMast; |
| | | } |
| | | |
| | |
| | | WaitPakin waitPakin1=new WaitPakin(); |
| | | waitPakin1.sync(wrkDetl); |
| | | locMast1 =commonService.getLocNo2(waitPakin1,arr,0,type,1); |
| | | if (locMast1 == null) { |
| | | basDevp.setArea("未找到空库位"); |
| | | basDevpService.updateById(basDevp); |
| | | throw new CoolException("未找到空库位"); |
| | | } |
| | | |
| | | //更新货物所在库位的深浅号 |
| | | wrkDetl.setSource(locMast1.getLocAttribute()); |
| | | wrkDetlService.update(wrkDetl,new EntityWrapper<WrkDetl>().eq("wrk_no", wrkDetl.getWrkNo())); |
| | |
| | | int type=Cools.isEmpty(waitPakins.get(0).getBeBatch())?1:waitPakins.get(0).getBeBatch(); |
| | | // 检索库位 |
| | | locMast1 =commonService.getLocNo2(waitPakins.get(0),arr,0,type,1); |
| | | if (locMast1 == null) { |
| | | basDevp.setArea("未找到空库位"); |
| | | basDevpService.updateById(basDevp); |
| | | throw new CoolException("未找到空库位"); |
| | | } |
| | | |
| | | int mbz=devpNo*10+Integer.valueOf(locMast1.getLocNo().substring(6)); |
| | | //正常入库 |
| | | workNo = commonService.getWorkNo(0); |