| | |
| | | } |
| | | } |
| | | } |
| | | // 入/出库均仅云仓来源单据参与上报(明细需带 platOrderCode 或 platWorkCode) |
| | | boolean hasCloudSource = taskItems.stream().anyMatch(this::hasCloudOrderRef); |
| | | // 入库组托场景允许按 WaitPakinItem.asnCode 兜底识别云仓来源,避免 plat* 为空时误跳过 |
| | | boolean hasCloudSource = taskItems.stream().anyMatch(this::hasCloudOrderRef) |
| | | || (isInbound && !sourceToOrderNo.isEmpty()); |
| | | if (!hasCloudSource) { |
| | | log.info("入/出库结果上报待办跳过:无云仓来源单据,taskId={}", task.getId()); |
| | | return; |
| | |
| | | ObjectMapper om = new ObjectMapper(); |
| | | Date now = new Date(); |
| | | for (TaskItem item : taskItems) { |
| | | if (!hasCloudOrderRef(item)) { |
| | | if (item == null) { |
| | | continue; |
| | | } |
| | | boolean hasTaskItemCloudRef = hasCloudOrderRef(item); |
| | | boolean hasInboundAsnFallbackRef = isInbound |
| | | && item.getSource() != null |
| | | && StringUtils.isNotBlank(sourceToOrderNo.get(item.getSource())); |
| | | if (!hasTaskItemCloudRef && !hasInboundAsnFallbackRef) { |
| | | continue; |
| | | } |
| | | String orderNo = isInbound ? sourceToOrderNo.get(item.getSource()) : (item.getPlatOrderCode() != null ? item.getPlatOrderCode() : item.getPlatWorkCode()); |