Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
+11
-4
@@ -23,7 +23,13 @@ public final class ReturnOrderResponses {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public record ReceiptCarton(String receiptNo, String palletCode, String cartonMark, String countStatus,
|
public record ReceiptCarton(String receiptNo, String palletCode, String cartonMark, String countStatus,
|
||||||
LocalDateTime countedAt, List<ReceiptItem> items) { }
|
LocalDateTime countedAt, List<ReceiptItem> items,
|
||||||
|
BigDecimal length, BigDecimal width, BigDecimal height, BigDecimal weight) {
|
||||||
|
public ReceiptCarton(String receiptNo, String palletCode, String cartonMark, String countStatus,
|
||||||
|
LocalDateTime countedAt, List<ReceiptItem> items) {
|
||||||
|
this(receiptNo, palletCode, cartonMark, countStatus, countedAt, items, null, null, null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
public record PackingDetail(String sourceCartonMark, String targetCartonMark, String returnNo,
|
public record PackingDetail(String sourceCartonMark, String targetCartonMark, String returnNo,
|
||||||
String skuCode, long quantity, LocalDateTime createdAt) { }
|
String skuCode, long quantity, LocalDateTime createdAt) { }
|
||||||
public record Photo(long fileId, String fileName, String contentType, long sizeBytes) { }
|
public record Photo(long fileId, String fileName, String contentType, long sizeBytes) { }
|
||||||
@@ -40,18 +46,19 @@ public final class ReturnOrderResponses {
|
|||||||
public record Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
public record Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
||||||
long receivedQuantity, String operatorName, LocalDateTime signedAt,
|
long receivedQuantity, String operatorName, LocalDateTime signedAt,
|
||||||
String unitType, String unitCode, long boxCount, List<ReceiptItem> items,
|
String unitType, String unitCode, long boxCount, List<ReceiptItem> items,
|
||||||
String cartonMark, String printableHtml, List<CartonLabel> labels, boolean labelRepairRequired) {
|
String cartonMark, String printableHtml, List<CartonLabel> labels, boolean labelRepairRequired,
|
||||||
|
BigDecimal length, BigDecimal width, BigDecimal height, BigDecimal weight) {
|
||||||
public Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
public Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
||||||
long receivedQuantity, String operatorName, LocalDateTime signedAt,
|
long receivedQuantity, String operatorName, LocalDateTime signedAt,
|
||||||
String unitType, String unitCode, long boxCount, List<ReceiptItem> items,
|
String unitType, String unitCode, long boxCount, List<ReceiptItem> items,
|
||||||
String cartonMark, String printableHtml, List<CartonLabel> labels) {
|
String cartonMark, String printableHtml, List<CartonLabel> labels) {
|
||||||
this(receiptNo, receiptBatchNo, palletCode, trackingNo, startedBy, receivedQuantity, operatorName, signedAt,
|
this(receiptNo, receiptBatchNo, palletCode, trackingNo, startedBy, receivedQuantity, operatorName, signedAt,
|
||||||
unitType, unitCode, boxCount, items, cartonMark, printableHtml, labels, false);
|
unitType, unitCode, boxCount, items, cartonMark, printableHtml, labels, false, null, null, null, null);
|
||||||
}
|
}
|
||||||
public Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
public Receipt(String receiptNo, String receiptBatchNo, String palletCode, String trackingNo, String startedBy,
|
||||||
long receivedQuantity, String operatorName, LocalDateTime signedAt) {
|
long receivedQuantity, String operatorName, LocalDateTime signedAt) {
|
||||||
this(receiptNo, receiptBatchNo, palletCode, trackingNo, startedBy, receivedQuantity, operatorName, signedAt,
|
this(receiptNo, receiptBatchNo, palletCode, trackingNo, startedBy, receivedQuantity, operatorName, signedAt,
|
||||||
"PALLET", palletCode, 0, List.of(), null, null, List.of());
|
"PALLET", palletCode, 0, List.of(), null, null, List.of(), false, null, null, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public record CartonLabel(String cartonMark, String printableHtml) { }
|
public record CartonLabel(String cartonMark, String printableHtml) { }
|
||||||
|
|||||||
+4
-2
@@ -705,11 +705,13 @@ public class ReturnInventoryService {
|
|||||||
var task = read(snapshot.getResultJson(), new TypeReference<com.baiyue.lastleg.returnreceipt.dto.ReturnCartonCountDtos.Task>() { });
|
var task = read(snapshot.getResultJson(), new TypeReference<com.baiyue.lastleg.returnreceipt.dto.ReturnCartonCountDtos.Task>() { });
|
||||||
if (!receipt.getReceiptNo().equals(task.receiptNo())) throw new IllegalStateException("箱内清点快照与签收单不一致");
|
if (!receipt.getReceiptNo().equals(task.receiptNo())) throw new IllegalStateException("箱内清点快照与签收单不一致");
|
||||||
return task.boxes().stream().map(box -> new ReturnOrderResponses.ReceiptCarton(receipt.getReceiptNo(), receipt.getPalletCode(), box.cartonMark(), "CONFIRMED", snapshot.getCreatedAt(),
|
return task.boxes().stream().map(box -> new ReturnOrderResponses.ReceiptCarton(receipt.getReceiptNo(), receipt.getPalletCode(), box.cartonMark(), "CONFIRMED", snapshot.getCreatedAt(),
|
||||||
box.items().stream().map(line -> new ReturnOrderResponses.ReceiptItem(line.skuCode(), line.productNameZh(), line.quantity(), 1)).toList())).toList();
|
box.items().stream().map(line -> new ReturnOrderResponses.ReceiptItem(line.skuCode(), line.productNameZh(), line.quantity(), 1)).toList(),
|
||||||
|
box.length(), box.width(), box.height(), box.weight())).toList();
|
||||||
}
|
}
|
||||||
// Never present provisional averages or subsequently changed inventory as receipt facts.
|
// Never present provisional averages or subsequently changed inventory as receipt facts.
|
||||||
return cartons.listReceipt(receipt.getId()).stream().map(box -> new ReturnOrderResponses.ReceiptCarton(receipt.getReceiptNo(), receipt.getPalletCode(), box.getCartonMark(),
|
return cartons.listReceipt(receipt.getId()).stream().map(box -> new ReturnOrderResponses.ReceiptCarton(receipt.getReceiptNo(), receipt.getPalletCode(), box.getCartonMark(),
|
||||||
"PENDING".equals(box.getCountStatus()) ? "PENDING" : "UNRECORDED", box.getCountedAt(), List.of())).toList();
|
"PENDING".equals(box.getCountStatus()) ? "PENDING" : "UNRECORDED", box.getCountedAt(), List.of(),
|
||||||
|
box.getLength(), box.getWidth(), box.getHeight(), box.getWeight())).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
|
|||||||
+1
-1
@@ -286,7 +286,7 @@ public class ReturnReceiptService {
|
|||||||
String printableHtml = combineLabels(labels);
|
String printableHtml = combineLabels(labels);
|
||||||
return new ReturnOrderResponses.Receipt(receipt.getReceiptNo(), receipt.getReceiptBatchNo(), receipt.getPalletCode(), receipt.getTrackingNo(),
|
return new ReturnOrderResponses.Receipt(receipt.getReceiptNo(), receipt.getReceiptBatchNo(), receipt.getPalletCode(), receipt.getTrackingNo(),
|
||||||
receipt.getBoundBy(), value(receipt.getReceivedQuantity()), receipt.getOperatorName(), receipt.getSignedAt(), receipt.getUnitType(), receipt.getUnitCode(), boxes, lines, cartonMark, printableHtml, labels,
|
receipt.getBoundBy(), value(receipt.getReceivedQuantity()), receipt.getOperatorName(), receipt.getSignedAt(), receipt.getUnitType(), receipt.getUnitCode(), boxes, lines, cartonMark, printableHtml, labels,
|
||||||
inventory.receiptRepairRequired(receipt, boxes));
|
inventory.receiptRepairRequired(receipt, boxes), receipt.getLength(), receipt.getWidth(), receipt.getHeight(), receipt.getWeight());
|
||||||
}).toList();
|
}).toList();
|
||||||
Map<String, Map<String, ReturnOrderResponses.PalletItem>> palletItems = new LinkedHashMap<>();
|
Map<String, Map<String, ReturnOrderResponses.PalletItem>> palletItems = new LinkedHashMap<>();
|
||||||
Map<String, String> palletTypes = new LinkedHashMap<>();
|
Map<String, String> palletTypes = new LinkedHashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user