From c0ec8defeaf77f31a1b3031dc3f573bfd55b9320 Mon Sep 17 00:00:00 2001 From: yixian Date: Fri, 14 Sep 2018 15:08:43 +0800 Subject: [PATCH] ATO Report, --- .../payment/manage/analysis/beans/ato/AddressInfo.java | 7 +++++-- .../payment/manage/process/ato/ExportATOReport.java | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ato/AddressInfo.java b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ato/AddressInfo.java index a59de68b0..02ac63210 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ato/AddressInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/ato/AddressInfo.java @@ -13,15 +13,18 @@ public class AddressInfo { public AddressInfo(String address, String suburb, String state, String postCode, String country) { this.address = address; this.suburb = suburb; - this.state = state; if (!postCode.matches("^\\d{4}$")) { postCode = "9999"; country = "OTH"; + state = "OTH"; } - this.postCode = postCode; if (country != null && country.length() != 3) { country = "OTH"; + state = "OTH"; + postCode = "9999"; } + this.postCode = postCode; + this.state = state; this.country = country; } diff --git a/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java b/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java index eb195443f..0c17dd0c9 100644 --- a/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java +++ b/src/test/java/au/com/royalpay/payment/manage/process/ato/ExportATOReport.java @@ -28,7 +28,7 @@ public class ExportATOReport { @Test public void export() throws IOException { - String content = atoReportService.exportBTTPSFile(DateTime.parse("2017-07-01").toDate(), DateTime.parse("2017-07-31").toDate()); - FileUtils.write(new File("C:\\Users\\yixian\\Documents\\royalpay2017070120170731.bttps"), content, StandardCharsets.US_ASCII); + String content = atoReportService.exportBTTPSFile(DateTime.parse("2017-07-01").toDate(), DateTime.parse("2018-06-30").toDate()); + FileUtils.write(new File("C:\\Users\\yixian\\Documents\\royalpay2017070120180630.bttps"), content, StandardCharsets.US_ASCII); } }