skyouc
3 天以前 093c43638d3f9aa64fc3b396a0a2452cc28abbe3
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -465,12 +465,17 @@
            if (Objects.isNull(locWorking)) {
                throw new CoolException("数据错误,作业中库存数据丢失!!");
            }
            if (locWorking.getAnfme().compareTo(taskItem.getAnfme()) >= 0) {
                locWorking.setAnfme(Math.round((locWorking.getAnfme() - taskItem.getAnfme()) * 10000) / 10000.0);
            if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
                locWorking.setWorkQty(0.0);
                locWorking.setAnfme(taskItem.getAnfme());
            } else {
                continue;
                if (locWorking.getAnfme().compareTo(taskItem.getAnfme()) >= 0) {
                    locWorking.setWorkQty(0.0);
                    locWorking.setAnfme(Math.round((locWorking.getAnfme() - taskItem.getAnfme()) * 10000) / 10000.0);
                } else {
                    continue;
                }
            }
            BeanUtils.copyProperties(locWorking, locItem);
            locItem.setLocCode(loc.getCode()).setLocId(loc.getId()).setId(null);
            items.add(locItem);
@@ -721,18 +726,19 @@
            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::getTaskStatus, TaskStsType.UPDATED_OUT.id))) {
                throw new CoolException("库存状态更新失败!!");
            }
        } else {
        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::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
                throw new CoolException("库存状态更新失败!!");
            }
        } else {
            if (!this.update(new LambdaUpdateWrapper<Task>()
                    .eq(Task::getId, task.getId())
                    .set(Task::getTaskStatus, TaskStsType.UPDATED_OUT.id))) {
                throw new CoolException("库存状态更新失败!!");
            }
        }
    }