| | |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber*2; i++) { |
| | | for (int i = times; i < crnNumber*4; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | |
| | | |
| | | // 1.按规则查找库位 |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (Cools.isEmpty(locMast)){ |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber; i++) { |
| | | for (int i = times; i < crnNumber*4; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | |
| | | |
| | | // 1.按规则查找库位 |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (Cools.isEmpty(locMast)){ |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D")); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) { |