| | |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber*2; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | if (basCrnpService.checkSiteError(crnNo, true)) { |
| | |
| | | |
| | | // 1.按规则查找库位 |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | List<LocMast> locMasts = null; |
| | | if (Utils.isNorth(sourceStaNo)){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",false)); |
| | | }else { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .orderBy("lev1",true).orderBy("bay1",true)); |
| | | } |
| | | |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber*2; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType); |
| | | rowCount = locNecessaryParameters[0]; |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("crn_no",7)); |
| | | int nearbay = 0; |
| | | int nearlev = 0; |
| | | for (LocMast locMastSign:locMasts){ |
| | |
| | | |
| | | for (int i = 0; i < crnNumber*2; i++) { |
| | | if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){ |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType); |
| | | curRowW = locNecessaryParameters[1]; |
| | | nearRowW = locNecessaryParameters[3]; |
| | | }else { |
| | |
| | | bay2=Utils.getBay(locMast2.getLocNo())+1; |
| | | } |
| | | String targetLocNo = locMast2.getLocNo().substring(0,2) +zerofill(String.valueOf(bay2), 3) + locMast2.getLocNo().substring(5); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O")); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("crn_no",7).eq("loc_sts","O")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | continue; |
| | | } |
| | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("bay1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) |
| | | .eq("crn_no",7) |
| | | .orderBy("lev1",true).orderBy("row1",false));//最浅库位 |
| | | |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (locMast != null){ |
| | | break; |
| | |
| | | if (curRow < nearRow){ |
| | | locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast1.getGro1()) |
| | | .eq("crn_no",7) |
| | | .orderBy("bay1",true)); |
| | | if(locMasts1.size() == 3 || (curRow>20 && locMasts1.size() == 2)){ |
| | | locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast1.getGro1()) |
| | | .eq("crn_no",7) |
| | | .orderBy("bay1",false)); |
| | | } |
| | | }else { |
| | | locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("gro1", locMast1.getGro1()) |
| | | .eq("crn_no",7) |
| | | .orderBy("bay1",false)); |
| | | } |
| | | if (Cools.isEmpty(locMasts1)) { |
| | |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | rowCount = locNecessaryParameters[0]; |