| | |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) { |
| | | |
| | | if (sourceStaNo.equals(202)) { |
| | | whsType = 1; |
| | | locTypeDto.setLocType1((short) 1); |
| | | } else if (sourceStaNo.equals(209)) { |
| | | whsType = 2; |
| | | locTypeDto.setLocType1((short) 2); |
| | | } |
| | | |
| | | whsType = 1; |
| | | locTypeDto.setLocType1((short) 1); |
| | | StartupDto startupDto = new StartupDto(); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | if (Cools.isEmpty(rowLastno)) { |
| | |
| | | int crnNo = crn_qty; |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | | crnNo=2; |
| | | if (curRow == 3) { |
| | | curRow = 4; |
| | | } else if (curRow == 4) { |
| | | curRow = 3; |
| | | } else { |
| | | rowCount = 0; |
| | | crnNo=1; |
| | | } |
| | | |
| | | if (crnNo == 0) { |
| | | throw new CoolException("没有可用的堆垛机"); |
| | |
| | | rowLastnoService.updateById(rowLastno); |
| | | |
| | | if (crnNo==1){ |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "F").eq("loc_type2", (short) 3)); |
| | | if (!Cools.isEmpty(locMast1)){ |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "F") |
| | | .eq("loc_type1", (short) 3)); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O") |
| | | .eq("loc_type1", (short) 1)); |
| | | if (!Cools.isEmpty(locMast1)||Cools.isEmpty(locMast2)){ |
| | | locMast = locMastService.queryFreeLocMast(2,(short)3); |
| | | if (Cools.isEmpty(locMast)){ |
| | | locMast = locMastService.queryFreeLocMast(1,(short)3); |