新建应付配置的附加费开关配置

This commit is contained in:
liuminghui
2026-11-05 16:05:01 +08:00
parent 116b3b74e4
commit fde53681d1
15 changed files with 1002 additions and 21 deletions
@@ -91,14 +91,36 @@ class PayWorkbookParserTest
{
PayPreview preview = parse("32、");
PayProduct ups = product(preview, "德国UPS");
assertEquals("Zone 1", ups.getWeightBands().get(0).getZoneName());
assertEquals("DE", ups.getWeightBands().get(0).getCountryCode());
assertTrue(decimal(ups.getWeightBands().get(0), "3.9"));
assertEquals("Zone 2", ups.getWeightBands().get(1).getZoneName());
assertTrue(ups.getWeightBands().get(1).getCountryCode().startsWith("BE,LU"));
assertTrue(decimal(ups.getWeightBands().get(1), "7.58"));
assertTrue(ups.getWeightBands().get(4).getZoneName().contains("Zone 5"));
assertTrue(decimal(ups.getWeightBands().get(4), "9.45"));
String[] codes = {
"DE",
"BE", "LU", "NL", "AT", "SI",
"CZ", "PL", "SK",
"DK", "FI", "FR", "SE", "ES", "IT", "PT", "HU",
"GR", "IE", "BG", "HR", "EE", "LT", "LV", "RO"
};
String[] zones = {
"Zone 1",
"Zone 2", "Zone 2", "Zone 2", "Zone 2", "Zone 2",
"Zone 3", "Zone 3", "Zone 3",
"Zone 4", "Zone 4", "Zone 4", "Zone 4", "Zone 4", "Zone 4", "Zone 4", "Zone 4",
"Zone 5", "Zone 5", "Zone 5", "Zone 5", "Zone 5", "Zone 5", "Zone 5", "Zone 5"
};
String[] prices = {
"3.9",
"7.58", "7.58", "7.58", "7.58", "7.58",
"7.72", "7.72", "7.72",
"8.41", "8.41", "8.41", "8.41", "8.41", "8.41", "8.41", "8.41",
"9.45", "9.45", "9.45", "9.45", "9.45", "9.45", "9.45", "9.45"
};
assertEquals(codes.length, ups.getWeightBands().size());
for (int i = 0; i < codes.length; i++)
{
PayWeightBand band = ups.getWeightBands().get(i);
assertEquals(zones[i], band.getZoneName(), codes[i]);
assertEquals(codes[i], band.getCountryCode());
assertEquals(codes[i], band.getCountryName());
assertTrue(decimal(band, prices[i]), codes[i] + " " + prices[i]);
}
assertTrue(ups.getSurcharges().stream().anyMatch(fee -> "报价说明".equals(fee.getFeeName())
&& fee.getChargeText().contains("不含管理费") && fee.getChargeText().contains("不含燃油")));
PaySurcharge handling = ups.getSurcharges().stream()