贴标申请,仓储转运
This commit is contained in:
@@ -20,7 +20,8 @@ public final class RelabelResponses {
|
||||
String fulfillmentStatus, String outboundOrderNo, LocalDateTime customerConfirmedAt,
|
||||
String reviewChannel, String reviewRemark, LocalDateTime createdAt,
|
||||
LocalDateTime reviewedAt, LocalDateTime relabelCompletedAt, LocalDateTime outboundAt,
|
||||
String productNameZh, String labelRequirement, List<String> operationTypes) {}
|
||||
String productNameZh, String labelRequirement, List<String> operationTypes,
|
||||
List<String> relatedBusinessOrderNos) {}
|
||||
public record Milestones(LocalDateTime reviewedAt, LocalDateTime relabelCompletedAt,
|
||||
LocalDateTime outboundAt) {}
|
||||
public record Item(Long id, String skuCode, String productImageFileId, String productImageFileName,
|
||||
|
||||
+16
-1
@@ -1228,7 +1228,22 @@ public class RelabelApplicationService implements WalletResultHandler {
|
||||
detailItems.stream().map(RelabelItem::getLabelRequirement).filter(StringUtils::hasText)
|
||||
.map(String::trim).distinct().collect(Collectors.joining(";")),
|
||||
detailItems.stream().map(RelabelItem::getOperationType).filter(StringUtils::hasText)
|
||||
.map(String::trim).distinct().toList());
|
||||
.map(String::trim).distinct().toList(), relatedBusinessOrderNos(value, order, detailItems));
|
||||
}
|
||||
|
||||
private List<String> relatedBusinessOrderNos(RelabelApplication application, LastlegOrder order,
|
||||
List<RelabelItem> detailItems) {
|
||||
if (order != null && Objects.equals(application.getCustomerId(), order.getCustomerId())
|
||||
&& !"RELABEL_APPLICATION".equals(order.getOrderType())) {
|
||||
String businessNo = StringUtils.hasText(order.getSourceOrderNo()) ? order.getSourceOrderNo() : order.getOrderNo();
|
||||
if (StringUtils.hasText(businessNo)) return List.of(businessNo.trim());
|
||||
}
|
||||
// Standalone relabel orders keep the actual inventory source on their item snapshots.
|
||||
// Their tail sourceOrderNo is a customer reference, not a business order number.
|
||||
return detailItems.stream().map(item -> StringUtils.hasText(item.getSourceInboundOrderNo())
|
||||
? item.getSourceInboundOrderNo()
|
||||
: "RETURN_BULK_SKU_LABEL".equals(item.getOperationType()) ? item.getShipmentNo() : null)
|
||||
.filter(StringUtils::hasText).map(String::trim).distinct().toList();
|
||||
}
|
||||
|
||||
@Override public boolean supports(String businessType) { return "RELABEL_ORDER".equals(businessType); }
|
||||
|
||||
Reference in New Issue
Block a user