ATO Report,

master
yixian 6 years ago
parent b72cba1a1d
commit c0ec8defea

@ -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;
}

@ -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);
}
}

Loading…
Cancel
Save