skyouc
10 天以前 e98be9d02d12b0453c6267190b86fdbc11fee9fc
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -582,11 +582,9 @@
                    throw new CoolException("更新组托状态失败!!");
                }
            }
            Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getTaskType() < TaskStsType.UPDATED_IN.id ? task.getTargLoc() : task.getOrgLoc()));
            if (null != loc
                    && (loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)
                    || loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type))) {
            Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getTaskType() < TaskStsType.UPDATED_IN.id ? task.getTargLoc() : task.getOrgLoc()));
            if (null != loc && (loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type) || loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type))) {
                loc.setUseStatus(LocStsType.LOC_STS_TYPE_O.type);
                if (!locService.updateById(loc)) {
                    throw new CoolException("更新库位状态失败!!");
@@ -607,8 +605,7 @@
                ) {
                    basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                            .eq(BasStation::getStationName, task.getTargLoc())
                            .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type)
                    );
                            .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type));
                }
                if (null == basStation) {
                    throw new CoolException("站点状态错误!!");
@@ -618,6 +615,10 @@
                    throw new CoolException("更新站点状态失败!!");
                }
            }
            if (!taskItemService.remove(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()))) {
                throw new CoolException("任务明细删除失败!!");
            }
        }
        if (!this.removeByIds(Arrays.asList(ids))) {
            throw new CoolException("Delete Fail");