| | |
| | | task.setTaskSts(TaskStsType.UPDATED_OUT.id);//200.库存更新完成
|
| | | if (!taskService.updateById(task)) {
|
| | | throw new CoolException("库存更新失败");
|
| | | } else {
|
| | | //CacheSite 释放已被占用的通道 //fixme 播种功能完成后,需要将这里注释掉
|
| | | // List<TaskDetl> detls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().eq(TaskDetl::getTaskId, task.getId()));
|
| | | // if (!Collections.isEmpty(detls)) {
|
| | | // List<Long> waveIds = detls.stream().map(TaskDetl::getWaveId).collect(Collectors.toList());
|
| | | // List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().in(Order::getWaveId, waveIds));
|
| | | // List<Long> orderIds = orders.stream().map(Order::getId).collect(Collectors.toList());
|
| | | // cacheSiteService.update(new LambdaUpdateWrapper<CacheSite>()
|
| | | // .in(CacheSite::getOrderId, orderIds)
|
| | | // .set(CacheSite::getSiteStatus, 0)
|
| | | // .set(CacheSite::getOrderId, null)
|
| | | // .set(CacheSite::getOrderNo, null));
|
| | | // }
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | |
| | | if (!locDetlService.save(locDetl)) {
|
| | | throw new CoolException("插入库存明细失败");
|
| | | }
|
| | | //fixme 暂时关闭HOSTID,后续打开机构ID
|
| | |
|
| | | //添加库存明细扩展字段
|
| | | // List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()).eq(TaskDetlField::getHostId, hostId));
|
| | | List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()));
|
| | | List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()).eq(TaskDetlField::getHostId, hostId));
|
| | | for (TaskDetlField detlField : detlFields) {
|
| | | LocDetlField locDetlField = new LocDetlField();
|
| | | locDetlField.setDetlId(locDetl.getId());
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | //fixme 暂时关闭HOSTID,后续打开机构ID
|
| | | //组托通知档转历史档
|
| | | // List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, task.getBarcode()).eq(WaitPakin::getHostId, hostId));
|
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, task.getBarcode()));
|
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, task.getBarcode()).eq(WaitPakin::getHostId, hostId));
|
| | | if (waitPakins.isEmpty()) {
|
| | | throw new CoolException("组托通知档不存在");
|
| | | }
|
| | |
| | | private void executeTask53(Task task) {
|
| | | Long hostId = task.getHostId();
|
| | | //fixme 将任务当前
|
| | | // Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()).eq(Loc::getHostId, hostId));
|
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()));
|
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()).eq(Loc::getHostId, hostId));
|
| | | // Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()));
|
| | | if (loc == null) {
|
| | | throw new CoolException("库位不存在");
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | //添加库存明细扩展字段
|
| | | //fixme 注释
|
| | | // List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()).eq(TaskDetlField::getHostId, hostId));
|
| | | List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()));
|
| | | List<TaskDetlField> detlFields = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId()).eq(TaskDetlField::getHostId, hostId));
|
| | | for (TaskDetlField detlField : detlFields) {
|
| | | LocDetlField locDetlField = new LocDetlField();
|
| | | locDetlField.setDetlId(locDetl.getId());
|