| | |
| | | dtos.add(new OutLocDto(locNo, locDetlDto)); |
| | | } |
| | | } |
| | | Config config = configService.selectConfigByCode("AutoMPArea"); |
| | | |
| | | List<LocMast> list = locMastMapper.selectList( |
| | | new EntityWrapper<LocMast>() |
| | | .eq("whs_type", 5) |
| | | .eq("loc_sts", "O") |
| | | ); |
| | | LocMast locMastRgv = list.isEmpty() ? null : list.get(0); |
| | | |
| | | Integer ioType = null; |
| | | // 生成工作档 |
| | | for (OutLocDto dto : dtos) { |
| | |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | if (Boolean.parseBoolean(config.getValue()) && locMastRgv.getLocNo() != null) { //若有空库位且配置允许则绑定其备料库位号 |
| | | wrkMast.setLocNo(locMastRgv.getLocNo()); |
| | | wrkMast.setTakeNone("0"); //0rgv未取,1rgv已取货 |
| | | } |
| | | wrkMast.setAppeUser(userId); // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | | //修改agv备料区状态 |
| | | if(locMastRgv.getLocSts().equals("O")){ |
| | | locMastRgv.setLocSts("S"); |
| | | locMastRgv.setModiUser(userId); |
| | | locMastRgv.setModiTime(now); |
| | | if (!locMastService.updateById(locMastRgv)) { |
| | | throw new CoolException("预约agv备料区库位状态失败,库位号:"+locMastRgv.getLocNo()); |
| | | } |
| | | }else{ |
| | | throw new CoolException(locMastRgv.getLocNo() + "备料区不是空库位状态"); |
| | | |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(dto.getLocNo()); |
| | |
| | | locMastRgv.setModiUser(userId); |
| | | locMastRgv.setModiTime(now); |
| | | if (!locMastService.updateById(locMastRgv)) { |
| | | throw new CoolException("预约agv备料区库位状态失败,库位号:"+taskDto.getLocNo()); |
| | | throw new CoolException("预约agv备料区库位状态失败,库位号:"+locMastRgv.getLocNo()); |
| | | } |
| | | }else{ |
| | | throw new CoolException(taskDto.getLocNo() + "备料区不是空库位状态"); |
| | | throw new CoolException(locMastRgv.getLocNo() + "备料区不是空库位状态"); |
| | | |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |