skyouc
4 天以前 7d27cdccf8b92f32e80499f1f06c4b8ab93936c1
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -426,23 +426,22 @@
        }
        List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()));
        if (taskItems.isEmpty()) {
            throw new CoolException("任务明细不存在!!");
        if (!taskItems.isEmpty()) {
            //移库有可能是空板
            try {
                //更新库位明细
                saveLocItem(taskItems, task.getId());
            } catch (Exception e) {
                throw new CoolException("库位明细更新失败!!");
            }
            if (!locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocCode, task.getOrgLoc()))) {
                throw new CoolException("源库位明细删除失败!");
            }
        }
        try {
            //更新库位明细
            saveLocItem(taskItems, task.getId());
        } catch (Exception e) {
            throw new CoolException("库位明细更新失败!!");
        }
//        /**对任务明细按组拖明细进行分组*/
//        try {
//            //保存库存明细
//            saveStockItems(taskItems, null, null, pakinItem.getWkType(), pakinItem.getType());
//        } catch (Exception e) {
//            log.error("<UNK>", e);
//            throw new CoolException(e.getMessage());
//        }
        /**修改库位状态为F.在库*/
        if (!locService.update(new LambdaUpdateWrapper<Loc>()
                        .set(Loc::getBarcode, task.getBarcode())
@@ -457,9 +456,6 @@
            throw new CoolException("库位状态修改失败!!");
        }
        if (!locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocCode, task.getOrgLoc()))) {
            throw new CoolException("源库位明细删除失败!");
        }
        if (!this.update(new LambdaUpdateWrapper<Task>().eq(Task::getId, task.getId()).set(Task::getTaskStatus, TaskStsType.UPDATED_IN.id))) {
            throw new CoolException("任务状态修改失败!!");
@@ -743,12 +739,6 @@
    public void complateOutStock(Task task) throws Exception {
        if (Objects.isNull(task)) {
            throw new CoolException("参数不能为空!!");
        }
        if (StringUtils.isNotBlank(task.getParentId() + "")) {
            Task task1 = taskService.getById(task.getParentId());
            if (!Objects.isNull(task1)) {
                throw new CoolException("父任务:" + task1.getTaskCode() + "未执行完成!");
            }
        }
        Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getOrgLoc()));