| | |
| | | // List<String> matnrs = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatnr).distinct().collect(Collectors.toList()); |
| | | // List<String> batchs = param.getList().stream().map(FullStoreParam.MatCodeStore::getBatch).distinct().collect(Collectors.toList()); |
| | | FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(param.getList().get(0)); |
| | | StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo, locTypeDto); |
| | | StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo, locTypeDto, param.getBarcode()); |
| | | if (Cools.isEmpty(dto)) { |
| | | throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo"); |
| | | } |
| | |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(); |
| | | |
| | | StartupDto dto = commonService.getLocNo(10, devpNo, findLocNoAttributeVo, locTypeDto); |
| | | StartupDto dto = commonService.getLocNo(10, devpNo, findLocNoAttributeVo, locTypeDto, null); |
| | | int workNo = dto.getWorkNo(); |
| | | Date now = new Date(); |
| | | // 生成工作档 |
| | |
| | | if (Cools.isEmpty(sourceLoc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | |
| | | if (Utils.isDeepLoc(slaveProperties, sourceLocNo)) { |
| | | String shallowLoc = Utils.getShallowLoc(slaveProperties, sourceLocNo); |
| | | LocMast locMast = locMastService.selectById(shallowLoc); |
| | | if (locMast == null) { |
| | | throw new CoolException(shallowLoc + "浅库位不存在"); |
| | | } |
| | | |
| | | if(!locMast.getLocSts().equals("O")) { |
| | | throw new CoolException(shallowLoc + "浅库位状态不为空"); |
| | | } |
| | | } |
| | | |
| | | LocMast loc = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(loc)) { |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | |
| | | if (Utils.isDeepLoc(slaveProperties, locNo)) { |
| | | String shallowLoc = Utils.getShallowLoc(slaveProperties, locNo); |
| | | LocMast locMast = locMastService.selectById(shallowLoc); |
| | | if (locMast == null) { |
| | | throw new CoolException(shallowLoc + "浅库位不存在"); |
| | | } |
| | | |
| | | if(!locMast.getLocSts().equals("O")) { |
| | | throw new CoolException(shallowLoc + "浅库位有货,无法移转"); |
| | | } |
| | | } |
| | | |
| | | // 判断库位是否冻结 |
| | | String sourceLocFrozen = locMastMapper.findFirstFrozenLocNo(Arrays.asList(sourceLoc.getLocNo(), loc.getLocNo())); |
| | | if (sourceLocFrozen != null) { |
| | |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setMemo("人工手动移库"); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | throw new CoolException("保存工作档失败"); |