| | |
| | | if (Cools.isEmpty(param.getOutSite())) { |
| | | throw new CoolException("站点不存在"); |
| | | } |
| | | List<String> locNoOtherList = new ArrayList<>(); |
| | | for (String locNo : param.getLocNos()) { |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PAKOUT.type); |
| | |
| | | throw new CoolException("更新库位状态失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public String[] staNoOther(String locNo){ |
| | | String[] strings = new String[2]; |
| | | int row = Utils.getRow(locNo); |
| | | if (row==1 || row==5 ){ |
| | | strings[0] = locNo; |
| | | strings[1] = getDeepLoc2(locNo,row); |
| | | return strings; |
| | | } else if (row == 4 || row == 8){ |
| | | strings[0] = getDeepLoc2(locNo,row); |
| | | strings[1] = locNo; |
| | | return strings; |
| | | }else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取 浅库位对应的深库位号 |
| | | */ |
| | | public static String getDeepLoc(String shallowLoc,int row) { |
| | | if (row == 2 || row == 6) { |
| | | return Utils.zerofill(String.valueOf(row-1), 2) + shallowLoc.substring(2); |
| | | } else if (row == 3 || row == 7) { |
| | | return Utils.zerofill(String.valueOf(row+1), 2) + shallowLoc.substring(2); |
| | | }else { |
| | | return shallowLoc; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取 深库位对应的浅库位号 |
| | | */ |
| | | public static String getDeepLoc2(String shallowLoc,int row) { |
| | | if (row == 1 || row == 5) { |
| | | return Utils.zerofill(String.valueOf(row+1), 2) + shallowLoc.substring(2); |
| | | } else if (row == 4 || row == 8) { |
| | | return Utils.zerofill(String.valueOf(row-1), 2) + shallowLoc.substring(2); |
| | | }else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", param.getLocDetls().get(0).getMatnr())); |
| | | if (Cools.isEmpty(locDetls) || locDetls.size()<1){ |
| | | throw new CoolException("待修改商品无库存,无需修改! 品号:"+param.getLocDetls().get(0).getMatnr()); |
| | | throw new CoolException("待修改商品无库存,无需修改! 规格:"+param.getLocDetls().get(0).getMatnr()); |
| | | } |
| | | try { |
| | | locDetlService.updateMatTurn(param.getLocDetls().get(0).getMatnr(),mat.getMatnr()); |