zc
1 天以前 0400f9faa256df6095a00e6facd10b2c4646cb9a
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -683,10 +683,9 @@
        if (Objects.isNull(loc)) {
            throw new CoolException("库存不存在!!");
        }
        if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
            throw new CoolException("当前库位状态不处于S.入库预约,不可执行入库操作!");
        }
//        if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
//            throw new CoolException("当前库位状态不处于S.入库预约,不可执行入库操作!");
//        }
        loc.setUseStatus(LocStsType.LOC_STS_TYPE_F.type)
                .setBarcode(task.getBarcode())
                .setUpdateBy(loginUserId).setUpdateTime(new Date());
@@ -705,6 +704,7 @@
            LocItem locItem = new LocItem();
            LocItemWorking locWorking = locItemWorkingService.getOne(new LambdaQueryWrapper<LocItemWorking>()
                    .eq(LocItemWorking::getTaskId, taskItem.getTaskId())
                    .eq(LocItemWorking::getFieldsIndex, taskItem.getFieldsIndex())
                    .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItemWorking::getBatch, taskItem.getBatch())
                    .eq(LocItemWorking::getMatnrId, taskItem.getMatnrId()));
            if (Objects.isNull(locWorking)) {
@@ -1205,28 +1205,37 @@
            throw new CoolException("库位状态修改失败!!");
        }
        if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
            if (!this.update(new LambdaUpdateWrapper<Task>()
                    .eq(Task::getId, task.getId())
                    .set(Task::getUpdateBy, loginUserId)
                    .set(Task::getUpdateTime, new Date())
                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
                throw new CoolException("库存状态更新失败!!");
            }
        } else {
            if (!this.update(new LambdaUpdateWrapper<Task>()
                    .eq(Task::getId, task.getId())
                    .set(Task::getUpdateBy, loginUserId)
                    .set(Task::getUpdateTime, new Date())
                    .set(Task::getTaskStatus, TaskStsType.UPDATED_OUT.id))) {
                throw new CoolException("库存状态更新失败!!");
            }
            //全板出库,删除临时库存
            if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
                throw new CoolException("临时库存清除失败!!");
            }
        if (!this.update(new LambdaUpdateWrapper<Task>()
                .eq(Task::getId, task.getId())
                .set(Task::getUpdateBy, loginUserId)
                .set(Task::getUpdateTime, new Date())
                .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
            throw new CoolException("库存状态更新失败!!");
        }
//        if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
//            if (!this.update(new LambdaUpdateWrapper<Task>()
//                    .eq(Task::getId, task.getId())
//                    .set(Task::getUpdateBy, loginUserId)
//                    .set(Task::getUpdateTime, new Date())
//                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
//                throw new CoolException("库存状态更新失败!!");
//            }
//        } else {
//            if (!this.update(new LambdaUpdateWrapper<Task>()
//                    .eq(Task::getId, task.getId())
//                    .set(Task::getUpdateBy, loginUserId)
//                    .set(Task::getUpdateTime, new Date())
//                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
//                throw new CoolException("库存状态更新失败!!");
//            }
////            //全板出库,删除临时库存
////            if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
////                throw new CoolException("临时库存清除失败!!");
////            }
//        }
    }
    /**