| | |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | // int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | int shallowRow = row; |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public static boolean BooleanWhsTypeStaIoType(Integer whsType) { //查询相似物料开关 |
| | | if (whsType == 1 || whsType==3 || whsType==4) { |
| | | if (whsType == 1 ||whsType==2 || whsType==3 || whsType==4) { |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | if (BooleanWhsTypeSta(whsType)) { |
| | | necessaryParameters[0] = crnNumber; // 轮询次数 |
| | | //满板正常入库 |
| | | if (curRow.equals(crnNumber * 4 + sRow - 1)) { |
| | | if (curRow.equals(crnNumber * 4 + sRow - 1) || curRow == crnNumber * 4 + sRow - 1) { |
| | | necessaryParameters[1] = sRow; //curRow 最深库位排 |
| | | necessaryParameters[2] = sCrnNo; //crnNo 堆垛机号 |
| | | necessaryParameters[3] = sRow+1; //nearRow 最浅库位排 |
| | | } else if (curRow.equals((crnNumber - 1) * 4 + sRow)) { |
| | | } else if (curRow.equals((crnNumber - 1) * 4 + sRow) || curRow == (crnNumber - 1) * 4 + sRow) { |
| | | necessaryParameters[1] = sRow+3; //curRow 最深库位排 |
| | | necessaryParameters[2] = sCrnNo; //crnNo 堆垛机号 |
| | | necessaryParameters[3] = sRow+2; //nearRow 最浅库位排 |
| | |
| | | RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | Integer sRow = rowLastno.getsRow(); |
| | | Integer eRow = rowLastno.geteRow(); |
| | | Integer sCrnNo = rowLastno.getsCrnNo(); |
| | | |
| | | // 判断仓库类型是否满足要求 |
| | |
| | | |
| | | // 计算最深库位排和最浅库位排 |
| | | int minRow = sRow; // 起始排号 |
| | | int maxRow = sRow + 7; // 终止排号 (8排) |
| | | int maxRow = eRow; // |
| | | |
| | | // 检查排号范围是否合法 |
| | | if (curRow < minRow || curRow > maxRow) { |