cl
1 天以前 d8cbfdcac8292522dd3c39e5cafdf19a43d15a5d
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
@@ -94,6 +94,8 @@
    @Autowired
    private LocService locService;
    @Autowired
    private BasStationService basStationService;
    @Autowired
    private WaveOrderRelaServiceImpl waveOrderRelaService;
    @Autowired
    private TaskItemService taskItemService;
@@ -777,7 +779,7 @@
                        throw new CoolException("出库单据不存在!!");
                    }
                    boolean isStockRevise = locItem.getWkType() != null
                            && locItem.getWkType().equals(Short.parseShort(OrderWorkType.ORDER_WORK_TYPE_STOCK_REVISE.type));
                            && Objects.equals(locItem.getWkType(), OrderWorkType.ORDER_WORK_TYPE_STOCK_REVISE.type);
                    if (isStockRevise) {
                        log.info("库存调整产生的库存,自动创建WkOrderItem - 出库单ID:{},物料ID:{},批次:{}",
                                outId, locItem.getMatnrId(), locItem.getBatch());
@@ -878,7 +880,14 @@
                TaskType.TASK_TYPE_PICK_AGAIN_OUT.type);
        // 先查全部再按 site 去重,避免 GROUP BY 与 only_full_group_by 冲突
        List<DeviceSite> all = deviceSiteService.list(new LambdaQueryWrapper<DeviceSite>().in(DeviceSite::getType, list));
        Set<String> outAbleSites = basStationService.list(new LambdaQueryWrapper<BasStation>()
                        .eq(BasStation::getOutAble, 1))
                .stream()
                .map(BasStation::getStationName)
                .filter(StringUtils::isNotBlank)
                .collect(Collectors.toSet());
        List<DeviceSite> sites = all.stream()
                .filter(d -> outAbleSites.contains(d.getSite()))
                .collect(Collectors.toMap(DeviceSite::getSite, d -> d, (a, b) -> a))
                .values().stream()
                .collect(Collectors.toList());