| | |
| | | } |
| | | } |
| | | } |
| | | // 出库仅云仓来源单据参与上报 |
| | | if (!isInbound) { |
| | | boolean hasCloudSource = taskItems.stream().anyMatch(this::hasCloudOrderRef); |
| | | if (!hasCloudSource) { |
| | | // log.info("入/出库结果上报待办跳过:无云仓来源单据,taskId={}", task.getId()); |
| | | log.info("入/出库结果上报待办跳过:手动创建出库单据不通知云仓,taskId={}", task.getId()); |
| | | return; |
| | | } |
| | | } |
| | | ObjectMapper om = new ObjectMapper(); |
| | | Date now = new Date(); |
| | | for (TaskItem item : taskItems) { |
| | | if (!isInbound && !hasCloudOrderRef(item)) { |
| | | continue; |
| | | } |
| | | String orderNo = isInbound ? sourceToOrderNo.get(item.getSource()) : (item.getPlatOrderCode() != null ? item.getPlatOrderCode() : item.getPlatWorkCode()); |
| | | if (orderNo == null && isInbound) { |
| | | orderNo = item.getPlatOrderCode() != null ? item.getPlatOrderCode() : item.getPlatWorkCode(); |
| | |
| | | log.warn("入/出库结果上报待办失败,taskId={},isInbound={}:{}", task.getId(), isInbound, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | private boolean hasCloudOrderRef(TaskItem item) { |
| | | if (item == null) { |
| | | return false; |
| | | } |
| | | return StringUtils.isNotBlank(item.getPlatOrderCode()) |
| | | || StringUtils.isNotBlank(item.getPlatWorkCode()); |
| | | } |
| | | } |