| | |
| | | } |
| | | |
| | | // 入库 -------------------------------------------------------------------------------- |
| | | if (wrkMast.getWrkSts() == 5) { |
| | | if (wrkMast.getWrkSts() == 10) { |
| | | // 全板入库 |
| | | if (wrkMast.getIoType() == 1) { |
| | | // 入库通知单 |
| | |
| | | } |
| | | |
| | | // 出库 -------------------------------------------------------------------------------- |
| | | } else if (wrkMast.getWrkSts() == 15) { |
| | | } else if (wrkMast.getWrkSts() == 18) { |
| | | if (!Cools.isEmpty(wrkDetls)) { |
| | | if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { |
| | | exceptionHandle("生成手动出库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setWrkSts(10L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | exceptionHandle("更新入库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(15L); |
| | | wrkMast.setWrkSts(18L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | exceptionHandle("更新出库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws InterruptedException { |
| | | Shelves shelves = new Shelves(2,2); |
| | | Shelves shelves = new Shelves(1,1); |
| | | System.out.println(shelves.nodes.toString()); |
| | | int start = 1; |
| | | while (true) { |
| | |
| | | */ |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) { |
| | | StartupDto startupDto = new StartupDto(); |
| | | switch (sourceStaNo) { |
| | | case 107: |
| | | whsType = 2; |
| | | break; |
| | | case 118: |
| | | whsType = 3; |
| | | break; |
| | | default: |
| | | whsType = 1; |
| | | break; |
| | | } |
| | | // 生成工作号 |
| | | int workNo = getWorkNo(0); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | Integer crnNo1 = shelves.get(curRow) + 1; |
| | | if (whsType != 1) { |
| | | crnNo1 = whsType; |
| | | } |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | | break; |
| | |
| | | // 1.当检索库排为浅库位排时,优先寻找当前库排的深库位排 |
| | | if (locMast == null) { |
| | | List<Integer> rows; |
| | | if (whsType == 2) { |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | | } else if (whsType == 3) { |
| | | rows = SECOND_GROUP_ROW_LIST; |
| | | } else { |
| | | switch (curRow) { |
| | | case 1: |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | |
| | | default: |
| | | throw new CoolException("入库逻辑故障【" + curRow + "】"); |
| | | } |
| | | } |
| | | |
| | | locMast = locMastService.queryFreeLocMast(curRow, rows, locTypeDto.getLocType1()); |
| | | locMast = locMastService.queryFreeLocMast(null, rows, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | // if (!locMastService.checkEmptyCount(locMast)) { |
| | | // locMast = null; |
| | |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | <if test="locType2 != null"> |
| | | and loc_type2 = #{locType2} |
| | | </if> |
| | | <if test="locType3 != null"> |
| | | and loc_type3 = #{locType3} |
| | | </if> |
| | | and loc_sts='O' |
| | | order by loc_sts desc,row1 asc, lev1 asc, bay1 asc |
| | | </select> |