提交
This commit is contained in:
+20
@@ -45,6 +45,26 @@ class FinanceExportProviderServiceTest {
|
||||
service.initializeSigningKey();
|
||||
}
|
||||
|
||||
@Test
|
||||
/** 应付结算列表和详情导出均使用中文状态,包括无明细的单据。 */
|
||||
void exportsSettlementStatusesInChinese() {
|
||||
for (var entry : Map.of("ISSUED", "已出账", "PARTIALLY_PAID", "部分结清", "PAID", "已结清", "VOIDED", "已作废").entrySet()) {
|
||||
var summary = new com.baiyue.finance.dto.FinanceSettlementDtos.SettlementSummary(
|
||||
701L, "AP-701", "PAYABLE", 10001L, "客户A", 301L, "供应商A", null, null,
|
||||
"2026-11", "操作费", "CNY", BigDecimal.TEN, BigDecimal.ZERO, BigDecimal.TEN,
|
||||
LocalDate.parse("2026-11-03"), null, "UNPAID", entry.getKey(), 7L, "财务员", null, null, null, 1);
|
||||
when(settlementService.listSettlements("PAYABLE", null)).thenReturn(List.of(summary));
|
||||
when(settlementService.getSettlement(701L)).thenReturn(new com.baiyue.finance.dto.FinanceSettlementDtos.SettlementDetail(
|
||||
summary, List.of(), List.of(), List.of()));
|
||||
var list = service.exportBatch(FinanceExportProviderService.PAYABLE_SETTLEMENT_LIST,
|
||||
request(Map.of("status", entry.getKey()), null, null));
|
||||
var detail = service.exportBatch(FinanceExportProviderService.PAYABLE_SETTLEMENT_DETAIL,
|
||||
request(Map.of("settlementId", "701"), null, null));
|
||||
assertThat(list.rows().get(0)).containsEntry("status", entry.getValue());
|
||||
assertThat(detail.rows().get(0)).containsEntry("status", entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void exportsStatementRowsUsingBusinessContainerNumberAndStableSnapshot() {
|
||||
Statement summary = new Statement(501L, 10001L, "REC-501", "客户A", LocalDate.parse("2026-08-31"),
|
||||
|
||||
Reference in New Issue
Block a user