| | |
| | | return defaultLoc;
|
| | | }
|
| | | }
|
| | |
|
| | | //fixme 如果没有相邻库位是否考虑推荐库位
|
| | | if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.SUGGEST.id)) {
|
| | | //获取推荐库位
|
| | | List<Loc> suggestLoc = locUtils.getSuggestLoc(taskType, mat.getId(), batch, locTypeHeight, laneRowList, currentLev);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public boolean generatePakIn(GeneratePakInParam param) {
|
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, param.getBarcode()));
|
| | | if (param.getTaskType() != 10 && waitPakins.isEmpty()) {
|
| | |
| | | }
|
| | |
|
| | | Task task = new Task();
|
| | | task.setTaskNo(this.generateTaskNo(taskType.getId()));//任务号
|
| | | task.setTaskSts(TaskStsType.GENERATE_IN.id);//1.生成入库任务
|
| | | task.setTaskType(taskType.getId());//任务类型
|
| | | task.setIoPri(this.generateIoPri(taskType.getId()));//优先级
|
| | | //任务号
|
| | | task.setTaskNo(this.generateTaskNo(taskType.getId()));
|
| | | //1.生成入库任务
|
| | | task.setTaskSts(TaskStsType.GENERATE_IN.id);
|
| | | //任务类型
|
| | | task.setTaskType(taskType.getId());
|
| | | //优先级
|
| | | task.setIoPri(this.generateIoPri(taskType.getId()));
|
| | | task.setOriginLoc(null);
|
| | | task.setTargetLoc(loc.getLocNo());
|
| | | task.setOriginSite(param.getOriginSite());
|
| | | task.setTargetSite(null);
|
| | | task.setBarcode(param.getBarcode());//托盘码
|
| | | //托盘码
|
| | | task.setBarcode(param.getBarcode());
|
| | | boolean taskSave = taskService.save(task);
|
| | | if (!taskSave) {
|
| | | throw new CoolException("任务生成失败");
|
| | |
| | | TaskDetl taskDetl = new TaskDetl();
|
| | | taskDetl.setTaskId(task.getId());
|
| | | taskDetl.setTaskNo(task.getTaskNo());
|
| | | taskDetl.setAnfme(waitPakin.getAnfme());//数量
|
| | | taskDetl.setStock(0D);//库存
|
| | | taskDetl.setBatch(waitPakin.getDetl$().getBatch());//批号
|
| | | //数量
|
| | | taskDetl.setAnfme(waitPakin.getAnfme());
|
| | | //库存
|
| | | taskDetl.setStock(0D);
|
| | | //批号
|
| | | taskDetl.setBatch(waitPakin.getDetl$().getBatch());
|
| | | taskDetl.setBarcode(waitPakin.getBarcode());
|
| | | taskDetl.setOrderId(waitPakin.getOrderId());
|
| | | taskDetl.setOrderNo(waitPakin.getOrderNo());
|
| | |
| | | throw new CoolException("任务类型不可拣料");
|
| | | }
|
| | |
|
| | | if (task.getTaskSts() != 200) {
|
| | | if (task.getTaskSts() != 198) {
|
| | | throw new CoolException("当前状态不可拣料");
|
| | | }
|
| | |
|