1
14 小时以前 0f3ba9d165742d5653f7dc4797223cee7b5856f4
rsf-server/src/main/java/com/vincent/rsf/server/manager/utils/LocManageUtil.java
@@ -201,7 +201,6 @@
                    locItems = LocManageUtil.getFirstInFirstOutItemList(item.getMatnrCode(), item.getBatch(), item.getAnfme());
                }
            }
            for (LocItem locItem : locItems) {
                Loc loc = locService.getById(locItem.getLocId());
                List<LocItem> itemList = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId()));
@@ -244,9 +243,18 @@
                                .apply("JSON_CONTAINS(container_type, {0}) = 1", containerType.getContainerType().toString())//容器类型
                                .eq(BasStationArea::getDeleted, 0));
//                                .apply("JSON_CONTAINS(station_alias, '\"{0}\"') = 1", null)//区域包含站点集
                        if (basStationAreas.isEmpty()){
                            throw new CoolException("未找到符合条件站点!!!请检查库区配置!!!");
                        }
                        List<String> targSiteAreaList = new ArrayList<>();
                        for (BasStationArea basStationArea : basStationAreas) {
                            targSiteAreaList.add(basStationArea.getStationAreaId());
                            if (basStationArea.getStationAlias().isEmpty()){
                                continue;
                            }
                            targSiteAreaList.add(basStationArea.getId().toString());
                        }
                        if (targSiteAreaList.isEmpty()){
                            throw new CoolException("未找到符合条件站点!!!请检查库区配置!!!");
                        }
                        int count = 0;
                        for (BasStationArea basStationArea : basStationAreas) {
@@ -266,6 +274,10 @@
//                                Set<String> stationSet = deviceSites.stream().map(DeviceSite::getSite).collect(Collectors.toSet());
                                //已使用站点
                                Set<String> stas = stations.stream().map(BasStation::getStationName).collect(Collectors.toSet());
                                if (stas.size() == maps.size()) {
                                    stations = new ArrayList<>();
                                    stas = stations.stream().map(BasStation::getStationName).collect(Collectors.toSet());
                                }
                                BasStationService basStationService = SpringUtils.getBean(BasStationService.class);
                                BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                                        .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
@@ -280,6 +292,10 @@
                                    if (!Objects.isNull(basStation)) {
                                        orderOutItemDto.setSiteNo(basStation.getStationName());
//                                        throw new CoolException("站點不存在!!");
                                    } else if (!stas.isEmpty()) {
                                        orderOutItemDto.setSiteNo(basStationArea.getStationAlias().get(0));
                                    } else {
                                        throw new CoolException("未找到符合条件站点!!!请检查库区或者路径配置!!!");
                                    }
                                } else {
                                    if (Objects.isNull(basStation)) {